what is the purpose of BLEProfile uart?

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

cross mob
Anonymous
Not applicable

In WICED-SMART-SDK-1.1.0,

bleprofile.h contains two functions, bleprofile_ReadUART and bleprofile_regHandleUARTCb.

What port are these functions using?

As Puart is independently set, I guess this UART is for HCI or debugging.

0 Likes
1 Solution
Anonymous
Not applicable

Hi eyan,

Those functions are for the peripheral UART, so you can communicate with another device. Here's an example I wrote that uses it to communicate with an Arduino DUE:

odbol/broadcom-wiced-ble-uart · GitHub

View solution in original post

7 Replies
Anonymous
Not applicable

Hello eyan


Let me research this for you tomorrow


JT

0 Likes
Anonymous
Not applicable

Hello eyan,

Still working on this, but the bleprofile_regHandleUARTCb is a Registered Call Back function.

Does this help?

JT

0 Likes
Anonymous
Not applicable

JT,

can you answer what bleprofile_ReadUART is for?

EY

0 Likes
Anonymous
Not applicable

Hello eyan,

bleprofile_ReadUART:

Your application can call this function to read the content of the UART received buffer.

Your application needs to provide at least READ_UART_LEN byte buffer

The Parameter:

data - This is the pointer to the buffer to read UART to.

Our API documentation is located in the SDK API.html file

pastedImage_0.png

Let me know if this answers your questions

JT

0 Likes
Anonymous
Not applicable

J.T, which port of UART does "bleprofile_ReadUART" use?

I'm confused with peripheral UART.

EY An

0 Likes
Anonymous
Not applicable

You can specify which port you use for peripheral uart like below.

const BLE_PROFILE_PUART_CFG sample_puart_config = {

    115200

    , GPIO_PIN_UART_TX

    , GPIO_PIN_UART_RX

};

sample_puart_config is used as the 4th parameter of bleapp_set_cfg().

0 Likes
Anonymous
Not applicable

Hi eyan,

Those functions are for the peripheral UART, so you can communicate with another device. Here's an example I wrote that uses it to communicate with an Arduino DUE:

odbol/broadcom-wiced-ble-uart · GitHub