<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF51: IoT-MQTT example and Raspberry Pi 3</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17146/nrf51-iot-mqtt-example-and-raspberry-pi-3</link><description>Hello, 
 I need a little help regarding IoT-SDK 0.8.0 on nRF51. 
 What I want to achive:
Get the IoT-SDK 0.8.0 MQTT-Example running on nRF51 and publishing sensor data to a Raspberry Pi 3 using IPv6 and MQTT. Later, more sensor nodes
should publish</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Oct 2016 11:40:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17146/nrf51-iot-mqtt-example-and-raspberry-pi-3" /><item><title>RE: nRF51: IoT-MQTT example and Raspberry Pi 3</title><link>https://devzone.nordicsemi.com/thread/65870?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2016 11:40:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61826993-22fa-4d19-9936-121a3b1d6ecd</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Great! :) Your question seems a bit unrelated, could you add a new question? It is more helpful for others if questions are asked separately. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: IoT-MQTT example and Raspberry Pi 3</title><link>https://devzone.nordicsemi.com/thread/65869?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2016 10:47:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0fabf87-9260-4ed1-8ca1-13c9e983e564</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;Thank you very much. It was working instantaneously after I replaced the IPv6-address with the global one :)
Last Question: Connection to the broker is established when I press the button (callback), but not when I call mqtt_connect() directly with same set of parameters after recognizing IPV6_UP (absuing m_display_state for that, because I still need some time to getting familiar with the firmware). Any ideas?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: IoT-MQTT example and Raspberry Pi 3</title><link>https://devzone.nordicsemi.com/thread/65868?ContentTypeID=1</link><pubDate>Fri, 21 Oct 2016 12:05:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:577fd36d-bcfe-4bba-8a5d-1887a3c2d92d</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You need to enter the full IPv6 address. See &lt;a href="https://devzone.nordicsemi.com/question/28143/how-to-setup-network-enviornment-for-iot/"&gt;this&lt;/a&gt;. I&amp;#39;m not sure if it works if the link local address (fe80), or if you need the global IPv6 address of the broker.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: IoT-MQTT example and Raspberry Pi 3</title><link>https://devzone.nordicsemi.com/thread/65866?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2016 14:52:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0a72d77-2cd2-4ce4-a57b-d72c34dc7ff2</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;This works without problems:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;echo 1 &amp;gt; /sys/kernel/debug/bluetooth/6lowpan_enable
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But this results in an permission error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;echo 35 &amp;gt; /sys/kernel/debug/bluetooth/6lowpan_psm
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I also get this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;root@raspberrypi:/home/pi# ls /sys/kernel/debug/bluetooth/6lowpan_psm
ls: cannot access /sys/kernel/debug/bluetooth/6lowpan_psm: No such file or directory
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And here is the content of /sys/kernel/debug/bluetooth/ :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;root@raspberrypi:/home/pi# ls /sys/kernel/debug/bluetooth/                      6lowpan_control  hci0   l2cap_le_default_mps  sco
6lowpan_enable   l2cap  l2cap_le_max_credits
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: IoT-MQTT example and Raspberry Pi 3</title><link>https://devzone.nordicsemi.com/thread/65867?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2016 14:50:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6ef7d9b-533a-4f70-b858-e639e7907e2f</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;Update: Connection ist established successfully, when I use &amp;quot;1&amp;quot; in the connect command. Unfortunately I cannot connect to the broker. Is my address right:&lt;/p&gt;
&lt;p&gt;When I get this using ifconfig on my bt0 device:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;inet6 addr: fe80::ba27:ebff:fe47:XXYY/64 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Than I have to enter it like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.addr =
{HTONL(0xBA27EBFF),
0x00000000,
0x00000000,
HTONL(0xFE47XXYY)}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is this correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: IoT-MQTT example and Raspberry Pi 3</title><link>https://devzone.nordicsemi.com/thread/65865?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2016 14:49:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4269394a-c56b-49cb-a565-edd53d21e20b</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;What is the PSM in /sys/kernel/debug/bluetooth/6lowpan_psm? Do you have permission to access /sys/kernel/debug/bluetooth/6lowpan_control ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: IoT-MQTT example and Raspberry Pi 3</title><link>https://devzone.nordicsemi.com/thread/65864?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2016 14:25:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a53909f1-872a-4937-b7a9-b8206a7880b2</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;Thank you for your reply. Unfortunately it is still not connecting to the broker. The debugfs was already mounted, the bluetooth_6lowpan was already loaded as mentioned in the text and I get &amp;quot;permission denied&amp;quot; when trying to execute the psm command (console was running as super user). Any further help/suggestions would be much apprechiated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: IoT-MQTT example and Raspberry Pi 3</title><link>https://devzone.nordicsemi.com/thread/65863?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2016 08:34:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:515be222-09cc-4a06-9f19-93485b33b057</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Have you done this? From the nRF51 IoT SDK 0.8.0 documentation:&lt;/p&gt;
&lt;p&gt;debugfs file system&lt;/p&gt;
&lt;p&gt;In most Linux distributions, the debugfs file system is mounted to /sys/kernel/debug. However, Raspbian OS does not automatically mount the debugfs file system. Therefore, you must mount it manually before 6LoWPAN can use it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Mount debugfs file system.
mount -t debugfs none /sys/kernel/debug
# Check the contents of the folder.
ls /sys/kernel/debug
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To initialize the 6LoWPAN module, you must first load it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;modprobe bluetooth_6lowpan
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, set the Protocol Service Multiplexer number (PSM) in the module. It must be set to the PSM of the Internet Protocol Support Profile (IPSP), which is 0x23 in hex or 35 decimal.&lt;/p&gt;
&lt;p&gt;To set the correct PSM number:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;echo 35 &amp;gt; /sys/kernel/debug/bluetooth/6lowpan_psm
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I would also try to use 1 instead of 2 in the connect command.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>