- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I saw you answered the following questions(https://community.cypress.com/thread/31902 ).
I have a similar problem.
Can I get a sample of your supplied fully raw mode sample code?
Thank you.
And one more thing: why did hci_raw_spp sample disappear from wiced studio 5.0 recently?
--------------------------------------------------------------------------------------------------------
https://community.cypress.com/thread/31902
-------------------------------------------------------------------------------------------------------
"For others viewing this thread, yes raw mode is supported by the usual transport APIs, but the RX handler must behave differently than the WICED_HCI RX handler (return bytes read instead of SUCCESS, and do not try to free transport buffer). A sample app will be included in future releases to demonstrate the steps necessary.
lye_2922526, We have already addressed your issue internally: I wrote a sample application that fully implements raw mode that was provided to you over email by your FAE. We plan to release this sample app into the SDK in future releases.
To answer (3): a watermark level triggers the callback."
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will try to give a skeleton of the code required to get raw HCI UART running.
1) Configure the wiced transport in RAW mode:
const wiced_transport_cfg_t transport_cfg =
{
WICED_TRANSPORT_UART,
{ WICED_TRANSPORT_UART_RAW_MODE, desired_baudrate},
{ buffer_size, num_buffers},
NULL,
rx_callback,
NULL
};
2) Initialize the wiced transport:
wiced_transport_init( &transport_cfg );
3) The callback:
uint32_t rx_callback( uint8_t *p_buffer, uint32_t length )
{
/* read the p_buffer or the rx data
and perform necessary processing
on the data.
Length signifies the length of the
data received.*/
return length; // or the length of data you were able to process
}
4) In order to send data back to the host, use wiced_transport_send_data() or wiced_transport_send_buffer() APIs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please, I want answers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kim,
What issues are you facing?
As stated, this example will be included in the SDK in future releases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am currently using hci raw spp mode.
But there are some problems.
So I want to check the sample code.
Can I check the sample code now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will try to give a skeleton of the code required to get raw HCI UART running.
1) Configure the wiced transport in RAW mode:
const wiced_transport_cfg_t transport_cfg =
{
WICED_TRANSPORT_UART,
{ WICED_TRANSPORT_UART_RAW_MODE, desired_baudrate},
{ buffer_size, num_buffers},
NULL,
rx_callback,
NULL
};
2) Initialize the wiced transport:
wiced_transport_init( &transport_cfg );
3) The callback:
uint32_t rx_callback( uint8_t *p_buffer, uint32_t length )
{
/* read the p_buffer or the rx data
and perform necessary processing
on the data.
Length signifies the length of the
data received.*/
return length; // or the length of data you were able to process
}
4) In order to send data back to the host, use wiced_transport_send_data() or wiced_transport_send_buffer() APIs.