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

Wi-Fi Combo Forum Discussions

Anonymous
Not applicable

Hi...

I am using this UART Setup and UART Messages Over Webpage  code in wiced sdk 2.4.0 , i want to receive hex-values  through uart and display the hex-value or equivalent decimal value in a webpage , when i tried to display i am not getting actual data.

also i tried this  to display data on console-Teraterm

{

unsigned char test_data[16] = {0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9};

wiced_uart_transmit_bytes( WICED_UART_1, test_data, sizeof(test_data));

}

same issue...Please help me...Thank you...

Incorect_hex_data.png

0 Likes
7 Replies
Anonymous
Not applicable

Which UART1 or UART2 are you using?

I think these all three need to be configured properly.

- pin connection,

- UART selection on source code,

- and also UART setting on Tera Term.

Anonymous
Not applicable

Thank you for your reply

I am using Discover wifi sn8200 ,Wiced sdk 2.4.0

other then hex data UART Setup and UART Messages Over Webpage  this UART code is working fine.

My application is    Main_Application.png

Working_Application.png

Anonymous
Not applicable

Below is my understanding. Is that correct?

If yes, please check 4) first. If both 1) and 4) work, 3) should work.

uart.png

0 Likes
Anonymous
Not applicable

Hi

Thank you for your reply.

Actually 4-th condition is working but data is not proper..the webpage in the top is the data i am getting ...

What i am missing ??

0 Likes
Anonymous
Not applicable

Hi ,

In my Discover Wifi  sn8200 wifi board i have only one UART , and i have connected this to BLE master . Now BLE master sending data to UART of Discover sn8200 board . my web page shows nothing . how can i check whether my master data is properly received  in sn8200 ...

my code will be like this...UART Setup and UART Messages Over Webpage

while (wiced_uart_receive_bytes( WICED_UART_1, UartRxData, 20, 1000) == WICED_SUCCESS)

    {

    wiced_rtos_lock_mutex(&msg_fwd_mutex);

    for (idx = 0 ; idx < sizeof(UartRxData); idx++)

    {

    SensorData[idx] = UartRxData[idx];

    }

    wiced_uart_transmit_bytes( WICED_UART_1, SensorData,sizeof(ensorData));

  strcpy(rx_msgs[rx_end_index], (const char* )SensorData);

  rx_end_index = (rx_end_index + 1) % HISTORY_LEN;

  wiced_rtos_unlock_mutex(&msg_fwd_mutex);

}

Please help me to solve this

0 Likes
Anonymous
Not applicable

Hi,
Sorry for my late response.
Let me ask a few things below.
1) Are you sending 20Bytes of data from BLE Master?
wiced_uart_receive_bytes() returns after UART received 20Bytes.
2) Are you sending ASCII data from BLE Master?
Data stored into rx_msgs[] should be ASCII characters.
If not, please convert it before saving.
3) Are you sending NUL character at the end of data?
The 20Byte data should be terminated by NUL (\0) charactor.

0 Likes
Anonymous
Not applicable

Thank you for your response, i will try as you suggest

0 Likes