Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 0 down vote accepted

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.

share|improve this answer

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.

share|improve this answer
    
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. –  user166571 Mar 23 '13 at 13:30
    
In addition to stackoverflow, I would be happy to give the bounty on askubuntu.com/questions/256846/… if I could get a remedy for my problem. Most of all, I would appreciate a lot for the help. –  user166571 Mar 23 '13 at 13:32
    
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 Mar 23 '13 at 15:32

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

share|improve this answer
4  
Could you please elaborate on why this will solve the asker's issue? –  oKtosiTe Mar 26 '13 at 10:37
2  
this answer does not make sense at all and do not reply what is asked for –  angs Jun 28 '13 at 11:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.