This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF51: IoT-MQTT Publisher Example problems

Hi, I just read IoT-MQTT example and have almost exactly the same problem but with the Publisher. I am running a PI with Raspberian 4.4.34-v7+. I have installed mosquitto on the PI and have radvd installed. I turned on the IPV6 forwarding (echo 1 > /proc/sys/net/ipv6/conf/all/forwarding), did the config file and restarted radvd. This worked ONCE. I did get this:

sudo echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
root@raspberrypi:/home/pi# sudo service radvd restart
root@raspberrypi:/home/pi# ifconfig bt0
bt0       Link encap:UNSPEC  HWaddr B8-27-EB-FF-FE-F1-72-D4-00-00-00-00-00-00-00-00  
inet6 addr: 2001:db8::ba27:ebff:fef1:72d4/64 Scope:Global
inet6 addr: fe80::ba27:ebff:fef1:72d4/64 Scope:Link
UP POINTOPOINT RUNNING MULTICAST  MTU:1280  Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1 
RX bytes:1906 (1.8 KiB)  TX bytes:2808 (2.7 KiB)

This is with the Publisher connected to bt0. The publisher has the 2001:... address compiled in. I then run mosquitto -v on the PI but when I press button 1 all 4 LED's light up and stay lit showing it failed. I get no messages on mosquitto.

But now if I disconnect and re-connect bt0 does NOT have the global address anymore. I even re-booted the PI and did the whole sequence all over again starting with loading 6lowPAN and still it does not get the global address. Do you have any suggestions of what to try next.

And one more question. The disconnect does not work. When I try to do:

echo "disconnect 00:EF:0B:A4:88:A6" > /sys/kernel/debug/bluetooth/6lowpan_control 

I get a write error of invalid argument. That is the correct MAC.

Thank you for the help. --jim schimpf

Parents
  • Hi, I have duplicated your script and also followed this article link text. When I follow the article I get an IPV6 connection from my PC at FD00:b::2 -> FD00:b::1 (the PI) and can ping my Nordic card at FD00:a::02EF:0bFF:FEA4:88a6 . Then I run mosquitto on the PC (and change the address in the PUB program to FD00:b::2) and still no connection. I have checked the mosquitto on the PC by running mosquitto_pub and mosquitto_sub on the PI and they publish and subscribe just fine. When I press button 0 all four LED's come on and stay on. (have to reset to recover). Also single stepping in gdb (Eclipse) I cannot step through the process of connection as the program jumps to run on the connect step.

    What is step 8 in the process, "Prepare the IPv6 global prefix for the btX interface." Is that where I assign FD00:b::1 to bt0 ?

Reply
  • Hi, I have duplicated your script and also followed this article link text. When I follow the article I get an IPV6 connection from my PC at FD00:b::2 -> FD00:b::1 (the PI) and can ping my Nordic card at FD00:a::02EF:0bFF:FEA4:88a6 . Then I run mosquitto on the PC (and change the address in the PUB program to FD00:b::2) and still no connection. I have checked the mosquitto on the PC by running mosquitto_pub and mosquitto_sub on the PI and they publish and subscribe just fine. When I press button 0 all four LED's come on and stay on. (have to reset to recover). Also single stepping in gdb (Eclipse) I cannot step through the process of connection as the program jumps to run on the connect step.

    What is step 8 in the process, "Prepare the IPv6 global prefix for the btX interface." Is that where I assign FD00:b::1 to bt0 ?

Children
No Data
Related