使用batman-adv协议在Raspberry Pi上进行无线网状网络连接

Ric*_*ich 5 networking wireless adhoc raspberry-pi mesh-network

第一次海报,所以如果我做错了什么,我道歉!

所以我正在尝试使用Raspberry Pi设置无线网状网络,使用Edimax EW-7811Un WLAN适配器和batman-adv协议.

我尝试过以下基本设置指南:
http://www.open-mesh.org/projects/batman-adv/wiki/Quick-start-guide
http://mindofdes.blogspot.co.uk/2013/ 02 /覆盆子-PI-raspbian-无线and.html

不幸的是,当我到达需要从另一个节点ping一个节点时,我得到
'目标主机无法访问'.

运行'batctl o'命令显示'范围内没有蝙蝠侠节点',但是当运行'iwconfig'时,两个节点似乎都与我设置的网络相关联,当运行'iwlist wlan0 scan'时,网络我'设置在两个节点上显示为单元格.

我现在不知道如何继续.我已经阅读了一些关于linux wlan适配器驱动程序的临时支持问题的文章.我的适配器正在使用RTL8192CU驱动程序.这可能是问题的原因吗?

任何帮助将非常感激.如果您有任何需要,请告诉我.

Ps我看了下面的帖子,但遗憾的是没有帮助:
Raspberry Pi ad-hoc网络

编辑:/ etc/network/interfaces的内容:

两个当前设置节点都具有相同的内容:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Run Code Online (Sandbox Code Playgroud)

编辑:两个节点的/etc/wpa_supplicant/wpa_supplicant.conf的内容:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
Run Code Online (Sandbox Code Playgroud)

编辑:两个节点的ifconfig,iwconfig和路由:

节点1

ifconfig

wlan0    Link encap: Ethernet  HWaddr 80:1f:02:9b:bc:6c
         inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:0  errors:0  dropped:1  overruns:0  frame:0
         TX packets:0  errors:0  dropped:0  overruns:0  carrier:0
         collisions:0  txqueuelen:1000
         RX bytes:0  (0.0 B)  TX bytes: 0  (0.0 B)

iwconfig

wlan0    IEEE 802.11bg  ESSID:"pi-ad-hoc" Nickname:"<WIFI@REALTEK>"
         Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 02:11:87:A1:CD:FF
         Bit Rate:54 Mb/s   Sensitivity:0/0
         Retry:off    RTS thr:off    Fragment thr:off
         Encryption key:off
         Power Management:off
         Link Quality=2/100  Signal level=2/100  Noise level=0/100
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
         Tx excessive retries:0  Invalid misc:0  Missed beacon:0

route

Kernel IP routing table
Destination    Gateway        Genmask        Flags  Metric  Ref    Use  Iface
192.168.2.0    *              255.255.255.0  U      0       0        0  wlan0
Run Code Online (Sandbox Code Playgroud)

节点2

ifconfig

wlan0    Link encap:Ethernet  HWaddr 80:1f:02:da:2e:ee
         inet addr:192.168.2.3  Bcast:192.168.2.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:0  errors:0  dropped:0  overruns:0  frame:0
         TX packets:6  errors:0  dropped:0  overruns:0  carrier:0
         collisions:0  txqueuelen:1000
         RX bytes:0  (0.0 B)  TX bytes:0  (0.0 B)

iwconfig

wlan0    IEEE 802.11bg ESSID:"pi-ad-hoc"  Nickname:"<WIFI@REALTEK>"
         Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 02:11:87:2F:D6:FF
         Bit Rate:54 Mb/s   Sensitivity:0/0
         Retry:off  RTS thr:off  Fragment thr:off
         Encryption key:off
         Power Management:off
         Link Quality=2/100  Signal level=2/100  Noise level=0/100
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
         Tx excessive retries:0  Invalid misc:0  Missed beacon:0

route

Kernel IP routing table
Destination    Gateway        Genmask        Flags  Metric  Ref     Use   Iface
192.168.2.0    *              255.255.255.0  U      0       0         0   wlan0
Run Code Online (Sandbox Code Playgroud)

Rat*_*atz 6

我可以确认,这是最新的rtl8192cu驱动程序的问题.我使用版本的驱动程序用于edimax wlan适配器,蝙蝠侠工作(几乎)正常.但我发现,在某些情况下(负载很重),连接失败了.然后我升级到该驱动程序的最新版本(日期:2013年9月11日),但发现蝙蝠侠不再工作(与旧驱动程序的配置完全相同).症状与您在帖子中描述的完全一致.

编辑:我的帖子被删除,说我没有回答这个问题.我不同意这一点:这对原帖的回答.原帖中唯一的问题是:"我的适配器正在使用RTL8192CU驱动程序.这可能是问题的原因吗?"

再说一遍:我可以确认使用这个(最新的)驱动程序会导致问题.此驱动程序与蝙蝠侠不兼容.该问题与配置文件无关.尝试寻找更老的驱动程序或更好的 - 使用具有不同芯片组的wlan适配器.


tsw*_*ehn 1

我刚刚在 Raspbian 上使用两个 Raspberry 和相同的 Wifi 适配器 (Edimax EW-7811Un) 检查了您的配置。长话短说:我得到的结果和你一样。

我的发现如下

  1. 按照描述设置一个 Raspberry 进行临时连接并从 iPad 或笔记本连接...工作正常
  2. 在笔记本上创建一个临时连接并让一个 Raspberry 加入...工作正常
  3. 设置一个 Raspbery 作为接入点并从 iPad 或笔记本电脑连接...工作正常
  4. 然而,当在临时模式或接入点模式下设置两个树莓派时,它们将无法相互连接......不起作用!
  5. 正如您通过此来源所了解的那样,这些适配器(rtl8192cu)的可用模式尚不清楚。
  6. 其他来源可以使用类似的设置和其他 wifi 适配器(如所述)轻松创建临时连接。

适配器驱动程序似乎不允许这种连接。

请注意:使用这些适配器设置接入点需要特殊编译的 hostapd:阅读此处了解如何操作