微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI无线射频设计 > 关于broadcaster里面 如何进行广播数据

关于broadcaster里面 如何进行广播数据

时间:12-22 整理:3721RD 点击:

我在simpleBLEBroadcaster里面看到这里的代码最后只是执行到peripheralStateNotificationCB里的GAPROLE_ADVERTISING,在这边就只利用lcd进行了个显示信息,其余什么也没有做,想请教下如何进行广播数据?GATT_Notification可以使用吗?如果使用的话如何设置其中的参数?bStatus_t GATT_Notification( uint16 connHandle, attHandleValueNoti_t *pNoti,  uint8 authenticated );其中的connHandle可以是0xffff吗?  我是用的GATT_Notification,然后connHandle写的0xffff,但是返回值却是0x39  找了个半天也没找到0x39这个返回值是个什么?请教高手给予解答,谢谢!

GATT_Notitication is used after connection.

The broadcast data is in the advData.

Assuming you have modified the advData, then do to update the advData:

GAPRole_SetParameter( GAPROLE_ADVERT_DATA, sizeof( advData), advData);

// Update the advertising data

GAP_UpdateAdvertisingData( simpleBLEPeripheral_TaskID, TRUE, sizeof( advertData ), advertData ); 

In your app level (simpleBLEperipheral).

 Or, alternatively, you can also do the start device again when advertising data is updated.

…….

    // Start the Device

    VOID GAPRole_StartDevice( &simpleBLEPeripheral_PeripheralCBs );

 

在周期广播数据的时候  发现不断的重启device(Start the Device)没什么作用 ?我现在的做法是不断的GAP_UpdateAdvertisingData(周期性的updata),此时会出现START_ADVERTISING_EVT   event里面GAP_MakeDiscoverable( gapRole_TaskID, &params );总是会返回11,这是什么意思?  假设我周期性(1s)广播(updata  the count ,count 1s 自加)数据  可是在observer端得到的数据(devinfo)不是一个连续的count  而是跳跃性的

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top