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

Quickest path to BLE data exchange...

Hi,

Given the too many examples in the nRF5 SDK that are provided to implement BLE and the unclear documentation on how to best proceed, what would you say is the quickest path to begin development of a bidirectional data transmission in a BLE embedded device? I am seeking to transmit small chunks of proprietary data (maybe 100 bytes/sec) from an embedded device and have it received by another embedded device in close proximity then send the data from the second embedded device on to an iPhone also very close by. I need bidirectional data from iPhone to second device to first device as well, so a two way data stream. Make sense?

I am using v16 (latest I believe) of the nRF5 SDK on an nRF52832.

Thanks,

Kevin

Parents Reply Children
  • Hi Kevin

    It is quite common to use a mobile phone as the NUS central/client, and the nRF52 as the peripheral/server, but in the case that you want to use an nRF52 device on both sides of the link we also provide a client example for the nRF52. 

    This example is set up to connect to any peripheral nearby, allowing you to send NUS data between the two devices.

    Best regards
    Torbjørn

  • Thanks again. I guess that's my question. When would one want to start with the server code and when would one want to start with the client code if both examples transmit data both ways? 

  • Hi Kevin,

    Are you going to be transfering the data between a mobile device and a Nordic device or between two Nordic devices?

    If the former is correct then you want to use the Nordic chip as a Peripheral/Server and the mobile device as the Central/Client.  If it's the latter then one Nordic chip will be the Peripheral/Server and the other a Central/Client.

    Cheers,

    Darren

  • Thanks Darren. Actually Device 1 will transmit data to Device 2. Device 2 will receive Device 1's data and do some calculations and transmit to the iPhone. However we need bidirectional data channels open between all devices, ideally. So Device 1 will Tx and Rx to 2 and Device 2 will Tx and Rx to Device 1. And Device 2 will also Tx and Rx to the iPhone. In this situation, what would you say are good starting projects for Device 1 and Device 2?

  • Hi Torbjørn. It occurs to me that the starting projects I need are: a two device BLE communications system where a device (either device) can say "I have some data for you" and can push their data to the other device (likely using an interrupt on the Rx end). At the same time, each device can also send a "pull" data request to the other device when it has some data ready for the other end (again probably in an interrupt notification situation). This would all be irrespective of who is the central and who is the peripheral - either can be I think, however one device also needs bidirectional communications with the iPhone sending and receiving data as needed.

    IOW: Device A (or B) has some data for Device B (or A) and sends out a push notification. Device B (or A) responds "OK I'm listening" and starts receiving the data. Later on, Device A (or B) needs some data from Device B (or A) and sends out a "please fulfill data" request. Device B (or A) then sends out the requested data. In this situation I'm not sure who is the central and who is the peripheral and it might not matter, however one of the devices, say Device B needs to also be able to send and receive data to the iPhone app.

    So I am looking for two good starting embedded projects for such communications setup. What would you recommend given all the sample apps?

    Make sense? Thanks!

Related