Description
Description
Managed to get the periodic advertising example to run on NRF52840_DK but it hangs when calling setPeriodicAdvertisingParameters.
I've tried on both release 5.13.1 and master branch, neither of them can pass the point when setPeriodicAdvertisingParameters is called.
I've also tried to debug and traced source code and seems only thing that matters are the WsfTaskLock call listed below. Any one bumped into similar issue? Any idea is this a bug of Mbed OS or a bug of the Periodical advertising example which I believe has been tested at some point? Anyone knows the version of the Mbed OS the exampled was tested with?
template
ble_error_t Gap::set_periodic_advertising_parameters_(
advertising_handle_t advertising_handle,
periodic_advertising_interval_t periodic_advertising_min,
periodic_advertising_interval_t periodic_advertising_max,
bool advertise_power
)
{
DmPerAdvIncTxPwr(advertising_handle, advertise_power);
DmPerAdvSetInterval(
advertising_handle,
periodic_advertising_min,
periodic_advertising_max
);
DmPerAdvConfig(advertising_handle);
return BLE_ERROR_NONE;
}
/************************************************************************************************/
/!
- \brief Set the minimum and maximum advertising intervals for periodic advertising.
- \param advHandle Advertising handle.
- \param intervalMin Minimum advertising interval.
- \param intervalMax Maximum advertising interval.
- \return None.
/
/************************************************************************************************/
void DmPerAdvSetInterval(uint8_t advHandle, uint16_t intervalMin, uint16_t intervalMax)
{
WSF_ASSERT(advHandle < DM_NUM_ADV_SETS);
WsfTaskLock();
dmPerAdvCb[advHandle].intervalMin = intervalMin;
dmPerAdvCb[advHandle].intervalMax = intervalMax;
WsfTaskUnlock();
}
/************************************************************************************************/
/!
- \brief Set whether or not to include TxPower in extended header of advertising PDU for
-
periodic advertising.
- \param advHandle Advertising handle.
- \param incTxPwr Whether to include TxPower in extended header of advertising PDU (default
-
value is FALSE).
- \return None.
/
/************************************************************************************************/
void DmPerAdvIncTxPwr(uint8_t advHandle, bool_t incTxPwr)
{
WSF_ASSERT(advHandle < DM_NUM_ADV_SETS);
WsfTaskLock();
dmPerAdvCb[advHandle].incTxPwr = incTxPwr;
WsfTaskUnlock();
}
Issue request type
[ ] Question
[ ] Enhancement
[X ] Bug