File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
modules/openthread/platform Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -433,6 +433,30 @@ otError otPlatBleGapAdvSetData(otInstance *aInstance, uint8_t *aAdvertisementDat
433433 return OT_ERROR_NONE ;
434434}
435435
436+ otError otPlatBleGapAdvUpdateData (otInstance * aInstance , uint8_t * aAdvertisementData ,
437+ uint16_t aAdvertisementLen )
438+ {
439+ ARG_UNUSED (aInstance );
440+
441+ int err ;
442+
443+ if (aAdvertisementLen > OT_TCAT_ADVERTISEMENT_MAX_LEN || aAdvertisementData == NULL ) {
444+ LOG_ERR ("Invalid TCAT Advertisement parameters advlen: %d" , aAdvertisementLen );
445+ return OT_ERROR_INVALID_ARGS ;
446+ }
447+
448+ ad [1 ].data_len = (uint8_t )aAdvertisementLen ;
449+ sd [1 ].data_len = (uint8_t )aAdvertisementLen ;
450+
451+ err = bt_le_adv_update_data (ad , ARRAY_SIZE (ad ), sd , ARRAY_SIZE (sd ));
452+
453+ if (err != 0 ) {
454+ return OT_ERROR_FAILED ;
455+ }
456+
457+ return OT_ERROR_NONE ;
458+ }
459+
436460otError otPlatBleGapAdvStart (otInstance * aInstance , uint16_t aInterval )
437461{
438462 ARG_UNUSED (aInstance );
You can’t perform that action at this time.
0 commit comments