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

Sending signal to multiple transmitter during receiving using ESB

Hello,

 

I have a question about a certain issue that came up during developing a 3 transmitter, 1 receiver setup.

So the basic setup is that the transmitters are sending data with around 200Hz (using ESB), the receiver gets the payloads and forwards it toward a Raspberry via SPI which later processes the data.

The problem is that during sampling I have to update the timestamp once in every minute for the transmitters (and unfortunately the time is not available on the transmitter side so I have to send an updated base timestamp, store it and count the elapsed microseconds using the RTC of the nRF52840 Dongle). For one transmitter the base timestamp update works pretty well, sending the payload in the ACK, but when it comes to multiple transmitters I can only send this message sequentially toward the transmitters on each pipe one-by-one with at least 50ms delay between messages.

My question is that is there a way to send a message to multiple TX RF modules with an RX RF module at the same time? Or do you have any suggestion on how to solve this issue?

Thank you for your help in advance!

Best regards,

 

- Bertalan

Parents
  • Hi Bertalan

    To send the same packet to all the TX devices at once you would essentially have to switch the TX/RX relationship around, so that the RX module went into TX mode and sent a no-ack packet to all the TX modules in RX mode, but this would obviously complicate the implementation a bit. 

    If you find the ACK payload method to work sufficiently well for one device I did write a modified version of the nrf_esb library a while back that makes it more suitable for multi pipe ACK payload implementations. 

    Essentially the official library has a bug when uploading ACK payloads to multiple pipes, where it will only check the last packet added every time a packet is received. This means that unless the last packet in the ACK payload buffer corresponds to the pipe you are receiving on you will not send any ACK payloads, even if there is a payload in the buffer for the current pipe. 

    I made a patch to the library to fix this bug, making some changes to the way ACK payloads are buffered:
    https://github.com/too1/nrf52-esb-buffer-improvements

    Could you try this library and see if it performs better for your use case?
    With this library you should be able to upload the same packet to all the pipes at once. 

    Best regards
    Torbjørn

Reply
  • Hi Bertalan

    To send the same packet to all the TX devices at once you would essentially have to switch the TX/RX relationship around, so that the RX module went into TX mode and sent a no-ack packet to all the TX modules in RX mode, but this would obviously complicate the implementation a bit. 

    If you find the ACK payload method to work sufficiently well for one device I did write a modified version of the nrf_esb library a while back that makes it more suitable for multi pipe ACK payload implementations. 

    Essentially the official library has a bug when uploading ACK payloads to multiple pipes, where it will only check the last packet added every time a packet is received. This means that unless the last packet in the ACK payload buffer corresponds to the pipe you are receiving on you will not send any ACK payloads, even if there is a payload in the buffer for the current pipe. 

    I made a patch to the library to fix this bug, making some changes to the way ACK payloads are buffered:
    https://github.com/too1/nrf52-esb-buffer-improvements

    Could you try this library and see if it performs better for your use case?
    With this library you should be able to upload the same packet to all the pipes at once. 

    Best regards
    Torbjørn

Children
  • Hello Torbjørn,

     

    First of all thank you for the modified esb library, I tried it out and maybe I am missing something.

    When I built the .hex file I received 3 warnings from the esb library, and also realized that the NRF_ESB_TX_POWER_8DBM constant is missing. Are these intentional and expected?

    Also to write an ACK with the RX RF module for all 3 transmitters I call nrf_esb_write_payload(&tx_payload). Should I wait a certain amount of time between modifying tx_payload.pipe value and calling the function again or can I call the function immediately?

    Thank you for the help and guidance!

    Best regards,

     

    Bertalan

  • Hi Bertalan 

    Laszlo_B said:
    When I built the .hex file I received 3 warnings from the esb library, and also realized that the NRF_ESB_TX_POWER_8DBM constant is missing. Are these intentional and expected?

    Yes, I get the same 3 warnings and haven't figured out yet how to remove them. It is related to the new buffering code, but doesn't appear to affect operation. 

    It is also correct that the NRF_ESB_TX_POWER_8DBM define is missing. If you need this supported I would recommend copying the nrf_esb_tx_power_t define in nrf_esb.h from the official library instead. 

    Laszlo_B said:
    Also to write an ACK with the RX RF module for all 3 transmitters I call nrf_esb_write_payload(&tx_payload). Should I wait a certain amount of time between modifying tx_payload.pipe value and calling the function again or can I call the function immediately?

    No delay is required, you can write all three packets in one go. 

    Best regards
    Torbjørn 

Related