<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: KW41Z host-controlled example THCI in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653060#M2521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you describe the exact procedure to reproduce this in the FRDM-KW41Z boards? I'm unable to reproduce.&lt;/P&gt;&lt;P&gt;The commissioning procedure takes some time due the 6LoWPAN and DTLS encryption processing, I'll check if there's a way to try to reduce the time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please keep each topic as a separate community post? This way we can keep a better track of any issues/questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Feb 2017 15:11:32 GMT</pubDate>
    <dc:creator>jc_pacheco</dc:creator>
    <dc:date>2017-02-28T15:11:32Z</dc:date>
    <item>
      <title>KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653050#M2511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use the&amp;nbsp;ble_thread_host_controlled_device demo in the KW41Z connectivity software package. I'm able to build and flash the boards, and I've been able to get a network set up using the remote interface. Ping works, UDP echo works, but I haven't been able to&amp;nbsp;send data back and forth between the devices using sockets, or at least I haven't been able to receive it. I've attached logs from both boards.&amp;nbsp;So far I've only tried to control the devices using the Test Tool. I haven't made any changes to any of the build flags. I've only made changes to the .cproj file in order to get the project to build.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The attached logs go roughly as follows:&lt;/P&gt;&lt;P&gt;Several GetAttribute and other status requests to&amp;nbsp;show the boards are connected to the same network and commissioned.&lt;/P&gt;&lt;P&gt;EchoUDP commands from both sides.&lt;/P&gt;&lt;P&gt;Set up UDP datagram sockets bound to port 60 on each side&lt;/P&gt;&lt;P&gt;Module A sends "ABC" to module B&lt;/P&gt;&lt;P&gt;Receive on module b returns no data.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong here? Is there a&amp;nbsp;more&amp;nbsp;instructive guide I missed in the stack documentation, or am I just failing to understand sockets?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried following the code through the debugger, but stepping was&amp;nbsp;leading to strange behavior, so I wasn't able to follow it very effectively. Is that something to do with FreeRTOS? I'm pretty new to that as well. I've only used FreeRTOS&amp;nbsp;on an ESP8266, with no debugger.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a side note, I want to&amp;nbsp;mention that the project files generated by the project cloner had invalid relative paths. They escaped out to one directory&amp;nbsp;higher than they should have (an extra ..\). They also didn't have the ProjDirPath variable in them, which I think is required, but I didn't test it without. I&amp;nbsp;cloned the project&amp;nbsp;to a drive other than the windows install drive (the SDK is installed on C: as well). I also had very strange issues with gcc returning paths that were missing a single character (e.g. "/middleware/wirless/" - missing an 'e' in wireless)&amp;nbsp;and saying it couldn't find files. The actual paths were correct other than the issue I mentioned above. I worked around this in one project by adding another ../parentDirectory/ to the path somewhere. This happened with KDS 3.1 and 3.2.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338988"&gt;module_b.log.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338988"&gt;module_a.log.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jan 2017 08:34:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653050#M2511</guid>
      <dc:creator>gbh</dc:creator>
      <dc:date>2017-01-28T08:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653051#M2512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default the Project Cloner uses "MyProject_01" as project name and "C:\Temp" as destination path.&lt;BR /&gt;If too longer strings (paths) are used, then KDS will not be able to understand the relative paths due to Windows OS Longer File Name Limitation. This is a known issue with Windows OS.&lt;BR /&gt;Same issue will be found on multiple IDE's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the sockets:&lt;/P&gt;&lt;P&gt;There's a known bug that will be fixed in the upcoming maintenance release where the data received by the firmware on FSCI (Test tool) is incorrect. Nevertheless,&amp;nbsp;I'm attaching the expected procedure to create and send UDP data through a socket when this is released.&lt;/P&gt;&lt;P&gt;Meanwhile you can verify the usage of sockets using the SHELL demo and enabling the "#SOCK_DEMO" macro at config.h.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;JC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 00:33:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653051#M2512</guid>
      <dc:creator>jc_pacheco</dc:creator>
      <dc:date>2017-02-09T00:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653052#M2513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response, JC. If I understand you correctly, the FSCI implementation in the stack itself is fine. I'm ultimately going to control the MKW41Z on my board with a K64, does&amp;nbsp;the FSCI implementation there&amp;nbsp;have the same issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't had a chance to look at&amp;nbsp;the shell demo, but I now have a custom board in-house with the MKW41Z512VHT4 on it, and I'm trying to get back to the point where I'm able to join it to the same network as one of my FRDM boards, but I'm having some issues with it. I'm able to create a network on the KW41-FRDM board, and connect to it from my custom board, but it doesn't work the other way around, when my device behaves as a leader/commissioner.&amp;nbsp;I hadn't changed any of the build flags, so I went through the definitions in the KDS project tonight and updated them to match my hardware, but nothing changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The KW41z&amp;nbsp;on my board will create a network, establish itself as leader/commissioner, and responds with success to adding an expected joiner, syncing the steering data, and&amp;nbsp;getting that expected joiner. The DTLS session starts as well, but&amp;nbsp;ultimately fails with JoinerDtlsError. The documentation only suggests that this might be an incorrect PSKd, but I've verified that the expected joiner command specifies "kinetis" (all commands being sent to create the network and configure the commissioner on the custom board are identical to the ones sent&amp;nbsp;to the FRDM board) and the FRDM board is running the&amp;nbsp;app with only the build config modifications I made earlier (in my first post), not the other flag changes I made tonight (disabling LEDs, buttons, TSI, keyboard).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing I did have to do on my custom board was&amp;nbsp;set the CLOCK_INIT_CONFIG to CLOCK_RUN_32, as with the default value (CLOCK_RUN_48_24) was hanging&amp;nbsp;in CLOCK_SetFeeMode (called from BootToFeeMode) while waiting for IREFST to change. My design is basically&amp;nbsp;the same as the FRDM board, but without the DCDC components (running bypass), and with a 32MHz osc (the FRDM schematic says 32MHz, but has a 27.648MHz xtal mounted), at 10ppm tolerance/stability (50/NA on the FRDM part), and 10pF load. (I just now noticed that frequency discrepancy, I guess that's why it's hanging). I also see that the config I'm using now is BLPE, and the core clock is 32MHz, vs a comment that says the config for the FRDM board is 48MHz.&amp;nbsp;Maybe that's the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've put a breakpoint in the APP_Commissioning_Handler while debugging from my board, which is a switch statement on the parameter code. Regardless of the value passed in, if I put a breakpoint in the case for the&amp;nbsp;JoinerError and the JoinerDtlsError (a common case) it is always hit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So is there any way I can get more detail on this DTLS failure?&amp;nbsp;Or maybe I've missed a build flag I need to set to account for my different&amp;nbsp;oscillator speed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 06:43:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653052#M2513</guid>
      <dc:creator>gbh</dc:creator>
      <dc:date>2017-02-23T06:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653053#M2514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ben,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed, if you are using the 32MHz reference you should change to CLOCK_RUN_32. More details in this post:&amp;nbsp;&lt;A href="https://community.nxp.com/docs/DOC-332805" rel="nofollow noopener noreferrer" target="_blank"&gt;Change clock configuration when 32 kHz oscillator is not available&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are running in bypass mode, you should also change:&lt;/P&gt;&lt;P&gt;DCDC.h&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="property macro token"&gt;#define gDCDC_Enabled_d&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 --&amp;gt;&amp;nbsp; 0&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;board.h&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="property macro token"&gt;#define APP_DCDC_MODE&amp;nbsp;&amp;nbsp;&amp;nbsp; (gDCDC_Mode_Buck_c)&amp;nbsp; --&amp;gt;&amp;nbsp; (gDCDC_Mode_Bypass_c)&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;ON the DTLS failure, if you are running the exact same steps, how is the RF performance on your board?&lt;/P&gt;&lt;P&gt;Are you using out of band comissioning?&lt;/P&gt;&lt;P&gt;What commands did you set for permitting joiners?&lt;/P&gt;&lt;P&gt;If you are using THCI, did you confirm that the comissioner started successfully?&lt;/P&gt;&lt;P&gt;Can you please attach a wireshark log?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-JC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:28:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653053#M2514</guid>
      <dc:creator>jc_pacheco</dc:creator>
      <dc:date>2017-02-23T15:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653054#M2515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey JC,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've made the DCDC changes you've suggested. No change in operation, but I don't know that that's an unexpected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have a sniffer in house, but I just ordered the USB-KW41z to do this and I'll respond with that&amp;nbsp;this weekend, if necessary. Unfortunately, it looks like the binaries&amp;nbsp;for that sniffer application won't work with the FRDM board due to the different SDA uC. I've also got a couple of KW24-FRDM boards, but obviously, the KW41z binary won't work on that. So for now,&amp;nbsp;I've attached logs from&amp;nbsp;the test tool for now, one from each board in each configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really have much of an idea about my board's RF performance yet. I can tell you that I followed the KW41z reference design, with the exception that I have a chip antenna on&amp;nbsp;my board. There is an etch keep-out under the antenna (as specified by the manufacturer), and the board was spec'd to be&amp;nbsp;controlled 50 ohm impedance. My custom board is&amp;nbsp;is mounted on a breakout&amp;nbsp;board, which has a ground plane that isn't broken under the antenna.&amp;nbsp;The bottom of my wireless board is&amp;nbsp;about&amp;nbsp;a quarter inch from the&amp;nbsp;breakout&amp;nbsp;board. I've tried moving the&amp;nbsp;FRDM board around and changing the orientation of the antennas without any apparent change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using in-band commissioning at the moment. I'm really just getting started with this,&amp;nbsp;and haven't made any modifications to the&amp;nbsp;code, other than the&amp;nbsp;build flags for the hardware configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what I've been able to verify in the source, it looks like data is getting to the stack OK from the&amp;nbsp;test tool. I specifically verified the 'kinetis' string use for PSK is in the correct field in the THCI handler.&amp;nbsp;Is it possible to get the source for the thread stack? It would be nice to be able to debug a bit more in depth to understand what's going on.&amp;nbsp;We're planning on using BLE as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been reviewing my schematic and ran across some notes I made in the reference manual. In CH14, the diagram given for bypass differs from the one given in 3.4.4.3. In 3.4.4.3, it indicates that DCDC_CFG is to be pulled low along with PSWITCH for bypass, while&amp;nbsp;14.1.4 indicates that DCDC_CONFIG is meant to be pulled high, and PSWITCH is grounded.&amp;nbsp;I noted that from looking at the FRDM board, the diagram in 14.1.4&amp;nbsp;is correct, and connected&amp;nbsp;it to VCC on my board. I have also connected the VDD_1P5OUT to VCC,&amp;nbsp;which also seems correct. VCC is 3.3v, by the way, and the supply looks clean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also noticed tonight that VDD_XTAL is not shown&amp;nbsp;in the pinout, but&amp;nbsp;the reference manual shows it connected to VCC. My best guess is that that's VDD_RF3, since that pin isn't referenced anywhere else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2017 04:55:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653054#M2515</guid>
      <dc:creator>gbh</dc:creator>
      <dc:date>2017-02-24T04:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653055#M2516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ben,&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the record, KW2xD has its own sniffer firmware, please look for it at&amp;nbsp;C:\NXP\Test Tool 12\images. I'll take a look at the logs and get back to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-JC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2017 14:40:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653055#M2516</guid>
      <dc:creator>jc_pacheco</dc:creator>
      <dc:date>2017-02-24T14:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653056#M2517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey JC,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the sniffer working with the KW2xD&amp;nbsp;last night and took a few traces. One shows a successful commissioning session with my custom board joining the FRDM leader/commissioner, one&amp;nbsp;shows&amp;nbsp;my custom board as&amp;nbsp;the leader/commissioner and the FDRM is unable to join, and a third&amp;nbsp;where I joined my custom board to the FRDM's network and then&amp;nbsp;established that custom board as the commisioner, and a second FRDM board is unable to join the network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both cases where my&amp;nbsp;device is performing commissioning, a hello verify request is sent by the commissioner, and responded to by the joiner, but there's no server hello. I don't see any&amp;nbsp;difference in the DTLS packets, and the cookie matches on the hello, so I'm trying to figure out why the server doesn't continue the&amp;nbsp;session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've verified in the debugger&amp;nbsp;that the expected joiner is found on my custom board by looking at the&amp;nbsp;APP_MeshcopValidateJoinerAddrCb function in&amp;nbsp;app_thread_callbacks.c, and the LED flash rate makes it look like the firmware knows how the clock is configured; my board toggles the LED at 4.99Hz, the FRDM board toggles at &amp;nbsp;4.96Hz, and the app specifies a toggle period of 100ms, so that all seems to make sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW,&amp;nbsp;I'd recommend indicating using the test tool for flashing in your writeup here: &lt;A href="https://community.nxp.com/thread/331971"&gt;Use KW24D512 as Sniffer in Wireshark&lt;/A&gt;.&amp;nbsp;It took me a bit to figure that out and I managed to apparently brick one of my KW24 boards in the process; cmsis-dap port doesn't show up as a USB device at all, much less enumerate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2017 02:04:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653056#M2517</guid>
      <dc:creator>gbh</dc:creator>
      <dc:date>2017-02-26T02:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653057#M2518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey JC,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Got it figured out, at least partially. I put my modified firmware on the FRDM board and found that it performed the same way my custom board did. Switching back to the initial clock configuration had it performing like the&amp;nbsp;unmodified firmware. I went through the default configuration and updated it to generate a 40MHz core clock from my external 32MHz&amp;nbsp;xtal. The FRDM board and my custom board&amp;nbsp;now send the ServerHello command, but it still looks like there's a less severe version of the same problem there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The traces I collect from the unmodified firmware when joining a FRDM board to another FRDM board's created network don't typically have any retries. However, when running at 40MHz, the SeverHello and the ClientKeyExchange flights are both retried, and&amp;nbsp;followed very quickly by&amp;nbsp;what seem like they must be responses to the original requests, based on the time between the retry and the message. I've attached a trace that shows&amp;nbsp;the DTLS handshake between&amp;nbsp;my custom boards running at 40MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What it seems like to me is that there's something assumed about the speed of the cryptographic operations required for those two messages which causes a retry to be sent, and then perhaps there's a bug in the stack&amp;nbsp;around handling a retried ClientHello, which prevents any ServerHello from being sent, but maybe that's more conjecture than the devs would care to hear :smileyhappy:. In any case, I need to understand what the issue is here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I take it the recommended hardware configuration for this part is to use the 32.768kHz oscillator to generate a 48MHz clock, but&amp;nbsp;can it then run without the main oscillator? I'd prefer not to mount both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed there's a ~7s delay between some of the message flights in the DTLS handshake when running at the 48MHz clock. Is this typical for thread devices?&amp;nbsp;How can we reduce the amount of time it takes to set up a network?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also,&amp;nbsp;I thought I saw a mention of a library that implements the control side of the THCI, but I haven't been able to&amp;nbsp;find it. I found the HomeKit SDK, but that appears to be for BLE with the kw40.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 02:30:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653057#M2518</guid>
      <dc:creator>gbh</dc:creator>
      <dc:date>2017-02-27T02:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653058#M2519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ben,&amp;nbsp;&lt;/P&gt;&lt;P&gt;This seems to be an issue with the clock on your custom board, I'm unable to reproduce using the FRDM hardware.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please double check the&amp;nbsp;System Clock and Bus clock:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;CLOCK_GetCoreSysClkFreq&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;CLOCK_GetBusClkFreq&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you can also measure the frequency using a CLKOUT pin (PTB3 -&amp;gt; Mux_ALT4 &amp;nbsp;or &amp;nbsp; PTB0 -&amp;gt; Mux_ALT7), by default you'll get&amp;nbsp;OSCERCLK DIV2 but you can select Bus Clock as the CLKOUT output with SIM_SOPT2 -&amp;gt;CLKOUTSEL register value = 0x02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;GpioSetPinMux&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gpioPort_B_c&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3u&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pinMux_Alt4_c&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A way to reduce the Commissioning time is to use Out-of-band commissioning, which will not exchange the key from the commissioner but use the pre-configured network settings.&lt;/P&gt;&lt;P&gt;See app_thread_config.h --&amp;gt; &amp;nbsp;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="property macro token"&gt;#define THR_DEV_IS_OUT_OF_BAND_CONFIGURED FALSE --&amp;gt; TRUE&lt;/SPAN&gt;
‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 32K XTAL is generally used for low power but can be used for system clk as you can see by default. If you are not using low power, it's ok to remove it and use the 32MHz XTAL, The 32MHz XTAL used in the FRDM-KW41Z is the Q22FA12800092 as you can see in the design files BOM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-JC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 21:07:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653058#M2519</guid>
      <dc:creator>jc_pacheco</dc:creator>
      <dc:date>2017-02-27T21:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653059#M2520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I went back to the FRDM board with the stock&amp;nbsp;ble_thread_host_controlled_device firmware, and only defined CLOCK_INIT_CONFIG=CLOCK_RUN_32 in the project properties. This&amp;nbsp;yields the same behavior on the FRDM board that I was seeing from my custom boards. For reference, the label on the back of one of my FRDM boards lists 700-29102 REV A2, SCH-29102 REV A3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the return from the GetFreq methods and read 32000000/16000000 with the CLOCK_RUN_32 flag set, and 47972352/23986176 with the default clock config. The&amp;nbsp;measurements on the OSCOUT pin matched these values as well, and my board behaves the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With my new clock configuration on my custom board, I read 40000000/20000000, and the frequency output also matches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had seen the out-of-band commissioning&amp;nbsp;feature of the Thread protocol. I'm more interested in speeding up the DTLS handshake, if it's possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My next issue is communicating with the KW41z over SPI. What's the protocol for this? I've got the FSCI messages basically implemented, copying the windows/linux driver logic, and comparing that output to the output of the test tool. How&amp;nbsp;are the responses&amp;nbsp;returned by the KW41z, though?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 08:19:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653059#M2520</guid>
      <dc:creator>gbh</dc:creator>
      <dc:date>2017-02-28T08:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653060#M2521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you describe the exact procedure to reproduce this in the FRDM-KW41Z boards? I'm unable to reproduce.&lt;/P&gt;&lt;P&gt;The commissioning procedure takes some time due the 6LoWPAN and DTLS encryption processing, I'll check if there's a way to try to reduce the time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please keep each topic as a separate community post? This way we can keep a better track of any issues/questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 15:11:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653060#M2521</guid>
      <dc:creator>jc_pacheco</dc:creator>
      <dc:date>2017-02-28T15:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653061#M2522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cloned the project (ble_thread_host_controlled_device) for KDS, made the changes as described in the first post in this thread (fixing paths in .cproject) and then&amp;nbsp;defined CLOCK_INIT_CONFIG=CLOCK_RUN_32 in Project Properties/"C/C++Build"/Tool Settings/Cross ARM C Compiler/Preprocessor. I then flashed the firmware to a KW41z FRDM board&amp;nbsp;using the OpenSDA interface with the J-Link driver. From there, I used the test tool to create a network on that board, add expected joiner (selected, all 0xFF, 7, 'kinetis'), sync steering data,and attempted to join&amp;nbsp;with my other KW41z FRDM board, which had the stock ble_thread_host_controlled_device firmware running on it. The joiner sends a hello, which is responded to with a HelloVerifyRequest, including a cookie. The joiner sends the cookie back in another ClientHello, but the board with the modified&amp;nbsp;firmware never never sends a ServerHello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New post created here for the SPI questions:&amp;nbsp;&lt;A href="https://community.nxp.com/thread/445897"&gt;MKW41z connectivity software THCI interface over SPI&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 04:33:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653061#M2522</guid>
      <dc:creator>gbh</dc:creator>
      <dc:date>2017-03-01T04:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653062#M2523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey JC,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm&amp;nbsp;working with the sockets again on my device, and I'm wondering what the exact nature of the error is in the test tool. I've compared the commands you sent with the commands the test tool is sending, and they look the same other than the addresses, socket indices, payloads, and (obviously) the checksums. Can you offer a bit more detail on that issue?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also,&amp;nbsp;I assume I need to poll the receive in order to actually get data back. Is that correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 08:07:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/653062#M2523</guid>
      <dc:creator>gbh</dc:creator>
      <dc:date>2017-03-09T08:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z host-controlled example THCI</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/1343921#M12074</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/45400"&gt;@jc_pacheco&lt;/a&gt; and &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160431"&gt;@gbh&lt;/a&gt;,&lt;/P&gt;&lt;DIV&gt;I'm using KW41Z as a host (using hybrid_ble_thread_host_controlled_device demo) and end-device/REED (using hybrid_ble_thread_router_wireless_uart demo) for the thread network. I'm able to create the thread network, join the network. I'm also able to send and receive data over the socket successfully.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I want to do this communication with DTLS as shown in "&lt;DIV class="lia-attachment-row-element lia-message-attachment-link-row-element"&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link-disabled lia-link-disabled"&gt;custom_leader_custom_joiner_retries.pcapng.zip&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-attachment-row-element lia-media-document"&gt;" logs.&lt;/DIV&gt;&lt;DIV class="lia-attachment-row-element lia-media-document"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;How this DTLS handshaking and communication can be done in hybrid_ble_thread_host_controlled_device and hybrid_ble_thread_router_wireless_uart?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can you please share some detail on this?&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Sep 2021 05:26:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-host-controlled-example-THCI/m-p/1343921#M12074</guid>
      <dc:creator>HastiGondaliya</dc:creator>
      <dc:date>2021-09-24T05:26:38Z</dc:date>
    </item>
  </channel>
</rss>

