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

Howto transfer hugh bidirectional data amount?

Hi there,

I'm just beginning BT development, so sorry for my basic question:

Our application needs to transfer data from PC to our device (approx. 512 bytes) then our device will respond with approx. 512 bytes. And then the PC sends again a request with 512 bytes and our device responses again with 512 bytes. Data transfer should be as fast as possible, power consumption is not important.

A smart phone (Android) or Windows-PC (Win10) should send the requests and visualize the response data. Would be nice, if that works out of the box without installing a special driver (.sys).

Summery: We want to use Bluetooth only as bidirectional data gateway (maybe like a virtual com port over the air).

Want is the best development-board and SDK example to get started? Makes it sense to use the nrf52832 chip (I have right in my front a Taiyo Yuden Evaluation Kit EKSHCNZXZ with nrf52832).

Thanks a lot for any hint,

Mark

  • If you want to target Win8/8.1/10 only and you insist on requirement "not to install any custom driver" then you can use Windows native BLE support in UWP API, there is HRM (Heart Rate Monitor) application example by Microsoft which works out of the box with Nordic HRM peripheral example from nRF5 SDK on any nRF5x Dev Kit. From there you can move on. Probably changing HRM protocol to something like Nordic BLE UART (aka NUS) but then you need to solve two principle things: rewrite Windows app to support the protocol and implement your custom protocol layer to fragment and reassemble data because 512 is too large for normal GATT layer set-up. There are more tools and examples from Nordic which support NUS so you should have plenty of inspiration whatever platform or programming language you choose.

  • Hello endnode, thanks for your answer. I tried to download and the HRM example, unfortunately the project can't be opened by my Visual Studio 2017. On the other hand: it seems to be a "Universal Windows" App. The Nordic BLE UART seems to be exactly what I need...but: Is there anywhere some Code provided (may be by nordic) how to send and receive some bytes over the Win API from "normal" (not universal windows) exe. In the meantime I guess BLE is not what I'm looking for, probably it would be easier to use a classic SPP because it's easier to access by windows. Is it possible to realize a Bluetooth classic SPP with the nrf52832 chip? Or what chip do I need to realize a SPP device?

  • There is no standard BLE API outside UWP on Windows (as far as I understand) so your request doesn't make much sense... Also note that none of Nordic products supports Classic BT (BR/EDR) so if you go that way it's not for this forum. When it comes to Microsoft HRM app I was able to convert it during opening in MS VS2017 and it works for me (C++ version) and if you look on Nordic GitHub they host some examples and tools' source code which might implement NUS on Windows (but it might need their HW+FW+driver if they don't use UWP) - just in case you would decide to stay with BLE.

  • Sorry, I'm absolutely new to Bluetooth development and it's hard to find how windows support Bluetooth and what kind of APIs exists. For the firmware side there are plenty of examples, so that will be the easier part. So, if you say there is no other API that the UWP API that helped me.

    Ok, I guess my I'm missing the Microsoft.VisualStudio.Component.Windows81SDK in my Studio installation. I try to add this.

    And next, I will check out the Nordic Github NUS examples.

  • Hi Mark,

    If you don’t mind using a nRF5x-DK as the gateway, we have a Desktop library for BLE development using nRF5 called pc-ble-driver. This is used in e.g. the nRF Connect for Desktop. Source code for nRF-Connect desktop can be found here. You can also create your own custom app inside the nRF-Connect framework, see this page.

Related