cancel
Showing results for 
Search instead for 
Did you mean: 

en.x-cube-wifi1_firmware_v3.0.2 bug client_MAC_address

yoann LBY
Senior
Posted on November 28, 2017 at 09:59

hi,

config: spwf04sx interface uart and stm32F401RB:

i inform you i found a bug in n.x-cube-wifi1_firmware_v3.0.2 in wifi_module_uart_04.c in function Process_Wind_Indication case WiFi__MiniAP_Associated to get client_MAC_address. ptr_offset is NULL because  +WIND:28 is not present in the string ptr! In this case the string is 'Station Associated:44:52:65:87:25:0'   without '+WIND:28'

case WiFi__MiniAP_Associated:

        //Find out which client joined by parsing the WIND //+WIND:28

        //X ptr_offset = (char *) strstr((const char *)ptr,'+WIND:28');

Relace by:

        ptr_offset = (char *)strchr((const char *)ptr,':'); //'Station Associated<:>'   

Add test to check if pointer is not NULL

        if (ptr_offset != NULL)

       {

         strncpy((char*)WiFi_Counter_Variables.client_MAC_address,(ptr_offset+1),17); 

       }

      //X for(i=17;i<=33;i++)

      //X WiFi_Counter_Variables.client_MAC_address[i-17] = *(ptr_offset + i);       

        IO_status_flag.WiFi_WIND_State = WiFiAPClientJoined;

        break;

Same problem with cas WiFi_MiniAP_Disassociated and perhaps other.

Rgds

Yoann

1 REPLY 1
Posted on November 28, 2017 at 10:58

Thanks for catching