Hello,
My CC2540 plays a peripheral role. Now I want to update the broadcast content dynamically,I have read some articles in this community which also shows adding the function
GAP_UpdateAdvertisingData( gapRole_TaskID,
TRUE, gapRole_AdvertDataLen, gapRole_AdvertData );
I have added it according to the article.what's more, when I start change the content of advData , first I stop broadcast; second modify the content; finally enable the broadcast.But It still does not work.
My advertise type is default type ,that is GAP_ADTYPE_ADV_IND.
when having a test , I find that when I connect the CC2540 with a phone running "BLE Reader" APP, the content of broadcast can be modified. Each connection makes content modified .what I really want is the content will be modified without the connected. I have added this function
GAPRole_SetParameter( GAPROLE_PARAM_UPDATE_ENABLE, sizeof( uint8 ), &enable_update_request );
in my project.
I have two question:
1) when in peripheral role , whether is the broadcast content modified dynamically or not?
2) can we change the advertise type among GAP_ADTYPE_ADV_IND,GAP_ADTYPE_ADV_SCAN_IND,GAP_ADTYPE_ADV_NONCONN_IND ? which type support updating broadcast dynamically?