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

Stream generic data directly to PC via BLE/Bluetooth?

Hi there!

I've developed with Nordic chips for years and really love the support, SDK, and awesome solutions you guys offer. Today, I would like to ask for some help.

I'm currently in the pre-production phase of developing a medical device that reads some generic sensor data (from the ADC), and streams this raw data over Bluetooth for the waveforms to be analysed by software (either PC or on an App). 

In past projects, when doing this, I have used the Nordic UART propriety protocol and it has worked a charm. This has always been suitable for directly streaming to a phone (with an app based off Nordic drivers), or when streaming to a USB Dongle with another nRF chip on the other side converting the data to a UART serial port.

For this current project, we have the device working great but with the "BLE to Serial Port" dongle present. Considering most modern PCs and Laptops have BLE compatibility, we want to remove this part of the system to reduce cost.

So my question is: what is involved with directly connecting to a PC/Laptop to stream data off? The application this device is for does not really fall under existing GATT protocols, so this will need to be just "generic data" similar to the Nordic UART protocol - but obviously, some protocol Windows 10 drivers/API is compatible with. 

I'm curious to know what firmware/drivers I should be using on the Nordic side in particular. I.e. is there even wrappers/high-level drivers for such an appropriate thing?

I have read previously asked similar questions (such as here: https://devzone.nordicsemi.com/f/nordic-q-a/48820/nrf52-direct-connection-to-win10) and was a little worried about the consistency. I understand this will not necessarily work on XP, Vista, even Windows 7 (or Mac, Linux, etc.) if the protocols and drivers are designed around a Windows 10 platform, but I want to make sure that it will at least work consistently across many Windows 10 PCs without issue (since this will be a mass-produced and exported item). I have also seen this API (https://github.com/NordicSemiconductor/pc-ble-driver) which looks really useful and perhaps what I'm after, but I would still like some suggestions in terms of getting started, what specific SDK examples are relevant, what specific Nordic nRF chips are compatible, and how I can perhaps test this. Since this is pre-production, and this is a medical device, its important for us to mitigate risk as much as possible.

Thanks, really appreciate your time reading. 

Parents
  • Hi Scott,

    You can think of the Nordic UART Service as an example of a custom service for generic data transport. So you can in fact continue to use this on the BLE link, and just skip the physical UART devices in the endpoints. If you make your own custom data streaming service it will probably be more or less the same. So my suggestion is to just keep the NUS service as is if that is something you are happy with.

    With the above approach, the question reduces to how you can implement support for this on the PC side without having an nRF dongle. Since you don't want an nRF chip on the PC side, the pc-ble-driver is also irrelevant. (That is a PC side library that is used together with a connectivity firmware on the nRF side, to provide the SoftDevice API on a PC). I am not experienced with Bluetooth development on the Windows platform, and in fact, all BLE development we do for Windows uses the pc-ble-driver and only work with nordic devices. But windows do have native BLE support, and that is probably what you should investigate and use if you are making a Windows only application. There is an example here. (There are also other cross-platform libraries such as PyBluez which work very well on Linux, but I am not sure how stable it is on Windows).

    Br,

    Einar

  • Thanks Einar. One thing I came across was this, nRF Connect App for Desktop: https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-desktop

    Would this be appropriate? Does it have Nordic UART functionality like the iOS/Android nRF Connect Apps? And, also, is the application source available to allow our software engineer to build with it and modify our Windows/Mac software to be compatible?

    Thanks. Please let me know!

  • Hi Scott,

    The nRF Connect for desktop tool does not fit your requirement since it relies on a connected nRF5 DK or dongle, and not the native BLE device on the system. Therefore it is based on the pc-ble-driver-js (JavaScript bindings for pc-ble-driver), and does not use any common Bluetooth API's. You can, of course, refer to it if you like, though. The source code is available on GitHub.

    I do not see a big reason for looking for a tool that has native support for the Nordic UART service (NUS), since that is probably implemented within a few hours once you know the BLE API of whatever you are using. The only cross-platform BLE API for use with native BLE devices I am aware of is ByBlueZ. I don't know how well it works on Windows, though. If not, it may be that you need to write separate code for each platform in this case.

    Br,

    Einar

Reply
  • Hi Scott,

    The nRF Connect for desktop tool does not fit your requirement since it relies on a connected nRF5 DK or dongle, and not the native BLE device on the system. Therefore it is based on the pc-ble-driver-js (JavaScript bindings for pc-ble-driver), and does not use any common Bluetooth API's. You can, of course, refer to it if you like, though. The source code is available on GitHub.

    I do not see a big reason for looking for a tool that has native support for the Nordic UART service (NUS), since that is probably implemented within a few hours once you know the BLE API of whatever you are using. The only cross-platform BLE API for use with native BLE devices I am aware of is ByBlueZ. I don't know how well it works on Windows, though. If not, it may be that you need to write separate code for each platform in this case.

    Br,

    Einar

Children
No Data
Related