8261主从一体的实现问题

Discussions on BLE related products, including standard BLE devices, BLE mesh, and Apple HomeKit products
Post Reply
xincxin
Posts: 8
Joined: Mon May 15, 2017 3:07 pm

Tue May 14, 2019 11:42 am

目前想实现BLE在连接和广播并能扫描附近的蓝牙,并解析出广播中的数据比如名字等。我参考TEST_ADVERTISING_SCANNING_IN_CONN_SLAVE_ROLE的代码。但是没找到怎么接收和解析广播数据的。麻烦给个参考。谢谢!
MXF)9UZE%7ETP6BK~J~U8RJ.png
MXF)9UZE%7ETP6BK~J~U8RJ.png (11.01 KiB) Viewed 498 times
TL_shengang.ding
Posts: 12
Joined: Wed May 10, 2017 1:51 pm

Thu May 16, 2019 6:04 pm

你目前测试的工程是正确的,在826x_feature_test 工程里,可以选择TEST_SCANNING_IN_ADV_AND_CONN_SLAVE_ROLE或者TEST_ADVERTISING_SCANNING_IN_CONN_SLAVE_ROLE
实现在广播态和连接态实现scan的功能。
事件 是在底层产生,事件回调接口是app_event_handler 。每扫描到一包数据就会产生回调,直接对 event_adv_report_t *pa处理即可。
Post Reply