Hello everyone,
I am trying to send a string printed float number using the ESB protocol. I am using nrfConnect SDK 1.9.1 with nrf52832, started off with the supplied esb_ptx and esb_prx examples. I gathered required snippeds and ported it to my code. I was able to receive updated values of sent payload where the example increments the second byte of the payload by 1.
However, when I update the payload with the string printed float number ("0.04" e.g.) the receiving hardware receives wrong data, "0.00" every cycle exactly. I have checked with Segger J-Link debugger the payload does update on the TX device to the value I wanted to send however RX does not budge. Weirdly, when I increment the 7th or 8th byte as in the provided sample RX device does receive the updated byte but no the data I actually wanted to send. It reads "0.00" every cycle.
To make it clear took screen shots of the issue,
transmitter:
receiver:
Here is the configuration structure of the ESB, (same for both RX and TX)
int esb_initialize(void) { int err; /* These are arbitrary default addresses. In end user products * different addresses should be used for each set of devices. */ uint8_t base_addr_0[4] = {0xE7, 0xE7, 0xE7, 0xE7}; uint8_t base_addr_1[4] = {0xC2, 0xC2, 0xC2, 0xC2}; uint8_t addr_prefix[8] = {0xE7, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8}; struct esb_config config = ESB_DEFAULT_CONFIG; config.event_handler = event_handler; config.mode = ESB_MODE_PRX; config.selective_auto_ack = true; err = esb_init(&config); if (err) { return err; } err = esb_set_base_address_0(base_addr_0); if (err) { return err; } err = esb_set_base_address_1(base_addr_1); if (err) { return err; } err = esb_set_prefixes(addr_prefix, ARRAY_SIZE(addr_prefix)); if (err) { return err; } return 0; }