cancel
Showing results for 
Search instead for 
Did you mean: 

ModusToolbox Bluetooth SDK

bt_fw_eng
New Contributor

In the RFCOMM_Serial_Port_Multi-Port example project for a CYW20721 the function hci_spp_handle_command is in the file hci_spp.c

I can't find anywhere in the code, or library headers any clues as to how hci_spp_handle_command is registered to receive commands from from the HCI UART. Is "hci_spp_handle_command" a defacto name that has to be used and that is baked into the Bluetooth stack? Or is the function registered through a const structure somewhere?

0 Likes
1 Reply
BragadeeshV
Moderator
Moderator

Hi @bt_fw_eng ,

spp_multi_port_proc_rx_cmd (user defined) is the handle used to receive HCI commands over UART from the host. The handle is registered in the configuration structure wiced_transport_cfg_t transport_cfg in spp_multi_port.c. Whenever the SPP group command is received, hci_spp_handle_command() (user defined) is called to process the commands.

Check the following exercise where this is explained clearly.

https://github.com/cypresssemiconductorco/CypressAcademy_BT101_Files/blob/master/PDFs/WBT101-05-Debu...

Regards,
Bragadeesh
0 Likes