keithr
Posts: 5
Joined: Wed Nov 04, 2015 4:33 am

Connection problems

Wed Nov 04, 2015 5:08 am

I just received a couple of Doit WifiMCU boards, and flashed them to the latest firmware and WLAN driver levels. I have been trying to connect in station mode to my router without success.This is what I get

Code: Select all

> function listap(t) if t then for k,v in pairs(t) do print(k..'\t'..v);end else print('no ap') end end; wifi.scan(listap)
> dd-wrt   D0:BA:E4:00:6F:57,52,6,WAP2 MIXED

> cfg={}
> cfg.ssid="dd-wrt"
> cfg.pwd="password"
> wifi.startsta(cfg)
> = wifi.sta.getip()
> =wifi.sta.getlink()
connected   76   dd-wrt   D0:BA:E4:00:6F:57
> =wifi.sta.getipadv()
DHCP_Client   11.11.11.2   11.11.11.1   255.255.255.0   11.11.11.1   d0bae4022f84   255.255.255.255



The MAC address in getlink is correct but the IP addresses are bogus, the EMW3165 should be 192.168.1.x and the router address should be 192.168.1.254. Doing a similar connection with an ESP8266 running NodeMCU gives this

Code: Select all

wifi.setmode(wifi.STATION)
> wifi.sta.config("dd-wrt","password")
> = wifi.sta.getip()
192.168.1.8   255.255.255.0   192.168.1.254
> =wifi.sta.getconfig()
dd-wrt   password   0   00:04:ed:89:c3:25

Visible Access Points:

dd-wrt      4,-66,d0:ba:e4:00:6f:57,6

Any ideas please?

doit_yp
Posts: 21
Joined: Wed Aug 19, 2015 1:06 am

Re: Connection problems

Fri Nov 13, 2015 6:52 am

It's strange.
Have you ever change another wifi router to test?
Software engineer from DoIT
yangping@doit.am

keithr
Posts: 5
Joined: Wed Nov 04, 2015 4:33 am

Re: Connection problems

Mon Nov 16, 2015 1:02 am

The problem is gone, I won't say that it is solved because I don't know exactly what caused the change. I hate it when you can't pinpoint the nature of the fix :cry: . I tried it with a couple of open APs and eventually had success connecting to them, then for no reason that I could determine I began having success on the proper router.

One of the problems was the password which is 62 random characters which include ' and %. The first caused problems with WiFistudio, and the second with LUA itself. To get over that I modified WiFistudio to enclose the SSID and password with [[ ]] rather than ' '. This solved both problems with the password. ( the [[ ]] construct causes LUA to accept the string exactly as is without interpreting any special characters)

doit_yp
Posts: 21
Joined: Wed Aug 19, 2015 1:06 am

Re: Connection problems

Wed Nov 18, 2015 12:55 am

The cause of connection prolem, i guess, is the difference of frequency band in different countries and regions? In an openwrt system for example, there are several wifi settings such as channel, frequency band etc, in the luci web configuration page.

I'm considering use "[[ ]]" in wifimcu studio for its next version. Thank you.
Software engineer from DoIT
yangping@doit.am


Return to “WiFiMCU”

Who is online

Users browsing this forum: No registered users and 1 guest