Hi,
I did respond to this:
I do not see a update on a response, maybe that im not part of this ticket ??
Could you please have a look at this?
Thanks,
Best Regards,
Theo
Hi,
I did respond to this:
I do not see a update on a response, maybe that im not part of this ticket ??
Could you please have a look at this?
Thanks,
Best Regards,
Theo
Hi,
As I said in the ticket you linked, we are working on a fix and I will update you when I have more to share.
probably not THE sollution, but when i empty (remove the code) of the routine:static void ble_data_sent(struct bt_nus_client *nus, uint8_t err,const uint8_t *const data, uint16_t len)the the crash is gone, and the send data i see on the peripheral....but, probably i have now a missing feature ????
Removing the k_sem_give() in that callback would not be good, but it looks like it would mostly slow the sample down and produce a lot of warnings.
Removing the rest of the code, along with the k_free() would cause a memory leak and the sample would crash after enough messages were sent.
Hi Øivind,
I have now only removed the k_free(), to prevent the crash, at the beginning.
After further working with the Central_uart AND the Peripheral_uart.. after some communication running it reveals an other-crash on both sides.
I found a memory leakage situation in the central AND in the peripheral...
Hi,
Great to see that you are trying to figure out what the issue is, but I unfortunately have to inform you that both those buffers already have an associated k_free().
The buffers allocated in central_uart's ble_data_received() and in peripheral_uart's bt_receive_cb() are later passed to k_free in the UART_TX_DONE case of uart_cb().
If you are seeing improvements from your changes, you should double check that uart_cb is getting the UART_TX_DONE event and freeing the buffer properly.
Ah Ok i see, thanks
it is becoming more clear now