networking - Raspberry Pi 上使用 batman-adv 协议(protocol)的无线网状网络

标签 networking raspberry-pi wireless adhoc mesh-network

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

我尝试遵循以下基本设置指南:

  • http://www.open-mesh.org/projects/batman-adv/wiki/Quick-start-guide
  • http://mindofdes.blogspot.co.uk/2013/02/raspberry-pi-raspbian-wireless-and.html

  • 不幸的是,当我需要从另一个节点 ping 一个节点时,我得到了

    Destination Host Unreachable.



    运行 batctl o命令显示

    'no batman nodes in range'



    但是,当运行 iwconfig ,两个节点似乎都与我设置的网络相关联,并且在运行 iwlist wlan0 scan 时,我设置的网络在两个节点上都显示为单元格。

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

    附言我看过the following post ,但不幸的是,这没有帮助。

    编辑:/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
    

    编辑:/etc/wpa_supplicant/wpa_supplicant.conf 的内容对于两个节点:
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    

    编辑: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
    

    节点 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
    

    最佳答案

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

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

    再次:我可以确认使用此(最新)驱动程序会导致问题。此驱动程序与 bat 侠不兼容。该问题与配置文件无关。尝试寻找较旧的驱动程序或 - 更好 - 使用具有不同芯片组的 wlan 适配器。

    关于networking - Raspberry Pi 上使用 batman-adv 协议(protocol)的无线网状网络,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23437690/

    相关文章:

    Java 游戏网络与 Kryonet : Bare-bones packet transfering

    docker - 在Docker容器中运行uv4l-未注册设备节点

    python - 如何在 Kivy 中将标签位置设置为边框?

    python - 我怎样才能找到周围的 scapy 无线网络?

    linux - Backtrack 4 无线不工作

    networking - 如何沿时间轴组织 i-graph 有向网络?

    iphone - 使用 MobileSubstrate 修改 iPhoneOS 上的所有 HTTP 请求?

    python - 使用 Python 访问网站

    linux - Python 更新 Linux (Raspberry Pi)

    networking - 有探测响应时为什么需要 Beacon