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

Several questions about sparkfun nrf52840 BLE connections

Hello Nordic,

I have several questions regarding the BLE connection. I have 2 sparkfun nRF52840 boards and an android phone (android 6.0).

This is my scenario:

    - the android phone connects to nRF1 and transmits some data .

    - then, nRF1 connects to nRF2 and transmits also some data.

    - at the final, nRF2 connects to android phone and transmits other data.

Can you help me, please, telling how to solve this circle of connections? I don't think that my phone supports peripheral mode. So, if my phone can be only in the central mode, that means that the boards have to be in peripheral mode, but being in peripheral, the boards can't talk to each other or do you have an example in the SDK to be able to do this?

Thank you.

Parents
  • Okay, I think this is due to the connection handles not being handled correctly. In the on_connected() function in main of the original multiperipheral example, where nrf_ble_qwr_conn_handle_assign() is called in this example, the connection handle is an array. You can see how this connection handle is used in the led_status_send_to_all() function. This is how the connection handle should be sent into ble_nusdata_send() in your example as well.

    Best regards,

    Simon

Reply
  • Okay, I think this is due to the connection handles not being handled correctly. In the on_connected() function in main of the original multiperipheral example, where nrf_ble_qwr_conn_handle_assign() is called in this example, the connection handle is an array. You can see how this connection handle is used in the led_status_send_to_all() function. This is how the connection handle should be sent into ble_nusdata_send() in your example as well.

    Best regards,

    Simon

Children
No Data
Related