trekawek / aqi-lcd

7 stars 5 forks source link

Not connecting to wifi #12

Open skibbipl opened 4 years ago

skibbipl commented 4 years ago

I'm trying to configure the LCD but I'm having troubles with connecting to my local wifi. Here is the log:

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld
AQI LCD is starting!
Initializing device...
Scanning wifi networks
- <list of surrounding wifi networks>
Config size: 703
Loaded config 'iwcThingName'= 'AQI LCD'
Loaded config 'iwcApPassword'= <hidden>
Loaded config 'iwcWifiSsid'= 'my-wifi-network'
Loaded config 'iwcWifiPassword'= <hidden>
Loaded config 'iwcApTimeout'= '30'
Loaded config 'sensorUrl'= 'https://xxx.aqi.eco/xxx/data.json'
Loaded config 'sensorType'= 'AQI_ECO'
Loaded config 'timezoneOffset'= '1'
Loaded config 'backlightTime'= '30'
SkipApStartup is requested, but either no WiFi was set up, or configButton was pressed.
AP password was not set in configuration
State changing from: 0 to 1
Setting up AP: AQI LCD
With default password: <hidden>
Creating access point
SSID:     AQI LCD

Any ideas whats wrong? Perhaps I didn't assemble the LCD correctly?

trekawek commented 4 years ago

I had similar problem when I didn't setup the "AP Password". I think the config library I'm using, IotWebConf, requires all the fields in the config panel to be filled before the configuration is marked as ready and tries to connect to the local network.

skibbipl commented 4 years ago

OK, your suggestion helped a bit, however still cannot connect to wifi:

Setting up AP: AQI LCD
Use password: <hidden>
Creating access point
SSID:     AQI LCD
Password: xxxxxxxxx
AP IP address: 192.168.4.1
State changed from: 3 to 2
State changing from: 2 to 3
Connecting to [my_wifi] (password is hidden)
Connecting to WiFi <my_wifi>
State changed from: 2 to 3
Giving up.
State changing from: 3 to 2

I can see in my Mikrotik router logs following entries:

AA:BB:CC:DD:EE:FF@wlan1: connected, signal strength -57
AA:BB:CC:DD:EE:FF@wlan1: disconnected, unicast key exchange timeout
kazikskrz commented 4 years ago

I'm having similar issue even all fileds are filled including AP Password:

Validating form. Updating configuration Value of arg 'iwcThingName' is:AQI LCD iwcThingName='AQI LCDAQI LCD' Value of arg 'iwcApPassword' is:password iwcApPassword was set Value of arg 'iwcWifiSsid' is:dd-wrt iwcWifiSsid='dd-wrtdd-wrt' Value of arg 'iwcWifiPassword' is:T****J iwcWifiPassword was set Value of arg 'sensorUrl' is:https://krasnikgorny.aqi.eco/pl/stacja1/data.json sensorUrl='https://krasnikgorny.aqi.eco/pl/stacja1/data.jsonhttps://krasnikgorny.aqi.eco/pl/stacja1/data.json' Value of arg 'sensorType' is:AQI_ECO sensorType='AQI_ECOAQI_ECO' Value of arg 'brightness' is:20 brightness='2020' Value of arg 'ledCount' is:30 ledCount='3030' Saving config 'iwcThingName'= 'AQI LCD' Saving config 'iwcApPassword'= Saving config 'iwcWifiSsid'= 'dd-wrt' Saving config 'iwcWifiPassword'= Saving config 'iwcApTimeout'= '30' Saving config 'sensorUrl'= 'https://krasnikgorny.aqi.eco/pl/stacja1/data.json' Saving config 'sensorType'= 'AQI_ECO' Saving config 'brightness'= '20' Saving config 'ledCount'= '30'

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d v8b899c12 ~ld AQI LCD is starting! Initializing device... Scanning wifi networks

AP IP address: 192.168.4.1 State changed from: 0 to 1 Connection to AP.