Doodle3D / doodle3d-firmware

The API of the Doodle3D WiFi box. This can for example talk to print3d, save settings, update the firmware etc.
www.doodle3d.com
GNU General Public License v2.0
13 stars 9 forks source link

Disconnects from network on startup? #14

Open peteruithoven opened 11 years ago

peteruithoven commented 11 years ago

While in client mode, after booting the box it connects to a network (there is a ssid), signins in successfull but then somehow losses connection (no ssid).

Network status:

{
data: {
bssid: "",
channel: "",
localip: "10.0.0.50",
mode: "sta",
noise: -95,
quality_max: 70,
ssid: "",
status: "2",
statusMessage: "Connected",
txpower: 15
},
msg: "Connected",
status: "success"
}

wifibox.log:

CGI invocation
01-01 00:00:14 (info)     =======rest api (api debugging)=======
01-01 00:00:14 (info)     running in autowifi mode
01-01 00:00:15 (info)     current wifi name/mode: <nil>/sta, ssid of self: Doodle3D-873438
01-01 00:00:15 (info)     visible networks: Fablab Amersfoort, Vrij, Doodle3D-8725FF, Ziggo56F14, Ziggo
01-01 00:00:15 (info)     known networks: Fablab Amersfoort/sta, Vrij/sta, Doodle3D-873438/ap, TKNEE-873438/ap, Tknee-873438/ap, OpenWrt/ap
01-01 00:00:15 (info)     netconfig:associateSsid: Fablab Amersfoort, <nil>, <nil>
01-01 00:00:15 (info)     network:setStatus: 1 | Connecting...
01-01 00:00:15 (debug)     reconfiguring component 'wwwredir' (rm)
01-01 00:00:15 (debug)     reconfiguring component 'wireless' (reload)
01-01 00:00:15 (debug)     reconfiguring component 'dnsredir' (rm)
01-01 00:00:15 (debug)     reconfiguring component 'staticaddr' (rm)
01-01 00:00:15 (debug)     reconfiguring component 'wifiiface' (add)
01-01 00:00:15 (debug)     reconfiguring component 'dhcppool' (rm)
01-01 00:00:15 (info)     committing component 'network'
01-01 00:00:15 (info)     committing component 'uhttpd'
01-01 00:00:15 (info)     committing component 'dhcp'
01-01 00:00:15 (info)     reloading component 'network'
01-01 00:00:20 (info)     reloading component 'uhttpd'
01-01 00:00:22 (info)     reloading component 'dnsmasq'
01-01 00:00:27 (info)     reloading component 'wireless'
01-01 00:00:27 (info)     network:setStatus: 2 | Connected
01-01 00:00:27 (error)     signin failed no local ip found
01-01 00:00:27 (info)     Signing in failed
01-01 00:00:27 (info)     autowifi setup done (autowifi: associated -- client mode with ssid 'Fablab Amersfoort')
CGI invocation
01-01 00:00:32 (info)     =======rest api (api debugging)=======
01-01 00:00:32 (info)     running in signin mode
01-01 00:00:32 (info)       ds.mode: sta
01-01 00:00:32 (info)       attempting signin
01-01 00:00:33 (info)     signin: {"status":"success","data":{"remoteip":"62.216.8.197","localip":"10.0.0.50","wifiboxid":"oudesticker","timestamp":138255651
6}}M

01-01 00:00:33 (info)     Signin successful
01-01 00:00:38 (info)     =======rest api (api debugging)=======
01-01 00:00:38 (info)     received request of type GET for network/alive
01-01 00:00:38 (info)     remote IP/port: 10.0.0.11/54567
01-01 00:00:41 (info)     =======rest api (api debugging)=======
01-01 00:00:41 (info)     received request of type GET for network/alive
01-01 00:00:41 (info)     remote IP/port: 10.0.0.11/54567
01-01 00:00:45 (info)     =======rest api (api debugging)=======
01-01 00:00:45 (info)     received request of type GET for network/alive
01-01 00:00:45 (info)     remote IP/port: 10.0.0.11/54567
01-01 00:04:20 (info)     =======rest api (api debugging)=======
01-01 00:04:20 (info)     received request of type GET for network/status
01-01 00:04:20 (info)     remote IP/port: 192.168.5.220/55053
01-01 00:04:20 (info)     network:getStatus
01-01 00:04:22 (info)     =======rest api (api debugging)=======
01-01 00:04:22 (info)     received request of type GET for network/status
01-01 00:04:22 (info)     remote IP/port: 192.168.5.220/55053
01-01 00:04:22 (info)     network:getStatus
01-01 00:04:25 (info)     =======rest api (api debugging)=======
01-01 00:04:25 (info)     received request of type GET for network/status
01-01 00:04:25 (info)     remote IP/port: 192.168.5.220/55053
01-01 00:04:25 (info)     network:getStatus
peteruithoven commented 11 years ago

This is very hard to consistently reproduce. I've tried:

It only sometimes goes wrong, when I try the same situation again it can sustain network connection just fine.

I'm now logging the ssid on calls like /info/status and /network/alive so that we can track when it loses connection.