Hello,
i try to set up a ad-hoc-mesh network with batman-adv.
There are three test-nodes with following configuration:
Nvidia Tegra 2 Dual Core ARM-Cortex A9 Processor with Linux 2.6.36.2 USB-Wifi Dongle with Ralink 5370 Chipset Ralink rt5370sta driver kernel module batman-adv 2012.1.0 (also tried with 2012.0.0)
I've set up the ad-hoc network with WPA-Encryption. This is working fine. I can access all nodes if i configure the ra0 (ralink wifi) interface with static ip addresses. I've done this for testing purpose only. Normally only the bat0 interface has an ip address.
After wireless connection is established I activate the batman-adv interface.
Example from first node: modprobe batman-adv batctl if add ra0 ifconfig bat0 up ifconfig bat0 192.168.50.1 netmask 255.255.255.0 ifconfig bat0 mtu 1472
After booting up all nodes "batctl o" returns: # batctl o [B.A.T.M.A.N. adv 2012.1.0, MainIF/MAC: ra0/80:1f:02:38:7a:bf (bat0)] Originator last-seen (#/255) Nexthop [outgoingIF]: Potential nexthops ... 00:0f:c9:22:00:17 0.020s (248) 00:0f:c9:22:00:17 [ ra0]: 00:0f:c9:22:11:78 (245) 00:0f:c9:22:00:17 (248) 00:0f:c9:22:11:78 0.560s (255) 00:0f:c9:22:11:78 [ ra0]: 00:0f:c9:22:00:17 (230) 00:0f:c9:22:11:78 (255)
So far everything looks fine. But if i try to connect to the other nodes i mostly get no answers. No ping reply, no ssh or http connection. But sometimes it works for a couple of minutes. I also tried to ping with batctl but got unstable results: first time everything looks good:
# batctl ping 00:0f:c9:22:00:17 PING 00:0f:c9:22:00:17 (00:0f:c9:22:00:17) 20(48) bytes of data 20 bytes from 00:0f:c9:22:00:17 icmp_seq=1 ttl=50 time=6.37 ms 20 bytes from 00:0f:c9:22:00:17 icmp_seq=2 ttl=50 time=13.22 ms 20 bytes from 00:0f:c9:22:00:17 icmp_seq=3 ttl=50 time=9.08 ms ^C--- 00:0f:c9:22:00:17 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss rtt min/avg/max/mdev = 6.373/9.560/13.225/2.818 ms
another try a few moments later did not work: # batctl ping 00:0f:c9:22:00:17 PING 00:0f:c9:22:00:17 (00:0f:c9:22:00:17) 20(48) bytes of data Reply from host 00:0f:c9:22:00:17 timed out Reply from host 00:0f:c9:22:00:17 timed out Reply from host 00:0f:c9:22:00:17 timed out Reply from host 00:0f:c9:22:00:17 timed out ^C--- 00:0f:c9:22:00:17 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss rtt min/avg/max/mdev = 0.000/0.000/0.000/0.000 ms
i tried many different things (changing MTU, Wifi channel, encryption SSID, batman-adv version,...) but the result was the same everytime.
Some further information: # iwconfig lo no wireless extensions. dummy0 no wireless extensions. usb0 no wireless extensions. eth0 no wireless extensions. ra0 Ralink STA ESSID:"ceR{)|n$v#pp|fJX" Nickname:"RT2870STA" Mode:Ad-Hoc Frequency=2.442 GHz Cell: DE:BB:8C:08:B8:EC Bit Rate=36 Mb/s RTS thr:off Fragment thr:off Encryption key:D83E-521A-8B9F-7C95-3ACE-D477-****-**** Security mode:open Link Quality=52/100 Signal level:-71 dBm Noise level:-71 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 bat0 no wireless extensions.
#ifconfig ra0 ra0 Link encap:Ethernet HWaddr 80:1F:02:38:7A:BF UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:11 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:258771 (252.7 KiB) TX bytes:13544 (13.2 KiB)
#ifconfig bat0 bat0 Link encap:Ethernet HWaddr 02:DA:94:22:E1:67 inet addr:192.168.50.60 Bcast:192.168.50.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1472 Metric:1 RX packets:5 errors:0 dropped:0 overruns:0 frame:0 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:434 (434.0 B) TX bytes:686 (686.0 B)
Do you have any ideas what I can try to solve my problem or where to search for a solution?
Thanks for any response.
Greetings,
Hi,
I've set up the ad-hoc network with WPA-Encryption. This is working fine. I can access all nodes if i configure the ra0 (ralink wifi) interface with static ip addresses. I've done this for testing purpose only. Normally only the bat0 interface has an ip address.
[..]
# iwconfig lo no wireless extensions. dummy0 no wireless extensions. usb0 no wireless extensions. eth0 no wireless extensions. ra0 Ralink STA ESSID:"ceR{)|n$v#pp|fJX" Nickname:"RT2870STA" Mode:Ad-Hoc Frequency=2.442 GHz Cell: DE:BB:8C:08:B8:EC Bit Rate=36 Mb/s RTS thr:off Fragment thr:off Encryption key:D83E-521A-8B9F-7C95-3ACE-D477-****-****
the ralink driver misses one very important feature to reliably run a larger adhoc mode cell: Assigning a manually chosen BSSID. Therefore, it would not suprise me if you experienced "cell splits" from time to time. To verify this theory you can watch the BSSID (Cell) field on the involved nodes and run a continuous ping on your statically configured setup. If I am correct you also will experience packet loss and the BSSID will change.
Regards, Marek
Hello Jochen -
welcome to driver & firmware hell. This is very likely a problem related to stability issues with your WiFi interfaces. I would expect this behavior since you are using USB WiFi dongles. All USB WiFi devices depend on firmware, which is loaded when you initialize the devices. Ad-hoc mode has been neglected far and wide by the industry. Since you have to load a proprietary binary blob, which is more likely broken in ad-hoc mode rather than not, I am afraid you are out of luck. I'd love to get a USB WiFi solution in my hands that actually works in a reliable and stable manner. Unfortunately I know of none.
If anybody has something that actually works, I'd love to know.
Cheers, Elektra
TP-Link TL-WN321G ( RT73/RT2xx) works well in adhoc mode with Openwrt & Linux driver since 3 years. We do use them for mulit-radio tests on VM and native Openwrt x86 enviroment. Working on SLITAZ & Debian *nix versions too Cell-split wasnt observed, but til today there was no vwif driver found,i.e. no adhoc + AP possible regards 3zl .
2012/5/14 Elektra onelektra@gmx.net:
Hello Jochen -
welcome to driver & firmware hell. This is very likely a problem related to stability issues with your WiFi interfaces. I would expect this behavior since you are using USB WiFi dongles. All USB WiFi devices depend on firmware, which is loaded when you initialize the devices. Ad-hoc mode has been neglected far and wide by the industry. Since you have to load a proprietary binary blob, which is more likely broken in ad-hoc mode rather than not, I am afraid you are out of luck. I'd love to get a USB WiFi solution in my hands that actually works in a reliable and stable manner. Unfortunately I know of none.
If anybody has something that actually works, I'd love to know.
Cheers, Elektra
Hello 3zl,
which driver/version do you use? Do you have the RT2870STA.dat in /etc/Wireless/RT2870STA? Can you show me your settings? Maybe i missed some important settings.
Another strange thing is, that the OGMs come in all the time. Also if i can't connect to the node. The Originator Table looks fine all the day. The last-seen value is between 0 and 2 seconds for every node.
here's the data of my Openwrt at the VM i have at hand :
Openwrt ATTITUDE ADJUSTMENT (bleeding edge, r31151)
# uname -a Linux e64f14 2.6.39.4 #2 Fri Mar 30 18:44:22 BST 2012 i686 GNU/Linux #
# lsmod | grep rt73 rt73usb 20320 0 rt2x00usb 6012 1 rt73usb rt2x00lib 25052 2 rt73usb,rt2x00usb usbcore 85712 6 uhci_hcd,ohci_hcd,ehci_hcd,rt73usb,rt2x00usb crc_itu_t 892 1 rt73usb # /lib/firmware/rt73.bin # # cat /etc/config/wireless
config wifi-device 'phy0' option phy 'phy0' option type 'mac80211' option channel '1'
config wifi-iface option device 'phy0' option mode 'adhoc' option ssid 'BRUCE-MESH' option bssid '02:AF:FE:00:11:22'
cat /etc/config/network
config interface 'lan' option ifname 'bat0' option type 'bridge' option proto 'dhcp'
# #iwconfig
wlan0 IEEE 802.11bg ESSID:"BRUCE-MESH" Mode:Ad-Hoc Frequency:2.412 GHz Cell: 02:AF:FE:00:11:22 Tx-Power=20 dBm RTS thr:off Fragment thr:off Encryption key:off Power Management:on
#ifconfig wlan0 mtu 1528
################################## for the Linux Slitaz setup i have to dig for it
for thorough test i would propose to run check-spripts + iperf on non-encryptet channels
regards 3zl
b.a.t.m.a.n@lists.open-mesh.org