We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

AdHoc/Mesh Networking



  • I'm experimenting with B.A.T.M.A.N. on the Onion Omega, trying to get a mesh network set up. Has anyone else tried this?

    batman is based on adhoc networking, but I haven't been able to get the adhoc networking to work between my two Onions either.

    Has anyone else been able to get adhoc networking to work on their onion?



  • @Austin-Hendrix I haven't played with BATMAN, but from their website it looks very cool. I will play around with it sometimes and report back if I can get it to work šŸ™‚



  • As far as I can tell, the trouble I'm having is actually with the adhoc networking; I can't even get my two Omegas talking to each other with an adhoc network and statically assigned IP addresses.



  • @Austin-Hendrix What have you tried to test out adhoc networking? I know that WIfi direct is supported by AR9331, but we haven't done too much with it yet.



  • /etc/config/wireless on Onion 1:

    config wifi-device 'radio0'
            option type 'mac80211'
            option hwmode '11g'
            option path 'platform/ar933x_wmac'
            option htmode 'HT20'
            option disabled '0'
            option channel '6'
            option txpower '30'
            option country 'US'
    
    config wifi-iface
            option device 'radio0'
            option ifname 'wlan0'
            option mode 'sta'
            option network 'wwan'
            option ssid 'NotMySSID'
            option encryption 'psk2'
            option key 'notmypassword'
    
    config wifi-iface 'wmesh'
            option device 'radio0'
            option ifname 'wlan1'
            option network 'wlan1'
            option mode 'adhoc'
            option ssid 'Onion-Adhoc'
            option 'mcast_rate' '18000'
            option bssid '42:a3:6b:c1:22:f0'
    

    /etc/config/network on Onion 1:

    config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
    
    config interface 'wwan'
        option proto 'dhcp'
        option hostname 'OnionOmega'
    
    config interface 'wlan1'
        option proto 'static'
        option ipaddr '10.0.0.2'
        option netmask '255.255.255.0'
    

    ifconfig wlan1 on Onion 1:

    root@Omega-22EF:/# ifconfig wlan1
    wlan1     Link encap:Ethernet  HWaddr 42:A3:6B:C1:22:F0  
              inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0
              inet6 addr: fe80::40a3:6bff:fec1:22f0%4566072/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:864 (864.0 B)
    

    /etc/config/wireless on Onion 2:

    config wifi-device 'radio0'
            option type 'mac80211'
            option hwmode '11g'
            option path 'platform/ar933x_wmac'
            option htmode 'HT20'
            option disabled '0'
            option channel '6'
            option txpower '30'
            option country 'US'
    
    config wifi-iface
            option device 'radio0'
            option mode 'sta'
            option network 'wwan'
            option ssid 'NotMySSID'
            option encryption 'psk2'
            option key 'notmypassword'
    
    config wifi-iface 'wmesh'
            option device 'radio0'
            option ifname 'wlan1'
            option network 'wlan1'
            option mode 'adhoc'
            option ssid 'Onion-Adhoc'
            option 'mcast_rate' '18000'
            option bssid '42:A3:6B:C1:22:F8'
    

    /etc/config/network on Onion 2:

    config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
    
    config interface 'wwan'
        option proto 'dhcp'
        option hostname 'OnionOmega'
    
    config interface 'wlan'
        option proto 'static'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'
    
    config interface 'wlan1'
        option proto 'static'
        option ipaddr '10.0.0.3'
        option netmask '255.255.255.0'
    

    ifconfig wlan1 on Onion 2:

    root@Omega-22F7:/# ifconfig wlan1
    wlan1     Link encap:Ethernet  HWaddr 42:A3:6B:C1:22:F8  
              inet addr:10.0.0.3  Bcast:10.0.0.255  Mask:255.255.255.0
              inet6 addr: fe80::40a3:6bff:fec1:22f8%4566072/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:864 (864.0 B)
    

    I can't ping 10.0.0.3 from Onion 1, and I can't ping 10.0.0.2 from Onion 2.



  • Adhoc mode works if I don't use the BSSID setting on both Onions, and if I disable the Infrastructure connection to my home network.



  • @Austin-Hendrix Hmmm, I think the adhoc mode on the Omega only supports infrastructure connection to your home network through Ethernet connection. With a single Wifi interface, it might not be able to sustain a connection to your router via wifi while doing all the adhoc stuff as well...



  • Has there been any progress with this subject? I'm very interested.



  • @Janus-Sanders We haven't had too much time to work with adhoc networking on the Omega yet. However, if you want to take a look at how to configure the Omega to use adhoc, you can take a look at https://wiki.openwrt.org/doc/uci/wireless. @Austin-Hendrix seems to have hit a roadblock where the adhoc mode won't work if he uses the BSSID settings or enable the infrastructure connection to his home network. It's an issue that we still need to look into.



  • I'm still playing with the meshing myself, and the setup can take a while.

    This describes some of how to setup batman on openwrt: http://www.open-mesh.org/projects/batman-adv/wiki/Batman-adv-openwrt-config

    Start by building a new OS image for the Omega with support for Batman and avahi. Once I had the Omega image building, I had to do so something like ./scripts/feeds install batman-adv ; and similar for avahi; I forget the exact package name. You should be able to find the package names you need by sifting through the feeds directory. You'll also need to run make menuconfig to enable batman-adv and avahi in the build.

    If you don't understand the build process or aren't comfortable flashing a new OS image onto your Omega, you probably shouldn't try.

    Keep your USB cable handy; I'm using the USB-serial console for all of my development and debugging, because I have to disable the connection to other wireless networks.

    I'm using the following network and wifi configs:

    /etc/config/wireless

    config wifi-device 'radio0'
            option type 'mac80211'
            option hwmode '11g'
            option path 'platform/ar933x_wmac'
            option htmode 'HT20'
            option disabled '0'
            option channel '6'
            option txpower '30'
            option country 'US'
    
    config wifi-iface 'wmesh'
            option device 'radio0'
            option ifname 'wlan1'
            option network 'wlan1'
            option mode 'adhoc'
            option ssid 'Onion-Mesh'
            option 'mcast_rate' '18000'
    

    and
    /etc/config/network

    config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
    
    config interface 'wlan1'
        option mtu '1532'
        option proto 'batadv'
        option mesh 'bat0'
    

    and the default batman-adv config.

    There's still some manual startup to do to get the mesh up, once the AdHoc connection is established:

    $ ip link set bat0 up
    $ avahi-autoipd bat0 &
    


  • @Austin-Hendrix Sorry for the late reply. I had to do quite a lot of research in order to build batman-adv and reflash the Onion.

    Question: Did you install batman-adv for Onion 15.05 (kernel 3.18.23) or an earlier kernel. I'm getting dependancy errors in opkg. It looks as though my compiled version of batman (kmod-batman-adv) only works with kernel 3.18.20?

    What version of the kernel are you running batman-adv?



  • Did you manage to sort out the dependency issues?

    I was debating whether to give this a go myself, or try Babel and Shncpd - the whole IPv6 part of that is the only reason I am not rushing into it.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.