NUS ble_app_uart freezes when client app is closed while receiving data from peripheral

When the nRF52840 Dev Kit is sending data as a peripheral, connected to client running nRF Connect all works.

I am sending (streaming) a text file to iOS phone or Android tablet.

1)

If I close nRF Connect while streaming, the peripheral (nRF52840) stays connected.

I have to power cycle to get nRF52840 to start advertising again.

2)

If I send a 340-character text file to NUS, all is fine. I can disconnect and reconnect.

If I send a 360-character text file, NUS locks up (Freezes).s

Only a power cycle can get the Dev Kit to function.again.

Any help appreciated

I am using:

nRF52840
nRF5_SDK_17.1.0_ddde560
s140_nrf52_7.2.0_softdevice

When I use:

ble_app_uart
nRF5_SDK_15.3.0_59ac345
s132_nrf52_6.1.1_softdevice.hex

nRF52832 Dev Kit

I can send a file of320 bytes, no problem

When I send a file of 360 bytes, the nRF52832 Dev Kit (Peripheral) automatically disconnects, but does NOT freeze.

So the Client, (Android tablet), can reconnect.

Parents
  • Amanda,

    As you can see from my earlier post, I am already commenting out the 

    //APP_ERROR_HANDLER(p_event->data.error_communication); which is the same as removing the line.

    However,

    We are seeing continued UART problems, if data is streamed from the external UART RX pin to BLE client. Even with //APP_ERROR_HANDLER(p_event->data.error_communication); commented out, the NUS would freeze. The only way to get it to work, is to power cycle.

    This problem is seen if I stream text to the UART from an external UART, NOT internally generated data from the NUS app).

    I use nRFConnect, and see the data.

    Then while it is streaming, close nRFConnect.

    NUS will freeze, but not disconnect.

     

    Any help appreciated

    I can talk to support directly, if you can send me a link.

Reply
  • Amanda,

    As you can see from my earlier post, I am already commenting out the 

    //APP_ERROR_HANDLER(p_event->data.error_communication); which is the same as removing the line.

    However,

    We are seeing continued UART problems, if data is streamed from the external UART RX pin to BLE client. Even with //APP_ERROR_HANDLER(p_event->data.error_communication); commented out, the NUS would freeze. The only way to get it to work, is to power cycle.

    This problem is seen if I stream text to the UART from an external UART, NOT internally generated data from the NUS app).

    I use nRFConnect, and see the data.

    Then while it is streaming, close nRFConnect.

    NUS will freeze, but not disconnect.

     

    Any help appreciated

    I can talk to support directly, if you can send me a link.

Children
No Data
Related