<?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>Working with dongle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58215/working-with-dongle</link><description>Hi, 
 What changes do I need to make to the C/C++ library &amp;amp; ble_connectivity firmware so that the nrf52 dongle can support a BLE packet &amp;gt; 27 bytes?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Jul 2020 12:31:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58215/working-with-dongle" /><item><title>RE: Working with dongle</title><link>https://devzone.nordicsemi.com/thread/261779?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2020 12:31:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2112256d-9fc9-48a8-aa53-f66d73ba9285</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you want to build the connectivity firmware yourself, then you should know that the pc-ble-driver patches the connectivity example. Please see the documentation in the pc-ble-driver repo for details (&lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver#compiling-connectivity-hex-files"&gt;Compiling connectivity HEX files&lt;/a&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working with dongle</title><link>https://devzone.nordicsemi.com/thread/257481?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2020 03:05:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e34ee85b-6cee-4e49-bc58-9d4b9de8108b</guid><dc:creator>Banban</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I opened &amp;quot;..examples\connectivity\ble_connectivity\pca10059\ser_s140_usb_hci\ses&amp;nbsp;ble_connectivity_s140_usb_hci_pca10059.emProject&amp;quot; with&amp;nbsp;SEGGER Embedded Studio and built this project.&amp;nbsp;Uploaded &amp;quot;..\examples\connectivity\ble_connectivity\pca10059\ser_s140_usb_hci\ses\Output\Release\Exe ble_connectivity_s140_usb_hci_pca10059.hex&amp;quot; and &amp;quot;..\components\softdevice\s140\hex s140_nrf52_6.1.1_softdevice.hex&amp;quot; by&amp;nbsp;nRF Connect Programmer.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1593486235230v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1593486244333v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But the dongle&amp;nbsp;didn&amp;#39;t work, and&amp;nbsp;nRF Connect Programmer displayed:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1593486268038v3.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1593486273378v4.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My question is &amp;quot;How to compile and use connectivity for nRF52840 Dongle?&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working with dongle</title><link>https://devzone.nordicsemi.com/thread/237363?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 09:49:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a1ec21f-1b08-402a-b04a-d6e8080bd5d2</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="bop123"]But still I can see only 20 bytes which means it supports only 27 bytes packets.[/quote]
&lt;p&gt;Can you elaborate? Where do you see this?&lt;/p&gt;
&lt;p&gt;Do you do a data length update procedure? Please refer to the migration document for the SoftDevic for details on this (&amp;quot;Data Length Update Procedure&amp;quot; section). This pseudo code snipped from the migration document demonstrates how to do it (the first part resided in the connectivity firmware in this case, but the latter resides on the PC side via the pc-ble-driver):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;const uint16_t client_rx_mtu = 247;
const uint32_t long_att_conn_cfg_tag = 1;

/* ATT_MTU must be configured first */
ble_cfg_t cfg;
memset(&amp;amp;cfg, 0, sizeof(ble_cfg_t));
cfg.conn_cfg.conn_cfg_tag = long_att_conn_cfg_tag;
cfg.conn_cfg.params.gatt_conn_cfg.att_mtu = client_rx_mtu;
sd_ble_cfg_set(BLE_CONN_CFG_GATT, &amp;amp;cfg, ...);

/* Enable the BLE Stack */
sd_ble_enable(...);

[...]

uint16_t long_att_conn_handle;

/* Establish connection */
sd_ble_gap_adv_start(..., long_att_conn_cfg_tag);

[...]

/* Start Data Length Update Procedure, can be done without ATT_MTU exchange */
ble_gap_data_length_params_t params = {
.max_tx_octets = client_rx_mtu + 4,
.max_rx_octets = client_rx_mtu + 4,
.max_tx_time_us = BLE_GAP_DATA_LENGTH_AUTO,
.max_rx_time_us = BLE_GAP_DATA_LENGTH_AUTO
};
sd_ble_gap_data_length_update(long_att_conn_handle, &amp;amp;params, NULL);

[...]

case BLE_GAP_EVT_DATA_LENGTH_UPDATE:
{
    /* Data Length Update Procedure completed, see p_ble_evt-&amp;gt;evt.gap_evt.params.data_length_update.
    effective_params for negotiated parameters. */
    break;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working with dongle</title><link>https://devzone.nordicsemi.com/thread/237301?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 01:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bd90166-4356-459c-823e-1caf2f8ea4ac</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Thanks for the info. I will work on this. So coming back to my original question, I modified the ble_connectivity firmware for packet size &amp;gt; 27&lt;/p&gt;
&lt;p&gt;I changed&lt;/p&gt;
&lt;p&gt;#define BLE_GATT_ATT_MTU_DEFAULT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 32&lt;/p&gt;
&lt;p&gt;in ble_gatt.h&lt;/p&gt;
&lt;p&gt;&amp;amp;&lt;/p&gt;
&lt;p&gt;#define NRF_SDH_BLE_GAP_DATA_LENGTH 36&lt;/p&gt;
&lt;p&gt;in sdk_config.h&lt;/p&gt;
&lt;p&gt;I also modified the C/C++ library.&lt;/p&gt;
&lt;p&gt;I changed&amp;nbsp;#define BLE_GATT_ATT_MTU_DEFAULT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 32&lt;/p&gt;
&lt;p&gt;&lt;span&gt;in ble_gatt.h&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But still I can see only 20 bytes which means it supports only 27 bytes packets.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working with dongle</title><link>https://devzone.nordicsemi.com/thread/236884?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2020 13:42:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7315aa0d-066e-4d1f-a8a9-f136a1a8ab19</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="bop123"]Since I will have to modify the ble_Connectivity firmware, what are the steps to combine the SD, bootloader (I&amp;#39;m guessing that&amp;#39;s the open bootloader) &amp;amp; firmware files &amp;amp; then flash them to the dongle?[/quote]
&lt;p&gt;You can program the dongle using nrfjprog as you do in your script.&amp;nbsp;I suggest you just use the USB bootloader that the device was shipped with unless you have a reason to change it. The connectivity firmware is not special in any way in this regard, so you could program it like you wound any other firmware. The only thing you need to remember is that if you program via a debugger instead of DFU, then you must also generate and program a valid DFU settings page so that the bootloader sees that there is a valid application that it will start.&lt;/p&gt;
[quote user="bop123"]I have a JLink attached to the nrf52840 dongle, how do I do a hardware flash?[/quote]
&lt;p&gt;I don&amp;#39;t understand completely since your script shows you are familiar with nrfjprog. Essentially you erase and program with nrfjprog. Use nrfjprog -h to see all details. Just remember that you should set the regulator voltage in the nRF correctly, if not it might end up in an unprogrammable state (depending on your programmer). See the last part of &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial"&gt;nRF52840 Dongle Programming Tutorial for details&lt;/a&gt;.&lt;/p&gt;
[quote user="bop123"]I used this batch script &amp;amp; I think it erased the bootloader on the dongle.[/quote]
&lt;p&gt;Yes, it did ( --chiperase). It also changed the REGOUT0 register so that the VDD voltage is 1.8 V unless the application you programmed configures it to something else. That might lead to problems, as described in the last part of the dongle programming tutorial. You can download the bootloader .hex file from the tutorial (or &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-13/pca10059_5F00_bootloader.zip"&gt;here&lt;/a&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working with dongle</title><link>https://devzone.nordicsemi.com/thread/236626?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 16:05:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4c0dbef-7f18-40c1-831e-9f1bf2f04155</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Since I will have to modify the ble_Connectivity firmware, what are the steps to combine the SD, bootloader (I&amp;#39;m guessing that&amp;#39;s the open bootloader) &amp;amp; firmware files &amp;amp; then flash them to the dongle?&lt;/p&gt;
&lt;p&gt;I have a JLink attached to the nrf52840 dongle, how do I do a hardware flash?&lt;/p&gt;
&lt;p&gt;I used this batch script &amp;amp; I think it erased the bootloader on the dongle.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dongle_5F00_hw_5F00_flash.bat"&gt;devzone.nordicsemi.com/.../dongle_5F00_hw_5F00_flash.bat&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working with dongle</title><link>https://devzone.nordicsemi.com/thread/236484?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 10:34:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98b8d299-33d9-41f3-8da5-dccafd2abd5f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="bop123"]I was referring to what changes need to be made as per below response (this is from someone else&amp;#39;s ticket)[/quote]
&lt;p&gt;I see. But&amp;nbsp;NRF_SDH_BLE_GAP_DATA_LENGTH is just the default data length, not the maximum.&lt;/p&gt;
[quote user="bop123"]Also, where can I get the USB bootloader code/hex which the dongle uses? What are the steps to flash the SD+bootloader+app to the dongle?[/quote]
&lt;p&gt;You can get it from the &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver"&gt;pc-ble-driver&lt;/a&gt; repo.&amp;nbsp;If you download the latest &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver/releases"&gt;release&lt;/a&gt; (currently 4.1.1), you will find all connectivity firmware variants under&amp;nbsp;share\nrf-ble-driver\hex\.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working with dongle</title><link>https://devzone.nordicsemi.com/thread/236069?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2020 17:26:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9180697-5023-426e-9a8f-d138c44ebf5d</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;I was referring to what changes need to be made as per below response (this is from someone else&amp;#39;s ticket)&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6153.image.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, where can I get the USB bootloader code/hex which the dongle uses? What are the steps to flash the SD+bootloader+app to the dongle?&lt;/p&gt;
&lt;p&gt;Does anything need to change if I were to use it with Fanstel&amp;#39;s 840 dongle? I haven&amp;#39;t tested yet but just asking.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working with dongle</title><link>https://devzone.nordicsemi.com/thread/235952?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2020 13:04:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ea4893a-7adc-4b6e-abc4-32c162f517cc</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Long packets are already supported. You can refer to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/55036/data-length-update-with-pc-ble-driver-py-library"&gt;this thread&lt;/a&gt; (though it is for pc-ble-driver-py).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>