Setup nRF52 dongle as a Central BLE device and relay all the data from the peripheral to the PC via USb port

Hello,

As per the title, I am trying to use the nRF52 dongle to interface with our device which uses nRF52 based module. The idea is to communicate with the dongle over USB port and send data to our device and receive data back.

Essentially, the nRF52 dongle is replacing the PC's built in Bluetooth which can be sometimes unreliable. Also enables us to have multiple dongles connected to communicate with multiple BLE devices simultaneously.

So I downloaded the Bluetooth: CENTRAL UART WITH USB_CDC_ACM source from github.

https://github.com/WesC-sys/usb_dongle

As suggested in this older ticket.

 Using the nRF52840 Dongle (PCA10059) as a USB serial-to-BLE port 

The issue I face is that the USBD write to the PC is not buffered and drops bytes. Is there a reliable way to implement what I am trying to achieving with high data throughput as out device uses data length extensions and transmits 200 bytes every 30 milliseconds.

Would it better to use a nrf52 DK and a USB UART to achieve the above?

Regards

  • Thanks Einar,

    That answers it then, the old repo is a boiler plate with no defined comms commands to the PC. I am working on extending it with custom code to accept commands to scan, connect and communicate with a peripheral based on my requirements.

    It would be helpful for others if Nordic documented how the BLE app in nRF Connect communicates with the dongle or other nRF DK.

  • exsurgo_ankit said:
    It would be helpful for others if Nordic documented how the BLE app in nRF Connect communicates with the dongle or other nRF DK.

    Hi,

    The PC side code is not open source, but thsi is done using SoftDeivce serialisation with pc-ble-driver (and in pc-ble-driver-js in this case). But please note that this is deprecated. It has not been maintained for some time, and will not receive any further updates or fixes.

    Another approach to use a nRF as Bluetooth controller for a PC is to run the Bluetooth host, and expose HCI over for USB as demonstarted in Bluetooth: HCI USB. This will work well in Linux, but Windows requiers Bluetooth controllers to support Bluetooth Classic a well in order to be use dnatively, so it will not work out of the box there.

Related