New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6lbr doesn't work on a new Raspbian #237
Comments
through experimentation found the problem, but I am unable to solve it: |
following this link #163 and this https://github.com/cetic/6lbr/wiki/6LBR-Interface-Configuration I am trying to setup "the routed interface mode" root@raspberrypi:~# cat /etc/6lbr/6lbr.conf MODE=ROUTER RAW_ETH=0 DEV_RADIO=/dev/ttyACM0 NODE_CONFIG=/etc/6lbr/node_config.conf LOG_LEVEL=3 #INFO and above only and I added: but still no luck (don't see 6lbr webpage [bbbb::100] |
Well, I just made a set up with a pi and rasbian. If it is not working, here is my conf Interestingly, my ethernet connection is not named eth0 but enxb827eb15ec3a This file describes the network interfaces available on your systemand how to activate them. For more information, see interfaces(5).The loopback network interfaceauto lo The primary network interfaceauto enxb827eb15ec3a Example to keep MAC address between reboots#hwaddress ether DE:AD:BE:EF:CA:FE The secondary network interface#auto eth1 auto br0 WiFi Exampleauto wlan0 wpa-ssid "essid"wpa-psk "password"make a sudo service network-manager stop & sudo service network-manager start and then, configure the 6lbr router in /etc/6lbr/6lbr.conf MODE=ROUTER RAW_ETH=0 DEV_RADIO=/dev/ttyACM0 #Enable this line if radio device is not detected LOG_LEVEL=3 #INFO and above only YOU HAVE TO SET DEV_RADIO=/dev/ttyACM0 accordingly to your slip device listed in ls /dev DO NOT FORGET TO START THE 6LBR PROCESS AT EACH STARTUP |
@florian-popup , |
@janeksz In the /etc/network/interfaces, I used When you modify /etc/network/interfaces, the network manager won't manage the devices anymore, so you have to edit /etc/NetworkManager/NetworkManager.conf Change the interfaces and 6lbr.conf files to bridge over wlan0 and restart your computer. You should be connected to the wifi directly at startup. I suppose that if ipv6 is disabled on your router, issues could happened due to the wifi interface being configured in dhcp mode. |
@florian-popup |
Well, I have exactly the same set up as you do : a rpi 3 with raspbian with
a cc2650 as slip radio and 2 cc2650 as mote.
I had an issue using wlan0 because it couldn't bridge over br0. Check if you don't have the same issue (very likely because you can't use on wlan0 but can on eth0). You can check your /var/log/6lbr.log for the message error saying that 6lbr can't create a bridge between wlan0 and br0
I through that I found a way to make wlan0 bridge over br0 but it doens't work. Apparently making a bridge over wlan0 is not obvious for the pi.
I'll work on it and keep you up to date.
Here is an usefull link
https://www.raspberrypi.org/forums/viewtopic.php?t=39269
|
@florian-popup |
Bridging to a WiFi interface is complex and depends on several factors (and the old faq ins't really helpful about that, I will update it) To have WiFi bridging you need two thinks :
The confusion comes from some WiFI chipset and drivers that in the past allowed to bridge the WiFi interface even not in AP mode (which seems to be forbidden by the WiFi standard...) If you don't want to make your host as a WiFi AP there are two solutions :
Tell me how it works for you and I will update the doc accordingly and if it does not work I'll find more information. |
Czesc Janek sorry za offtop, czy moglby sie z Toba skontaktowac, mam kilka pytan co do 6lbr w razie czego moj mail to kamil.bojar@gmail.com? |
@laurentderu Thanks for helping, much appreciate it. I"m trying to use solution 1 as suggested by you. ####################################### #MODE=ROUTER RAW_ETH=0 RAW_ETH_FCS=0 DEV_RADIO=/dev/ttyACM0 NODE_CONFIG=/etc/6lbr/node_config.conf LOG_LEVEL=3 #INFO and above only_ my /etc/network/interfaces is: #----------------------- auto lo iface eth0 inet manual iface wlan0 inet static auto br0 allow-hotplug wlan0 iface default inet dhcp #----------------------- After rebooting and starting 6lbr service, my ifconfig is: root@raspberrypi:~# ifconfig eth0 Link encap:Ethernet HWaddr b8:27:eb:01:c9:7e lo Link encap:Local Loopback tap0 Link encap:Ethernet HWaddr 02:0a:0b:0c:0d:0e wlan0 Link encap:Ethernet HWaddr b8:27:eb:54:9c:2b root@raspberrypi:~# Still no luck, unable to access [bbbb::100] from web browser my /var/log/6lbr.err doesn't show any error Friday 13 January 04:10:52 UTC 2017 : Starting 6LBR Any conclusions? |
@janeksz If you intend to use the routing interfacing, with your configuration you are still bridging wlan0 and tap0, which does not work. You should have in your 6lbr.conf file :
In your /etc/network/interfaces you should have a normal interface for wlan0, not a bridge. If you have :: in 6lbr.ip, that means the BR is still waiting for the network configuration. You must instead configure it manually using the nvm_tool : nvm_tool --update --wsn-accept-ra 0 /etc/6lbr/nvm.dat Or, if you are using 1.5.x, remove the /etc/6lbr/nvm.dat file to reset to default configuration. |
@laurentderu, thanks but I am still confused, so will need your advice step by step.
my /etc/6lbr/6lbr.conf will be: #MODE=ROUTER RAW_ETH=0 RAW_ETH_FCS=0 DEV_RADIO=/dev/ttyACM0 NODE_CONFIG=/etc/6lbr/node_config.conf LOG_LEVEL=3 #INFO and above only_ Is this correct? |
@laurentderu auto lo iface eth0 inet manual allow-hotplug wlan0 root@raspberrypi:~# service 6lbr status Jan 22 23:55:24 raspberrypi 6lbr[888]: Starting 6LoWPAN Border Router:. lo Link encap:Local Loopback tap0 Link encap:Ethernet HWaddr 02:0a:0b:0c:0d:0e wlan0 Link encap:Ethernet HWaddr b8:27:eb:54:9c:2b root@raspberrypi:~# looks close, but no cigar (unable to access [bbbb::100] from web browser) Attached is the log file (renamed from6lbr.log to 6lbr.txt) |
@laurentderu WSN network prefix : aaaa:: Eth network prefix : bbbb:: RA daemon : True RPL instance ID : 30 RPL DAO ACK : False NAT 64 Enabled : True Local address rewrite : True root@raspberrypi:~# |
@janeksz In order to do this, you have to desactivate the bridge in the 6lbr conf and interface conf files then in your interface file, you should not define br0 Once you restarted 6lbr, take a look at the ipv6 routing table Here is my network conf, adapt the command to yours what you have to do is
That's it for ipv6 IF YOU WANT TO USE IP64
Don't forget to enable ipv4 forwarding on the server side YOU SHOULD BE ABLE TO REACH THE 6LBR SERVER FROM IPV4 Then to access via IPV6 ONLY IF YOU DON'T HAVE AN IPV6 network enabled, you have to tunnel all ipv6 address (or only your ipv6 server address to 192.168.150.249), using for example 6to4 on your client computer |
@florian-popup , thanks for sharing Next I executed steps 1,2,3 as per your post above (same addresses as yours) Moving into IPV4 network. root@raspberrypi:~# /usr/lib/6lbr/bin/nvm_tool --print /etc/6lbr/nvm.dat WSN network prefix : aaaa:: Eth network prefix : bbbb:: RA daemon : True RPL instance ID : 30 RPL DAO ACK : False NAT 64 Enabled : True Local address rewrite : True root@raspberrypi:~# /usr/lib/6lbr/bin/nvm_tool --print /etc/6lbr/nvm.dat //---------------------- |
@florian-popup @laurentderu |
@janeksz |
Just after you start 6lbr, check if you can reach [bbbb::100] from your rpi. Then follow all the steps as I descibed. EDIT !!!!!!!!!!!!!!!! YOU HAVE TO ENABLE THE POSTROUTING If you want to go deeper in the network configuration and securise your device, I invite you to take a look at The command I gave for the network configuration are really loose about it ! |
@florian-popup, thanks again |
@florian-popup, thanks again. I will try your further suggestion, when back at uni. |
@janeksz |
@florian-popup , thanks for your patience, that thing is killing me, I wish I knew more about networking. After starting 6lbr service, bbbb::100 is reachable from RPi: After executing: On my Windows client, still no access to [bbbb::100] Can you see anything obviously wrong? |
@janeksz Ok, so when you use route rules, the 6lbr servers interface isn't connected directly to you local network. Thus, you can't use DHCP or access to 6lbr directly. So you have to enable ip forwarding (in your case ipv6 forwarding) on your rpi Use masquerade too in sixx mode on your rpi DO NOT FORGET that you can't reach the bbbb::/64 network directly on a client because the local network router (ie your internet box) does either not listen to that network and cannot reach the 6lbr serveur interface. Only your rpi knows how to reach the bbbb network via the rules in the ip tables (that works for ipv4, I tested it 2 times howerver, I don't have any ipv6 network and router configured so I can't test it but the mechanisms are exactly the same) I m trying to set up an ARP on the rpi so there will be no need of such route rules, the 6lbr interface will be seen as a part of the local network thus, enabling DHCP, direct addressing ... but this is not my priority right now Tell me if you succeed. |
@florian-popup Thank you for providing such detailed information, I will try to digest it and improve the documentation :) Maybe your configuration could be simplified by switching to SmartBridge mode and statically configure the 6LBR IPv6 address and prefix. With that the bbbb::/64 is no longer needed and you could only keep the fd00::/64 routing. @janeksz Related to #237 (comment), I looked at it and it's actually a bug. The .ip file is not updated when the IPv4 configuration is changed. I will fix that. If you can modify the configuration of your WiFi AP and if it is sufficiently advanced, you could configure it to add a Route Information Option in the IPv6 network configuration to create the routes for the fd00::/64 (and bbbb::/64) subnets via the RPi link local wlan address. This is what 6LBR is doing to create the route to the WSN when in Router mode. |
@florian-popup, @laurentderu , thank you both. I am away for a few days. I couldn't make it work for now, will have a look again later. |
Hello everyone, I have already built the 6lbr many times, but since yesterday I am having problems. I'm trying to create a new system and when I click on the [bbbb :: 100] the sensor page, says connection failed. It will be a new update? |
@MarCast, try to return to the last working version (hardware and software) and then change one thing at a time. That is, what I do, when in trouble. Good luck. |
@florian-popup thanks for your message above on wlan0. In my case, I am trying the simple pi setup as shown in the page below: https://github.com/cetic/6lbr/wiki/Example-1:-Hello-6LBR Instead of connecting eth0 to another computer, I have plugged it directly into the network. (The RJ45 cable of the Pi.) So in that case, what is the correct routing command to be applied so that I can bring up [bbbb::100] in the browser? Currently it refuses to connect. Thanks for any help. |
If you are using ethernet, you won't have to make change about the ip tables as opposed as if you used wifi. always test if the 6lbr server is up from your pi Look at the 1 st message I put in this thread, I gave some proper configuration files working with ethernet. Due to display command in github, the line in bold text have a comment sign before (hashtag). You can remove them At this point you should be able to connect to your 6lbr server FROM YOUR PI (using a web broswer). @laurentderu
Some ints about networking like static ip configuration & ip forwarding, tunneling in order to make the access to the webserver easier Also, I wrote a plugin to display all ip address of the devices routed by the server in a log file. It could be very usefull to add it to the basic functionality to make the interfacing to any domotic/IOT framework easier. I can provide you the code if you want. Last thing, I know that linux ie debian does't support RPL routing yet. Have you consider contributing to it ? That would be a really nice improvement for IOT |
@florian-popup thanks for the prompt reply. Here are my configurations:
And here are the existing routes:
In /etc/network/interfaces I have:
With the above, I am still not able to reach [bbbb:100] |
In your 6lbr conf try RAW_ETH=0 and in your interface file put auto br0 (I think that is the reason it is not working.( If you don't have the aboves lines already). You desactivated the link of the bridge to tap0 in you 6lbr conf (BRIDGE =0) so you have no access to tap0 (the interface to 6lbr) thus, the webserver) Restart your pi |
Thanks @florian-popup The cmd below seems to be missing something:
Should it instead be:
|
Your configuration works (with my awk change above), and now the [bbbb:100] webpage loads, but only once. As soon as I refresh the page or click on any of the tabs, something crashes, and it is no longer able to display the page till I restart the 6lbr service. Any ideas on what might be happening? |
Thanks for the correction on the command line Well, I have no idea and can't guess without seeing your logs. clear your logs, make the crash happen and post your 6lbr.log entirely. |
@florian-popup @laurentderu Unfortunately in uni labs students are using Windows computers and don't have admin rights to change routes. We need to use for now the old Raspian and old RPi2 to be able to use WiFi with 6lbr. Hopefully some solution will come soon, before the next semester. Thanks again for your support. |
Hello, To not overload this issue, I put all Info into a gist: The weird thing is: I am able to access the website the first time right after restarting my computer. After a certain time http://[bbbb::100]/ gets unreachable. I spend so much time on this issue now and have no idea anymore, what to do. I would be really glad, if you could help me out here. Also I have a second question: |
@INemesisI I looked at your logs, and I don't see anything wrong at first sight. Loosing connection after a while is often linked to issues with the bridge on the BR host. It could either be that the multicast snooping is reactivated by some other process or a network manager app could reconfigure the bridge interface. For your second question, by default 6LBR in Router mode can work in standalone mode. You don't even have to create a bridge if you plan to only reach it from the hosting platform. |
@MarCast @laurentderu Hi, I am able to access the website the first time right after restarting my computer, when I click on the [bbbb :: 100] the sensor page, says connection failed. Cloud you tell me how you solve this problem? |
@CreativityH I had the same issue. Just get the dev branch. See issue #246 |
There is a step-by-step how-to at http://sunmaysky.blogspot.tw/2017/04/running-6lbr-on-raspberry-pi-with-wifi.html which shows you run 6lbr with WiFi enable on Raspbian. |
@florian-popup @laurentderu I'm trying to connect my 6lbr to a wifi network but all the clients other than the device running 6lbr itself are not able to access [bbbb::100]. On my RPi3 (with 6lbr), I've tried followings:
And then on my client side RPi3, I did this thing:
[2003::1] is a global ipv6 address of my (runnnig 6lbr) RPi's wlan0. But still, unable to ping6 bbbb::100 from the client. there was actually some progress though. before executing command
but now it at least gives me an error saying "host unreachable" [2003::1] is absolutely reachable. and I can also successfully ping6 from the client to bbbb::(whatever) on the tap0 interface but to bbbb::100 . please help me. I spent so many hours on this trying all kinds of possible combinations of ip tables. xD what would be the problem? |
@chenek @laurentderu @florian-popup |
@janeksz @NaniteFactory |
@janeksz @NaniteFactory |
@florian-popup @laurentderu @NaniteFactory thanks, I found this http://www.thingsquare.com/blog/articles/wireless-sensor-network-raspberry-pi-zero-w/ and will try to investigate how to |
Hey there! |
Thank you @chenek , I've tried that, but still no result. I was wondering if there's someone who managed to access the bbbb page after the recent update of 6lbr. |
Hi,
After creating a new RPi image:
Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linx
and installing 6lbr
I am not able to access 6lbr webpage
Everything works fine if I use my old uSD card with the same hardware (RPi2mB, cc2650 Launchpad as SLIP radio, CC2650 sensortags with Contiki as motes)
How to debug it?
root@raspberrypi:
# service 6lbr restart# service 6lbr statusroot@raspberrypi:
● 6lbr.service - LSB: 6LoWPAN Border Router
Loaded: loaded (/etc/init.d/6lbr)
Active: active (running) since Fri 2017-01-06 01:51:59 UTC; 8s ago
Process: 10617 ExecStop=/etc/init.d/6lbr stop (code=exited, status=0/SUCCESS)
Process: 10633 ExecStart=/etc/init.d/6lbr start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/6lbr.service
├─10639 /bin/sh /usr/lib/6lbr/6lbr /etc/6lbr/6lbr.conf
├─10643 /usr/lib/6lbr/bin/cetic_6lbr_router -c /etc/6lbr/nvm.dat -...
├─10644 /bin/sh /usr/lib/6lbr/6lbr-watchdog 10643 60 3 /var/log/6l...
└─10704 sleep 1
Jan 06 01:51:59 raspberrypi 6lbr[10633]: Starting 6LoWPAN Border Router:.
Jan 06 01:51:59 raspberrypi systemd[1]: Started LSB: 6LoWPAN Border Router.
root@raspberrypi:~#
All my hardware and 6lbr settings are identical to previous (working) version
my /var/log/6lbr.log is being continuously updated, but i am unable to figure out what is wrong and why I can not see [bbbb::100] in my browser
Friday 6 January 02:03:22 UTC 2017 : Starting 6LBR
/usr/lib/6lbr/bin/cetic_6lbr_router -c /etc/6lbr/nvm.dat -o /etc/6lbr/nvm.conf -s /dev/ttyACM0 -r -t wlan0 -f -B 115200 -U /usr/lib/6lbr/6lbr-ifup -D /usr/lib/6lbr/6lbr-ifdown -w /usr/lib/6lbr/www -L 3 -W /var/log/6lbr.timestamp -P 60 -C /var/log/6lbr.ip -n /etc/6lbr/node_config.conf -m /usr/lib/6lbr/plugins
Contiki-develop-20160421-6-gb1df3d1 started with IPV6, RPL
Rime started with address 1.2.3.4.5.6.7.8
MAC mac_wrapper RDC br-rdc SEC llsec-wrapper NETWORK sicslowpan
2017-01-06 2:03:23.282507: NOTICE: 6LBR: Starting 6LBR version 1.4.x (Contiki-develop-20160421-6-gb1df3d1)
2017-01-06 2:03:23.283637: INFO: ETH: 6LBR watchdog started (interval: 60)
2017-01-06 2:03:23.287660: INFO: PLUGIN: Loading /usr/lib/6lbr/plugins/dummy.so
2017-01-06 2:03:23.290524: INFO: PLUGIN: Loading /usr/lib/6lbr/plugins/lwm2m.so
2017-01-06 2:03:23.327259: INFO: PLUGIN: Initialising lwm2m-client
2017-01-06 2:03:23.368001: INFO: NVM: NVM Magic : 2009
2017-01-06 2:03:23.368046: INFO: NVM: NVM Version : 5
2017-01-06 2:03:23.368106: INFO: CONFIG: Loading configuration : /etc/6lbr/nvm.conf
wlan0 Link encap:Ethernet HWaddr 00:c1:41:06:0b:97
inet addr:172.19.124.137 Bcast:172.19.125.255 Mask:255.255.254.0
inet6 addr: fe80::7863:b74b:b569:9336/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:0
TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6623 (6.4 KiB) TX bytes:6659 (6.5 KiB)
2017-01-06 2:03:24.728144: PACKET: TAP: read: 165
2017-01-06 2:03:24.729030: PACKET: TAP: read: 145
2017-01-06 2:03:25.043883: PACKET: PF: bridge_output: Sending packet to Broadcast
2017-01-06 2:03:25.044488: PACKET: PF: wireless_output: sending packet
2017-01-06 2:03:25.045212: PACKET: PF: eth_output: broadcast
2017-01-06 2:03:25.045749: PACKET: PF: eth_output: Sending packet to Ethernet
2017-01-06 2:03:25.046380: PACKET: ETH: write: 78
2017-01-06 2:03:25.046922: DUMP: ETH:
3333ffb5 ee8500c1 41060b97 86dd6000
00000018 3aff0000 00000000 00000000
00000000 0000ff02 00000000 00000000
0001ffb5 ee858700 9d750000 0000aaaa
00000000 00000212 4b0007b5 ee85
The text was updated successfully, but these errors were encountered: