<?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>pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18984/pc-ble-driver-py---sd_ble_gap_sec_params_reply-fails</link><description>I have been using the pc-ble-driver Python bindings to implement a peripheral. I have extended BLEDriver to support sd_ble_gatts_* the functions. I now have a working peripheral, however I have a problem when trying to support bonding. 
 When the central</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 17 May 2018 19:13:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18984/pc-ble-driver-py---sd_ble_gap_sec_params_reply-fails" /><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/132445?ContentTypeID=1</link><pubDate>Thu, 17 May 2018 19:13:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f9417d6-cfb7-48f0-861e-136979ffbaea</guid><dc:creator>josschne</dc:creator><description>&lt;p&gt;Thank you as well for this solution! I am implementing a bonded DFU solution and this was critical to making nrfutil work reliably.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/73379?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2017 15:33:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96657d46-0950-4990-80bb-f18d1d19fdd5</guid><dc:creator>Paul Stone</dc:creator><description>&lt;p&gt;This works, thank you! I had been able to partially work around this issue by limiting the size of data passed to sd_ble_gap_sec_params_reply (e.g. by only requesting peer LTK, but not the IRK). It now makes sense why this worked, and why error 0x03 was caused by timeout errors.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/73378?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2017 14:57:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58c7a8be-456e-4aa7-98bf-3d0b79db3939</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;If others experience this error (0x03), with the pc-ble-driver on Linux/OSX, you can try this:&lt;/p&gt;
&lt;p&gt;There is an issue with the Segger firmware when using long packets over UART on Linux/OSX. The solutions is to disable the Mass Storage Device (MSD). The procedure to disable it is described in Workareound 2 on &lt;a href="https://wiki.segger.com/index.php?title=J-Link-OB_SAM3U#Workaround_2"&gt;this page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I know the page say that the issue is not present on Linux, but it solved this exact problem for another user, so it might be worth trying.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/73377?ContentTypeID=1</link><pubDate>Thu, 19 Jan 2017 17:17:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76b7ddbb-299d-4f8b-9baa-e270ff2e996b</guid><dc:creator>Paul Stone</dc:creator><description>&lt;p&gt;I finally figured out how to make this work. The connectivity firmware will simply not respond if  sec_params and sec_keyset are not filled in exactly right. I had to call sd_ble_gap_sec_params_reply directly, instead of using ble_gap_sec_params reply in the BLEDriver class.&lt;/p&gt;
&lt;p&gt;The following worked for me:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sec_status = ble_driver.BLE_GAP_SEC_STATUS_SUCCESS
sec_params = ble_driver.ble_gap_sec_params_t()
sec_params.bond = 1
sec_params.mitm = 0
sec_params.lesc = 0
sec_params.keypress = 0
sec_params.io_caps = 3
sec_params.oob = 0
sec_params.min_key_size = 7 # fails if not 7
sec_params.max_key_size = 16
sec_params.kdist_own.enc = 0
sec_params.kdist_own.id = 0
sec_params.kdist_own.sign = 0
sec_params.kdist_own.link = 0
sec_params.kdist_peer.enc = 0
sec_params.kdist_peer.id = 0
sec_params.kdist_peer.sign = 0
sec_params.kdist_peer.link = 0
sec_keyset = ble_driver.ble_gap_sec_keyset_t()
ble_driver.ble_gap_sec_params_reply(conn_handle, sec_status, sec_params, sec_keyset)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After this I get a BLE_GAP_EVT_CONN_SEC_UPDATE event followed by a BLE_GAP_EVT_AUTH_STATUS event.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/73375?ContentTypeID=1</link><pubDate>Thu, 19 Jan 2017 12:33:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0d81814-8ebd-49e9-90f8-e14da5c99db1</guid><dc:creator>Paul Stone</dc:creator><description>&lt;p&gt;Using gdb, I found that the NRF_ERROR_INTERNAL is caused by a NRF_ERROR_TIMEOUT in H5Transport::send. I tried increasing the timeouts for sd_rpc_data_link_layer_create_bt_three_wire and sd_rpc_transport_layer_create but the error still occurs. I also enabled the log message handler for sd_rpc_open and got the following output:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;on_gap_evt_connected - conn_handle: 0 role: BLEGapRoles.periph
12/ 0 &amp;lt;-  [02 13 00 00 00 47 00 10 0f 0f ]
            type:     VENDOR_SPECIFIC reliable:yes seq#:4 ack#:3 payload_length:a data_integrity:1 header_checksum:76 err_code:0
    15 -&amp;gt;  []
            type:                 ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0
on_gap_evt_sec_params_request - conn_handle
13/ 0 &amp;lt;-  [02 12 00 00 00 06 00 06 00 00 00 d0 07 ]
            type:     VENDOR_SPECIFIC reliable:yes seq#:5 ack#:3 payload_length:d data_integrity:1 header_checksum:45 err_code:0
    16 -&amp;gt;  []
            type:                 ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0
14/ 0 &amp;lt;-  [02 12 00 00 00 28 00 28 00 00 00 d0 07 ]
            type:     VENDOR_SPECIFIC reliable:yes seq#:6 ack#:3 payload_length:d data_integrity:1 header_checksum:44 err_code:0
    17 -&amp;gt;  []
            type:                 ACK reliable: no seq#:0 ack#:7 payload_length:0 data_integrity:0 err_code:0
    18 -&amp;gt;  [00 7f 00 00 00 01 47 00 10 03 03 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
            type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:7 payload_length:118 data_integrity:1 header_checksum:66 err_code:0
    19 -&amp;gt;  [00 7f 00 00 00 01 47 00 10 03 03 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
            type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:7 payload_length:118 data_integrity:1 header_checksum:66 err_code:0
    20 -&amp;gt;  [00 7f 00 00 00 01 47 00 10 03 03 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
            type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:7 payload_length:118 data_integrity:1 header_checksum:66 err_code:0
    21 -&amp;gt;  [00 7f 00 00 00 01 47 00 10 03 03 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
            type:     VENDOR_SPECIFIC reliable:yes seq#:3 ack#:7 payload_length:118 data_integrity:1 header_checksum:66 err_code:0
Traceback (most recent call last):
File &amp;quot;bond_test2.py&amp;quot;, line 60, in &amp;lt;module&amp;gt;
    main(serial_port)
File &amp;quot;bond_test2.py&amp;quot;, line 46, in main
    driver.ble_gap_sec_params_reply(0, BLEGapSecStatus.success, sec_params, None, None)     
File &amp;quot;/usr/local/lib/python2.7/dist-packages/pc_ble_driver_py/ble_driver.py&amp;quot;, line 126, in wrapper
    raise NordicSemiException(&amp;#39;Failed to {}. Error code: {}&amp;#39;.format(wrapped.__name__, err_code))
pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_gap_sec_params_reply. Error code: 3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;edit: I compared the bytes in the debug output to &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v9.0.0/ble_serialization_s130_functions_gap.html?cp=4_0_5_3_2_1_3_3_15#nrf51_sec_params_reply_encoding"&gt;the documented serialization for sd_ble_gap_sec_params_reply&lt;/a&gt;. The serialized message is 280 bytes long - but the documentation says it should be no longer than 148 bytes. So it would seem that the message is malformed and causing the connectivity firmware to crash.&lt;/p&gt;
&lt;p&gt;edit 2: i was looking at an old version of the docs. The &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/ble_serialization_s130_functions_gap.html?cp=4_0_3_3_2_1_1_3_15#nrf51_sec_params_reply_encoding"&gt;encoding is correct&lt;/a&gt;, but I believe the error is caused by not filling in the ble_gap_sec_keyset_t struct correctly. I&amp;#39;ll post the answer here if I manage to get it working.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/73376?ContentTypeID=1</link><pubDate>Thu, 19 Jan 2017 07:51:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9936502-ab1e-4a6d-8f1f-e6d50c6fac89</guid><dc:creator>Mike</dc:creator><description>&lt;p&gt;I have also described the same problem &lt;a href="https://devzone.nordicsemi.com/question/110137/pc-ble-driver-10-bonding/"&gt;here&lt;/a&gt;. After using flag and calling &lt;code&gt;sd_ble_gap_sec_params_reply()&lt;/code&gt; form main loop I also get the &lt;code&gt;NRF_ERROR_INTERNAL&lt;/code&gt;. Tested with PCA10040.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/73374?ContentTypeID=1</link><pubDate>Wed, 18 Jan 2017 17:03:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bbc98d2-c02a-4d1c-bf88-ce6a553c7ae3</guid><dc:creator>Paul Stone</dc:creator><description>&lt;p&gt;I think this is a general problem with the connectivity firmware. I used two nRF Connect for Desktop instances on a pair of nRF51 dev boards. When bonding one to the other I get the same error as my Python script -  &amp;#39;Failed to reply security parameters. (NRF_ERROR_INTERNAL)&amp;#39;. This is using the latest 1.1.0 connectivity firmware, tested on both Windows 10 and Linux. See &lt;a href="https://devzone.nordicsemi.com/question/95564/error-when-trying-to-pairbond-to-a-peripheral-in-nrf-connect-v10-on-linux/"&gt;this similar question&lt;/a&gt;. Could it be my board rev? I have two PCA10026 nRF51 dev boards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/73372?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2017 14:48:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:605b9b54-18b3-4801-9be0-e42f4780ef69</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Could you catch a sniffer trace ?
I tried again with a nRF51 and it also worked (tried with nRF52 and v3 earlier) it also work with my Android S6.&lt;/p&gt;
&lt;p&gt;Note that error 3 is not in the list of error return code of sd_ble_gap_sec_params_reply()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/73371?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2017 14:25:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fbb744b-e8b5-4ecf-9251-0c7a06693367</guid><dc:creator>Paul Stone</dc:creator><description>&lt;p&gt;Unfortunately, I still get the same error 3 with your code (which seems to be equivalent to mine). I&amp;#39;m using nRF Connect on Android 6 to connect and initiate bonding.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/73370?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2017 09:10:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64dc8f6c-fa58-4af6-b48a-c6033aaa30b4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Paul,
Not sure why you got the issue.
I did a quick mod of your example and it worked for me:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import sys
import time 
import logging
from pc_ble_driver_py.observers import BLEDriverObserver

logging.basicConfig(level=logging.DEBUG)
flag = 0
def init(conn_ic_id):
    global BLEDriver, BLEAdvData, BLEGapSecStatus, BLEGapSecParams, BLEGapIOCaps, BLEGapSecKDist
    from pc_ble_driver_py import config
    config.__conn_ic_id__ = conn_ic_id
    from pc_ble_driver_py.ble_driver import BLEDriver, BLEAdvData, BLEGapSecStatus, BLEGapSecParams, BLEGapIOCaps, BLEGapSecKDist

class PeripheralTest(BLEDriverObserver):
    def on_gap_evt_connected(self, ble_driver, conn_handle, peer_addr, role, conn_params):
        print(&amp;#39;on_gap_evt_connected - conn_handle: {} role: {}&amp;#39;.format(conn_handle, role))

    def on_gap_evt_disconnected(self, ble_driver, conn_handle, reason):
        print(&amp;#39;on_gap_evt_disconnected - conn_handle: {} reason: {}&amp;#39;.format(conn_handle, reason))

    def on_gap_evt_sec_params_request(self, ble_driver, conn_handle, peer_params):
        global flag
        flag = 1
        print(&amp;#39;on_gap_evt_sec_params_request - conn_handle&amp;#39;.format(&amp;#39;conn_handle&amp;#39;))
 
def main(serial_port):
    global flag
    print(&amp;#39;Serial port used: {}&amp;#39;.format(serial_port))
    driver = BLEDriver(serial_port=serial_port, auto_flash=False)
    periph = PeripheralTest()
    driver.observer_register(periph)
    driver.open()
    driver.ble_enable()
    driver.ble_gap_adv_data_set(BLEAdvData(complete_local_name=&amp;#39;Bond Test&amp;#39;))
    driver.ble_gap_adv_start()
    print(&amp;#39;Started advertising&amp;#39;)
    try:
        while 1==1:
            time.sleep(1)
            if flag == 1:    
                sec_params = BLEGapSecParams(bond = 1, mitm = 0, lesc = 0,keypress = 0, io_caps = BLEGapIOCaps.none, oob = 0, 
                min_key_size = 7, max_key_size = 16,
                kdist_own = BLEGapSecKDist(enc=1, id=1, sign=0, link=0),
                kdist_peer = BLEGapSecKDist(enc=1, id=1, sign=0, link=0))
                driver.ble_gap_sec_params_reply(0, BLEGapSecStatus.success, sec_params, None, None)		
                flag=0
    except KeyboardInterrupt:
        pass
    print(&amp;#39;Closing&amp;#39;)
    driver.close()

if __name__ == &amp;#39;__main__&amp;#39;:
    serial_port = None
    if len(sys.argv) &amp;lt; 3:
        print(&amp;quot;Please specify connectivity IC identifier (NRF51, NRF52) and serial port&amp;quot;)
        exit(1)
    init(sys.argv[1])
    serial_port = sys.argv[2]
    main(serial_port)
    quit()
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/73373?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2017 15:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1f53ed4-193c-4e50-a17c-b85f1733028a</guid><dc:creator>Paul Stone</dc:creator><description>&lt;p&gt;Thanks for looking into this! Calling ble_gap_sec_params_reply from the main thread no longer crashes but instead returns error code 3. I&amp;#39;ve updated my example above to show this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py - sd_ble_gap_sec_params_reply fails</title><link>https://devzone.nordicsemi.com/thread/73369?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2017 10:07:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5d40ca0-a187-4c8f-8ab8-6d9bf1d0569a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;We found it&amp;#39;s a bug with the ble_driver that if you call ble_gap_sec_params_reply() inside an interrupt handler it will crash.&lt;/p&gt;
&lt;p&gt;So if you can instead set a flag and then execute the command in main loop it should be ok.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>