Hello,
I am trying to setup a PAN coordinator by following these steps:
1. mlme_reset_req() -> successfully responds with a mlme_reset_conf_t by calling the callback function.
2. Set macShortAddress, macAssociationPermit and macRxOnWhenIdle attributes using the mlme_set() function. They all are successfully set.
3. mlme_start_req() -> nothing happens. It does not throw any errors and does not invoke the callback.
Here is the code for starting up the Wpan:
static void SetupSeqStartWpan()
{
waiting_response = true;
static mlme_start_req_t mlme_start_req_container =
{
.pan_id = 0x1234,
.logical_channel = 13,
.beacon_order = 15, // nonbeacon-enabled network
.pan_coordinator = true,
};
mlme_start_req(&mlme_start_req_container, SetupSeqStartWpanCb);
}
static void SetupSeqStartWpanCb(mlme_start_conf_t * response)
{
waiting_response = false;
if(response->status != MAC_SUCCESS)
{
rfhandler_setup_state = SETUP_SEQ_RESET_MLME;
return;
}
}
It never calls the SetupSeqStartWpanCb() function after the mlme_start_req() command is issued.