I ran another test just now using the BLEServoExample.ino project that was recently added to the blogs section of TinyCircuits website. I got the same problem when running that example code as well as with JUST the UARTPassthrough example.
An important thing to note is that the main sketch loop continues to run but the call to aciloop() is either throwing a non-catchable error is not detecting input if Bluetooth is sent too fast. For examples sake I am sending a max of a 4 byte integer every 16ms for a total max of 240 bytes per second in the worst case scenario. The BLE code will run for a short (random) time period but eventually stop detecting input.
So basically:
My suspicion is that there is some kind of error occurring deep inside the UART.ino portion of the project that does not cause the main loop to stop, but causes all future RX_Characteristic writes from an external bluetooth server to be ignored. I am not really sure where to go from here.
An important thing to note is that the main sketch loop continues to run but the call to aciloop() is either throwing a non-catchable error is not detecting input if Bluetooth is sent too fast. For examples sake I am sending a max of a 4 byte integer every 16ms for a total max of 240 bytes per second in the worst case scenario. The BLE code will run for a short (random) time period but eventually stop detecting input.
So basically:
- the main loop is running verfied via a SerialPrint on every loop after the error state occurs
- call to aciloop is not changing the value of ble_rx_buffer_length variable to non-zero
- most likely not filling the ble_rx_buffer either
My suspicion is that there is some kind of error occurring deep inside the UART.ino portion of the project that does not cause the main loop to stop, but causes all future RX_Characteristic writes from an external bluetooth server to be ignored. I am not really sure where to go from here.