How to connect NRF52840 Dongle by USB CDC port?

hi, I am new to Nordic development, and I have to write a VC# Windows App to connect with a BLE GATT oximeter (based on an nRF SOC) through nRF52840 dongle in a few days. After reading some materials, I think standard Nordic development procedures are too difficult to me because I have to learn a lot of tools and languages in a short time.

The nRF52840 dongle works with nRF Connect for Desktop Bluetooth Low Energy v3.3.0 now. Since there is a virtual COM port (nRF Connect USB CDC ACM) attatched to my computer, is it possible for me to write a simple VC# Windows APP, which uses this COM port to talk with nRF52840 dongle, then talk with my BLE GATT deivce?

If this idea works for me, do you have any documents to explain communication protocols I need to konw? or any examples which is more common to a tranditional Windows programmer?

Thanks so much.

  • Hello,

    You have two options. Either you can use something called pc-ble-driver, where the dongle will act as a serialized bluetooth stack. Alternatively, you can write a custom application for the nRF that sends ble messages based on USB input. In that case, you may want to look at a combination of the SDK\examples\peripherals\usbd_cdc_acm ans\d SDK\examples\ble_peripheral\ble_app_uart.

    Either approach should work, so it is up to you which you prefer. Personally, for simple applications, if you just want to forward some data from the usb over bluetooth, I think the latter would be simpler, but that may be because I am more familiar with the SDK than the pc-ble-driver.

    My guess is that the oximeter is a bluetooth LE peripheral, so you would need to set up a central. We have an example acting as a peripheral that forwards USB data in the SDK\examples\peripheral\usbd_ble_uart example, so you would have to port this to act as a central.

    If you are not familiar with our SDK, I would really recommend you to get hold of a couple of DKs, which have a debugger so that you can develop the application, since the nRF52 Dongles doesn't have a debugger.

    Best regards,

    Edvin

  • Thanks for your help, I will give it a try.

Related