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

Modify Relay example for a problem statement

Hi

I am relatively new to this software and I am using this for a project which involves device-device and user-device communication.I came across the ble relay example.My aim is to send a piece of information from a user device (smartphone) to the device(development board) which passes it on to the main hub(Other development board) to update it to the server.I think relay example will be suited for this problem.So in relay the user is getting the data from the sensors on his smartphone.I'll have to reverse the flow for my project.What changes will i need to make?

Thank you

Parents
  • My suggestion is to start with the app blinky example. This example demonstrate how you can exchange data between two peers:

    https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fble_sdk_app_blinky.html 

    What is important to understand is that the BLE softdevice can maintain multiple connection handles, and it's possible to have both peripheral and central role for each individual connection. The relay example you refer to show how to initiate the BLE softdevice to have 3 connections, and it show how to read and write data from one connection to the next connection. This is achieved not only by using connection handles, but also database characteristic handles, which specify where the data is coming from, and where it can be written to. Often the role of a connection is referred to as GAP central or peripheral, while the database is referred as GATT server or client. It is going to take some time to understand this, but I think it is a better idea to start with the app blinky example, and as a next step you can add a second connection.

Reply
  • My suggestion is to start with the app blinky example. This example demonstrate how you can exchange data between two peers:

    https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fble_sdk_app_blinky.html 

    What is important to understand is that the BLE softdevice can maintain multiple connection handles, and it's possible to have both peripheral and central role for each individual connection. The relay example you refer to show how to initiate the BLE softdevice to have 3 connections, and it show how to read and write data from one connection to the next connection. This is achieved not only by using connection handles, but also database characteristic handles, which specify where the data is coming from, and where it can be written to. Often the role of a connection is referred to as GAP central or peripheral, while the database is referred as GATT server or client. It is going to take some time to understand this, but I think it is a better idea to start with the app blinky example, and as a next step you can add a second connection.

Children
No Data
Related