-
Notifications
You must be signed in to change notification settings - Fork 194
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
Installation of 6LBR in Ubuntu 10.04 #3
Comments
Hi, The network interface (DEV_ETH) to be specified in /etc/6lbr/6lbr.conf should be the Ethernet interface of the 6LBR host, according to your diagram it should be Eth0 instead Eth1. If this does not solve the issue, could you send us the configuration files (6lbr.conf and nvm.dat), the log files (var/log/6lbr.*) and also the output of ifconfig eth1 and netstat -nr -A inet6 on the Client. Could you also try TAP-Bridge mode, it might be that Ubuntu has additional security rules that prevent raw ethernet to work properly. Thank you for your feedback, |
Dear Laurent, Sorry for disturb, but I can't find from 6lbr source code, where is the modified "slip-radio" from 6lbr-demo (cd $CONTIKI_HOME/examples/6lbr-demo/slip-radio) ? Thank you. |
Hello, |
@KarHoey , I wondered why you wre looking for a $CONTIKI_HOME/examples/6lbr-demo/slip-radio and just realized that I had written that in the Hello 6LBR example. My bad, I'm updating it right now. Thanks for pointing that out |
Hi again, when we released 6LBR, we concentrated on documenting RPi, BeagleBone and Econotag. Now, I have replayed a setup using the same configuration as you, and I can contact [bbbb::100] from the IPv6 host. Here is a summary of the steps. I will update the documentation soon. Please let me know if this works for you, I'm using Mint and Debian, it should be close to Ubuntu. This is what I did: On the 6LBR Host:
sudo apt-get install bridge-utils
make all_native make tools sudo make install
MODE=ROUTER RAW_ETH=0 BRIDGE=1 DEV_BRIDGE=br0 DEV_TAP=tap0 DEV_ETH=eth0 RAW_ETH_FCS=0 DEV_RADIO=/dev/ttyUSB0 BAUDRATE=115200 IFUP=/usr/lib/6lbr/6lbr-ifup IFDOWN=/usr/lib/6lbr/6lbr-ifdown
sudo service 6lbr start On the other PC (directly connected by ethernet)sudo ip -6 addr add bbbb::101/64 dev eth0 Why do we do this? Because you are on an isolated ethernet LAN without an external IPv6 Router. When we send RAs from the 6LBR in router mode, we intentionnally put the lifetime to 0 and announce WSN destinations explicity using the RIO option in RAs. In the next revision, we will give both options. In the meantime, it is expected that the IPv6 host accepts RIOs. I can explain this later, but it is irrelevant for now because we just want to contact the 6lbr webserver first. TestOn the IPv6 host, try to access [bbbb::100] from a browser. It should display the 6lbr webserver correctly. The logsthe end of your logs should contain this: cat /var/log/6lbr.* -c /etc/6lbr/nvm.dat -s /dev/ttyUSB0 -t tap0 -R -B 115200 -U /usr/lib/6lbr/6lbr-ifup -D /usr/lib/6lbr/6lbr-ifdown -w /usr/bin/../lib/6lbr/www Contiki-6lbr-1.0-rc0-11-g5e54897 started with IPV6, RPL Rime started with address 1.2.3.4.5.6.7.8 MAC nullmac RDC br-rdc NETWORK sicslowpan Opening nvm file '/etc/6lbr/nvm.dat' NVM Magic : 2009 NVM Version : 0 WSN Prefix : aaaa:0000:0000:0000:0000:0000:0000:0000 WSN IP address : aaaa:0000:0000:0000:0000:0000:0000:0100 Eth Prefix : bbbb:0000:0000:0000:0000:0000:0000:0000 Eth IP address : bbbb:0000:0000:0000:0000:0000:0000:0100 Mode : 5f Channel : 26 RAW/TAP init ********SLIP started on ``/dev/ttyUSB0'' opened device ``/dev/tap0'' tap0 Link encap:Ethernet HWaddr 02:0a:0b:0c:0d:0e inet6 addr: fe80::a:bff:fe0c:d0e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) br0 Link encap:Ethernet HWaddr 02:0a:0b:0c:0d:0e inet6 addr: fe80::a:bff:fe0c:d0e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Fetching MAC address TUN data incoming read:90 TUN data incoming read:46 TUN data incoming read:86 SLIP-DBG: cc2420_cmd: setting channel: 26 Got MAC TUN data incoming read:78 TUN data incoming read:78 Low2Eth adding prefix Eth MAC address : 06:00:14:6f:02:64 Opening nvm file '/etc/6lbr/nvm.dat' Tentative local IPv6 address fe80:0000:0000:0000:0212:7400:146f:0264 Tentative global IPv6 address (WSN) aaaa:0000:0000:0000:0212:7400:146f:0264 RA with autoconfig Tentative global IPv6 address (ETH) bbbb:0000:0000:0000:0000:0000:0000:0100 Starting as ROUTER UDP server started CETIC 6LBR Started SLIP: Sending 48 TUN data incoming read:101 Server received: '378 | fe80::0400:14ff:ff6f:0264' from aaaa::212:7400:1466:1fdb Responding with message: Hello from the server! (1) Server received: '378 | fe80::0400:14ff:ff6f:0264' from aaaa::212:7400:13b7:6d50 Responding with message: Hello from the server! (2) On the 6LBR Hostifconfig br0 Link encap:Ethernet HWaddr 02:0a:0b:0c:0d:0e inet6 addr: fe80::a:bff:fe0c:d0e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:28 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:583 (583.0 B) TX bytes:4872 (4.8 KB) eth0 Link encap:Ethernet HWaddr d4:be:d9:14:00:ea inet6 addr: fe80::d6be:d9ff:fe14:ea/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:242009 errors:0 dropped:0 overruns:0 frame:0 TX packets:113681 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:182730238 (182.7 MB) TX bytes:31001936 (31.0 MB) Interrupt:20 Memory:e6e00000-e6e20000 tap0 Link encap:Ethernet HWaddr 02:0a:0b:0c:0d:0e inet6 addr: fe80::a:bff:fe0c:d0e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:467 errors:0 dropped:0 overruns:0 frame:0 TX packets:529 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:54152 (54.1 KB) TX bytes:47537 (47.5 KB) On the IPv6 Hostsudo netstat -nr6 Kernel IPv6 routing table Destination Next Hop Flag Met Ref Use If bbbb::/64 :: UAe 256 0 0 eth0 fe80::/64 :: U 256 0 0 eth0 ::/0 :: !n -1 1 118 lo ::1/128 :: Un 0 1 3 lo bbbb::221:70ff:fed6:642/128 :: Un 0 1 1943 lo fe80::221:70ff:fed6:642/128 :: Un 0 1 0 lo ff00::/8 :: U 256 0 0 eth0 ::/0 :: !n -1 1 118 lo ifconfig eth0 Link encap:Ethernet HWaddr 00:21:70:d6:06:42 inet6 addr: bbbb::101/64 Scope:Global inet6 addr: bbbb::221:70ff:fed6:642/64 Scope:Global inet6 addr: fe80::221:70ff:fed6:642/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2106593 errors:0 dropped:0 overruns:0 frame:0 TX packets:95283 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:414214840 (395.0 MiB) TX bytes:8711929 (8.3 MiB) Interrupt:22 Memory:f6ae0000-f6b00000 Please let me know if this works for you. |
a minor detail, the follow lines in 6lbr.conf are superfluous: IFUP=/usr/lib/6lbr/6lbr-ifup IFDOWN=/usr/lib/6lbr/6lbr-ifdown This is what is chosen by default when you don't put the option. |
Thanks dear. It perfectly works! |
great, so I will make a new example using the documentation in this thread if this works fine for you. |
Hello! Everything works for me as well on RaspberryPi (with latest Raspbian) with Sky motes, except finding the actual data from sensors even though 6lbr-demo (via sky-websense) seems to collect them. I thought initially that I will het them via the web-interface, but there even the node names are active links they are not functional. Please point me into the right direction! Thank you! Calin |
Hello! Strangely enough, trying again, the links worked and the values for light and temperature for both sensors became visible. The setup was the same including additional route to "aaaa::/64" installed manually. However, as a difference from last time, this time all external access to 6LBT host (ssh over IPv4 and IPv6) was lost all the time 6lbr service was started. I will try again a number of times to try to identify a pattern. If you feel that any details/logs are useful, please, let me know. All the best, Calin |
Hi, If you have to manually add "aaaa::/64" route it is because your host is discarding the Route Information set in the RA message sent by 6LBR. On Linux this has to be manually activated using :
It is supported on Windows from Windows 7 onwards Your second problem is a known one that will be fixed in V1.1; when 6LBR starts up, it creates a bridge between its internal interface an the Ethernet interface. however the Ethernet interface loses its address in the process. In the mean time you could manually assign the address or invoke dhclient onto br0 interface in 6lbr-ifup script Laurent. |
Thanks Laurent for the explanations! Now, it makes perfect sense. Best regards, Calin On Tue, May 7, 2013 at 11:04 AM, Laurent Deru notifications@github.comwrote:
|
Solved in 1.1 |
Hi, sdawans: lo Link encap:Local Loopback I don't know where is wrong, could you give some advice? |
…ia Z1). The following problems were present in the existing DCO calibration algorithm: Problem #1. In function msp430_quick_synch_dco(), the "for(i=0; i < 1000; i++) { .. }" loop is optimized away by the compiler, as i is not volatile. Making i volatile would improve the results, but would not be sufficient: see the next point. Problem #2. According to MSP430F2617 Device Erratasheet, bug BCL12 precludes a naive implementations of "fast" calibration altogether. The bug is present on all MCU revisions up to date. The description of the bug: "After switching RSELx bits (located in register BCSCTL1) from a value of >13 to a value of <12 OR from a value of <12 to a value of >13, the resulting clock delivered by the DCO can stop before the new clock frequency is applied. This dead time is approximately 20 us. In some instances, the DCO may completely stop, requiring a power cycle. Furthermore, if all of the RSELx bits in the BSCTL1 register are set, modifying the DCOCTL register to change the DCOx or the MODx bits could also result in DCO dead time or DCO hang up." In Contiki code for msp430f2xxx @ 8MHz, the RSEL search currently typically goes from 15 down to 11, thus violating the rules. Step-by-step RSEL change is proposed as the best possible workaround: "[..] more reliable method can be implemented by changing the RSEL bits step by step in order to guarantee safe function without any dead time of the DCO." Problem #3. The old Contiki code started from the highest possible calibration values: RSEL=15, DCOx=7. According to MSP430F2617 datasheet, this means that the DCO frequency is set to 26 MHz. For one, Vcc under 3V is not supported for this frequency, so this means that battery-powered nodes have a big problem. The minimal operating voltages are: - 1.8V for RSEL <= 13 - 2.2V for RSEL = 14 - 3.0V for RSEL = 15 So the correct way is to always start calibration from RSEL <= 13, unless explicityly pre-calibred values are present. Problem #4. Timer B should be turned off after the calibration, following the "Principles for Low-Power Applications" in MSP430 user's Guide. The patch fixes these issues by performing step-by-step calibration and turning off Timer B afterwards. As opposed to MSP430F1xxx calibration, this algorithm does not change the ACLK divider beforehand; attempts to make calibration more precise would lead to looping in some cases, as the calibration step granularity at larger frequencies is quite big. Additionally, the patch improves DCOSYNCH_CONF_ENABLED behavior, allowing the resynchronization to correct for more than one step.
@sdawans can you bring please the /etc/network/interfaces file of this project? thanks in advance! |
Enhancements for your pull request (#556).
Dear developers, I´m trying to use the 6lbr in my ubunto 10.04 but for some reason that I can´t understand my slip-radio not find the others nodes. My topology is almost equal to question found on the site, with one difference, I'm using a econotag with 6lbr demo. Link of issue: #3 Look like everthing is run well but i cant find the other node. I put the level log like 7, but i don´t i can´t get it what is wrong. Fallows the logs: Qui Mai 21 16:18:07 BRT 2015 : Starting 6LBR tap0 Link encap:Ethernet Endereço de HW 02:0a:0b:0c:0d:0e 2015-04-21 16:18:07.847865: INFO: BR-RDC: Reset SLIP Radio and keeps popping up these messages: 2015-04-21 16:18:14.523747: PACKET: PF: eth_input: Dropping packet type=0x0069 I don´t know with something is wrong with the 6lbr or with the node 6lbr Any help would be great, My regards. |
Hello, it's a bit strange, there seems to be communication between 6LBR and the slip-radio, however the data received is garbled as if another process is reading from the serial port and only some of the bytes are received. Have you programmed the slip-radio in the econotag flash or are you programming it the ram ? |
Hi, I had burn the firmware slip-radio it in flash of my econotag. I already tried with two econotags and yestarday I use the example server and client ipv6 were the comunication betwen them was ok, but nothing pass trough the 6lbr. Thanks Laurentderu. |
Definitively strange... If you connect to the slip-radio using an terminal (hterm, pyterm, ...) and you reset the slip-radio, what is the output ? |
I´m not with them right now. I will put the output from the slip-radio when I get in university. Thanks for the help. |
Hi laurentderu, This are the outputs from the econotag sli-radio: vbatt: 3326 mV NVM ok without buck mc1322x config: magic: 1322 version: 1 eui: 00050c2a8c7f950c channel: 15 power: 17 flags: ffffffc7
trying to start 32kHz xtal 32xtal failed, using ring osc RTC calibrated to 2054 Hz setting panid 0xcdab setting short mac 0xffff setting long mac 0x00050c2a_8c7f950c Rime configured with address 00:05:0C:2A:8C:7F:95:0C Thanks! |
Any help my felow??? |
Hi, Have you build the slip-radio from the Contiki tree of 6LBR tree ? The huge block of data from the Slip-Radio shown in the previous 6LBR traces are actually wrongly formatted slip-radio traces. If you let 6LBR run for some time, do you still see the lines : INFO: BR-RDC: Fetching MAC address |
Hi, Sorry for the delay of my answer, but now i got an raspberry pi and the same incident is happing. My build of slip-radio came from the 6LBR tree and the device takes an MAC address after a while. Fallow logs from 6LBR: Tue Jun 9 16:54:03 BRT 2015 : Starting 6LBR tap0 Link encap:Ethernet HWaddr 02:0a:0b:0c:0d:0e 2015-05-09 16:54:06.293488: INFO: BR-RDC: Reset SLIP Radio 2015-05-09 16:54:08.22474: PACKET: SLIP: read: 10 My settings came to appear: root@raspberrypi:/var/log# ifconfig eth0 Link encap:Ethernet HWaddr b8:27:eb:6a:81:77 lo Link encap:Local Loopback tap0 Link encap:Ethernet HWaddr 02:0a:0b:0c:0d:0e root@raspberrypi:/etc/6lbr# route -A inet6 This is my set for 6LBR: MODE=ROUTER |
Hi, I don't see any issue any more, there is the reply to the fetch MAC address command : 2015-05-09 16:54:08.39827: INFO: BR-RDC: Got MAC: 00:05:0c:2a:8c:bd:fd:6c And the 6LBR has successfully started, 2015-05-09 16:54:08.316813: INFO: 6LBR: CETIC 6LBR Started Can you describe what is your issue now ? |
Hi! At the webserver it is not showing any devices in WSN and i cant send a ICMPV6 packet for them because no route was created to the devices. The route should be created automatically? My devices are two examples of UDP client. The output of one UDP client: setting panid 0xcdab setting short mac 0xffff setting long mac 0x00020615_c60dd07e Rime configured with address 00:02:06:15:C6:0D:D0:7E For example, i have a 6LBR demo device and nothing appears on the outputs of him. Your output should have messages like: Response from the server: 'Hello from the server!(xx) I created a route to that device. root@raspberrypi:/home/pi# ping6 aaaa::202:615:c60d:d07e root@raspberrypi:/home/pi# route -A inet6 add aaaa::/64 gw bbbb::100 root@raspberrypi:/home/pi# ping6 aaaa::202:615:c60d:d07e --- aaaa::202:615:c60d:d07e ping statistics --- Before anything I would really like to thank you and sorry for the lack of knowledge. Thank you. |
Hi, The node should appear in the network tab and the sensor page, if they are using the same channel and pan-id, as well as same MAC and RDC as the Border Router. Instead of using UDP Client example, you should instead try 6lbr-demo, it contains an udp client and is configured to work with the Border Router. The UDP client you are using has nullmac as MAC instead of CSMA, which could prevent connectivity. To reach the nodes once they appear in the Border Router, you have to setup your connectivity, see https://github.com/cetic/6lbr/wiki/6LBR-Connection |
Sorry, I overlooked that you tried with 6lbr-demo. If the node appears in the sensor page, you should be able to ping it. Are you able to ping bbbb::100 from the same machine ? If so, could you send me a pcap while you try to ping that node and the log with level 10 ? |
Hi Laurent, The problem is that no node is appearing on the sensor page. This time I built 2 6lbr demo in my econotag boards and tried again, but the My configuration: root@raspberrypi:/home/pi/6lbr/examples/6lbr/tools# ./nvm_tool --print WSN network prefix : aaaa:: Eth network prefix : bbbb:: Local address rewrite : True RA daemon : True RPL instance ID : 30 Webserver configuration page disabled : False Follow the logs: Tue Jun 9 22:35:47 BRT 2015 : Starting 6LBR tap0 Link encap:Ethernet HWaddr 02:0a:0b:0c:0d:0e 2015-05-09 22:35:50.209898: ERROR: SLIP: *** dropping large 2048 byte packet root@raspberrypi:/etc/6lbr# ifconfig eth0 Link encap:Ethernet HWaddr b8:27:eb:6a:81:77 tap0 Link encap:Ethernet HWaddr 02:0a:0b:0c:0d:0e root@raspberrypi:/etc/6lbr# route -A inet6 To send ICMPV6 packets is necessary create a route to aaaa::/64 by the 6lbr route -A inet6 add aaaa::/64 gw bbbb::100 And then i can send the packets: PING aaaa::205:c2a:8cf1:ee15(aaaa::205:c2a:8cf1:ee15) 56 data bytes The answers came from the IP on the slip-radio, but I can not send root@raspberrypi:/etc/6lbr# ping6 aaaa::202:0615:c6cb:c866 root@raspberrypi:/etc/6lbr# ping6 aaaa::205:0c2a:8c01:4d9a This are the outputs from 6lbr demos: setting panid 0xcdab setting short mac 0xffff setting long mac 0x00050c2a_8c014d9a Rime configured with address 00:05:0C:2A:8C:01:4D:9A setting panid 0xcdab setting short mac 0xffff setting long mac 0x00020615_c6cbc866 Rime configured with address 00:02:06:15:C6:CB:C8:66 I printed every information from the webserver page, they are attached to Thanks for the help! Leonardo Pereira, Student of graduation in system of telecommunication. 2015-06-11 17:58 GMT-03:00 Laurent Deru notifications@github.com:
|
Hi Laurent, About these logs beneath, then mean samethig wrong? 2015-05-09 22:35:50.209898: ERROR: SLIP: *** dropping large 2048 byte packet Thanks. |
HI, At startup you might have such errors as the 6LBR and the slip-radio are possibly not synchronized yet, and so garbage might be mistaken as messages or commands. But if they continue to appear after a while, it means there is a problem with the slip link (usually another process reading from/writing to the slip radio). Laurent. |
Hi, With the information from six days ago, you find what is wrong? I still have problems with raspberry, I keep finding no other devices on WSN. The 6lbr demo can´t find the 6lbr router and no information are sending by my 6lbr demos. One question, where can I find the PAN ID 6lbr? Thanks! |
Hi, GitHub drops email attachments, so I never received your pcap and log files. Could you send them directly via email ? You can find the PAN ID of 6lbr in the 6lbr/project-conf.h file (it's currently hardcoded, but configurable in the next version). For 6lbr-demo, it's also modifiable in 6lbr-demo/project-conf.h But as far as I can see, your PAN IDs are correct. |
Ok!!! I sent the email to you a few minutes ago to laurent.deru@cetic.be email. You received ??? |
Received correctly this time :) I will have a look at it. |
Hello, sorry for the delay. I had a look at your logs and pcap, and there is no obvious error. The network and routes are properly configured too. Laurent. |
Hello Laurent, first my apologies for the delay, but I have good news! After change my custom econotag by a different type with SoC cc2538 the 6lbr worked perfectly. Now i have one little question. We can use IPsec with the 6lbr? Thanks for everything. |
Hello, it's good to know you get it working ! About IPSec, there is no support for it in 6LBR. There are a few implementation of IPSec for Contiki available, but not in sync with the current development tree (see for example http://sourceforge.net/p/contiki/mailman/message/31687079/ and https://github.com/vjutvik/Contiki-IPsec). I believe though that the adaptation in 6LBR is small (or maybe even null) as IPsec packets just need to be routed. |
Fixed more MessageListUI to respect visualized in Cooja
Can i change the IP address that 6lbr use? |
Hi,
Thanks for suggestion but I didn't try the Python2.7 yet. The 6lbr still not works for me.
Everything is configured as default except that
because my 6LBR is connected to a Eth1 interface.
The Ubuntu client unable to connect to the [bbbb::100]. Can you point out me where I did wrong.. Thank you.
The text was updated successfully, but these errors were encountered: