<?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>How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29848/how-to-use-pca10040-as-dongle-scanner</link><description>Hi, 
 I&amp;#39;m trying to have a PCA10040 working as a scanner of BLE peripherals to be able to connect to my own BLE Nordic device, write a characteristic and close the connection.
To do that I followed those steps: 
 
 
 Flash `nRF5_SDK_14.1.0_1dda907</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Aug 2019 09:33:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29848/how-to-use-pca10040-as-dongle-scanner" /><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/203007?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2019 09:33:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7ff2490-7ac4-4ba4-a28e-b8742a52321d</guid><dc:creator>jim.jian</dc:creator><description>&lt;p&gt;Hi Jorgen:&lt;/p&gt;
&lt;p&gt;I use nus_collector.py read data but data was lost.&lt;/p&gt;
&lt;p&gt;I send 200 bytes data but I only receive 47 bytes.&lt;/p&gt;
&lt;p&gt;Data is in hvx_evt.data&amp;nbsp;in function named&amp;nbsp;on_gattc_evt_hvx?&lt;/p&gt;
&lt;p&gt;Can I modify it?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/194434?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2019 15:05:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d8e3456-1ffa-4581-b54c-9dc7b87062a9</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Are you using the correct version of pc-ble-driver-py? I would recommend that you post a new case where you describe your setup and environment in detail. That way we can help you debug the issue, without spamming this post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/194240?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2019 07:59:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:713609eb-a408-42af-808c-b620e47b74d2</guid><dc:creator>robertsehlstedt</dc:creator><description>&lt;p&gt;Hello J&amp;ouml;rgen!&lt;span class="user-name"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I have a similar issue to this, but my error message looks something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;robban@:pca20020_s132$ python2.7 nus_collector.py NRF52
	0 : /dev/ttyACM0: 000682995637
 
Enter your choice: 0
Serial port used: /dev/ttyACM0
Traceback (most recent call last):
  File &amp;quot;nus_collector.py&amp;quot;, line 196, in &amp;lt;module&amp;gt;
    main(serial_port)
  File &amp;quot;nus_collector.py&amp;quot;, line 158, in main
    collector.open()
  File &amp;quot;nus_collector.py&amp;quot;, line 73, in open
    self.adapter.driver.open()
  File &amp;quot;/usr/local/lib/python2.7/dist-packages/pc_ble_driver_py/ble_driver.py&amp;quot;, line 99, in wrapper
    error_code=err_code,
pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: 13&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have tried using the nrfjprog -f nrf52 -e command you recommended above, and my PATH includes the nrfjprog binaries. However I still cannot make it work, and the links to the wrong baudrate and similar issues above seem to be broken?&lt;/p&gt;
&lt;p&gt;Also I have tried figuring out where the script actually determines which HEX-files should be written with the nrfconnect to my device, I can&amp;#39;t seem to find it.&lt;/p&gt;
&lt;p&gt;Would appreciate some help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/119537?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2018 12:57:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc677746-e730-418e-8b07-cb73ef300357</guid><dc:creator>Sebastien Monat</dc:creator><description>&lt;p&gt;OK Jorgen I have put a PATH=$PATH:&amp;lt;MyFolderLocation&amp;gt; and it is working now. I&amp;#39;m able to see all the BLE peripherals on the range. Many thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/119514?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2018 11:45:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dd799de-64fe-49d3-a3d9-10abc3aae1e3</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Do you have the path to nrfjprog binary in your PATH environment variable? Which OS are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/119501?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2018 10:33:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f357ca4-02f8-497f-9538-cac5adb8f385</guid><dc:creator>Sebastien Monat</dc:creator><description>&lt;p&gt;Yes I have all the tools on my computer. I think I have to put nrfjprog on a special folder but I do not know which folder. Maybe /usr ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/119497?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2018 10:16:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9877fb16-4eac-46aa-a5dd-7c4606d5d688</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Do you have nrfjprog installed? You also need J-Link drivers, as described in the section about &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver/blob/master/Installation.md#installing-drivers-and-tools"&gt;required drivers and tools&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/119479?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2018 08:11:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c91a712a-ff70-4a6d-93ce-4916925bef98</guid><dc:creator>Sebastien Monat</dc:creator><description>&lt;p&gt;Hi Jorgen.&lt;/p&gt;
&lt;p&gt;I have tried to change the baudrate put 115200 and put 1M on the ble_central_ble_app_uart_c&amp;nbsp;example.&lt;/p&gt;
&lt;p&gt;When I change the auto_flash to True on the python script l155 I got this error :&amp;nbsp;pc_ble_driver_py.exceptions.NordicSemiException: nrfjprog not installed&lt;/p&gt;
&lt;p&gt;I think I need to change some path somewhere ...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/118633?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 15:33:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae5b52eb-fbfc-4f00-9180-1d7b88c4e8c0</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Did you flash the connectivity firmware manually? If you have the firmware flashed, but it is using the &lt;a href="https://itsrv28/question/117517/pc-ble-driver-failed-to-open-nrf-ble-driver-error-code-0x0d/?answer=118010#post-id-118010"&gt;wrong baudrate&lt;/a&gt;, you might get this error. Please try erasing the board using &lt;code&gt;nrfjprog -f nrf52 -e&lt;/code&gt; command and let pc-ble-driver-py do the firmware flashing for you. You can also try disabling the MSD when using Linux, some users have experienced &lt;a href="https://itsrv28/question/110916/pc-ble-driver-py-sd_ble_gap_sec_params_reply-fails/?answer=113005#post-id-113005"&gt;similar issues&lt;/a&gt; when this is enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/118631?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 15:07:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93c76da0-e23a-4a69-8b35-6cf5f1875d63</guid><dc:creator>Sebastien Monat</dc:creator><description>&lt;p&gt;I added a new answer concerning this issue !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/118632?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 15:04:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65bc4b56-d1db-4fcd-a46a-00c8d8401cbe</guid><dc:creator>Sebastien Monat</dc:creator><description>&lt;p&gt;Hi Jorgen !!!&lt;/p&gt;
&lt;p&gt;Thank you for this pretty cool answer. I tried your script after flashing my PCA10040 with example/ble_central_ble_app_uart_c on SDK 14.1.0 without any changement. I used the command&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ python2.7 nus_collector.py NRF52 /dev/ttyACM0 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;An this is the log :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Serial port used: /dev/ttyACM0
Traceback (most recent call last):
  File &amp;quot;nus_collector.py&amp;quot;, line 196, in &amp;lt;module&amp;gt;
    main(serial_port)
  File &amp;quot;nus_collector.py&amp;quot;, line 158, in main
    collector.open()
  File &amp;quot;nus_collector.py&amp;quot;, line 73, in open
    self.adapter.driver.open()
  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 open. Error code: 13
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So I still have the problem. Do you have any idea ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use PCA10040 as Dongle Scanner</title><link>https://devzone.nordicsemi.com/thread/118630?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2018 14:10:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4dc24ae-1444-4344-ba7c-857e888b7c87</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have attached a script based on &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver-py/blob/v0.11.3/python/pc_ble_driver_py/examples/heart_rate_collector.py"&gt;heart_rate_collector.c&lt;/a&gt;, that works with pc-ble-driver-py v0.11.3. The script connects to devices named &amp;quot;Nordic_UART&amp;quot;, which is the default in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/ble_sdk_app_nus_eval.html?cp=4_0_0_4_2_2_22"&gt;ble_app_uart example&lt;/a&gt;, performs service discovery, enables notifications for custom 128-bit UUID NUS TX char and receive data from NUS. Let me know if you need more help with this!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0207.nus_5F00_collector.py"&gt;nus_collector.py&lt;/a&gt;&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></channel></rss>