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

Forced disconnections when i try to send 50 bytes per second on UART example

Hi everyone,

Explaning my project: an external device transmit via UART to nordik nrf52840DK device with UART peripheal firmware, this is connected to another nrf52840DK via BLE with UART central firmware.

So the peripheal is only working as bridge.

It simply works when i send less than 10 bytes per second, but when I increase the amount of data to more than 30bytes per second i get disconnexions of my peripheal when passed 20-40 seconds. 

I tink that it could be an overload of the UART or an overload of BLE, here my conn_params:

Here the error of disconnection: Disconnected: <log_strdup alloc failed> (reason 8)

Really the objective of the project is send 50-100 bytes every 100msec.

What point i need to check or reconfigure to achieve it??


Thank you,

regards.

Parents Reply Children
  • I think i am having troubbles with flow control of uart

  • Hi another time,

    If you didn't be able to debug my project until now, there aren't any problem, but i work a little more on the projects, and as i can see only is keeping the error of BUS Alert, but with some differences on directions, i will update all information:

    For reproduce this error is necessary have a connection of 1 central and 1 peripheral. On one of any devices connect to a external UART(for example xctu) and send periodically a packet of 5 bytes + \r +\n every second.

    The error happens on the device where the external UART is connected and sending data. Aparently the device reboots randomly. This is an example of the issue on Central:

    Debuging on direction 0x0029e5c:

    On thread.c line 828:

    To see wich thread is causing this:

    On hci_core on line 65:

    This thread isn't the same of the last time, I CONFIG_BT_RX_STACK_SIZE=2200 and CONFIG_BT_HCI_TX_STACK_SIZE=2200

    and the error continue...
    I don't know what more try.
    Thank you,
    regards.

  • Hi,

    I thought the fault happened on the peripheral device? Now I see you have a bus fault on the central device as well?

    Can you try to make a minimal failing project that reproduce the issue using a single DK, and using any device (like nRF connect for Desktop BLE) as the peer? Also it should not rely on physical UART, but just send some dummy NSU data in firmware. That way it is easier to test and also fewer variables to look into. Also, if stripping away parts of your firmware changes the behavior that gives an indication on where to look.

  • OK, I will try.

    I keep my custom Central Uart but trying to connect to nRF connect for Desktop BLE.

    I thought the fault happened on the peripheral device? Now I see you have a bus fault on the central device as well?

    The fault happen only on the device which the external UART is connected. On another words, the device which faults is receiving data through UART rx and sending it to the another device through BLE.

    So i can't understand that the error is on this thread...

    On hci_core on line 65:

    This thread isn't the same of the last time, I CONFIG_BT_RX_STACK_SIZE=2200 and CONFIG_BT_HCI_TX_STACK_SIZE=2200

Related