BLE Stack internal Debug output?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi

   

I am developing a project using the CYBLE-012011-00 module with the latest PSoC Creator 4.0 Update 1 (4.0.0.432) and BLE stack 3.30. Sometimes I'm having some connection problems with BlueZ stack in Linux when my device gets stuck in an infinite connect/disconnect loop after devices boot and try to re-establish their connection. This happens only sporadically, but when it does happen a complete un-pairing and re-pairing is the only solution. I already catch all events coming from the callback I have registered to CyBle_Start() function and send them to DEBUG UART, but unfortunately they do not help me very much as I seem to get random CYBLE_EVT_GATT_DISCONNECT_IND out of nowhere. On the Linux side debugging BlueZ (both bluetoothd and btmon) has not helped either, I can see the same disconnect events there also but not where they come from and why. Then they re-establish connection and I get a CYBLE_EVT_GATT_CONNECT_IND event which is shortly after followed by another CYBLE_EVT_GATT_DISCONNECT_IND and so on...

   

 

   

So is there any way to enable debug uart output in within the Cypress BLE stack, and not just the callback? I cannot find anything about it in the BLE_Stack.h file in my project and neither in the PDF documentation for the BLE 3.30 module. Surely the Cypress stack developers must be using som debug output from within the BLE stack itself when they are developing the stack? Any suggestions?

0 Likes
1 Solution
Anonymous
Not applicable

The closest thing I can think of that would allow you to throw debug info out of the Cypress stack would be to insert prinft() calls at the locations you want to see logged on the UART, but this is admittedly a pretty frustrating way to do things. A cypress employee would probably have more info on if they already have one built-in.

   

Sorry, can't say I've seen anything that would be more helpful. (The HCI mode just allows more events to occur within the BLE stack callback, so no. That wouldn't be what you want)

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

There is the HCI mode for the BLE component, but not sure if that is what you would want.

0 Likes
Anonymous
Not applicable

I have seen "hci mode" mentioned in some places also, but why would it be any good for getting debug output from the stack. For instance, if the stack decides to send timeout by itself, and does some debug output regarding this, how can can this be observed? "Use hci mode" does not help me, if the solution is really use hci mode then more advise is needed.

0 Likes
Anonymous
Not applicable

No unfortunately this is not what I'm looking for, I want it to run with my current profile (HID over GATT) and would just like to see more debug outputs of what is going on inside the stack when my connection fails.

0 Likes
Anonymous
Not applicable

The closest thing I can think of that would allow you to throw debug info out of the Cypress stack would be to insert prinft() calls at the locations you want to see logged on the UART, but this is admittedly a pretty frustrating way to do things. A cypress employee would probably have more info on if they already have one built-in.

   

Sorry, can't say I've seen anything that would be more helpful. (The HCI mode just allows more events to occur within the BLE stack callback, so no. That wouldn't be what you want)

0 Likes