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

Nordic provide a BLE USB dongle for applications running on a PC?

Does Nordic provide a BLE functionality with a USB dongle that a PC application can use? I do NOT want to use the Windows 10 BLE as it is buggy and does not provide the low level control I need. I am writing an extensive health device BLE test suite for centrals and I do not want to download HEX files onto a chip for each test. What is needed is to call the BLE APIs from the PC application and get signaled of BLE events in the PC application. I am thinking Visual Studio 19 using C or C++. I am forced to select things in the product and I will pick something at random. I have no idea which one will do. Pretty stupid requirement on Nordic's part.

Parents
  • Hi,

    pc-ble-driver should meet your requirements. This is a C/C++ library for serializing our BLE softdevices. You can use it together with our nRF52840 Dongle (PCA10059).

    Best regards,
    Jørgen

  • There are a few tools and dependencies required in order to build the driver, but as long as you follow the instructions closely, you should be fine.

    The tools are required in order to support the many platforms and targets (OSes, ICs, softdevice versions, physical transports, etc.). You will need to run an application on the nRF chip in any scenario that you want to use it for BLE, the chip is blank when produced, and does not provide any mechanism for controlling BLE. The connectivity HEX file that is required by pc-ble-driver is not changed after the first build, you only need to rebuild it if you want to change softdevice version or run it on another board. In fact, you do not need to compile the connectivity hex yourself at all if you want to run it on any of our boards, you can use the precompiled version found in the downloadable releases.

    Exactly which tools are you concerned about?

  • This is starting to sound much easier. Since I am running on a 64 bit Windows machine, the driver libraries are already available and I do not have to build them. The connectivity HEX file is also available, so I don't have to build that either. All I need (that I do not have) is a tool to install the connectivity HEX file through the JSEGGER interface. Once that is done, I could, in theory, start a new VC studio project and create a BLE peripheral or central using the SoftDevice APIs. Love the sound of that.

  • Note that if you want to use the nRF52840 Dongle that I linked above, this does not contain a Segger debugger to program the device. Instead, the device comes loaded with our serial bootloader, allowing you to program the connectivity hex through the USB port of the dongle. Please see this tutorial for more details.

  • I have the dongles and have got the segger installed and the dongle recognized. nRF connect tool is installed. Looked at  this tutorial but do not see how to install the pre-compiled HEX files I downloaded. All I get is the option to install a cental/client app on the dongle.

    Is it SoftDevice I am trying to install? One of these files 

    connectivity_4.1.1_usb_with_s140_6.1.1.hex

    perhaps? (There are 4 hex files each in four directories. They are the only HEX files I could find. How do I get the nRF Connect tool to install these HEX files onto the dongle (assuming they are what I want). Of the selection is large; there are 12 to choose from.

  • "connectivity_4.1.1_usb_with_s140_6.1.1.hex" should be the correct hex file. You can also choose one for an older softdevice API (v3, v5), but these will not provide all the available features that the latest softdevice does.

    I'm not sure what you mean by "cental/client app". You installed nRF Connect for Desktop, installed and launched the "Programmer app" inside nRF Connect, pressed the side-button on the Dongle (the LED should be pulsating in red color), selected the dongle from the drop-down list in the upper left corner? When you have done this, you should be able to browse to the hex-file location by pressing "Add HEX file", and then click "Write" to write the application to the dongle.

  • My dongle has no side button but it does have a white button next to the MCU on the opposite side of the MCU of the flashing red LED. I assume that's the button you mean.

    No I did not do those steps. I did not find those in a way I understood them to apply to my use case (I was scared of doing damage.). BUt I just did it and it worked. The LED flashed in funny ways as the write was being done and a green LED flashed in a different location (I am assuming it means success) and now the dongle is back to flashing red. I am saving this set of steps. If this actually allows me to code and run C-based BLE apps on my PC, this was incredibly easy!

    By the way, nfrConnect got installed in my AppData/Local/ Programs directory. I'm not sure how. Can I just move that entire nrfconnect directory somewhere else or must I uninstall and reinstall and keep close track of where I can make the move to install it in a location of my choice.

    I just found out that the reset button is the little tiny thing next to SW1 (the white button). I pushed the white button and not the reset button, Yet it seemed to work. Don't know if it is all messed up or what. Perhaps I should re-do?

    These are the steps I finally took (except I did not press the reset button - I pressed SW1)

    Configure the nRF52840 dongle to access its BLE functionality from a PC application

    • Download the driver from here: github.com/.../v4.1.1 Its just a zip file. Just unzip it. No installation needed.
    • Download the nRF Connect for Desktop application here: www.nordicsemi.com/.../nRF-Connect-for-desktop This will download a setup executable nrfconnectsetup320ia32.exe. Even though it says '32' its for both 32 and 64 bit machines.
    •  Run the nrfconnectsetup320ia32 setup program.
    •  Download Segger Jlink software here: www.segger.com/.../. It will look like this: JLink_Windows_V652a.exe. Run the installer.
    • Plug in the dongle - a red LED should flash.
    • Open nRF Connect for Desktop. You will see 'APPS' and 'SETTINGS' in the title bar. Be sure 'APPS' is selected
    • Scroll down to 'Programmer'. In my case it was second in the list of choices so I didn't have to scroll.
    • Click the 'Install' button (it will then be 'Open' when re-visited). A new window will popup.
    • On the dongle press the reset button to put it into programmable mode (DFU mode) - I think DFU means Device Firmware Update but I am not sure. Note that the reset button is the tiny button on the side of the 'reset' unit next to the big white SW1 button. You can see the reset unit pictured here: infocenter.nordicsemi.com/index.jsp - Note the button is very tiny and not so obvious!
    • In the nRF Connect Desktop program's new popup window select the device from the drop down window in the title bar.
    • Click on 'Add Hex file' in the selections on the right hand side.
    • Navigate to the appopriate HEX file where the driver was unzipped and select it. In my case located here: nrf-ble-driver-4.1.1-win_x86_64\share\nrf-ble-driver\hex\sd_api_v6\connectivity_4.1.1_usb_with_s140_6.1.1.hex
    • Now select the 'Write' option from the list on the right hand side. The LEDs should flash and eventually the green LED will flash. At the bottom of the Desktop app will be a display of the progress. When all done the last row should say 'DFU for SoftDevice completed successfully!'
Reply
  • My dongle has no side button but it does have a white button next to the MCU on the opposite side of the MCU of the flashing red LED. I assume that's the button you mean.

    No I did not do those steps. I did not find those in a way I understood them to apply to my use case (I was scared of doing damage.). BUt I just did it and it worked. The LED flashed in funny ways as the write was being done and a green LED flashed in a different location (I am assuming it means success) and now the dongle is back to flashing red. I am saving this set of steps. If this actually allows me to code and run C-based BLE apps on my PC, this was incredibly easy!

    By the way, nfrConnect got installed in my AppData/Local/ Programs directory. I'm not sure how. Can I just move that entire nrfconnect directory somewhere else or must I uninstall and reinstall and keep close track of where I can make the move to install it in a location of my choice.

    I just found out that the reset button is the little tiny thing next to SW1 (the white button). I pushed the white button and not the reset button, Yet it seemed to work. Don't know if it is all messed up or what. Perhaps I should re-do?

    These are the steps I finally took (except I did not press the reset button - I pressed SW1)

    Configure the nRF52840 dongle to access its BLE functionality from a PC application

    • Download the driver from here: github.com/.../v4.1.1 Its just a zip file. Just unzip it. No installation needed.
    • Download the nRF Connect for Desktop application here: www.nordicsemi.com/.../nRF-Connect-for-desktop This will download a setup executable nrfconnectsetup320ia32.exe. Even though it says '32' its for both 32 and 64 bit machines.
    •  Run the nrfconnectsetup320ia32 setup program.
    •  Download Segger Jlink software here: www.segger.com/.../. It will look like this: JLink_Windows_V652a.exe. Run the installer.
    • Plug in the dongle - a red LED should flash.
    • Open nRF Connect for Desktop. You will see 'APPS' and 'SETTINGS' in the title bar. Be sure 'APPS' is selected
    • Scroll down to 'Programmer'. In my case it was second in the list of choices so I didn't have to scroll.
    • Click the 'Install' button (it will then be 'Open' when re-visited). A new window will popup.
    • On the dongle press the reset button to put it into programmable mode (DFU mode) - I think DFU means Device Firmware Update but I am not sure. Note that the reset button is the tiny button on the side of the 'reset' unit next to the big white SW1 button. You can see the reset unit pictured here: infocenter.nordicsemi.com/index.jsp - Note the button is very tiny and not so obvious!
    • In the nRF Connect Desktop program's new popup window select the device from the drop down window in the title bar.
    • Click on 'Add Hex file' in the selections on the right hand side.
    • Navigate to the appopriate HEX file where the driver was unzipped and select it. In my case located here: nrf-ble-driver-4.1.1-win_x86_64\share\nrf-ble-driver\hex\sd_api_v6\connectivity_4.1.1_usb_with_s140_6.1.1.hex
    • Now select the 'Write' option from the list on the right hand side. The LEDs should flash and eventually the green LED will flash. At the bottom of the Desktop app will be a display of the progress. When all done the last row should say 'DFU for SoftDevice completed successfully!'
Children
Related