2016-08-15 07:48 AM
I'm finding very little info on how to set up the module. Can anybody point me to some sample scripts or something? My goal is to see the SSID with a phone/tablet/laptop and connect to it and then open a webpage on the module so I can send/receive a simple text file of data.
So I think I want to set up as a mini AP. I've fumbled around and found that if I change any settings I need to turn the wifi off/on to update the settings. Right now I have an SSID that I can see with my phone, but when I connect I get the following:+WIND:28:Station 00:34:DA:9A:1F:42 Associated:0
+WIND:72:Station 00:34:DA:9A:1F:42 Disassociated:3 and my phone hangs on ''obtaining ip address''. The phone says it is using WEP and prompts me for a string. I enter 5 ascii zeros and the connect button activates so I can connect, but then it hangs. Not sure if i'm having WEP issues or DHCP issues. Any thoughts? I've sent these settings via Terminal: AT+S.SCFG=wifi_mode,3 //set to miniAP mode AT+S.SCFG=blink_led,1 //blink led for # of connects AT+S.SCFG=ip_use_dhcp,2 //mini AP mode provides DHCP AT+S.WIFI=0 // turn OFF wifi AT+S.WIFI=1 // turn ON wifi and my AT&V is: # Dumping All Configuration Keys: # nv_manuf = ST # nv_model = SPWF01SA1 # nv_serial = 2415D36371 # nv_wifi_macaddr = 00:80:E1:B5:9F:C1 # blink_led = 1 # 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 = 50:72:6F:69:7A:76:6F:64:6E:6A:61:20:54:65:73:74:69:72:61:6E:6A:65:00:00:00:00:00:00:00:00:00:00 # wifi_ssid_len = 22 # wifi_txfail_thresh = 5 # wifi_ht_mode = 0 # wifi_channelnum = 11 # wifi_opr_rate_mask = 0x00003FCF # 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 = 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 = 0B:B7:B0:8D:23:7A:BB:A0:B9:80:A7:58:62:4E:95:22:5B:B7:09:61:16:6D:C2:EF:AF:B3:8C:54:4B:3D:F8:E2 # wifi_wpa_psk_text = mikroe123456 # ip_use_dhcp = 2 # ip_use_httpd = 1 # ip_mtu = 1500 # ip_hostname = iwm-B5-9F-C1 # ip_apdomainname = captiveportal.net # ip_apredirect = firstset.html # ip_ipaddr = 192.168.0.50 # ip_netmask = 255.255.255.0 # ip_gw = 192.168.0.1 # ip_dns = 192.168.0.1 # ip_http_get_recv_timeout = 3000 # ip_wait_timeout = 12000 # ip_dhcp_timeout = 20 # ip_sockd_timeout = 2502016-08-23 12:23 PM
miniAP only support no security and WEP security. Set wifi_priv_mode to proper value.
Another tip: - call wifi=0 - set variables - call wifi=1