CN / EN
CN / EN

提问

获得支持

您的项目私密技术问题如需获得一对一支持,请点击下方联系我们。

如何设置蓝牙的发射功率ble_gap_tx_power_set(gap_activity_role_t role, uint8_t index, int8_t txpwr_dbm) GR551x

232****com

2021-01-08 16:42

ble_gap_tx_power_set设置后,蓝牙功率没变化。

ble_gap_tx_power_set(GAP_ACTIVITY_ROLE_ADV, 0, 7);

index的参数怎么配呢,我是直接设置成0的。

-If role is @ref GAP_ACTIVITY_ROLE_ADV, it's the index of Advertising.

-If role is @ref GAP_ACTIVITY_ROLE_CON, it's the index of connection.

0收藏

0赞成

walt

汇顶员工
2021-01-12 12:34

你好, uint16_t ble_gap_tx_power_set(gap_activity_role_t role, uint8_t index, int8_t txpwr_dbm)接口:

role选择设置是广播模式或连接模式

index在广播和连接状态分别是蓝牙回调app_gap_adv_start_cb(), app_gap_connect_cb ()中可以获取到数值

txpwr_dbm设置范围是-20到7

谢谢

0条评论

0赞成

0收藏

您的评论

登录后可回答问题,请 注册

我们时刻倾听您的声音
联系销售

扫描关注公众号

打开微信,使用“扫一扫”即可关注