Hello,
We developed some year ago a product based on the MC13213 with the Beekit 3.0.2 (BeeKit HCS08 MAC Codebase 2.6.1)
Ou application is based on the exemple Non Beacon Device:
On start, the device send a Scan request to get all possible coordinator (on all channel 11 to 26). Then after get the list of the coordinator, send an association request.
The original Scan request was done in the "App_StartScan" function vy the folloiniwg code:
pMsg->msgType = gMlmeScanReq_c;
pScanReq = &pMsg->msgData.scanReq;
pScanReq->scanType = scanType;
pScanReq->scanChannels[0] = (uint8_t)((mDefaultValueOfChannel_c) & 0xFF);
pScanReq->scanChannels[1] = (uint8_t)((mDefaultValueOfChannel_c >> 8) & 0xFF);
pScanReq->scanChannels[2] = (uint8_t)((mDefaultValueOfChannel_c >> 16) & 0xFF);
pScanReq->scanChannels[3] = (uint8_t)((mDefaultValueOfChannel_c >> 24) & 0xFF);
pScanReq->scanDuration = 1;
#ifdef gMAC2006_d
pScanReq->securityLevel = 0;
#endif
if(MSG_Send(NWK_MLME, pMsg) == gSuccess_c)
...
This work ok.
I made a modification last year to perform the connection time:
I Scan the network only on the last channel where the device was connected (saved in NV memory) with a short duration time.
If not success, I try a second time, Then a third time (with a longer duration scan) and then, I make a last try on all channel.
But sometime, with this sequence, on the 4 try (on all channel), the broadcast request on the air on a channel (21 on 22) the frame is bad (with a sniffer, the Dest address is not FFFF and the CRC is bad...
Very not lucky!
If I scan another time (5) it work properly. If I scan on all channel on the first, second or third try, this work also!:smileyconfused:
Is somebody could help me about this problem? Is now, the beestack source code is accessible?
Thank
Best regards