Hi!
I am currently working on a project that involves taking a command sent over UART and broadcasting the data sent in that command to a number of BLE Mesh devices. I currently have this somewhat working using the dimming client example from the BLE Mesh v5 development kit and the libUART_async library from NRF SDK 17.0.2.
This being said, I have run into an issue where after sending a large number of commands the rx UART buffer suddenly appears to contain all of the commands that I had sent up until that point. For example, If I am sending 'hello' 100 times, the buffer will suddenly contain 'llohellohellohello'. I am clearing the rx buffer each time the interrupt is triggered using this nrf_libuarte_async_rx_free(p_libuarte, p_evt->data.rxtx.p_data, p_evt->data.rxtx.length); command.
Additionally, each time I send a command via UART it seem that the rx interrupt is triggered twice. The first time, the data in the buffer looks correct. For example it would contain 'hello'. The second time the data contained in the buffer is incorrect, containing the same data but missing the first index. For example it will contain 'ello'.
Question 1) Does anyone know why I might be encountering these two bugs?
Question 2) Is there a better way to integrate BLE Mesh with UART than using the libUART_async library from NRF SDK 17.0.2. So far I have not seen any other ways to do this but I am open to other options.