bmx-routing / bmx7

BMX7 / SEMTOR Securely Entrusted Mesh Routing Protocol
GNU General Public License v2.0
63 stars 15 forks source link

bmx7 not detecting certain wireless interfaces #13

Closed axn closed 6 years ago

axn commented 6 years ago

Problem: https://github.com/libremesh/lime-packages/issues/335 Possible solution: https://github.com/freifunk-gluon/gluon/commit/4ce85afc22a2c64e5ac5ea1b52ad93f323e384d4

axn commented 6 years ago

@aparcar : Could you dump 'bmx7 -cpd8', /etc/config/wireless, and /etc/config/network from an openwrt device where it does not work?

aparcar commented 6 years ago

I used the patch of @dangowrt and it seems to work perfectly fine on a ubnt nano beam m5

root@rdntz-wurze2-6:~# bmx7 -cpd8
PARAMETERS:
 plugin                 bmx7_config.so       (0) 
 plugin                 bmx7_json.so         (0) 
 plugin                 bmx7_iwinfo.so       (0) 
 plugin                 bmx7_sms.so          (0) 
 plugin                 bmx7_tun.so          (0) 
 ipVersion              6                    (6) 
 syslog                 0                    (1) 
 dbgMuteTimeout         1000000              (100000) 
 dev                    br-lan               (0) 
 dev                    wlan0-mesh_13        (0) 
 dev                    eth0.2               (0) 
 configSync             0                    (1) 
 tunOutTimeout          100000               (60000) 
 tunDev                 main                 (0) 
    /tun4Address        10.13.81.68/24       (0) 
    /tun6Address        2012:0:0:44::/48     (0) 
 tunIn                  myIP4                (0) 
    /network            10.13.81.68/32       (0) 
 tunIn                  myIP6                (0) 
    /network            2012:0:0:44::/128    (0) 
 tunOut                 nodes                (0) 
    /network            172.16.0.0/12        (0) 
 tunOut                 clouds               (0) 
    /network            10.0.0.0/8           (0) 
 tunOut                 inet4                (0) 
    /network            0.0.0.0/0            (0) 
    /maxPrefixLen       0                    (128) 
 tunOut                 inet6                (0) 
    /network            ::/0                 (0) 
    /maxPrefixLen       0                    (128) 
 tunOut                 publicv6             (0) 
    /network            2000::/3             (0) 
    /maxPrefixLen       64                   (128) 
STATUS:
shortId  name           nodeKey cv revision primaryIp                               tun6Address      tun4Address    uptime     cpu txQ  nbs rts nodes 
804B1FFF rdntz-wurze2-6 RSA2048 21 210f1e3  fd70:804b:1fff:3c08:74cf:3117:7f83:1af3 2012:0:0:44::/48 10.13.81.68/24 0:03:15:09 0.6 0/50 1   1   2/2   
INTERFACES:
dev           state linkKey    linkKeys          type     channel rateMax idx localIp                      rts helloSqn rxBpP   txBpP   
br-lan        UP    DH2048M112 RSA896,DH2048M112 ethernet 0       1000M   1   fe80::822a:a8ff:fea7:5144/64 0   49100    0/0.0   89/1.3  
eth0.2        UP    DH2048M112 RSA896,DH2048M112 ethernet 0       1000M   2   fe80::822a:a8ff:fea7:5144/64 0   48093    0/0.0   89/1.3  
wlan0-mesh_13 UP    DH2048M112 RSA896,DH2048M112 wireless 165     56000K  3   fe80::822a:a8ff:fea6:5144/64 1   22895    124/1.2 151/1.4 
LINKS:
shortId  name                    linkKey    linkKeys          nbLocalIp                 dev           rts rq  tq txRate wTxRate wTxRateEff wTxThr wTxThrEff mcs sgi chw wSnr 
32C34C2A rdntz-ostpassagetheater DH2048M112 RSA896,DH2048M112 fe80::f29f:c2ff:fee2:896d wlan0-mesh_13 1   100 97 57704K 144M    57704K     48000K 33567K    15  1   20  38  
ORIGINATORS:
shortId  name                    as S s T t descSqn lastDesc descSize cv revision primaryIp                               dev           nbShortId nbName                  metric hops ogmSqn lastRef 
32C34C2A rdntz-ostpassagetheater nA A A A A 117     392      733+794  21 210f1e3  fd70:32c3:4c2a:4ef4:e166:de6a:f81d:ad46 wlan0-mesh_13 32C34C2A  rdntz-ostpassagetheater 57698K 1    178    0       
804B1FFF rdntz-wurze2-6          nQ A A A A 116     2292     761+801  21 210f1e3  fd70:804b:1fff:3c08:74cf:3117:7f83:1af3 ---           ---       ---                     257G   0    348    3       
TUNNELS:
tunOut   id       gwName net           min max hyst rating minBw tunName  tunRoute         remoteId remoteName              advNet            advBw pathMtc tunMtc 
inet4    00000000 ---    0.0.0.0/0     0   0   20   100    960   ---      ---              ---      ---                     ---               ---   ---     ---    
inet6    00000000 ---    ::/0          0   0   20   100    960   ---      ---              ---      ---                     ---               ---   ---     ---    
nodes    00000000 ---    172.16.0.0/12 12  128 20   100    960   ---      ---              ---      ---                     ---               ---   ---     ---    
clouds   00000000 ---    10.0.0.0/8    8   128 20   100    960   X7C4main 10.13.137.109/32 32C34C2A rdntz-ostpassagetheater 10.13.137.109/32  960   57698K  69238K 
clouds   00000000 ---    10.0.0.0/8    8   128 20   100    960   X7C4main 10.13.137.0/24   32C34C2A rdntz-ostpassagetheater 10.13.137.0/24    257G  57698K  69238K 
publicv6 00000000 ---    2000::/3      3   64  20   100    960   X7C6main 2012::/48        32C34C2A rdntz-ostpassagetheater 2012::/48         257G  57698K  69238K 
---      ---      ---    ---           0   0   0    0      ---   ---      ---              32C34C2A rdntz-ostpassagetheater 2012:0:0:6d::/128 960   57698K  ---    
root@rdntz-wurze2-6:~# cat  /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 globals 'globals'

config interface 'lan'
    option type 'bridge'
    option proto 'static'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option ip6addr '2012:0:0:44::/48'
    option ipaddr '10.13.81.68'
    option mtu '1500'
    list ifname 'eth0.1'

config interface 'wan'
    option ifname 'eth0.2'
    option proto 'dhcp'

config interface 'wan6'
    option ifname 'eth0.2'
    option proto 'none'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '5 0t'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '1 0t'

config interface 'lm_net_wlan0_mesh'
    option proto 'none'
    option mtu '1536'
    option auto '1'

config device 'lm_net_wlan0_mesh_bmx7_dev'
    option type '8021ad'
    option name 'wlan0-mesh_13'
    option ifname '@lm_net_wlan0_mesh'
    option vid '13'
    option mtu '1500'

config interface 'lm_net_wlan0_mesh_bmx7_if'
    option auto '1'
    option ifname 'wlan0-mesh_13'
    option proto 'static'
    option ipaddr '169.254.81.68'
    option netmask '255.255.255.255'

config interface 'lm_net_eth0_2'
    option proto 'none'
    option auto '1'
    option ifname 'eth0.2'
    option mtu '1500'
root@rdntz-wurze2-6:~# cat  /etc/config/wireless 

config wifi-device 'radio0'
    option type 'mac80211'
    option hwmode '11a'
    option path 'platform/ar934x_wmac'
    option htmode 'HT20'
    option disabled '0'
    option distance '100'
    option noscan '1'
    option channel '165'

config wifi-iface 'lm_wlan0_mesh_radio0'
    option mode 'mesh'
    option device 'radio0'
    option ifname 'wlan0-mesh'
    option network 'lm_net_wlan0_mesh'
    option distance '100'
    option mesh_fwding '0'
    option mesh_id 'LiMe'