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

BLE_APP_UART Locks up with high datarate

I'm attempting to take a 115k baud stream of NMEA sentences from a GPS sensor, and outputting it to a phone based on the UART example. While I'm not sure if BLE is perfectly capable of handling it, I'd still like to send the maximum number of complete "sentences" as possible to see what update rate that ends up being.

The UART example works super well with a good 'ol "Hello World" but when hooked up to the GPS sensor it will send ~4-6 sentences rapidly then stop responding

I've looked at RTT viewer and it reads:

APP:INFO:UART Start!

APP:INFO:Connected

APP:INFO:Data len is set to 0x3D(61) (then it locks up)

I was concerned the while(); loop in the UART handler was causing an overflow, so I instead re-wrote the handler to attempt a send and reset the array index regardless of whether the BLE string_send was busy or not.. didn't seem to make a difference.

Any tips here? I'm pretty new with both Bluetooth and uVision, so any help is appreciated.

I also found this question, but I haven't been able to tell if my problem is related or not: devzone.nordicsemi.com/.../

(Project info) SDK_13.1.0_7ca7556

S132 Soft Device

nrf52832


Update 8/4/17

I've been trying to narrow down where this goes into the weeds, so I put the following line as the "default" in ble_nus_on_ble_evt():

NRF_LOG_INFO("Unhandled BLE evt [%X]\r\n", p_ble_evt->header.evt_id);

When I do this, I get the following in my log:

APP:INFO:UART Start!

APP:INFO:Connected APP:INFO:Data len is set to 0x3D(61)

:INFO:Unhandled BLE evt [3A]

:INFO:Unhandled BLE evt [22]

:INFO:Unhandled BLE evt [12]

:INFO:Unhandled BLE evt [12]

:INFO:Unhandled BLE evt [12]

  • If I just leave my phone connected, it will sit on 0x12 for a while, and when I connect the UART stream I get:

:INFO:Unhandled BLE evt [57]

:INFO:Unhandled BLE evt [57]

:INFO:Unhandled BLE evt [57]

APP:INFO:UART Start!

I looked in ble_ranges.h, but can't seem to get what 0x57 stands for.. any help here?

Related