Simultaneous communication as central and perihperal for the nRF52840

Hello,

I have to develop a new device that has to connect as a central device to three sensors, and has to connect as a peripheral to a smartphone. The type of connection would be 1Mbps PHY. The sequence of events would be the next:

 1.- Capture the information of sensor 1.

2.- Repeat the information of sensor 1 to the smartphone.

3.- Repeat the former steps for sensor 2 and sensor 3.

The quantity of information is quite long for each sensor (around 110KBytes), so I will have to divide the communication of the buffer information in many packets. What do you think could be the maximum packet size I could receive and send using the nRF52840 and the present SoftDevice version?

There is then a problem about the time delay between the capture of the information of the three sensors and the reception in the smartphone. For reducing the time delay one option would be resend a packet to the smartphone at the same time that it's readed from one sensor. Do you think the only way to do that would be assembling 2 modules based on nRF52840? Or is it possible to interleave the Rx as central with the Tx as peripheral?

Thank you very much in advance.

Best Regards,

Joel Invers

Parents
  • Hi Kenneth,

    Thank you for your answer.

    The sensors have a very small range, so this new device is, in fact, a repeater to the smartphone.

    The latency requirement all the way sensors-relay-phone may be 1 or 2 seconds.

    About the througput, there is no specific data. So the question is how to get a compromised setup the full set. The sensors are BLe 5 compliant.

    Best Regards,

    Joel

  • Hi Kenneth,

    I will have to modifiy the program to adapt the buffers and manage the notificiations of all the packages.

    To reduce the total time I will have to use the maximum internal RAM possible, although I have no clear idea now if this could be possible. I have to advance more on the tests.

    One general question. What size of RAM do you think could be available for the application (in rough numbers)?

    Best Regards,

    Joel Invers

  • I compiled the relay example that support both central and peripheral role, the flash and ram usage include the usage by the softdevice BLE stack and relay application. There is very much RAM available if you are planning to use the nRF52840:

  • Hi,

    Thank you for your answers.

    The sensors have the NUS service implemented. So, for getting the information from the sensors I have thought that I will have to include the NUS client in the relay appliaction.

    Once the relay have captured all the information of one sensor (110Kbytes), it will send the full pack to an smartphone app by a series of notifications. May be using a service like the Throughput example?

    Would you use another example that could help to develop the solution more quickly?

    Thank you in advance.

    Regards,

    Joel

Reply
  • Hi,

    Thank you for your answers.

    The sensors have the NUS service implemented. So, for getting the information from the sensors I have thought that I will have to include the NUS client in the relay appliaction.

    Once the relay have captured all the information of one sensor (110Kbytes), it will send the full pack to an smartphone app by a series of notifications. May be using a service like the Throughput example?

    Would you use another example that could help to develop the solution more quickly?

    Thank you in advance.

    Regards,

    Joel

Children
  • For any BLE proprieatery application that does not follow any specific BLE profile, then you are free to do and implement this as you best see fit. You can start with BLE blinky, nus, throughput and/or relay example. You will need in any case adapt it to your more specific data, so I don't have any other suggestion than to study either of the mentioned example and try to understand how they work, and modify the one you are most comfortable with understaning. They can all in principle achieve the same throughput at the end of the day.

    Best regards,
    Kenneth

Related