This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Working with dongle

Hi,

What changes do I need to make to the C/C++ library & ble_connectivity firmware so that the nrf52 dongle can support a BLE packet > 27 bytes?

  • Hi,

    Long packets are already supported. You can refer to this thread (though it is for pc-ble-driver-py).

  • I was referring to what changes need to be made as per below response (this is from someone else's ticket)

    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?

    Does anything need to change if I were to use it with Fanstel's 840 dongle? I haven't tested yet but just asking.

  • Hi,

    bscdb said:
    I was referring to what changes need to be made as per below response (this is from someone else's ticket)

    I see. But NRF_SDH_BLE_GAP_DATA_LENGTH is just the default data length, not the maximum.

    bscdb said:
    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?

    You can get it from the pc-ble-driver repo. If you download the latest release (currently 4.1.1), you will find all connectivity firmware variants under share\nrf-ble-driver\hex\.

  • Since I will have to modify the ble_Connectivity firmware, what are the steps to combine the SD, bootloader (I'm guessing that's the open bootloader) & firmware files & then flash them to the dongle?

    I have a JLink attached to the nrf52840 dongle, how do I do a hardware flash?

    I used this batch script & I think it erased the bootloader on the dongle.

    @echo off
    
    :: # Check to make sure nrfutil and mergehex and nrfjprog are installed before moving on
    WHERE >nul 2>nul nrfutil
    IF %ERRORLEVEL% NEQ 0 (
    ECHO "nrfutil was not found in PATH, please install using pip install"
    goto :end
    )
    WHERE >nul 2>nul nrfjprog
    IF %ERRORLEVEL% NEQ 0 (
    ECHO "nrfjprog was not found in PATH, please install using windows installer from nordicsemi.com"
    goto :end
    )
    
    SET S140=".\softdevice\s140_nrf52_6.1.1_softdevice.hex"
    SET APPLICATION_HEX="..\ble_connectivity_dongle\pca10059\ser_s140_usb_hci\arm5_no_packs\_build\nrf52840_xxaa.hex"
    
    echo "## Looking to make sure %S140% exists"
    if not exist %S140% (
    echo "#### s140 hex file does not exist! Make sure the softdevice is in the same folder as this script!"
    goto :end
    )
    echo.
    
    echo "## Looking to make sure %APPLICATION_HEX% is present in folder"
    if not exist %APPLICATION_HEX% (
    echo "#### app.hex file does not exist! Please copy a application .hex file into the folder, rename it, and try again!"
    goto :end
    )
    echo.
    
    nrfjprog --family nRF52 --program %S140% --chiperase --verify
    nrfjprog --family NRF52 --program %APPLICATION_HEX% --sectorerase --verify
    nrfjprog --family NRF52 --reset
    
    :end
    pause

  • Hi,

    bscdb said:
    Since I will have to modify the ble_Connectivity firmware, what are the steps to combine the SD, bootloader (I'm guessing that's the open bootloader) & firmware files & then flash them to the dongle?

    You can program the dongle using nrfjprog as you do in your script. 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.

    bscdb said:
    I have a JLink attached to the nrf52840 dongle, how do I do a hardware flash?

    I don'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 nRF52840 Dongle Programming Tutorial for details.

    bscdb said:
    I used this batch script & I think it erased the bootloader on the dongle.

    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 here).

Related