Please notice that the second parameter p_data is the pointer to the payload.
Thank you for your response XinghaoZ_26,
const wiced_transport_cfg_t transport_cfg =
.type = WICED_TRANSPORT_UART,
.mode = WICED_TRANSPORT_UART_RAW_MODE,
.baud_rate = 115200,
.buffer_size = TRANS_UART_BUFFER_SIZE,
.buffer_count = 2,
.p_status_handler = NULL,
.p_data_handler = hci_control_proc_rx_cmd,
.p_tx_complete_cback = NULL
//in receive part i am just making my LED ON
uint32_t hci_control_proc_rx_cmd( uint8_t *p_buffer, uint32_t length )
but even if i write on PUTTY terminal i don't think the code runs this function hci_control_proc_rx_cmd?
//Transmitting every one second
unsigned char temp_buffer = "TDC";
below is my output on serial terminal,
I receive the "TDC", but after that i get garbage. What could be the issue?
So the question is not about the HCI Raw Data mode, it is about the SPP transmit function?
Did you test the demo code in the KBA?(How to Use HCI Raw Data Mode in CYW20706 - KBA225970 ) It works fine on my side.
Yes i tried using the demo code How to Use HCI Raw Data Mode in CYW20706 - KBA225970 .
As soon i connect to the PUTTY terminal, my spp test bt connection with mobile gets disconnect.
I am using CYW20719 chip and not CYW20706(the code works fine with cyw20706), I dont want to use spp.
I just want to use HCI Rx nd HCI Tx pin to communicate with ESP8266 module. Can i achieve this using HCI raw data mode.?
Are you using the CYW20719B1 device on the WICED SDK? Or Modus Tool Box?
Could you share the information about the device and SDK you are using? I can try to give you a demo tomorrow.
I just confirmed internally, there is some problem with the HCI Raw data mode on CYW20719B1. Could you try to use the HCI mode? You just need to add a header to your data. The header is introduced in document doc/WICED-HCI-Control-Protocol.pdf as follows:
You can define your own command and group code for the data.
You can also use the HCI mode for AT commands communication. You only need to add a header with your command.
You may refer to the hci_audio_gateway demo. The received HCI data is handled in function hci_control_proc_rx_cmd. You can handle the data as you needed.
I want to communicate with ESP8266, as i am not going to code ESP8266 (using the initial FW which supports AT coomands)
If i try to add header files for eg 0x19 0x00 0x00 0x05 0x00 0x41(A) 0x54(T). The ESP8266 won't take as an AT commands.
Anyways i will try to use Puart pin then.