cancel
Showing results for 
Search instead for 
Did you mean: 

SPWF01 Repeatable Hard Fault/crash

markb
Associate II
Posted on October 01, 2015 at 09:51

Hi,

I am broadcasting a small UDP packet once a second through the SPWF01 using

AT+S.SOCKON=192.168.1.255,55555,u and AT+S.SOCKW and that appears to work just fine but

if I access the SPWF01 web server at the same time to reload some web pages it often dies with a hard fault like this

+WIND:8:Hard Fault:TCPIP: r0 2C303035, r1 00000300, r2 00000000, r3 0000FFFF, r12 2000867C, lr 08022E25, pc 08022E3A, psr 61000000

Or the module may just crash, reboot, etc.

If I don't do the UDP broadcast, then the module appears reliable.

This is very bad as I need to be able to do the UDP broadcast so clients can find the device.

Cheers,

Mark

14 REPLIES 14
Posted on October 01, 2015 at 09:57

AT+S.STS and AT&V dump please

markb
Associate II
Posted on October 02, 2015 at 08:56

Hi, here are the dumps. The files being served via the HTTP server are:

-rw-r--r-- 1 markb users 123132 Sep  1 09:39 img.css

-rw-r--r-- 1 markb users 202322 Sep 30 08:48 img.js

-rw-r--r-- 1 markb users  21981 Sep 28 10:21 index.html

So you can see it is sending about 340K to the web browser so it takes a few seconds. During that time, if I send a UDP packet

using AT+SOCKW the module often crashes.

# Status & Statistics:

#  version = 150410-c2e37a3-SPWF01S

#  reset_reason = 4

#  conf_flag = 5

#  system_uptime = 98

#  system_sleeptime = 0

#  gpio_enable = 0

#  captiveportal = 0

#  wifi_state = 10

#  wifi_bssid = 74:EA:3A:BA:89:67

#  wifi_aid = 3

#  wifi_channelnum = 1

#  wifi_sup_rate_mask = 0x003FFFCF

#  wifi_bas_rate_mask = 0x0000000F

#  wifi_chan_activity2 = 0x00000000

#  wifi_max_tx_power = 18

#  wifi_gf_mode = 0

#  wifi_reg_country =

#  wifi_dtim_period = 1

#  wifi_sleeping = 0

#  wifi_num_assoc = 0

#  ip_ipaddr = 192.168.1.106

#  ip_netmask = 255.255.255.0

#  ip_gw = 192.168.1.250

#  ip_dns = 192.168.1.250

#  ip_sock_open = 1

#  ip_sockd_port = 4000

#  free_heap = 20544

#  min_heap = 20400

#  current_time = 98

OK

# Dumping All Configuration Keys:

#  nv_manuf = ST

#  nv_model = SPWF01SA1

#  nv_serial = 2914D13607

#  nv_wifi_macaddr = 00:80:E1:FF:D2:0C

#  blink_led = 0

#  wind_off_low = 0x00000000

#  wind_off_medium = 0x00000000

#  wind_off_high = 0x00000000

#  user_desc = anonymous

#  escape_seq = at+s.

#  localecho1 = 0

#  console1_speed = 115200

#  console1_hwfc = 0

#  console1_enabled = 1

#  sleep_enabled = 0

#  standby_enabled = 0

#  standby_time = 10

#  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 = 43:4C:46:32: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_ssid_len = 4

#  wifi_txfail_thresh = 5

#  wifi_ht_mode = 0

#  wifi_channelnum = 1

#  wifi_opr_rate_mask = 0x00003FCF

#  wifi_bas_rate_mask = 0x0000000F

#  wifi_mode = 1

#  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 = 2

#  wifi_wep_keys[0] = 00:00:00:00:00: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 = 00:00:00:00

#  wifi_wep_default_key = 0

#  wifi_wpa_psk_raw = 0A:C9:1E:70:69:21:CE:16:3D:D4:F9:AE:DE:96:95:05:6D:B6:30:06:53:CF:47:6C:9A:C7:F0:A8:F3:D1:FB:73

#  wifi_wpa_psk_text = ******

#  ip_use_dhcp = 1

#  ip_use_httpd = 1

#  ip_mtu = 1500

#  ip_hostname = iwm-FF-D2-0C

#  ip_apdomainname = pb4.wifi

#  ip_apredirect = index.html

#  ip_ipaddr = 192.168.0.50

#  ip_netmask = 255.255.255.0

#  ip_gw = 192.168.0.1

#  ip_dns = 172.31.12.1

#  ip_http_get_recv_timeout = 3000

#  ip_wait_timeout = 12000

#  ip_dhcp_timeout = 20

#  ip_sockd_timeout = 250

 

OK

Posted on October 05, 2015 at 15:57

Hi Mark,

I tried to reproduce the hardfault, but I don't see the error.

Can I have your filesystem image/content of SOCKW?

Thanks

jerry

markb
Associate II
Posted on October 05, 2015 at 16:58

Hi Jerry,

You can find the image here:

https://dl.dropboxusercontent.com/u/53627836/test.img

Load index.html into your browser.

Typical payload of the SOCKW would be a simple string like this:

NAME@192.168.1.106:4000

Cheers,

Mark

markb
Associate II
Posted on October 05, 2015 at 17:24

Jerry,

One other thing I forgot to mention is that the module is also listening on TCP port 4000 (AT+S.SOCKD=4000) but

at the time the crashes occur, no incoming connection has occurred.

Cheers,

Mark

markb
Associate II
Posted on October 05, 2015 at 17:45

Yet another thing I forgot to mention is that the module is in ST mode connected to an AP.

You may recall that UDP broadcast doesn't actually work when the module is in AP mode!

Nickname3786_O
Associate II
Posted on October 06, 2015 at 10:46

Hi Mark,

I successfully reproduced the issue using exactly your use case:

- module in STA

- module listening on a TCP port but no incoming connection

- module sends 1 packet (NAME@192.168.1.106:4000) per sec to an UDP server

- external user continuously opens the index.html (uploaded the test.img)

After a while, the hard fault has been observed. 

We will investigate on it and we will give you a feedback asap.

Cheers,

Salvatore

markb
Associate II
Posted on October 06, 2015 at 11:31

Glad to hear you have confirmed the problem.

Cheers,

Mark

Posted on October 06, 2015 at 11:37

Hi Mark,

Faster than light, there is simple workaround also.

Please try to reduce ip_wait_timeout variable (down to 1000). As a temporary workaround should be fine. Confirm please :)

Tnx

j

ps: about UDP broadcast in miniAP, I suspect the problem is that miniAP is not a Router. However, it's under investigation...