How can I send data without a header via UART?

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

cross mob
AlGo_4347736
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

Hello!

I have some troubles with UART. I'm trying to send message using wiced transport, but I don't recive expected message from another side.

I used different modes of operation for UART:

    WICED_TRANSPORT_UART_HCI_MODE,

    WICED_TRANSPORT_UART_RAW_MODE,

Code:

uint8_t data[] = "\x01\x00\x21\x02\x11\x01\xBD\x67";

wiced_result_t res = wiced_transport_send_data( 0, data, sizeof(data));

or (wiced_result_t res = wiced_transport_send_buffer( 0, data, sizeof(data));)

if (res != WICED_SUCCESS)

{

  WICED_BT_TRACE ( "Cannot send message \n");

}

Expected result: 01 00 21 02 11 01 BD 67 00

Current result: 19 00 00 09 00 01 00 21 02 11 01 BD 67 00

How to avoid the appearance of a header '19 00 00 09 00' in a message received through UART?

What if I just want to send my bytes buffer without any additional automatically generated bytes?

Thank you!

0 Likes
1 Solution
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi AlGo_4347736​,

I checked internally and can confirm that using CYW20719, there is an issue of getting some header or junk values while using raw mode. This issue needs to be fixed in firmware in ROM; unfortunately we do not have any plan for this fix as of now.

However, this issue is fixed for CYW20819, you can try using that.

View solution in original post

0 Likes
4 Replies
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi AlGo_4347736​,

I consider you are using WICED_TRANSPORT_UART_RAW_MODE mode to send your data over HCI UART. Am I correct? Could you give us more information about the code you are using?

Have you checked the step given in this article & tried the same:How to Use HCI Raw Data Mode in CYW20706 - KBA225970

However, I am checking more with our firmware team. Will update you soon.

SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi AlGo_4347736​,

I checked internally and can confirm that using CYW20719, there is an issue of getting some header or junk values while using raw mode. This issue needs to be fixed in firmware in ROM; unfortunately we do not have any plan for this fix as of now.

However, this issue is fixed for CYW20819, you can try using that.

0 Likes

Hello SheetalJ_96

Could you find out if this problem exists on CYW20721B2?

0 Likes

Yes this issue exists for CYW20721B2 but supposed to get fixed in BTSDK 2.6.