WICED Hci command transport robustness

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

cross mob
aglier
Level 4
Level 4
25 replies posted 25 sign-ins 10 replies posted

Hi,

 

I use the CYBT-343026 chip in HCI command mode.

I send WICED Hci commands to control it.

Whenever I send a random character BEFORE I send a valid HCI command, the whole communication is not working anymore and I need to reset the device.

E.g. when I send a HCI Reset command  (HEX) 19 01 00 00 00  everything works fine and I receive a "Device started event" (HEX) 19 05 00 00 00

 

However, when I send a (ASCII) 'v' before sending a reset command, I will not receive any answer. Sending a valid command afterwards also does not fix this issue.

 

Is there any special setting that I need to setup to make the parser robust to "invalid bytes"?

 

Best regards

Alex

0 Likes
1 Solution
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

Are you sending WICED HCI command or just standard HCI command?

WICED HCI command is expected to send from an external MCU to the application of  CYBT-343026  application. May I know which application are you using? Please send me the application, software version and steps to reproduce.

If it is just standard HCI commands directly injected into the controller, then the behavior is expected. The controller expects valid commands only.  Otherwise, the controller may get stuck.

 

Thanks,

-Dheeraj.P.K

View solution in original post

0 Likes
3 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

Are you sending WICED HCI command or just standard HCI command?

WICED HCI command is expected to send from an external MCU to the application of  CYBT-343026  application. May I know which application are you using? Please send me the application, software version and steps to reproduce.

If it is just standard HCI commands directly injected into the controller, then the behavior is expected. The controller expects valid commands only.  Otherwise, the controller may get stuck.

 

Thanks,

-Dheeraj.P.K

0 Likes
aglier
Level 4
Level 4
25 replies posted 25 sign-ins 10 replies posted

Hi and thank you for your reply.

Yes, I send WICED HCI commands from an external source (MCU) to the application of the CYBT-343026.

I was seeing that the .p_data_handler callback in wiced_transport_cfg_t is only called when a valid command is received. However, if there is any byte transfered that does not fit into the protocol it won't be called and I have no chance to validate the received data.

Is there any setting that can forward all bytes before parsing them?

 

Best regards

Alex

0 Likes
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Update:

If you are using WICED HCI commands, please follow the WICED HCI protocol document. 

Note, for raw usage you can configure the HCI UART in raw mode as well. 

0 Likes