While using ad-hoc networking, how to I force nodes to use the same cell IDs (bssid)?

2

1

I have Debian/Ubuntu hosts that I connect via an ad-hoc network with the following settings:

board:~# cat /etc/network/interfaces
auto wlan0
iface wlan0 inet static
        address 10.0.0.2
        netmask 255.255.255.0
        wpa-driver nl80211
        wpa-conf /etc/wpa_supplicant.conf

board:~# cat /etc/wpa_supplicant.conf
# IBSS/ad-hoc network with WPA-None/TKIP.
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
        ssid="adhoc_test"
        mode=1
        frequency=2412
        proto=WPA
        key_mgmt=WPA-NONE
        pairwise=NONE
        group=TKIP
        psk="abcdefgh"
        bssid=F8:D1:11:52:0C:4E
}

These configurations create an ad-hoc WLAN; however, the nodes often get different cell IDs so that they cannot communicate with each other. To prevent it I added a bssid=F8:D1:11:52:0C:4E line; however, nodes don't get the predefined cell ID when they get the cell ID.

My question is how can I prevent nodes from getting different cell IDs? Why does the bssid line not work in the ad-hoc mode?

P.S. I tried these settings on Ubuntu and Debian distributions that have 3.2 and 3.4 kernels. Wpa_supplicant versions that I used were 0.7, 1.0, and 2.0. None work. For the chipset, I am using Atheros AR9271 chipset for the Wi-Fi module.

user166571

Posted 2013-02-16T09:54:05.707

Reputation:

Answers

0

The command and settings are correct. However, prior to wpa_supplicant 2.0 do not allow you to predefine the BSSID. Therefore, you need to update the wpa_supplicant to the version 2.0, then the problem will be solved.

Btw, if you do not define the BSSID in advance, each node will get BSSID as its own MAC address. Then the WLANs should be merged as they detect their broadcasts. If they are not merging then check if they are on the same channel, or misspelling on the SSID.

Angs

Posted 2013-02-16T09:54:05.707

Reputation: 900

1

I'm trying to connect some Raspberry Pi via ad-hoc mesh network. And encountered same problem, different cell, or known as "Cell Splitting".

After days of search, I found this great post:

http://tiebing.blogspot.com/2009/12/ad-hoc-cell-splitting-re-post-original.html

So I solved this problem and here is my script:

    $IFC "$IFACE" down
    $IWC "$IFACE" mode managed
    $IWC "$IFACE" power off
    $IWC "$IFACE" mode ad-hoc channel 10 rts 250 frag 256
    $IWC "$IFACE" essid whateveryouwant
    $IWC "$IFACE" key off
    $IWC "$IFACE" ap 11:22:33:44:55:66
    $IFC "$IFACE" up
    $IFC "$IFACE" 10.10.10.10/24 up

The command "sudo iwconfig ath0 ap 11:22:33:44:55:66" forces my ralink5370 into specified cell-id.

Hope this helps.

user209528

Posted 2013-02-16T09:54:05.707

Reputation: 11

Thank you for your reply. I saw your post on stackoverflow as well. I am looking for a solution for wpa_supplicant. The reason is that iwconfig or iw tool provides WEP encryption. My config above has also WEP encryption settings but I will use RSN patch to have WPA2 however iwconfig can only provide WEP as I know. I use bssid on wpa_Supplicant to force device to get the defined cell ID but it does not, I test it on several different embedded boards and desktops, but I experienced the same problem each time. I would appreciate if you know any solution for the wpa_supplicant. – None – 2013-03-23T13:30:34.433

In addition to stackoverflow, I would be happy to give the bounty on http://askubuntu.com/questions/256846/predefined-cell-id-assignment-for-an-ad-hoc-wlan if I could get a remedy for my problem. Most of all, I would appreciate a lot for the help.

– None – 2013-03-23T13:32:53.647

Sorry, I tried WPA + Ad-hoc using configuration like yours. But with no luck, all I got is an OPEN(no WEP/no WPA). Are you sure the WPA+Ad-hoc is feasible? – user209528 – 2013-03-23T15:32:27.993

1

Use ap_scan=2 and remove the bssid= line from the configuration.

mumair

Posted 2013-02-16T09:54:05.707

Reputation: 438

4Could you please elaborate on why this will solve the asker's issue? – oKtosiTe – 2013-03-26T10:37:49.730

2this answer does not make sense at all and do not reply what is asked for – Angs – 2013-06-28T11:12:40.237