-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I found two reasons for this.
- sys_wifi.c in SYS_WIFI_CreateSsdiList function
if you make more than a scan, from the second time, g_wifiSrvcScanConfig.pSsidList points to g_scanSsidListString so the list becomes empty
if (g_wifiSrvcScanConfig.pSsidList)
{
memset(g_scanSsidListString, 0, sizeof(g_scanSsidListString));
start = g_wifiSrvcScanConfig.pSsidList;'
if you agree, I have fixed this way
if (g_wifiSrvcScanConfig.pSsidList)
{
g_wifiSrvcScanConfig.pSsidList = SYS_WIFI_SCAN_SSID_LIST;
memset(g_scanSsidListString, 0, sizeof(g_scanSsidListString));
start = g_wifiSrvcScanConfig.pSsidList;
- wdrv_pic32mzw.c in WDRV_PIC32MZW_WIDProcess
if a scan returns an empty list, the scanInProgress flag remains true and a new scansion never starts
case DRV_WIFI_WID_GET_SCAN_RESULTS:
{
const DRV_PIC32MZW_SCAN_RESULTS *const pScanRes = (const DRV_PIC32MZW_SCAN_RESULTS *const)pData;
if (NULL != pScanRes)
{
if((NULL != pCtrl->pfBSSFindNotifyCB) && (0 == pScanRes->ofTotal))
{
pCtrl->pfBSSFindNotifyCB(pCtrl->handle, 0, 0, NULL);
pCtrl->pfBSSFindNotifyCB = NULL;
break;
}
if (0 == pScanRes->index)
{
pCtrl->scanInProgress = false;
}
DRV_PIC32MZW_StoreBSSScanResult(pScanRes);
}
if you agree, I have fixed this way
case DRV_WIFI_WID_GET_SCAN_RESULTS:
{
const DRV_PIC32MZW_SCAN_RESULTS *const pScanRes = (const DRV_PIC32MZW_SCAN_RESULTS *const)pData;
if (NULL != pScanRes)
{
if (0 == pScanRes->index)
{
pCtrl->scanInProgress = false;
}
if((NULL != pCtrl->pfBSSFindNotifyCB) && (0 == pScanRes->ofTotal))
{
pCtrl->pfBSSFindNotifyCB(pCtrl->handle, 0, 0, NULL);
pCtrl->pfBSSFindNotifyCB = NULL;
break;
}
DRV_PIC32MZW_StoreBSSScanResult(pScanRes);
}
- if the autoconnect flag isn't set, a manual connection never happens. I have to do like this
SYS_WIFI_CtrlMsg(sysObj.syswifi, SYS_WIFI_GETWIFICONFIG, &config, sizeof(SYS_WIFI_CONFIG));
config.staConfig.autoConnect = true;
SYS_WIFI_CtrlMsg(sysObj.syswifi, SYS_WIFI_CONNECT, &config, sizeof(SYS_WIFI_CONFIG));
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels