2019-01-03 08:11 AM
I've recently updated some SPWF04SA modules to firmware version 1.1.0 and I have a couple of problems with Mini AP mode:
+WIND:1:Poweron:171117-0328fe3-SPWF04S
+WIND:13:Copyright (c) 2012-2017 STMicroelectronics, Inc. All rights Reserved:SPWF04SA
+WIND:0:Console active
+WIND:3:Watchdog Running:20
AT+S.WIFI=0
AT-S.ERROR:18:Radio not running
AT+S.SCFG=wifi_tx_power,0
AT-S.OK
AT+S.SCFG=ip_use_httpd,0
AT-S.OK
AT+S.SCFG=ip_use_tftpd,0
AT-S.OK
AT+S.SCFG=ip_use_v6,0
AT-S.OK
AT+S.SCFG=ip_ntp_startup,0
AT-S.OK
AT+S.WIFI=0
AT-S.ERROR:18:Radio not running
AT+S.SSIDTXT=<my SSSID>
AT-S.OK
AT+S.SCFG=wifi_wpa_psk_text,<my password>
AT-S.OK
AT+S.SCFG=wifi_auth_type,0
AT-S.OK
AT+S.SCFG=wifi_priv_mode,2
AT-S.OK
AT+S.SCFG=wifi_mode,3
AT-S.OK
AT+S.WIFI=1
AT-S.OK
+WIND:32:WiFi Hardware Started
+WIND:26:Started AP:<my SSSID>
+WIND:24:WiFi Up:0:192.168.0.50
AT+S.GCFG=ip_netmask
AT-S.Var:ip_netmask=255.255.255.0
AT-S.OK
+WIND:28:Station Associated:00:0F:00:4F:B1:3F:0
[...]
Am I missing something somewhere?
Thanks in advance,
Scott.
2019-01-07 10:11 AM
Hello Scott,
the command sequence seems correct.
I don't see the WIND:46: WPA Crunching PSK: indication, that may confirm the MiniAP is starting in open mode.
I also checked the truncated SSID, but I cannot reproduce it on my side.
I kindly ask you to restore the factory setting:
AT+S.FCFG
AT+S.WCFG
AT+S.RESET
then wait for "WIND:32: WiFi Hardware Started" and then send your sequence above (AT+S.WIFI=0, ...).
Best Regards,
Elio
2019-01-09 02:02 AM
Thanks for your reply, Elio. After much experimentation, the following sequence of commands seems to start MiniAP mode with WPA2 enabled (and the full un-truncated SSID) consistently. I had to reset the module after the AT+S.WCFG using the reset pin instead of AT+S.RESET as it seemed to stop responding to commands when I used that.
+WIND:1:Poweron:171117-0328fe3-SPWF04S
+WIND:13:Copyright (c) 2012-2017 STMicroelectronics, Inc. All rights Reserved:SPWF04SA
+WIND:0:Console active
+WIND:3:Watchdog Running:20
AT+S.WIFI=0
AT-S.ERROR:18:Radio not running
+WIND:32:WiFi Hardware Started
AT+S.SCFG=wifi_mode,3
AT-S.OK
AT+S.WCFG
AT-S.OK
+WIND:1:Poweron:171117-0328fe3-SPWF04S
+WIND:13:Copyright (c) 2012-2017 STMicroelectronics, Inc. All rights Reserved:SPWF04SA
+WIND:0:Console active
+WIND:3:Watchdog Running:20
+WIND:32:WiFi Hardware Started
AT+S.WIFI=0
AT-S.OK
+WIND:26:Started AP:<my SSID>
+WIND:49:WPA Terminated:0
+WIND:38:WiFi Powered Down
AT+S.SCFG=wifi_tx_power,0
AT-S.OK
AT+S.SCFG=ip_use_httpd,0
AT-S.OK
AT+S.SCFG=ip_use_tftpd,0
AT-S.OK
AT+S.SCFG=ip_use_v6,0
AT-S.OK
AT+S.SCFG=ip_ntp_startup,0
AT-S.OK
AT+S.WIFI=0
AT-S.ERROR:18:Radio not running
AT+S.SSIDTXT=<my SSID>
AT-S.OK
AT+S.SCFG=wifi_wpa_psk_text,<my password>
AT-S.OK
AT+S.SCFG=wifi_auth_type,0
AT-S.OK
AT+S.SCFG=wifi_priv_mode,2
AT-S.OK
AT+S.SCFG=wifi_mode,3
AT-S.OK
AT+S.WIFI=1
AT-S.OK
+WIND:46:WPA Crunching PSK:<my password>:14
+WIND:32:WiFi Hardware Started
+WIND:26:Started AP:<my SSID>
+WIND:24:WiFi Up:0:192.168.0.50
Waiting for the WIND 32 after reset, before issuing AT+S.WIFI=0 seems to be crucial, as does resetting after setting and saving wifi_mode so that it is set to the desired value at boot time. Also I think AT+S.WIFI=0 needs to be sent before wifi_mode is set before the reset.
I have also observed a further issue with MiniAP mode - the DHCP server will by default offer to clients a default gateway address of 165.165.165.165. Surely this is erroneous?
2019-01-09 07:23 AM
Hi Scott,
at boot the WiFi Hardware will be started or not depending on the hardware state at last AT+S.WCFG command.
Actually:
At this point you can change any wifi_* config variable.
The observation about default gateway address may give interoperability problem with some devices, upgrading to a newer FW is recommended for this (please contact your ST dealer for getting the FW package).
Regards,
Elio