cancel
Showing results for 
Search instead for 
Did you mean: 

SPWF01S Station connection problems

cbertrand
Associate II
Posted on December 17, 2014 at 10:35

Hi all,

I'm using the WiFi module to connect to infra WiFi in socket server mode.

The module return (through serial link) that connection to WiFi is OK.

But sometimes, in the WiFi router interface (a Freebox), the module is seen but stay in a not reachable status. At the end, it's not possible to send data to socket server. Even a ping to module address doesn't work.

Sometimes it works perfectly... for few hours and then back to unreachable.

SPWF01S output on startup :

+WIND:1:Poweron (141106-0950875-SPWF01S)

 

+WIND:13:ST SPWF01SA1 IWM: Copyright (c) 2012-2014 STMicroelectronics, Inc.  All rights Reserved.

 

+WIND:3:Watchdog Running

 

+WIND:0:Console active

 

+WIND:32:WiFi Hardware Started

 

+WIND:19:WiFi Join:F4:CA:E5:D3:65:34

 

+WIND:25:WiFi Association with 'freebox_EVB' successful

 

+WIND:51:WPA Handshake Complete

 

+WIND:24:WiFi Up:192.168.1.43

 

OK

 

The OK at the end is the answer of socket server start command :

AT+S.SOCKD=27024

My config config is :

# Dumping All Configuration Keys:

 

#  nv_manuf = ST

 

#  nv_model = SPWF01SA1

 

#  nv_serial = 4313D07237

 

#  nv_wifi_macaddr = 00:80:E1:FF:B5:14

 

#  blink_led = 0

 

#  wind_off_low = 0x00200000

 

#  wind_off_medium = 0x00000008

 

#  wind_off_high = 0x00000000

 

#  user_desc = IoTMesh

 

#  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 = 66:72:65:65:62:6F:78:5F:45:56:42:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

 

#  wifi_ssid_len = 11

 

#  wifi_channelnum = 6

 

#  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] = 49:6F:54:4D:65:73:68:30:30:38:30:45:31: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 = 0D:00:00:00

 

#  wifi_wep_default_key = 0

 

#  wifi_wpa_psk_raw = XXX...

 

#  wifi_wpa_psk_text = XXX...

 

#  ip_use_dhcp = 0

 

#  ip_use_httpd = 1

 

#  ip_mtu = 1500

 

#  ip_hostname = GWM4_0080E1

 

#  ip_apdomainname = gwm4_iotmesh.net

 

#  ip_ipaddr = 192.168.1.51

 

#  ip_netmask = 255.255.255.0

 

#  ip_gw = 192.168.1.254

 

#  ip_dns = 192.168.1.254

 

#  ip_http_get_recv_timeout = 3000

 

#  ip_dhcp_timeout = 20

 

#  ip_sockd_timeout = 250

 

 

OK

 

I really don't understand why module is sometimes reachable and sometimes not.

Any ideas ?

Thanks.
16 REPLIES 16
Nickname3786_O
Associate II
Posted on December 17, 2014 at 16:11

Hi,

could you please share with us the status of the module (AT+S.STS) after the failure?

Thanks
cbertrand
Associate II
Posted on December 17, 2014 at 18:19

Hi,

Thanks for answering.

Here after is the status sent back by the module :

# Status & Statistics:

 

#  version = 141106-0950875-SPWF01S

 

#  reset_reason = 0

 

#  conf_flag = 5

 

#  system_uptime = 75

 

#  system_sleeptime = 0

 

#  gpio_enable = 0

 

#  captiveportal = 0

 

#  wifi_state = 10

 

#  wifi_bssid = F4:CA:E5:D3:65:34

 

#  wifi_aid = 1

 

#  wifi_channelnum = 11

 

#  wifi_sup_rate_mask = 0x003FFFCF

 

#  wifi_bas_rate_mask = 0x0000000F

 

#  wifi_chan_activity2 = 0x00003FFF

 

#  wifi_max_tx_power = 18

 

#  wifi_reg_country = FRI

 

#  wifi_dtim_period = 2

 

#  wifi_sleeping = 1

 

#  wifi_num_assoc = 0

 

#  ip_ipaddr = 192.168.1.51

 

#  ip_netmask = 255.255.255.0

 

#  ip_gw = 192.168.1.254

 

#  ip_dns = 208.67.222.222

 

#  ip_sock_open = 0

 

#  ip_sockd_port = 27024

 

#  free_heap = 20040

 

#  min_heap = 19832

 

#  current_time = 75

 

Posted on December 17, 2014 at 18:52

Hi,

thanks for update.

If possible, can you check if connected device list (into access point status webpage) contains (or, probably, not) the WiFi module?

From at+s.sts dump, I see that wifi_state is 10, meaning module is connected to AP...

cbertrand
Associate II
Posted on December 18, 2014 at 10:30

Hi,

n the router web page, I can see the module but greyed (see screenshot).

End a ping to the IP return e delay expired message.

Sometimes, the icon is blue and ''Actif :'' (for active) counter reset to 0 on each ping or TCP socket server access.

Did I missed something ?

Thanks.

________________

Attachments :

Presse-papiers-2.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1QM&d=%2Fa%2F0X0000000bmo%2FUqzikae4HgvBahX8vTekdAqjy2wHUONe8_t3g3OmfyM&asPdf=false
Posted on December 18, 2014 at 13:40

Hi Bertrand,

I haven't your Access Point, and user manuals too.

Can you please check on user manuals what does ''greyed icon'' mean?

Deauthenticated, Disassociated, gone, or other...

Sorry for so many questions, but I need as much info as possible.

Thanks

jerry
cbertrand
Associate II
Posted on December 18, 2014 at 17:22

Hi Gerardo,

No problem about questions, I'm happy to read somebody interested on my problem.

Concerning the WiFi router (a Freebox) there is no documentation about the meaning of grey icons. I would say it's for disconnected device because after some seconds the line dispeared.

I have may be another symptom. If I set the auth_type to 1 and write it with AT&W. I restart the module that doesn't connect (stuck in +WIND 19 Wifi Join state) and then send the auth_type 0 with AT+S.SCFG. The module associates, do the WPA handshake and connection is ok.

Isn't there something not correctly initialized on startup and correctly initialized when changing auth_type ?

Other point, is it normal to be in auth_type=0 (open system) with WPA-PSK protection on my access point ? Woudln't it be auth_type=1 (Shared Key) ?

Thanks.

Cyrille
Posted on December 18, 2014 at 17:46

auth_type variable is related to WEP priv_mode.

Since you are using WPA (priv_mode = 2), that variable has no meaning.

About the problem, could you use a wireless sniffer (Wireshark), and capture the issue?

I'd like to have a look to that capture file.

Thanks for patience!

jerry

cbertrand
Associate II
Posted on December 19, 2014 at 10:05

Hi Gerardo,

Sorry but I'm not able to use Wireshark to sniff the Wi-Fi because I have no Wi-Fi interface that support promiscuous mode. So Wireshark only sniff packets to/from PC and not packets between module and box.

My module works correctly since yesterday with the manip auth_type of my previous post (even if I understand there is normally no use of this variable in my setting). And it's certain that changing the value of auth_type allow or not the connection.

Any other things I can check to help investigation ?

Thanks.

Posted on December 19, 2014 at 12:32

Hi Cyrille,

I think I did not get current situation...

Problem disappears after changing auth_type value from SHARED to OPEN? Also, are you working in WPA2 mode?