<?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>The issue when using pc-ble-driver-py for nRF52840-Dongle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52531/the-issue-when-using-pc-ble-driver-py-for-nrf52840-dongle</link><description>Dears, 
 I need to use the nRF52840-Dongle for BLE device to communicate with the end devices, the platform is ubuntu and the programming is python3.7, I have problem on it. 
 I have installed the nRF-Connect-Desktop, and written the fireware into the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 Aug 2020 09:52:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52531/the-issue-when-using-pc-ble-driver-py-for-nrf52840-dongle" /><item><title>RE: The issue when using pc-ble-driver-py for nRF52840-Dongle</title><link>https://devzone.nordicsemi.com/thread/265721?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2020 09:52:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:806847a2-d5d6-43bd-ac51-9c8504db1741</guid><dc:creator>stes</dc:creator><description>&lt;p&gt;I found this here in common/platform/linux/serial_port_enum.cpp:&lt;/p&gt;
&lt;p&gt;if (((idVendor == SEGGER_VENDOR_ID) || (idVendor == NXP_VENDOR_ID)) &amp;amp;&amp;amp;&lt;br /&gt; ((manufacturer == &amp;quot;SEGGER&amp;quot;) || (strncasecmp(manufacturer.c_str(), &amp;quot;arm&amp;quot;, 3) == 0) ||&lt;br /&gt; (strncasecmp(manufacturer.c_str(), &amp;quot;mbed&amp;quot;, 4) == 0)))&lt;br /&gt; {&lt;br /&gt; std::string serialNumber =&lt;br /&gt; to_str(udev_device_get_sysattr_value(udev_usb_dev, &amp;quot;serial&amp;quot;));&lt;br /&gt; std::string idProduct =&lt;br /&gt; to_str(udev_device_get_sysattr_value(udev_usb_dev, &amp;quot;idProduct&amp;quot;));&lt;/p&gt;
&lt;p&gt;devices.push_back(&lt;br /&gt; SerialPortDesc{devname, manufacturer, serialNumber, &amp;quot;&amp;quot;, path, idVendor, idProduct});&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;I guess this is the reason why the dongle is not listed&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The issue when using pc-ble-driver-py for nRF52840-Dongle</title><link>https://devzone.nordicsemi.com/thread/212162?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 02:59:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68c74c7d-6154-4869-a4e1-acf8b6fa2f04</guid><dc:creator>kevinlei</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for your reply. Yes, I pull the code from the github with the master branch, which is the version 0.13.0a0.&amp;nbsp; I will try the branch 0.12.0 to have a try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The issue when using pc-ble-driver-py for nRF52840-Dongle</title><link>https://devzone.nordicsemi.com/thread/212156?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 01:21:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc017e4e-01c5-4318-a027-e9cdc824cd8d</guid><dc:creator>kevinlei</dc:creator><description>&lt;p&gt;Yes, I tried and I found that the issue is only on the enum_serial_ports, so I got the dev files in /dev path directly to resolve this issue. Thank you very much&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The issue when using pc-ble-driver-py for nRF52840-Dongle</title><link>https://devzone.nordicsemi.com/thread/212040?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2019 12:00:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00defeb0-2d17-4a93-8387-b74f8752a3c6</guid><dc:creator>jeg223</dc:creator><description>&lt;p&gt;I&amp;#39;m having the same issue as you, where BLEDriver.enum_serial_ports() returns an empty result.&amp;nbsp; Have you tried the other examples?&amp;nbsp; If I run the Heart Rate Collector, and provide the port, it works.&amp;nbsp; It finds the other BLE devices in the room.&amp;nbsp; It seems like the issue is only in enum_serial_ports().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The issue when using pc-ble-driver-py for nRF52840-Dongle</title><link>https://devzone.nordicsemi.com/thread/212014?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2019 10:54:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5969c10b-34d4-4c0f-8255-88858c49da62</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am wondering from where you got version 0.13.0a0, as the latest tagged version of pc-ble-driver-py on github is &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver-py/tree/0.12.0"&gt;version 0.12.0&lt;/a&gt;. Can you try with 0.12.0?&lt;/p&gt;
&lt;p&gt;The error messages from your trial with 0.11.4 is because of python version. 0.12.0 is the first version to use Python 3. All previous versions of pc-ble-driver-py used Python 2. Please consult the README.md for the particular pc-ble-driver-py version, for Python version requirements.&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><item><title>RE: The issue when using pc-ble-driver-py for nRF52840-Dongle</title><link>https://devzone.nordicsemi.com/thread/211727?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2019 08:48:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36e5368b-2503-402c-8438-ecd72787fef8</guid><dc:creator>kevinlei</dc:creator><description>&lt;p&gt;In additional, I thought that the pc-ble-driver-py 0.13.0a0 and the connectivity_4.1.1_usb_with_s132_5.1.0_dfu_pkg.zip should be matched, because with the input arg &amp;quot;NRF52&amp;quot;, the driver for the pc-ble-driver-py 0.13.0a0 is ds_api_v5:&lt;/p&gt;
&lt;p&gt;ble_driver.py:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if nrf_sd_ble_api_ver == 2:
    import pc_ble_driver_py.lib.nrf_ble_driver_sd_api_v2 as driver

    ATT_MTU_DEFAULT = driver.GATT_MTU_SIZE_DEFAULT
elif nrf_sd_ble_api_ver == 5:
    import pc_ble_driver_py.lib.nrf_ble_driver_sd_api_v5 as driver

    ATT_MTU_DEFAULT = driver.BLE_GATT_ATT_MTU_DEFAULT
else:
    raise NordicSemiException(
        &amp;quot;SoftDevice API {} not supported&amp;quot;.format(nrf_sd_ble_api_ver)
    )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;while the sd_api_ver in pc-ble-driver-py 0.11.4 is 3. So why it doesn&amp;#39;t enum any nRF devices?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The issue when using pc-ble-driver-py for nRF52840-Dongle</title><link>https://devzone.nordicsemi.com/thread/211655?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2019 03:40:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f70f2c6e-263f-4622-8e57-b21ead6b35cf</guid><dc:creator>kevinlei</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your reply. Initially, I installed the pc-ble-driver-py according to &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver-py"&gt;Building from source.&amp;nbsp; &lt;/a&gt;The version of my pc-ble-driver-py is pc-ble-driver-py==0.13.0a0, and the pc-ble-driver is 4.1.1(installed via vcpkg), and my nRF-Connect-Desktop is V3.2.0&lt;/p&gt;
&lt;p&gt;I flushed the DFU zip file downloaded by the vcpkg(name is connectivity_4.1.1_usb_with_s132_3.1.0_dfu_pkg.zip) using the command nrfutil as you previously mentioned. As the device programmed successfully, I also got the same issue(enum_serial_ports: 0 serial ports found)!&lt;/p&gt;
&lt;p&gt;I tried other DFU zip file(connectivity_4.1.1_usb_with_s132_5.1.0_dfu_pkg.zip), and I received same issue.&lt;/p&gt;
&lt;p&gt;For more trail, I downgraded the pc-ble-driver-py version to 0.11.4, and I got different failure(same with the two DFU zip files mentioned above):&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;&amp;gt;python3 serial_port_enum.py NRF52
&amp;gt;Traceback (most recent call last):
  File &amp;quot;serial_port_enum.py&amp;quot;, line 83, in &amp;lt;module&amp;gt;
    init(sys.argv[1])
  File &amp;quot;serial_port_enum.py&amp;quot;, line 48, in init
    from pc_ble_driver_py.ble_driver import BLEDriver, Flasher
  File &amp;quot;/usr/local/lib/python3.7/dist-packages/pc_ble_driver_py/ble_driver.py&amp;quot;, line 112, in &amp;lt;module&amp;gt;
    driver = importlib.import_module(SWIG_MODULE_NAME)
  File &amp;quot;/usr/lib/python3.7/importlib/__init__.py&amp;quot;, line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File &amp;quot;/usr/local/lib/python3.7/dist-packages/pc_ble_driver_py/lib/linux/x86_64/pc_ble_driver_sd_api_v3.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;
    _pc_ble_driver_sd_api_v3 = swig_import_helper()
  File &amp;quot;/usr/local/lib/python3.7/dist-packages/pc_ble_driver_py/lib/linux/x86_64/pc_ble_driver_sd_api_v3.py&amp;quot;, line 24, in swig_import_helper
    _mod = imp.load_module(&amp;#39;_pc_ble_driver_sd_api_v3&amp;#39;, fp, pathname, description)
  File &amp;quot;/usr/lib/python3.7/imp.py&amp;quot;, line 242, in load_module
    return load_dynamic(name, filename, file)
  File &amp;quot;/usr/lib/python3.7/imp.py&amp;quot;, line 342, in load_dynamic
    return _load(spec)
ImportError: dynamic module does not define module export function (PyInit__pc_ble_driver_sd_api_v3)
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Would you please help to check for me? Thank you very much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The issue when using pc-ble-driver-py for nRF52840-Dongle</title><link>https://devzone.nordicsemi.com/thread/211599?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2019 15:35:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36253f90-8030-4cfd-9f32-5d09a14c454d</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What version of pc-ble-driver-py are you using? It may not use the same version of the connectivity firmware as what nRF Connect for Desktop uses. Have a look at &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver/tree/v4.1.1#Programming-connectivity-HEX-files"&gt;Programming connectivity HEX files&lt;/a&gt;, in particular the sections on &amp;quot;Nordic USB based kits&amp;quot;.&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>