AnsweredAssumed Answered

SPWF04SA DHCP Server problem

Question asked by bernd schönlebe on Aug 1, 2017
Latest reply on Sep 4, 2017 by bernd schönlebe

I have setup the module as miniAP with following script: (from here)

AT+S.WIFI=0
AT+S.FCFG
AT+S.SSIDTXT=test_ap
AT+S.SCFG=wifi_priv_mode,1
AT+S.SCFG=wifi_mode,3
AT+S.SCFG=wifi_wep_keys[0],76543210ab
AT+S.SCFG=wifi_wep_key_lens,05
AT+S.SCFG=wifi_auth_type,0
AT+S.SCFG=ip_ipaddr,192.168.0.1
AT+S.SCFG=ip_use_dhcpc,2
AT+S.WIFI=1
AT+S.WCFG
AT+S.RESET

once it restarts, this is what I get:

Port opened
SPWF04SA WIFI test program start.
Setup SPI done.
Reset module...
Start module...
Done.
RX:02 10 07 02 00 AT+S.WIND:7:Configuration Failure:<wifistate=Hardware power up>:10
RX:02 10 01 16 00 AT+S.WIND:1:Poweron:<wifistate=Hardware power up>:170726-b7ac1ba-SPWF04S
RX:02 10 0D 08 00 AT+S.WIND:13:Copyright:<wifistate=Hardware power up>:SPWF04SA
RX:02 10 03 02 00 AT+S.WIND:3:Watchdog Running:<wifistate=Hardware power up>:20
RX:02 10 00 00 00 AT+S.WIND:0:Console active:<wifistate=Hardware power up>:
RX:02 13 20 00 00 AT+S.WIND:32:WiFi Hardware Started:<wifistate=Radio idle>:
RX:02 13 1A 07 00 AT+S.WIND:26:Started AP:<wifistate=Radio idle>:test_ap
RX:02 19 18 0D 00 AT+S.WIND:24:WiFi Up:<wifistate=802.11 handshake complete>:0:192.168.0.1
RX:02 1A 18 1C 00 AT+S.WIND:24:WiFi Up:<wifistate=Ready to TX>::fe80:0:0:0:280:e1ff:febd:39

now, just to be sure, here the entire config printout:

TX:02 00 02 09 00 //AT+S.GCFG

nv_manuf=STMicroelectronics Inc.
nv_model=SPWF04SA
nv_serial=17111984
nv_wifi_macaddr=00:80:E1:BD:00:39
standby_time=10
standby_enabled=0
sleep_enabled=0
etf_mode=0
blink_led=1
ext_volume=3
ramdisk_memsize=16
aes128_key=00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
user_desc=anonymous
python_script=3:/uPython_test.py
python_memsize=32
console_enabled=1
console_speed=115200
console_hwfc=0
console_echo=1
console_errs=2
console_winds=2
console_verbose=1
console_repeater=0x21
console_delimiter=0x2C
console_wind_off_low=0x00000000
console_wind_off_medium=0x00000000
console_wind_off_high=0x00000000
wifi_tx_msdu_lifetime=0
wifi_rx_msdu_lifetime=0
wifi_operational_mode=0x00000011
wifi_beacon_wakeup=1
wifi_beacon_interval=100
wifi_listen_interval=0
wifi_rts_threshold=3000
wifi_ssid=74:65:73:74:5F:61:70:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
wifi_ssid_len=7
wifi_txfail_thresh=5
wifi_dtim_period=1
wifi_add_tim_ie=0
wifi_region=1
wifi_ht_mode=1
wifi_channelnum=6
wifi_opr_rate_mask=0x003FFFCF
wifi_bas_rate_mask=0x0000000F
wifi_mode=3
wifi_auth_type=0
wifi_atim_window=0
wifi_powersave=0
wifi_tx_power=18
wifi_rssi_thresh=0
wifi_rssi_hyst=0
wifi_ap_idle_timeout=120
wifi_beacon_loss_thresh=10
wifi_priv_mode=1
wifi_wep_keys[0]=76:54:32:10:AB:00:00:00:00:00:00:00:00:00:00:00
wifi_wep_keys[1]=00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
wifi_wep_keys[2]=00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
wifi_wep_keys[3]=00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
wifi_wep_key_lens=05:00:00:00
wifi_wep_default_key=0
wifi_wpa_psk_raw=00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
wifi_wpa_psk_text=
wifi_eap_identity=identity
wifi_eap_anon_identity=anonymous@identity.org
wifi_eap_passwd=password
wifi_eap_type=0
wifi_eap_skip_datechecks=0
wifi_wps_walk_time=120
wifi_wps_pin=1234567
ip_sock_memsize=1
ip_sock_threshold=0
ip_dhcp_lease_time=120
ip_macfilter=00:00:00:00:00:00
ip_num_clients=5
ip_allow_port_scans=1
ip_use_v6=1
ip_use_dhcpd=1
ip_use_httpd=1
ip_use_tftpd=1
ip_use_dhcpc=2
ip_hostname=iwm-BD-00-39
ip_apdomainname=captiveportal.net
ip_apredirect=firstset.html
ip_ipaddr=192.168.0.1
ip_netmask=255.255.255.0
ip_gw=192.168.0.1
ip_dns1=192.168.0.1
ip_dns2=208.67.220.220
ip_local=0:0:0:0:0:0:0:0
ip_dns1v6=0:0:0:0:0:0:0:0
ip_dns2v6=0:0:0:0:0:0:0:0
ip_dhcp_timeout=20
ip_ntp_server1=ptbtime1.ptb.de
ip_ntp_server2=ntp0.ipv6.fau.de
ip_ntp_refresh=3600
ip_ntp_startup=1
ip_mdns_domain_name=SPWF04S-Default
ip_mdns_device_name_ttl=120
ip_mdns_services_name=SPWF04S-WebSrv SPWF04S-TFTPSrv
ip_mdns_services_prot=_http._tcp _tftp._udp
ip_mdns_services_keys=dev1 dev2
ip_mdns_services_vals=number1 number2
ip_mdns_services_port=80 69
ip_mdns_services_ttl=120 60
ip_mdns_startup=01:01


now my problem is this: once I try to connect with my phones wifi f.e., it does recognize that a station gets associated, but it does not give out an IP, what do I have to setup for it to work?

RX:02 1A 1C 13 00 AT+S.WIND:28:Station Associated:<wifistate=Ready to TX>:00:16:EA:E5:89:FE:0
RX:02 1A 1C 13 00 AT+S.WIND:28:Station Associated:<wifistate=Ready to TX>:00:16:EA:E5:89:FE:0
RX:02 1A 48 13 00 AT+S.WIND:72:Station Disassociated:<wifistate=Ready to TX>:00:16:EA:E5:89:FE:1

PS: I see the "Configuration Failure" but its non-halting and I dunno what HW pullup resistor is meant here. This all worked fine before I upgraded the firmware (SPWF04S-170726-b7ac1ba)

PPS: if I downgrade back (firmware SPWF04S-170216-fd39c59), it works but all the fixed problems (with SPI communication) are back, so this has to be a firmware issue

Outcomes