nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Central Device for transmitting the Sensor Data

Hi All!

  I am using nrf52820/33/40 devices. Able to connect central (1) and peripheral (4) concurrently.

Central is an end node(nrf52820) that is connected to the sensor to send data and Peripheral is the gateway(nrf52833) for receiving the data. For simplicity, let's assume we have 4 central devices and 1 peripheral. My question is, is this approach is fine or not ? or I should have to connect the sensors with peripherals and set central as a gateway.I am using the ble_app_uart_cble_app_uart as a base for this task . My plan is to set the app_timer to send data every 5 mins from central to peripheral. 

Thanks in Advance! 

Regards,

Parents
  • Hello,

    You are mixing up a bit, by first saying 1 central and 4 peripherals, and latery you say that the peripheral is the gateway, and that you have 4 centrals and 1 peripheral. So which one is it?

    If you are not sure, but you want a star network with one gateway, I would suggest that the gateway is the central, and you connect this to 4 peripherals. Peripherals use less power than a central, but if the central is a gateway, it is more likely connected to a larger battery/wall power.

    ble_app_uart and ble_app_uart_c are suited for this, but the ble_app_uart_c only allows for one connection by default. So either you can cycle through the 4 peripherals, or you can allow it to connect to more devices. It is a bit complex, but look at the ble_app_multilink_central example, which allows for more connections than one.

    In fact, you can use that example, and change out the lbs service with the nus service.

    Best regards,

    Edvin

  • Hi

    Thank you so much for the prompt response! Yes, you are right I mixed up the things. For other users, I want to correct my mistake. I have 4 centrals(end nodes) and 1 peripheral(gateway). As per your suggestion, it will be more power-consuming if I set central as an end node.

    For sure I will go through the ble_app_multilink_central example and replace the service with NUS. 

    Again thank you!

    Regards,

    Muhammad Usman

Reply
  • Hi

    Thank you so much for the prompt response! Yes, you are right I mixed up the things. For other users, I want to correct my mistake. I have 4 centrals(end nodes) and 1 peripheral(gateway). As per your suggestion, it will be more power-consuming if I set central as an end node.

    For sure I will go through the ble_app_multilink_central example and replace the service with NUS. 

    Again thank you!

    Regards,

    Muhammad Usman

Children
  • Muhammad Usman said:

    As per your suggestion, it will be more power-consuming if I set central as an end node.

    Just to clarify, I meant that your gateway should be the central, and the 4 end nodes should be peripherals. There are a couple of reasons for this:

    1: It matches the ble_app_mutlilink_central example, as this is a central, and it allows to connect to multiple peripherals.

    2: peripherals uses less power than centrals.

    3: The central is the "boss" in the connection, so it will decide when to connect (both devices can disconnect). But since it is the boss, it also decides the connection parameters and the timing, making sure that the connections doesn't collide. This can be a bit more messy if you have several centrals connecting to a single peripheral (4 "bosses" ruling over the same "slave").

    Best regards,

    Edvin

  • Hi

    Again thank you for the nice explanation!

    Thanks & Regards,

    Muhammad Usman

Related