MRF24WB0M assert failures whe using <iwconfig scan> command

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
MRF24WB0M assert failures whe using <iwconfig scan> command

Host scan <iwconfig scan> command ASSERT failures 

Applicable for MRF24WB0M only. 

Using both MLA v2012-04-03 and v2013-02-15, if all connection parameters are correct, with only the pass-phrase set wrongly, it causes assert failure 

WF ASSERTION at WFMgmtMsg.c Line Number = 248. 

However, if the wrong ssid is used, <iwconfig scan> is OK. 

 

  • Case [1] wrong ssid only. < iwconfig scan > is OK

> iwconfig ssid MCHP_test 

> iwpriv enc wpa-phrase 

> iwpriv phrase 12345434 

> iwconfig mode managed 

> Event: Connection Failed – eventInfo = 10, WF_NO_SUI TABLE_AP_FOUND_FAILURE 

> iwconfig scan <---- iwconfig scan is OK 

Scanning... 

Scan completed. 

> Event: Scan Results Ready, 21results 

 

  • Case [2] wrong pass-phrase only. < iwconfig scan > causes assert failure

> iwconfig ssid MCHP_test 

> iwpriv enc wpa-phrase 

> iwpriv phrase 12341234 

> iwconfig mode managed 

> Event: Connection Failed – eventInfo = 9, WF_SECURITY_MISMATCH_FAILURE 

> iwconfig scan 

Scanning... 

WF ASSERTION at WFMgmtMsg.c Line Number = 248 

 

Recommended workarounds 

  1. WFScan.c

Replace WF_Scan() with the following 

 

UINT16 WF_Scan(UINT8 CpId) 

UINT8 hdr[4]; 

#ifndef MRF24WG 

UINT8 connectionState; 

UINT8 dummy; 

#endif 

 

if (!WF_CMIsHostScanAllowed()) 

return WF_ERROR_OPERATION_CANCELLED; 

 

#ifndef MRF24WG 

WF_CMGetConnectionState(&connectionState, &dummy); 

if (connectionState == WF_CSTATE_NOT_CONNECTED) 

WF_CMConnect(0xff); /* MRF24WB 0x120c host scan bug workaround */ 

#endif 

 

hdr[0] = WF_MGMT_REQUEST_TYPE; 

hdr[1] = WF_SCAN_START_SUBTYPE; 

hdr[2] = CpId; /* Connection Profile ID */ 

hdr[3] = 0; /* not used */ 

 

SendMgmtMsg(hdr, /* header */ 

sizeof(hdr), /* size of header */ 

NULL, /* no data */ 

0); /* no data */ 

 

/* wait for mgmt response, free it after it comes in (no data needed) */ 

WaitForMgmtResponse(WF_SCAN_START_SUBTYPE, FREE_MGMT_BUFFER); 

 

return WF_SUCCESS; 

 

  1. WFMgmtMsg.c

In WaitForMgmtResponse() 

replace 

} else { 

WF_ASSERT(hdr.result == WF_SUCCESS); 

with 

} else { 

if (!(hdr.result == WF_ERROR_CP_INVALID_PROFILE_ID 

&& hdr.subtype == WF_CM_CONNECT_SUBYTPE)) { 

WF_ASSERT(hdr.result == WF_SUCCESS);

Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.