<?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>Intermittent Failed to ble_cfg_set. Error code: NRF_ERROR_SOFTDEVICE_NOT_ENABLED at connection open</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73147/intermittent-failed-to-ble_cfg_set-error-code-nrf_error_softdevice_not_enabled-at-connection-open</link><description>Hi, 
 We are having problems with nRF52840 dongle. 
 Intermittently pc-ble-driver-py throws the error in the subject when trying to open interface to nRF52840 dongle. After the error the dongle always fails to open with NRF_ERROR_TIMEOUT until it is reflashed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Aug 2021 12:31:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73147/intermittent-failed-to-ble_cfg_set-error-code-nrf_error_softdevice_not_enabled-at-connection-open" /><item><title>RE: Intermittent Failed to ble_cfg_set. Error code: NRF_ERROR_SOFTDEVICE_NOT_ENABLED at connection open</title><link>https://devzone.nordicsemi.com/thread/325500?ContentTypeID=1</link><pubDate>Wed, 18 Aug 2021 12:31:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb8d7006-053f-468c-a87f-161316384694</guid><dc:creator>Kaja</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;okay, I&amp;#39;m glad is not blocking anymore! Terje is out of office, could you create a new case, with your problem, if you want help with it, so that you get an engineer assigned to your case?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Kaja&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent Failed to ble_cfg_set. Error code: NRF_ERROR_SOFTDEVICE_NOT_ENABLED at connection open</title><link>https://devzone.nordicsemi.com/thread/325270?ContentTypeID=1</link><pubDate>Tue, 17 Aug 2021 10:58:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2f94a56-28b8-4dda-86bc-26765f180709</guid><dc:creator>JMH</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The issue is not blocking anymore due to the dongle restart. It is not solved though.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Br,&lt;/p&gt;
&lt;p&gt;-Juho&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent Failed to ble_cfg_set. Error code: NRF_ERROR_SOFTDEVICE_NOT_ENABLED at connection open</title><link>https://devzone.nordicsemi.com/thread/323762?ContentTypeID=1</link><pubDate>Fri, 06 Aug 2021 12:54:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d66a1a77-eede-44d6-9ab1-a345ffda6419</guid><dc:creator>Kaja</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;have you solved your problem, or is it still unsolved?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Kaja&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent Failed to ble_cfg_set. Error code: NRF_ERROR_SOFTDEVICE_NOT_ENABLED at connection open</title><link>https://devzone.nordicsemi.com/thread/302313?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 08:29:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcfd4ab9-897c-4e5d-954c-e420ea36b299</guid><dc:creator>JMH</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;from pc_ble_driver_py import config
config.__conn_ic_id__ = &amp;#39;NRF52&amp;#39;  # this line causes pylint trouble....
from pc_ble_driver_py.ble_driver import BLEDriver, BLEAdvData, BLEGapAddr, BLEConfigConnGatts, BLEConfigConnGattc, \
    BLEConfigConnGap
from pc_ble_driver_py.ble_driver import BLEGapSecStatus, BLEGapSecParams, BLEGapIOCaps, BLEGapSecKDist
from pc_ble_driver_py.ble_driver import BLEUUIDBase, BLEUUID, BLEConfig, BLEConfigConnGatt
from pc_ble_driver_py.ble_driver import BLEGapConnParams, BLEGapScanParams, BLEGapTimeoutSrc
from pc_ble_driver_py.ble_adapter import BLEAdapter
from pc_ble_driver_py.exceptions import NordicSemiException
# pylint: enable-all


class BleInterface(BLEDriverObserver, BLEAdapterObserver):

    NRF52_VID = int(&amp;quot;1915&amp;quot;, 16)
    NRF52_PID = int(&amp;quot;C00A&amp;quot;, 16)

    # NRF51_VID = int(&amp;quot;1366&amp;quot;, 16)
    # NRF51_PID = int(&amp;quot;1015&amp;quot;, 16)

    # pylint: disable=super-init-not-called
    def __init__(self, port, logger=get_null_logger()):
        &amp;quot;&amp;quot;&amp;quot;
        NRF52 Ble interface object
        :param port:
        :type port: str
        :param logger: Logger instance
        :type logger: Logger
        &amp;quot;&amp;quot;&amp;quot;
        self.logger = logger
        self._serial_port = port
        driver = BLEDriver(serial_port=port, baud_rate=115200)
        self.adapter = BLEAdapter(driver)
        self.adapter.observer_register(self)
        self.adapter.driver.observer_register(self)
        self._scanning = False
        self._devices = BleDeviceList(device_class=self._device_class)
        self._devices.set_logger(self.logger)

    def open(self, **kwargs):
        &amp;quot;&amp;quot;&amp;quot;
        Open NRF52 connection
        :param kwargs: config_conn_gatt:BLEConfigConnGatt
        :return: None
        &amp;quot;&amp;quot;&amp;quot;
        assert self.adapter, &amp;#39;adapter does not exists&amp;#39;
        self.logger.debug(f&amp;#39;opening BLE interface (serial_port: {self._serial_port})&amp;#39;)
        self.adapter.driver.open()
        config_conn_gatt = kwargs.get(&amp;#39;config_conn_gatt&amp;#39;)

        if config_conn_gatt:
            gatt_cfg_defaults = BLEConfigConnGatt()
            gatt_cfg_defaults.att_mtu = config_conn_gatt.get(&amp;#39;att_mtu&amp;#39;)
            gatt_cfg_defaults.tag = config_conn_gatt.get(&amp;#39;tag&amp;#39;)
            err = self.adapter.driver.ble_cfg_set(BLEConfig.conn_gatt, gatt_cfg_defaults)
            assert err is None, f&amp;#39;BLE config set failed with error: {err}&amp;#39;

        self.adapter.driver.ble_enable()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;self.adapter.driver.open() is the line that raises NRF_ERROR_TIMEOUT. BleInterface is initialized and then open is called. Those are the steps leading to the problem.&lt;br /&gt;No helpful log or USB trace is available without extra effort.&lt;br /&gt;&lt;br /&gt;We have created workaround based on nrfutil where on open failure dongle is reset by putting it to bootloader mode and bringing it back to normal mode.&lt;br /&gt;This seems to help, but is not optimal of course.&lt;br /&gt;&lt;br /&gt;Br,&lt;br /&gt;-Juho&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent Failed to ble_cfg_set. Error code: NRF_ERROR_SOFTDEVICE_NOT_ENABLED at connection open</title><link>https://devzone.nordicsemi.com/thread/301833?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 09:38:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e54cd20c-9892-4913-95ab-244f199bf863</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Which call returns NRF_ERROR_TIMEOUT, and what happens leading up to that point?&lt;/p&gt;
&lt;p&gt;Can you share code, at least leading up to the error, for potentially reproducing?&lt;/p&gt;
&lt;p&gt;The examples typically lack checks on the return value from various calls, are you checking/logging return values from all pc-ble-driver API calls?&lt;/p&gt;
&lt;p&gt;Do you have any log output from the application, and/or USB trace from the communication between application and Dongle?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>