<?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>BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94324/ble-just-works-on-nrf52832-and-nrf-connect</link><description>Hi, I am working on something that requires me to use Just Works on nrf52832 custom board. Here is the work sccenario. under normal conditions, my module has a bonding PIN and the user is supposed to enter the PIN on his application to get data. My NRF</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Jan 2023 12:31:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94324/ble-just-works-on-nrf52832-and-nrf-connect" /><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/403178?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 12:31:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3564e04f-d622-4795-bfe1-c1a1cf1c4197</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;I believe it is due to the UART as mentioned in the other thread. I am not using uARTE and so, I am trying with the work thread. It seems like there are no more crashes but now I have a couple of other problems. When I try to switch to Just Works, it is somewhere &amp;#39; in the middle&amp;#39; kind of state. It still asks me for passkey but when I enter the passkey, pairing fails due to wrong passkey. So, i guess somehow the old passkey is removed but the method of pairing still exists. Cant seem to get any clue on that behaviour.&lt;br /&gt;Also, the whole unpairing process is taking something like 10 minutes or so to even start.&lt;/p&gt;
&lt;p&gt;Edit : I think the delay in unpairing described above is my mistake. From what I observe now, the issue seems to be resolved and I can switch between modes comfortably. Hence, closing the case.&lt;/p&gt;
&lt;p&gt;Thank you so much for the support. &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/88947/isr-error-in-asynchronous-uart-rx-tx-crashing-zephyr-when-using-bluetooth-ncs-v1-9-1"&gt;This thread&lt;/a&gt; proved to be useful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/403165?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 11:47:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:101bc2ab-8576-4a66-9e66-7e3a78fc228a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi again,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think we need to clarify if the issue related to UART or not. If you test with my example do you see the problem ?&amp;nbsp;&lt;br /&gt;How do you handle UART ? Do you use EasyDMA ? I don&amp;#39;t think it has any problem with erasing setting.&amp;nbsp;&lt;br /&gt;It&amp;#39;s important to see where you call the bond erase command. If you are calling it inside an interrupt handler, I would suggest not to do so.&amp;nbsp;&lt;br /&gt;You should put the erase in a work thread and start the work in the interrupt handle. So that the bond erase command is called in a thread level. This is similar to&amp;nbsp;uart_work in the example.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/403152?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 11:01:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b912d62-86a1-49ad-9877-d3a893beee50</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;I have a UARt command for the functionality and there will always be more than atleast a couple of seconds delay between the commands. The commands are not queued at all. I was wondering if my problem has anything to do with &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/88947/isr-error-in-asynchronous-uart-rx-tx-crashing-zephyr-when-using-bluetooth-ncs-v1-9-1"&gt;this older issue&lt;/a&gt; . What do you think about that ?&lt;/p&gt;
&lt;p&gt;Is there anything else you suggest that might help me?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/403139?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 10:25:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff085b44-1034-40d1-a326-4c3c3a386504</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;I would assume in your application you will have a button or an UART command that switch the pairing feature. And this doesn&amp;#39;t have to be switch back and forth in very short time ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Erasing a page in flash taking time, can be up to 90ms. I wouldn&amp;#39;t suggest to queueing a lot of erase command in a short period of time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the bond is already erased you don&amp;#39;t need to erase the bond again to switch the pairing method.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/403135?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 10:21:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43adb854-6227-4136-ace7-331d116b7fcd</guid><dc:creator>Midhunjac</dc:creator><description>[quote userid="2121" url="~/f/nordic-q-a/94324/ble-just-works-on-nrf52832-and-nrf-connect/403115"]Could you try the attached hex file ?&amp;nbsp;[/quote]
&lt;p&gt;I tried this but seems like my DK buttons have become completely useless. I do not even see the callback prints.There seems to be no effect too. Sorry about that. Is there some other way we can verify this ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/403129?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 10:02:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d1b21ad-f106-4a08-80ba-9ffe876798f6</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I had tried with v2.2.0 too and there were no changes to my observation. Using buttons do not always create a problem but I have observed problems when I switch back and forth for long times though. You see, ultimately what I want in this project is to control the switching with UART commands on a custom board.Hence, even in the devkit I try to use a similar feature (i.e UART controlled BLE mode switching.) As such, it is of little consequence to me beyond debugging purposes that whether this works fine with buttons. I hope you get the bigger picture. A new problem now is that the buttons in my DK are not working fine as it used to before.&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/94324/ble-just-works-on-nrf52832-and-nrf-connect/403115"]You mentioned you tested on different devkit and got the same result[/quote]
&lt;p&gt;Not different devkits, different devices. I tried it on another nrf52840 and got the same result.&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/94324/ble-just-works-on-nrf52832-and-nrf-connect/403115"]If you&amp;nbsp;test with my code without any modification do you have the same issue ?[/quote]
&lt;p&gt;The last time I checked, it was working fine for a majority of cases except when there was a huge number of switching back and forth between modes. But as I told, that is not something I really want.&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/94324/ble-just-works-on-nrf52832-and-nrf-connect/403115"]Could you try the attached hex file ?&amp;nbsp;[/quote]
&lt;p&gt;I will let you know about the result.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/403115?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 09:18:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30b91aef-45fd-49bc-9847-46a52bd43b17</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Midjunhac,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried to compile with v2.1.0 and it doesn&amp;#39;t change the result for me.&amp;nbsp;&lt;br /&gt;It&amp;#39;s strange that deleting setting would cause an issue for you. If you simply to make the button to delete setting /bond and don&amp;#39;t change anything in the pairing configuration do you have the issue ?&amp;nbsp;&lt;br /&gt;Have you tried to test with v2.2.0 ?&amp;nbsp;&lt;br /&gt;You mentioned you tested on different devkit and got the same result ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you&amp;nbsp;test with my code without any modification do you have the same issue ?&lt;/p&gt;
&lt;p&gt;Could you try the attached hex file ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0027.zephyr.hex"&gt;devzone.nordicsemi.com/.../0027.zephyr.hex&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/403019?ContentTypeID=1</link><pubDate>Tue, 03 Jan 2023 15:39:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5de51540-4e7e-4f46-8ca3-bf011a29f95f</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Whatever I try, it all ends in the same error message. And I always trace it back to the settings_delete() in C:\ncs\v2.1.0\zephyr\subsys\settings\src\settings_store.c. Please go through the latest logs attached. There are some custom minor changes but the overall workflow and process is still the same.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_01_2D00_03-153723.png" /&gt;&lt;/p&gt;
&lt;p&gt;I have no idea why this does not come up in any of your tests though. I have tried different projects, different methods and even different devices and it all ends the same way. Can you please help me figure this out ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edits:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/94324/ble-just-works-on-nrf52832-and-nrf-connect/402850"]Note that I don&amp;#39;t use&amp;nbsp;&lt;strong&gt;CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE&amp;nbsp;&lt;/strong&gt;[/quote]
&lt;p&gt;I dont use that either.&lt;/p&gt;
&lt;p&gt;However, &lt;strong&gt;please note that I am using NCS v2.1.0&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Also, since I believed that the mutexes in the settings_save_one() which is invoked by the settings_delete(), I tried commenting out the invokes to settings_delete() to check if there was a change in situation and it worked. There was no more of this error and I could switch back and forth. This strengthened my belief that there might be something happening around that part. But that does not explain why I am the only one with issue though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402850?ContentTypeID=1</link><pubDate>Mon, 02 Jan 2023 14:54:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12289c19-8429-4cf4-a8c4-2f76ebbe5228</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Could you try my attached code. I added the following code for Button2 to switch back to passkey:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;buttons&lt;/span&gt;&lt;span&gt; &amp;amp; &lt;/span&gt;&lt;span&gt;DK_BTN2_MSK&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;LOG_INF&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;BTN2&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bt_passkey_set&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;passkey&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bt_conn_auth_cb_register&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bt_conn_auth_cb_register&lt;/span&gt;&lt;span&gt;(&amp;amp;&lt;/span&gt;&lt;span&gt;conn_auth_callbacks&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; } &amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;And I can switch between bond modes back and forth multiple times.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1672671222926v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/16682.main.c"&gt;devzone.nordicsemi.com/.../16682.main.c&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note that I don&amp;#39;t use&amp;nbsp;&lt;strong&gt;CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402833?ContentTypeID=1</link><pubDate>Mon, 02 Jan 2023 14:01:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85a96abc-e98c-492f-939a-25b8b27c61b9</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;I know what caused the issue. It is the bt_unpair() at top level that causes the issue. I debugged a bit and as far as i can tell, it traces back to settings_delete() in C:\ncs\v2.1.0\zephyr\subsys\settings\src\settings_store.c. Please see the attached log. The error happens when one switches from passkey to justoworks and then to passkey.&amp;nbsp; The settings-delete() invokes a settings_save_one() which employs mutex. I believe that operation inside the mutex lock is what is causing the issue.&amp;nbsp; &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/putty.txt"&gt;devzone.nordicsemi.com/.../putty.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402815?ContentTypeID=1</link><pubDate>Mon, 02 Jan 2023 13:18:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95b2cce6-c468-49bc-9822-ecdaa958378b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi again,&amp;nbsp;&lt;br /&gt;If you see an error please try to debug. We can&amp;#39;t just test every combination for you.&amp;nbsp;&lt;br /&gt;Please try to get the error log. Check what exactly which function cause the error and if possible step into the code and see why it crashed. It&amp;#39;s not a black box.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;We will try to help you but you need to provide debug information.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402810?ContentTypeID=1</link><pubDate>Mon, 02 Jan 2023 12:37:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f7f3e18-15eb-46b8-bcfe-01f5b312e0c1</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;I tested the attached configuration and it works fine. I think I now understand the issue. The test procedure is incomplete. The following is the test sequence that gives the error.&lt;/p&gt;
&lt;p&gt;Pair using static key - &lt;strong&gt;SUCCESS&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Disconnect&lt;/p&gt;
&lt;p&gt;Button 3 (or some function to unpair )&lt;/p&gt;
&lt;p&gt;Button 4 ( or some function to switch to Just Works)&lt;/p&gt;
&lt;p&gt;Pair again - &lt;strong&gt;SUCCESS&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Disconnect&lt;/p&gt;
&lt;p&gt;Button 3 (or some function to unpair )&lt;/p&gt;
&lt;p&gt;Button 4 ( or some function to switch BACK TO fixed passkey ) - &lt;strong&gt;ASSERT&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Attempt to pair - &lt;strong&gt;FAILURE&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The below is a very crude form of the test setup. Sending &amp;#39;h&amp;#39; through UART, makes the module switch to fixed passkey and sending &amp;#39;c&amp;#39; through UART makes it switch to Just Works.&lt;/p&gt;
&lt;p&gt;I think this would show the failure condition. Can you please try this one? Please forgive the mess in the attached code. I have been trying a lot of things.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/51568.main.c"&gt;devzone.nordicsemi.com/.../51568.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402804?ContentTypeID=1</link><pubDate>Mon, 02 Jan 2023 12:04:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42d2e6a9-5e37-4a7e-8f82-f602df275b97</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please try the attached project with static passkey. I tested here and it worked fine.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1672661027983v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_uart_5F00_changebond2.zip"&gt;devzone.nordicsemi.com/.../peripheral_5F00_uart_5F00_changebond2.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6406.zephyr.hex"&gt;devzone.nordicsemi.com/.../6406.zephyr.hex&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402792?ContentTypeID=1</link><pubDate>Mon, 02 Jan 2023 11:30:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:726d41fb-5935-4237-ab3d-f7af2a51043e</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;I do not understand this. Can you please do me a favor and try again the same steps with the fixed passkey thing as I did and let me know , if that is not too much to ask ? I still have the same issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402790?ContentTypeID=1</link><pubDate>Mon, 02 Jan 2023 11:22:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8479f18a-32ff-4291-a95b-6e6a136f125d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi again,&amp;nbsp;&lt;br /&gt;I attached here the log when I test with my example:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1672658500289v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;What I did was to connect, bond, then disconnect, then press button 3 (BTN3), and then Button 4 (BTN) then pair again. It worked just fine, no assert.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402759?ContentTypeID=1</link><pubDate>Mon, 02 Jan 2023 09:02:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4931acb5-13b3-44fd-914e-c9125034bf8d</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;Yes when button 3 is pressed I can bond.But what actually happens is this same assertion failure and a consequent reboot. I hadnt gone through the logs earlier so I could not see this happening. All these happens so fast that I could not observe any thing wrong while connecting/dusconnecting/pairing. Can you please check on your side if there is this assertion failure happening ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402747?ContentTypeID=1</link><pubDate>Mon, 02 Jan 2023 08:32:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f529f9bd-e4bb-4c32-94bd-3e0b4bdda165</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried with my example ? When you press button 3 on the kit would the bond information be deleted ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please do a chip erase before testing.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402718?ContentTypeID=1</link><pubDate>Sat, 31 Dec 2022 13:49:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cc9bc98-e8c9-4067-b497-07adf2ebd0d0</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;Hi, Just to add to the my previous observations, here is the wireshark capture for the events. The file &amp;#39;capture_whole_new.pcapng&amp;#39; contains the packets for the test case 1 described above. &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/capture_5F00_whole_5F00_new.pcapng"&gt;devzone.nordicsemi.com/.../capture_5F00_whole_5F00_new.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402710?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2022 23:06:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ea6942d-fcc6-4f75-b809-d7887faed56a</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I did as instructed, but nothing much has changed except for on thing. Here are the two cases that I have tried.&lt;/p&gt;
&lt;p&gt;1) Establish a bond first with passkey and then try Just Works.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The passkey bonding works fine. But if I try to switch to Just Works, the bonding attempt fails without any error message. It just shows &amp;#39;NOT BONDED&amp;#39; in the nrf connect. But from what I understand by examining the flags set, it seems like the module is still remembering the previous connections.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;2) Establish a bond first using Just Works. Unpair it from the nrf connect. Try pairing again using Just Works&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The first time pairing using Just Works works fine. The device is paired. The second time the pairing using the same callbacks and same methods will be unsuccessful.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is the snippet that I use with a custom function.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*&amp;lt;main.c&amp;gt;*/

static struct bt_conn_auth_cb conn_auth_callbacks = {
	//.passkey_display = auth_passkey_display,
	.passkey_confirm = auth_passkey_confirm,
	.cancel = auth_cancel,
};

static struct bt_conn_auth_cb conn_auth_callbacks2 = {
	.cancel = auth_cancel,
};

static struct bt_conn_auth_info_cb conn_auth_info_callbacks = {
	.pairing_complete = pairing_complete,
	.pairing_failed = pairing_failed
};

void update()
{
    LOG_INF(&amp;quot;Update ble pairing&amp;quot;);
   // bt_unpair(BT_ID_DEFAULT,NULL);// including this line results in system crash
	bt_passkey_set(BT_PASSKEY_INVALID);
	bt_conn_auth_cb_register(NULL);
	bt_conn_auth_cb_register(&amp;amp;conn_auth_callbacks2);
}
/*&amp;lt;prj.conf&amp;gt;*/

CONFIG_BT_SMP=y
CONFIG_BT_FIXED_PASSKEY=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, whenever I use bt_unpair function, the system crashes immediately with the following message&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ASSERTION FAIL [!arch_is_in_isr()] @ WEST_TOPDIR/zephyr/kernel/mutex.c:101&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mutexes cannot be used inside ISRs&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;*** Booting Zephyr OS build v3.1.99-ncs1&amp;nbsp; ***&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Starting Nordic UART service example&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;From what I&amp;#39;ve observed, whenever there is a previously established bond, if we try to unpair using bt_unpair(), this assertion fails. If there are no previous bonds, there is no problem.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So, all the testing that I did above was done without invoking the bt_unpair(). But the bonding information from the nrf connect was deleted after each successful bonding. Is this why the module was still &amp;#39;remembering&amp;#39; its previous state ? But even if that was the case, isnt the case (2) supposed to work ?&lt;/p&gt;
&lt;p&gt;Can you please explain this behavior ? Is there something wrong I am doing ? I do not seem to understand the issue here. Thanks a lot for helping me out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402671?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2022 12:45:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65e84eb1-d0eb-4236-b3f6-f182a54bc551</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do this when in button 4 handler (before&amp;nbsp;bt_conn_auth_cb_register calls)&amp;nbsp; and it should work:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bt_passkey_set&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;BT_PASSKEY_INVALID&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;You can find such information in the documentation of the function:&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/2.6.0/reference/bluetooth/connection_mgmt.html?highlight=bt_passkey_set#c.bt_passkey_set"&gt;https://docs.zephyrproject.org/2.6.0/reference/bluetooth/connection_mgmt.html?highlight=bt_passkey_set#c.bt_passkey_set&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402655?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2022 11:24:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:535e8f99-f940-493b-9595-b56de9908d03</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you sure about that ? Because I made the above two changes to the prj.conf and deleted the display callback. Now I can set my passkey on the module with bt_passkey_set(). It works fine. I have to enter the said passkey in nrf connect application to bond. But now I cannot switch to Just Works with the changes you attached. The nrf connect will still prompt me to enter the preset passkey even after pressing the Button 4. Is there anything I am missing? Can you confirm this behavior at your end please? These are my callbacks and prj.conf configurations.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*&amp;lt;main.c&amp;gt;*/

static struct bt_conn_auth_cb conn_auth_callbacks = {
	//.passkey_display = auth_passkey_display,
	.passkey_confirm = auth_passkey_confirm,
	.cancel = auth_cancel,
};

static struct bt_conn_auth_cb conn_auth_callbacks2 = {
	.cancel = auth_cancel,
};

static struct bt_conn_auth_info_cb conn_auth_info_callbacks = {
	.pairing_complete = pairing_complete,
	.pairing_failed = pairing_failed
};

/*&amp;lt;prj.conf&amp;gt;*/

CONFIG_BT_SMP=y
CONFIG_BT_FIXED_PASSKEY=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402568?ContentTypeID=1</link><pubDate>Thu, 29 Dec 2022 16:08:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8bac729-4e8d-4400-94bc-f69bb079721e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Midhunjac,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;No I don&amp;#39;t see a problem with the configuration. A device can support both passkey and Just work. You can configure with passkey in the prj.conf and then if in the code you don&amp;#39;t supply the callback for display then only Just work allowed.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402530?ContentTypeID=1</link><pubDate>Thu, 29 Dec 2022 12:33:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a523aa2-1478-4672-a5c0-99d8a7e99808</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the help. It works now as you described above.. Maybe i was using the wrong button for flashing the device in the VS code. There needs to be a few changes though. As I said, my module has a static passkey and the user should enter that passkey to bond. Not the other way round as it is in your example.&lt;/p&gt;
[quote userid="120818" url="~/f/nordic-q-a/94324/ble-just-works-on-nrf52832-and-nrf-connect"]normal conditions, my module has a bonding PIN and the user is supposed to enter the PIN on his application to get data. My NRF module is a peripheral and i have enabled following in the prj.conf.[/quote]
&lt;p&gt;The way I understand, for the module to work like that, we need to set CONFIG_BT_FIXED_PASSKEY and CONFIG_BT_SMP to &amp;#39;y&amp;#39;. right ?&lt;/p&gt;
&lt;p&gt;But if we do that, is there some way I can switch mode to Just Works during run time as I think that these configuration options blocks the working of Just Works ? I am aware that they are build configurations and may not be modifiable during runtime but is there any chance of achieving this ? Thanks again for helping me through this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402457?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2022 15:20:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2681c44-3cda-4854-8ef3-41b3a5fb7e6f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi again,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can read about the&amp;nbsp;&lt;span&gt;CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#!CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE"&gt;here&lt;/a&gt;. For any KConfig configuration you can search there.&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1672240275434v1.png" alt=" " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Basically when you enable this option, it allow a device that you already bonded can make another bond. Just like what you did in Step 2 and 3.&amp;nbsp;&lt;br /&gt;However this option only allow overwriting when the previous bond is UNAUTHORIZED (Just work) At step 3 , the previous bond as Passkey so it not allowed to overwrite the bond without erasing it first.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please try to test my example again and list how you tested it and what you observed.&amp;nbsp;&lt;br /&gt;My suggestion is:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- First use nRF Connect to connect and bond, you should see a passkey appear and you need to press button 1 on the board to confirm the pass key (numeric comparison)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-&amp;nbsp;Disconnect&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Press button 3 to erase bond&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Press button 4 to change mode&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Use nRF Connect to connect, then bond. You will see a pop up asking to pair, but no passkey, you don&amp;#39;t have to press anything on the DK , only on the phone. This is Just work pairing.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you still have issue please try to capture the sniffer trace. You don&amp;#39;t need to install the Sniffer API, just need to follow what in the documentation.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Just Works on nrf52832 and NRF Connect</title><link>https://devzone.nordicsemi.com/thread/402454?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2022 14:45:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52ee0f35-0939-46ee-b714-cbb5caa210ce</guid><dc:creator>Midhunjac</dc:creator><description>&lt;p&gt;Hi, you are right about my final goal. I want a button press event to allow both Just Work and passkey states. But it does not work. The example that you provided also did not yield any success. The button press events are registered but it does not allow the Just Work method. The two separate images were just part of debugging, to get a better clarity.&lt;/p&gt;
&lt;p&gt;But the summary you derived is not quite right. I will make myself clear.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First I flash the Just Works image. It works fine. (No passkey,just bonded fine) (log 1)&lt;/li&gt;
&lt;li&gt;Next i flashed the Fixed passkey image. It works fine too.(Prompted to enter passkey. If passkey is right, bonded) (log 2)&lt;/li&gt;
&lt;li&gt;Finally, flash the Just Works image again. This time it does not work as it worked in the first iteration.(log 3)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As for the extension in VS code, I had been using the icon next to &amp;quot;flash&amp;quot;. Maybe that explains my observation in the above three iterations. I will give the icon you mentioned a try and see if the situation changes.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/94324/ble-just-works-on-nrf52832-and-nrf-connect/402391"]Please be aware that&amp;nbsp;CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE=y only allow replacement of unauthorized (Just Work) bonding. So you can&amp;#39;t replace bonding automatically if the bonding was done with Passkey.&amp;nbsp;[/quote]
&lt;p&gt;Can you please elaborate on this ? Or can you point me to a document which explains what this is and its application? This seems to do what I want but somehow it feels like this is not the right way to implement Just Works.&lt;/p&gt;
&lt;p&gt;Also, what is the correct way to get Just Works working ?My characteristics do not require any encryption at all yet Just Works does not seem to work. Thank you for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>