How to custome uart protocol to modify advertisement data

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

cross mob
lock attach
Attachments are accessible only for community members.
YaTr_3516311
Level 5
Level 5
25 sign-ins First solution authored 100 replies posted

Hi,

I want to custome uart protocol to modify advertisement data when uart recieve "SAD,D=0102" command.

But once I set "SAD,D=0102" command from uart with new FW, modeule restart. I don't know where is the problem.

I use CYBT-343026-01 EVAL board to do the testing.

Please check my code.

BR,

Treacy

0 Likes
1 Solution

There are something wrong with your function wiced_result_t ibeacon_set_advertisement_data(uint8* p_data, uint8 len ).

Could you refer to the function static void hci_control_le_handle_set_advertisement_data(uint8_t* data, uint32_t length) in the file hci_control_le.c under demo headset.

View solution in original post

0 Likes
3 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

The SAD command is only avaliable for EZ-Serial firmware. If you develop your own application code, please call the API wiced_bt_ble_set_raw_advertisement_data() in your code to set the adv data.

0 Likes

Dear OwenZ,

I know. I just use the same SAD command defined to my uart protocol. You can check the code, in the deep call, it call wiced_bt_ble_set_raw_advertisement_data.  But the problem is "reboot". Once port enter SAD command, it reboot.

BR,

Treacy

0 Likes

There are something wrong with your function wiced_result_t ibeacon_set_advertisement_data(uint8* p_data, uint8 len ).

Could you refer to the function static void hci_control_le_handle_set_advertisement_data(uint8_t* data, uint32_t length) in the file hci_control_le.c under demo headset.

0 Likes