Can you please attach your project for analysis? What is the error code from CYBLE_EVT_HCI_STATUS?
Hi @grsr, thanks for asking. I'm still having trouble. I am able to connect, interrogate, and communicate much of the time. But about every 3rd time I get stuck on CYBLE_EVT_HCI_STATUS with error code 4. Oddly, even when it works it always cycles through CYBLE_EVT_HCI_STATUS with error code 4 before progressing to 0x4c (CYBLE_EVT_GATTS_WRITE_REQ). But when it's stuck it never goes further than CYBLE_EVT_HCI_STATUS:4.
My workspace is attached to MyCase #00274530, please take a look. I will upload an updated archive now in case it exposes anything useful. You won't be able to test exactly as I do since the characteristic notifications are driven by proprietary messages originating from UART messages that come from the main processor. However, the one hint I can provide is that I never get stuck on CYBLE_EVT_HCI_STATUS when I comment out the call to CyBle_GattsNotification in the sendSPINotification method.
Thank you again.
I happened to check the event coming from the stack since it is 32-bit and I am casting it to 8-bit for diplay. It turns out the event code is not actually 0x4 (CYBLE_EVT_HCI_STATUS) but instead 0x104, a value beyond the CYBLE_EVENT_T enumeration (greater than CYBLE_EVT_MAX which is 0xff)! It hits this every time I am interrogating the device following connect, and this is the last seen event when it hangs and interrogation fails. Disconnecting, then reconnecting tends to "fix" it when this happens (obviously not good enough to ship in a real product).
Any ideas? Why would I be seeing 0x104, a value which should be impossible?