<?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>Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58907/thread-ncp-spi-pin-configuration</link><description>I can not find where to change the default pins to connect the nrf52840 to the rpi over SPI. The default pins are SPI pin Raspberry Pi pin nRF52833, nRF52840 or nRF52811 pin MOSI pin 19 (GPIO10) P0.04 MISO pin 21 (GPIO09) P0.28 SCK pin 23 (GPIO11) P0</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 Mar 2020 20:21:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58907/thread-ncp-spi-pin-configuration" /><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/241238?ContentTypeID=1</link><pubDate>Mon, 23 Mar 2020 20:21:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c63d550-6cd0-495f-b662-fb247fd594f8</guid><dc:creator>jebentancour</dc:creator><description>&lt;p&gt;Binary file /usr/sbin/MQTT-SNGateway matches &amp;lt;- This is the problem&lt;/p&gt;
&lt;p&gt;The MQTT-SN gateway uses GPIO 23, 24 and 25:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/eclipse/paho.mqtt-sn.embedded-c/blob/master/MQTTSNGateway/src/linux/Timer.h"&gt;github.com/.../Timer.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;/*==========================================================&lt;br /&gt; * Light Indicators&lt;br /&gt; ===========================================================*/&lt;br /&gt;#define MAX_GPIO 27 // GPIO02 - GPIO27&lt;br /&gt;#define LIGHT_INDICATOR_GREEN 23 // RPi connector 16&lt;br /&gt;#define LIGHT_INDICATOR_RED 24 // RPi connector 18&lt;br /&gt;#define LIGHT_INDICATOR_BLUE 25 // RPi connector 22&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/240653?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2020 13:40:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9499be14-03ae-4756-a2bf-25318f09d4f6</guid><dc:creator>jebentancour</dc:creator><description>&lt;p&gt;It seems that the pin I want to use is already in use:&lt;/p&gt;
&lt;p&gt;pi@raspberrypi:/sys/class/gpio $ ls&lt;br /&gt;export&amp;nbsp; gpio19&amp;nbsp; gpio23&amp;nbsp; gpio25&amp;nbsp; gpio6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gpiochip100&amp;nbsp; unexport&lt;br /&gt;gpio13&amp;nbsp; gpio21&amp;nbsp; gpio24&amp;nbsp; gpio26&amp;nbsp; gpiochip0&amp;nbsp; gpiochip504&lt;/p&gt;
&lt;p&gt;The NFC shield does not uses GPIO24 (pin 18):&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1584624857153v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;My schematic:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1584625010160v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I am going to try in a fresh Raspbian install, but it would be nice to know who is using those pins on the BR image.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/240613?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2020 11:24:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a21befaf-4936-4ea1-ae72-f437576336cc</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I figured that you need also to set the SPI_INT_GPIO_PIN in wpantund init config script found in&amp;nbsp;/etc/init.d/wpantund for the GPIO to be initialized correctly. Did you modify this as well, or only the /etc/wpantund.conf file? I tested with GPIO20, and this seems to work correctly. Note that some GPIOs may collide with the &lt;a href="https://www.element14.com/community/docs/DOC-71574/l/explore-nfc-board-for-raspberry-pi"&gt;NFC shield&lt;/a&gt; used by the MeshCop example for commissioning. From the &lt;a href="http://www.element14.com/community/docs/DOC-76384"&gt;schematics of the shield&lt;/a&gt;, it can look like GPIO25 is used for switching between SPI and I2C mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;gpio25 is also listed in /sys/class/gpio, which may indicate that it is used by another module. I can&amp;#39;t find any references to this the BR image, but a grep tells me that it found a match for &amp;quot;/sys/class/gpio/export&amp;quot; inside a few binary files:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;pi@raspberrypi:~ $ grep -r &amp;quot;/sys/class/gpio/export&amp;quot; / 2&amp;gt; /dev/null
Binary file /proc/11933/task/11933/cmdline matches
Binary file /proc/11933/cmdline matches
/etc/init.d/wpantund:        echo &amp;quot;$SPI_INT_GPIO_PIN&amp;quot; &amp;gt; /sys/class/gpio/export
Binary file /usr/sbin/nfccommissiond matches
Binary file /usr/sbin/MQTT-SNGateway matches
Binary file /usr/sbin/MQTT-SNLogmonitor matches
Binary file /usr/lib/python2.7/dist-packages/RPi/_GPIO.arm-linux-gnueabihf.so matches
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/240313?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2020 17:37:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f3ea0ba-4057-4a39-b14a-3333d25811d8</guid><dc:creator>jebentancour</dc:creator><description>&lt;p&gt;I tried a few different GPIOs and it only works on GPIO 21&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/240305?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2020 16:00:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb9fed47-dfe5-43a2-8926-f4463b6e4f4f</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Unfortunately, I do not have any suggestions on what could be wrong on the Raspberry Pi. It looks like you have changed the wpantund.conf file correctly. Do any other GPIOs work, or do only GPIO 21 work?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/240290?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2020 14:58:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0588ff01-322e-44ef-8568-c4eb8194c59c</guid><dc:creator>jebentancour</dc:creator><description>&lt;p&gt;I tried the things you suggested and find out that the problem is in the INT pin configuration from the Raspberry GPIO side.&lt;br /&gt;&lt;br /&gt;I was using GPIO 24 but when leave the default GPIO 21 the NCP started to work.&lt;br /&gt;&lt;br /&gt;Do you have any idea what the problem could be? I would like to use GPIO 24&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/240266?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2020 13:03:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:310c05a0-970c-4088-9572-99a4877ad910</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;ul&gt;
&lt;li&gt;Which pins are you using for the SPI interface?&lt;/li&gt;
&lt;li&gt;Are you using a DK or a custom board?&lt;/li&gt;
&lt;li&gt;Have you tested the NCP with SPI transport with a DK and the precompiled examples?&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/240260?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2020 12:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f05e401f-4d72-4bc3-bb46-42c5d39114d7</guid><dc:creator>jebentancour</dc:creator><description>&lt;p&gt;I was able to compile the libraries:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;- I move the SDK closer to the root of the drive&lt;br /&gt;- I move the compiler binaries closer to the root of the drive&lt;br /&gt;- Remove the quotes for the # Toolchain commands in the file Makefile.common&lt;/p&gt;
&lt;p&gt;Compiled the example successfully but the NCP crashes a few seconds after being running.&lt;/p&gt;
&lt;p&gt;pi@raspberrypi:~ $ sudo wpantund&lt;br /&gt;wpantund[2439]: Starting wpantund 0.08.00d (Dec 13 2019 21:37:34) . . .&lt;br /&gt;wpantund[2439]: Configuration file &amp;quot;/etc/wpantund.conf&amp;quot; read.&lt;br /&gt;wpantund[2440]: About to exec &amp;quot;/usr/bin/spi-hdlc-adapter -i /sys/class/gpio/gpio24 /dev/spidev0.1&amp;quot;&lt;br /&gt;spi-hdlc-adapter[2440]: spi-hdlc-adapter 0.07 (21:37:34 Dec 13 2019)&lt;br /&gt;wpantund[2439]: Ready. Using DBUS bus &amp;quot;:1.63&amp;quot;&lt;br /&gt;wpantund[2439]: Running as root without dropping privileges!&lt;br /&gt;wpantund[2439]: State change: &amp;quot;uninitialized&amp;quot; -&amp;gt; &amp;quot;offline&amp;quot;&lt;br /&gt;wpantund[2439]: NCP is running &amp;quot;OPENTHREAD/20180926-01143-g8a1992e2; NRF52840; Mar 16 2020 17:35:06&amp;quot;&lt;br /&gt;wpantund[2439]: Driver is running &amp;quot;0.08.00d (; Dec 13 2019 21:37:34)&amp;quot;&lt;br /&gt;wpantund[2439]: Network is not joinable&lt;br /&gt;wpantund[2439]: State change: &amp;quot;offline&amp;quot; -&amp;gt; &amp;quot;offline:commissioned&amp;quot;&lt;br /&gt;wpantund[2439]: [-NCP-]: SLAAC enabled&lt;br /&gt;wpantund[2439]: Finished initializing NCP&lt;br /&gt;wpantund[2439]: AutoResume is enabled. Trying to resume.&lt;br /&gt;wpantund[2439]: NCP is commissioned. Resuming...&lt;br /&gt;wpantund[2439]: State change: &amp;quot;offline:commissioned&amp;quot; -&amp;gt; &amp;quot;associating&amp;quot;&lt;br /&gt;wpantund[2439]: State change: &amp;quot;associating&amp;quot; -&amp;gt; &amp;quot;associated&amp;quot;&lt;br /&gt;wpantund[2439]: Node type change: &amp;quot;unknown&amp;quot; -&amp;gt; &amp;quot;leader&amp;quot;&lt;br /&gt;wpantund[2439]: Adding on-mesh prefix &amp;quot;fd11:22::/64&amp;quot; to NCP&lt;br /&gt;wpantund[2439]: SpinelNCPTask.cpp:86: Requirement Failed (IS_EVENT_FROM_NCP(event) &amp;amp;&amp;amp; GetInstance(this)-&amp;gt;mInboundHeader == mLastHeader)&lt;br /&gt;wpantund[2439]: SpinelNCPTaskSendCommand.cpp:323: Requirement Failed ((mRetVal == kWPANTUNDStatus_Ok) || (mRetVal == kWPANTUNDStatus_Busy))&lt;br /&gt;wpantund[2439]: SendCommand task encountered an error: 7 (0x00000007)&lt;br /&gt;wpantund[2439]: SpinelNCPTask.cpp:86: Requirement Failed (IS_EVENT_FROM_NCP(event) &amp;amp;&amp;amp; GetInstance(this)-&amp;gt;mInboundHeader == mLastHeader)&lt;br /&gt;wpantund[2439]: SpinelNCPTaskSendCommand.cpp:381: Check Failed (error 7)&lt;br /&gt;wpantund[2439]: Error Timeout (7) while performing &amp;quot;adding on-mesh prefix&amp;quot; on NCP - Resetting NCP.&lt;br /&gt;&lt;br /&gt;Caught SIGHUP!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/240092?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 15:46:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01543b7f-3714-4ecf-bb18-a76be1134c72</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I&amp;#39;m not speaking Spanish, but from what I can see from Google translate it looks like an issue with the paths. Can you try to move the SDK closer to the root of the drive? I have sometimes seen issues when the paths get too long.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/239388?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2020 15:49:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3efd0bc-c186-41ba-9ed1-f925b8b7fdc6</guid><dc:creator>jebentancour</dc:creator><description>&lt;p&gt;I checked the commit version and still have the same problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/239263?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2020 08:20:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0067b087-f2c6-4519-ba53-3c126b216613</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Did you checkout the correct commit after cloning the OpenThread repository? If you try to build master, the project files in the SDK may not include all the required paths and source files.&lt;/p&gt;
&lt;p&gt;The commit used by the SDK is indicated in the project readme-file: external\openthread\project\readme.txt&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/239228?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 22:20:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32cb9f89-42a9-4a75-b873-c9ad00f393b2</guid><dc:creator>jebentancour</dc:creator><description>&lt;p&gt;Ok, now i am having trouble to build the libraries&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;C:\Users\User\Documents\nRF5_SDK_for_Thread_and_Zigbee_v4.0.0\external\openthread\project&amp;gt;py build_gcc_libs.py&lt;br /&gt;Compiling file: cli.cpp&lt;br /&gt;make: se ingresa al directorio `C:/Users/User/Documents/nRF5_SDK_for_Thread_and_Zigbee_v4.0.0/external/openthread/project/nrf52840/openthread_cli/ftd/armgcc&amp;#39;&lt;br /&gt;&amp;quot;&amp;#39;C:&amp;quot; no se reconoce como un comando interno o externo,&lt;br /&gt;programa o archivo por lotes ejecutable.&lt;br /&gt;make: *** [_build/libopenthread_cli_ftd_nrf52840/cli.cpp.o] Error 1&lt;br /&gt;make: se sale del directorio `C:/Users/User/Documents/nRF5_SDK_for_Thread_and_Zigbee_v4.0.0/external/openthread/project/nrf52840/openthread_cli/ftd/armgcc&amp;#39;&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt;&amp;nbsp; File &amp;quot;build_gcc_libs.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; subprocess.run(make_cmd, check=True)&lt;br /&gt;&amp;nbsp; File &amp;quot;C:\Users\User\AppData\Local\Programs\Python\Python38\lib\subprocess.py&amp;quot;, line 512, in run&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise CalledProcessError(retcode, process.args,&lt;br /&gt;subprocess.CalledProcessError: Command &amp;#39;['make', '-C', 'nrf52840\\openthread_cli/ftd\\armgcc']&amp;#39; returned non-zero exit status 2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread NCP SPI pin configuration</title><link>https://devzone.nordicsemi.com/thread/239145?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 13:54:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd717a08-ae0c-4390-96c5-bd51c13a776a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This statement is not entirely accurate. The SPI/UART pins are set in the platform-config.h file in OpenThread, as described on &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.0.0/thread_architectures_ncp.html#thread_architectures_details_uart"&gt;this page&lt;/a&gt;. Changing this config requires you to &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.0.0/thread_ot_libraries_building.html"&gt;rebuild the OpenThread libraries&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>