cetic / 6lbr

A deployment-ready 6LoWPAN Border Router solution based on Contiki
github.com/cetic/6lbr/wiki
Other
337 stars 194 forks source link

unable to see TI sensortag 2.0 from webpage #92

Closed weijian19391 closed 7 years ago

weijian19391 commented 9 years ago

Hi

I followed the example from http://processors.wiki.ti.com/index.php/Cc26xx_sw_examples, but instead of using BBB i used a Raspberry Pi as my edge router, configuration for 6lbr.config as follows:


MODE=ROUTER
#MODE=SMART-BRIDGE
#MODE=RPL-RELAY
#MODE=FULL-TRANSPARENT-BRIDGE
#MODE=NDP-ROUTER
#MODE=6LR
#MODE=RPL-ROOT

RAW_ETH=1
BRIDGE=0
DEV_BRIDGE=br0
DEV_TAP=tap0
DEV_ETH=eth0
RAW_ETH_FCS=0

DEV_RADIO=/dev/ttyACM0
BAUDRATE=115200

LOG_LEVEL=1 #INFO and above only

I am able to see the web page showing me information about the boarder router, but under the sensor tab, the Sensortag are not being displayed. Checking on the log file :

Wed Jul 1 09:39:31 UTC 2015 : Starting 6LBR
/usr/lib/6lbr/bin/cetic_6lbr_router -c /etc/6lbr/nvm.dat -s /dev/ttyACM0 -t eth0 -r -B 115200 -U /usr/lib/6lbr/6lbr-ifup -D /usr/lib/6lbr/6lbr-ifdown -w /usr/lib/6lbr/www -L 1  -W /var/log/6lbr.timestamp -P 60 -C /var/log/6lbr.ip  -m /usr/lib/6lbr/plugins  
Contiki-6lbr-1.3.3 started with IPV6, RPL
Rime started with address 1.2.3.4.5.6.7.8
MAC CSMA RDC br-rdc NETWORK sicslowpan
Log level : 10
Log services : ffffffff
eth0      Link encap:Ethernet  HWaddr b8:27:eb:47:62:57  
          inet addr:172.29.32.12  Bcast:172.29.35.255  Mask:255.255.252.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2501624 errors:0 dropped:1598 overruns:0 frame:0
          TX packets:36261 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:350150429 (333.9 MiB)  TX bytes:5755660 (5.4 MiB)

2015-06-01 9:39:52.706820: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (6)
2015-06-01 9:39:55.4644: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (7)
2015-06-01 9:39:57.413032: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (8)
2015-06-01 9:39:59.670708: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (9)
2015-06-01 9:40:02.28807: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (10)
2015-06-01 9:40:04.154226: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (11)
2015-06-01 9:40:06.409359: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (12)
2015-06-01 9:40:08.747607: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (13)
2015-06-01 9:40:11.830729: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (14)
2015-06-01 9:40:14.749025: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (15)
2015-06-01 9:40:16.875006: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (0)
2015-06-01 9:40:19.215748: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (1)
2015-06-01 9:40:21.541121: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (2)
2015-06-01 9:40:24.43239: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (3)
2015-06-01 9:40:26.526165: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (4)
2015-06-01 9:40:28.651151: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (5)
2015-06-01 9:40:31.19045: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (6)
2015-06-01 9:40:33.368616: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (7)
2015-06-01 9:40:36.160376: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (8)
2015-06-01 9:40:38.742339: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (9)
2015-06-01 9:40:40.867357: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (10)
2015-06-01 9:40:43.140344: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (11)
2015-06-01 9:40:45.634505: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (12)
2015-06-01 9:40:48.83386: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (13)
2015-06-01 9:40:50.960031: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (14)
2015-06-01 9:41:35.813553: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (15)
2015-06-01 9:41:37.962901: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (0)
2015-06-01 9:41:40.474580: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (1)
2015-06-01 9:41:42.819200: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (2)
2015-06-01 9:41:45.500826: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (3)
2015-06-01 9:43:49.989961: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (4)
2015-06-01 9:43:52.158674: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (5)
2015-06-01 9:43:54.647044: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (6)
2015-06-01 9:43:57.400956: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (7)
2015-06-01 9:43:59.826454: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (8)
2015-06-01 9:44:23.812086: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (9)
2015-06-01 9:44:25.991675: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (10)
2015-06-01 9:44:28.223968: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (11)
2015-06-01 9:44:30.719097: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (12)
2015-06-01 9:44:33.597958: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout (13)

I have flashed the Sensortag with the web-demo.bin (http://processors.wiki.ti.com/index.php/Contiki_setting_up_sw) using over the air downloader from my android phone, and CC2531 as my slip radio, flashed with cc2531-slip-radio_contikimac.zip from http://processors.wiki.ti.com/index.php/Cc26xx_sw_examples.

May i know where i might have done wrong? Thank you

laurentderu commented 9 years ago

According to the log, it seems 6LBR can not communicate properly with the slip-radio (hence all the errors). Please check if it is correctly programmed. If so, maybe you have issues with the cc2531 and the raspberry, see the raspberry page on the Wiki for some workarounds (https://github.com/cetic/6lbr/wiki/RaspberryPi-Software-Configuration)

Laurent.

weijian19391 commented 9 years ago

@laurentderu Thanks for your reply. Any idea where and how can i debug where went wrong? i manage to get to the web page served by 6lbr, hence i supposed the software is being set up correctly on my RPI. How can i check if the slip radio is working and that it is working with RPI?

weijian19391 commented 9 years ago

@laurentderu I got it to work! Turns out, i need the follow settings to be done for RPi even though i am not using Nooliberry radio

remove the following parameters from /boot/cmdline.txt
console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
note that you do not need dwc_otg.speed=1 in that file for the Nooliberry, due to the lower baudrate
Also, in /etc/inittab the following line at the bottom of the file should be commented out, because the Nooliberry needs to use the ttyAMA0:
#Spawn a getty on Raspberry Pi serial line

#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Thank you very much for your help!

sdawans commented 9 years ago

hello @weijian19391, on your RPi, are you using one of the official raspbian images? If so, do you know which release it is? This problem appeared on certain versions of Raspbian, it would help us to know which one you are using.

weijian19391 commented 9 years ago

@sdawans Yes i am running the official Raspbian image. Not sure if this is what you're looking for, but using uname -a gave me the following:

Linux raspberrypi 4.0.7+ #801 PREEMPT Tue Jun 30 18:15:24 BST 2015 armv6l GNU/Linux

On a side note, do you happen to know any NAT64 program that i can run in my RPi for it to translate between IPv6 and IPv4?

laurentderu commented 9 years ago

For NAT64, you can either use the latest develop snapshot which integrate NAT64 or use Jool on your RPi.

weijian19391 commented 9 years ago

@laurentderu is there any elegant way of updating my current 6lbr to the develop branch, or do i have to remove the current 6lbr and git clone the develop snapshot to reinstall 6lbr again?

laurentderu commented 9 years ago

if you are using git and the github repository of 6lbr, you can do a git fetch to have the lastest version and then do a git checkout develop-20150508 to select the latest snapshot

weijian19391 commented 9 years ago

@laurentderu I see. Thanks!

Is there any way for me to inspect the traffic flow of the 6lbr? I have implemented a mqtt client on my TI sensor tag, which is supposed to send data to port 1883, however when i tried to listen on port 1883 nothing is being received. Hence, i am now trying to see which part of the connection went wrong.

opendsvn commented 9 years ago

We need to reduce the speed of the CC2531 USB Dongle: I added this parameter "dwc_otg.speed=1" to the beginning of the /boot/cmdline.txt like this:

dwc_otg.speed=1 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p3 rootwait

Then it works!

laurentderu commented 9 years ago

@opendsvn thanks for the info, I will update the wiki to make more clear that one need this parameter for CC2531, Telos, ... slip-radios.

zubairhamed commented 9 years ago

Is this property only for slip radios or also for sniffers?

Z

On 29 Jul 2015, at 4:27 pm, opendsvn notifications@github.com wrote:

We need to reduce the speed of the CC2531 USB Dongle: I added this parameter "dwc_otg.speed=1" to the beginning of the /boot/cmdline.txt like this:

dwc_otg.speed=1 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p3 rootwait

Then it works!

— Reply to this email directly or view it on GitHub.

laurentderu commented 9 years ago

It's for both, you need that parameter to have the USB device working on RPi.

rohitsivakumar commented 8 years ago

I have a similar problem and my hardware runs raspbian (supported on BananaPI hardware). my cmdline.txt settings are: dwc_otg.speed=1 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

I am still facing the same problem and the same error: ERROR: BR-RDC: br-rdc: send failed, slip ack timeout

schankam commented 8 years ago

Same problem here, was running with Raspbian and the soft was unstable, then switched to Ubuntu 16 LTS Mate, and I now got:

ERROR: BR-RDC: br-rdc: send failed, slip ack timeout

laurentderu commented 8 years ago

What is the frequency of the error, do you have it for each packet sent or do you have one once in a while ? Could you check if in /etc/inittab you don't have a console opened on your serial device ?

naivewong commented 7 years ago

My raspberry pi's version is 4.4.50-v7+. I have the same problem. But I don't have the /etc/inittab file and my /boot/cmdline.txt is dwc_otg.lpm_enable=0 console=serial0, 115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait splash plymouth.ignore-serial-consoles dwc_otg.speed=1 Can anyone tell me how to configure? Thank you very much!!!

Usman78930 commented 5 years ago

I am also facing the same issue that i am able to access my web page that showing 6lbr information but under the sensor tab sensor values are not showing. i am using raspbian stretch. Kindly help me fix this problem