<?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>Serializaiton: sd_ble_gap_lesc_dhkey_reply returns NRF_ERROR_INVALID_STATE with BLE_GAP_SEC_STATUS_UNSPECIFIED during Just Works Bonding...</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30102/serializaiton-sd_ble_gap_lesc_dhkey_reply-returns-nrf_error_invalid_state-with-ble_gap_sec_status_unspecified-during-just-works-bonding</link><description>I&amp;#39;m developing a Multi-Role device using an STM32F3 and NRF52832 with Serialization. I&amp;#39;m currently trying to add Just Works encryption to the Peripheral of my device (that is connecting to an android tablet), using the Multi-Role LESC example. I&amp;#39;ve gone</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Apr 2018 07:09:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30102/serializaiton-sd_ble_gap_lesc_dhkey_reply-returns-nrf_error_invalid_state-with-ble_gap_sec_status_unspecified-during-just-works-bonding" /><item><title>RE: Serializaiton: sd_ble_gap_lesc_dhkey_reply returns NRF_ERROR_INVALID_STATE with BLE_GAP_SEC_STATUS_UNSPECIFIED during Just Works Bonding...</title><link>https://devzone.nordicsemi.com/thread/129463?ContentTypeID=1</link><pubDate>Tue, 24 Apr 2018 07:09:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a21cae5a-71a1-46a3-8729-bb43a4667792</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. I was out of office the previous week.&lt;/p&gt;
&lt;p&gt;I talked to some guys who worked on serialization. He told me that the LESC command should be available through the serialized interface in the latest SDK-release. It&amp;#39;s only some nrf_soc API&amp;#39;s that are not included in the serialization at this point in time.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serializaiton: sd_ble_gap_lesc_dhkey_reply returns NRF_ERROR_INVALID_STATE with BLE_GAP_SEC_STATUS_UNSPECIFIED during Just Works Bonding...</title><link>https://devzone.nordicsemi.com/thread/128706?ContentTypeID=1</link><pubDate>Tue, 17 Apr 2018 22:35:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6515dad5-5fa2-4e15-a4b2-4f7219373440</guid><dc:creator>Ben</dc:creator><description>&lt;p&gt;Edvin:&lt;/p&gt;
&lt;p&gt;Has this issue been fixed in the newly released SDK15?&lt;/p&gt;
&lt;p&gt;I looked through the release notes but couldn&amp;#39;t find a specific notice that seemed applicable to crypto and serialization.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serializaiton: sd_ble_gap_lesc_dhkey_reply returns NRF_ERROR_INVALID_STATE with BLE_GAP_SEC_STATUS_UNSPECIFIED during Just Works Bonding...</title><link>https://devzone.nordicsemi.com/thread/120729?ContentTypeID=1</link><pubDate>Tue, 13 Feb 2018 15:32:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d9d3641-92a2-4470-9fc3-f5ac6f33c82a</guid><dc:creator>Ben</dc:creator><description>&lt;p&gt;Edvin:&lt;/p&gt;
&lt;p&gt;At this point I think we&amp;#39;re a little too far along to pivot away from serialization, though I&amp;#39;ll consider that for future projects.&amp;nbsp; For this project I can manually implement the RNG by gathering entropy from other sources, so while I wish it&amp;nbsp;&lt;em&gt;could&lt;/em&gt; be serialized, I&amp;#39;m not too worried about it.&lt;/p&gt;
&lt;p&gt;Do you have an estimate for the release of the next Library update?&amp;nbsp; I&amp;#39;ve added my email address to my profile if you can send it to me put would prefer not to post it publicly.&amp;nbsp; (I understand that any provided estimate isn&amp;#39;t a guarantee, it would just help me decide whether to manually implement the softdevice calls or wait for the update).&lt;/p&gt;
&lt;p&gt;Also, you&amp;#39;re saying I should be able to edit the nRF5 SDK / Library on the STM32 and modify the counterpart calls in the nRF firmware without modifications to the SoftDevice blob?&lt;/p&gt;
&lt;p&gt;I did not have the logging module enabled at that point, but will update this thread when I&amp;#39;ve repeated the tests.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serializaiton: sd_ble_gap_lesc_dhkey_reply returns NRF_ERROR_INVALID_STATE with BLE_GAP_SEC_STATUS_UNSPECIFIED during Just Works Bonding...</title><link>https://devzone.nordicsemi.com/thread/120674?ContentTypeID=1</link><pubDate>Tue, 13 Feb 2018 08:39:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5142fa0a-c3bc-4379-9eca-2810b238c7f2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Ben,&lt;/p&gt;
&lt;p&gt;I spoke to some people working in with the serialization library. As I mentioned, there seems to be some of the API for LESC that is not serialized, as mentioned in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/24914/ble_gap_evt_auth_status_t-not-serialized-correctly-in-sdk14" rel="noopener noreferrer" target="_blank"&gt;this thread&lt;/a&gt;. It has been fixed, but the fixed version has not yet been released. They also said that the Random Number Generator is &lt;b&gt;not&lt;/b&gt;&amp;nbsp;serialized. It will either be possible to do this yourself, since random numbers are sort of the back bone in encryption.&lt;/p&gt;
&lt;p&gt;Alternatively, instead of using serialization, you should consider to create your own UART protocol, without using the serialization library. This way the nRF would be in control of all BLE related operations, and you can pull requests or push any info you need between the two chips.&lt;/p&gt;
&lt;p&gt;If you want to use the serialization you can either wait for the next softdevice release, or try to implement the missing softdevice calls.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you get any information from the logging module on the application chip (STM) when the pairing fails? That is around packet #95982 in the sniffer log?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serializaiton: sd_ble_gap_lesc_dhkey_reply returns NRF_ERROR_INVALID_STATE with BLE_GAP_SEC_STATUS_UNSPECIFIED during Just Works Bonding...</title><link>https://devzone.nordicsemi.com/thread/120430?ContentTypeID=1</link><pubDate>Fri, 09 Feb 2018 13:51:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5ced68e-5b09-48d7-8e15-279049fb3f87</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Ben,&lt;/p&gt;
&lt;p&gt;I have looked a bit into this. I am not too familiar with the LESC procedure, but I see that it seems to be some serialization API missing for the LESC. I have to check around if someone knows if this is supposed to be working now. Ideally, it would have serialized the RNG, so that you would not need that on the STM.&lt;/p&gt;
&lt;p&gt;Let me come back to you on Monday.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serializaiton: sd_ble_gap_lesc_dhkey_reply returns NRF_ERROR_INVALID_STATE with BLE_GAP_SEC_STATUS_UNSPECIFIED during Just Works Bonding...</title><link>https://devzone.nordicsemi.com/thread/120348?ContentTypeID=1</link><pubDate>Thu, 08 Feb 2018 20:20:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a83bfb1-8ded-40ab-b34e-8964012cc26e</guid><dc:creator>Ben</dc:creator><description>&lt;p&gt;Hey Edvin,&lt;/p&gt;
&lt;p&gt;Yes, the STM+nRF is peripheral / slave.&lt;/p&gt;
&lt;p&gt;This is a work computer with Windows 7.&amp;nbsp; For testing on&amp;nbsp; Windows I&amp;#39;m using Win 7, nRF Connect, and a PCA10040 instead of an off the shelf USB Bluetooth adapter.&amp;nbsp; But I&amp;#39;m also at a loss for why it wasn&amp;#39;t working when connecting to nRF Connect on iOS.&lt;/p&gt;
&lt;p&gt;I programmed the PCA10040 with the ble_app_multirole_lesc and everything worked as expected.&amp;nbsp; I&amp;#39;m not sure what the best way to program my board without using serialization would be, so I haven&amp;#39;t.&amp;nbsp; (The only thing I could think was to try to program the nRF on my board with the ble_app_multirole_lesc program, but I&amp;#39;m not sure what that would really be testing).&lt;/p&gt;
&lt;p&gt;With Serialization, I can&amp;#39;t compile if I don&amp;#39;t make the modifications to nrf_drv_rng as I don&amp;#39;t have that nrf_rng peripheral on the STM32.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve attached the Wireshark sniffer from my attempt to connect with iOS / nRF Connect&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/lesc_5F00_error.pcapng"&gt;devzone.nordicsemi.com/.../lesc_5F00_error.pcapng&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serializaiton: sd_ble_gap_lesc_dhkey_reply returns NRF_ERROR_INVALID_STATE with BLE_GAP_SEC_STATUS_UNSPECIFIED during Just Works Bonding...</title><link>https://devzone.nordicsemi.com/thread/120065?ContentTypeID=1</link><pubDate>Wed, 07 Feb 2018 09:22:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fe9d22c-3c7c-4525-9464-8d5b6e106243</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Ben,&lt;/p&gt;
&lt;p&gt;I assume that the STM+nRF acts as the peripheral/slave, is that correct?&lt;/p&gt;
&lt;p&gt;I think that Windows does not yet support LESC. At least it didn&amp;#39;t do in May, as @Rocky posted in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/21746/windows-10-lesc" rel="noopener noreferrer" target="_blank"&gt;this thread&lt;/a&gt;. This should however not mean that it shouldn&amp;#39;t work in nRF Connect&lt;/p&gt;
&lt;p&gt;Have you tried to do this with a &amp;quot;bare nRF&amp;quot; example, without serialization? Just for debugging purposes, that is. Thus also, without removing the&amp;nbsp;&lt;span&gt;nrf_drv_rng drivers, and rewriting nrf_crypto_sw_rng.c and ecc.c?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can try the example from SDK\examples\ble_central_and_peripherals\ble_app_multirole_lesc&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I see from the screenshot of the sniffer log that it is the Master/central that sends the first pairing failed: unspecified reason. Could you post the sniffer log file?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>