opendata-stuttgart / sensors-software

sourcecode for reading sensor data
571 stars 307 forks source link

Sensor verbindet sich nicht mit meinem Wlan #346

Open ghost opened 6 years ago

ghost commented 6 years ago

Hallo in die Runde, ich habe mir einen Feinstaubdaten-Sensor gebaut und schaffe es einfach nicht, ihn mit meinem Wlan zu verbinden.

Könnt ihr mir helfen? Ich weiß nicht, wie ich das Problem weiter eingrenzen kann.

Danke und viele Grüße Jakob

YaguraStation commented 6 years ago

Two questions: Does your WLAN by any chance have a space in its SSID? Have you tried switching off 5Ghz on the AP temporarily to test?

You can review WLAN errors via serial monitor. See end of this article https://github.com/opendata-stuttgart/meta/wiki/Firmware-einspielen

ghost commented 6 years ago

Thanks for bringing up that article. No, there is no space in the wifi SSID. And yes, I tried swithing of 5Ghz with the same result.

I looked at the log via serial monitor and this is how the output reads out:

Any chance you can help me interpreting it?

---- Result from Webconfig ---- WLANSSID: XXXXXXXXXX

Reading ... PPD: 0 SDS: 1 PMS24: 0 PMS32: 0 HPM: 0 DHT: 1 DS18B20: 0 HTU21D: 0 BMP: 0

Send to ... Dusti: 1 Madavi: 1 CSV: 0

Autoupdate: 1 Display: 0 LCD 1602: 0 Debug: 3

Restart needed ...

WiFi connected IP address: 0.0.0.0 saving config... {"current_lang":"DE","SOFTWARE_VERSION":"NRZ-2018-103","wlanssid":"XXXXXXXXXX","wlanpwd":"XXXXXXXXXX","www_username":"admin","www_password":"feinstaub","fs_ssid":"Feinstaubsensor-3871409","fs_pwd":"","www_basicauth_enabled":false,"dht_read":true,"htu21d_read":false,"ppd_read":false,"sds_read":true,"pms24_read":false,"pms32_read":false,"hpm_read":false,"bmp_read":false,"bmp280_read":false,"bme280_read":false,"ds18b20_read":false,"gps_read":false,"send2dusti":true,"send2madavi":true,"send2sensemap":false,"send2lora":false,"send2csv":false,"auto_update":true,"use_beta":false,"has_display":false,"has_lcd1602":false,"has_lcd1602_27":false,"has_lcd2004_27":false,"debug":"3","sending_intervall_ms":"145000","time_for_wifi_config":"600000","senseboxid":"","send2custom":false,"host_custom":"192.168.234.1","url_custom":"/data.php","port_custom":80,"user_custom":"","pwd_custom":"","send2influx":false,"host_influx":"api.luftdaten.info","url_influx":"/write?db=luftdaten","port_influx":8086,"user_influx":"luftdaten","pwd_influx":"info"} Config written: {"current_lang":"DE","SOFTWARE_VERSION":"NRZ-2018-103","wlanssid":"XXXXXXXXXX","wlanpwd":"XXXXXXXXXX","www_username":"admin","www_password":"feinstaub","fs_ssid":"Feinstaubsensor-3871409","fs_pwd":"","www_basicauth_enabled":false,"dht_read":true,"htu21d_read":false,"ppd_read":false,"sds_read":true,"pms24_read":false,"pms32_read":false,"hpm_read":false,"bmp_read":false,"bmp280_read":false,"bme280_read":false,"ds18b20_read":false,"gps_read":false,"send2dusti":true,"send2madavi":true,"send2sensemap":false,"send2lora":false,"send2csv":false,"auto_update":true,"use_beta":false,"has_display":false,"has_lcd1602":false,"has_lcd1602_27":false,"has_lcd2004_27":false,"debug":"3","sending_intervall_ms":"145000","time_for_wifi_config":"600000","senseboxid":"","send2custom":false,"host_custom":"192.168.234.1","url_custom":"/data.php","port_custom":80,"user_custom":"","pwd_custom":"","send2influx":false,"host_influx":"api.luftdaten.info","url_influx":"/write?db=luftdaten","port_influx":8086,"user_influx":"luftdaten","pwd_influx":"info"} ?)⸮ ⸮

⸮mounting FS... mounted file system... reading config file... opened config file... parsed json... Starting Webserver... 0.0.0.0 6 Connecting to XXXXXXXXXX ........................................ Starting WiFiManager AP ID: Feinstaubsensor-3871409 Password:

ricki-z commented 6 years ago

Could you please send the characters used in the wifi password? There should be a list of available wifi networks after soe seconds on the config page. Is your network listed there?

ghost commented 6 years ago

Sorry for the late response...

Yes, my network is listed on the config page. My wifi password contains some letters, two numbers, "!" and "_".

This weekend I will have time to do some more troubleshooting and will report afterwards.

ghost commented 6 years ago

Ok so I renamed my two networks and changed the password but still was not able to connect. I ordered a Freifunk router yesterday (a plan I have had for some time) and hope I will be able to connect to the Freifunk network once it is all set up.

ricki-z commented 6 years ago

Have you checked your wifi router that there are no limitations (MAC filter, guest wifi settings, time limitations) for 'new' devices?

ghost commented 6 years ago

hi again, yes, I checked all this :( With a rasperry pi I was able to connet to my router without any problems. Anyway, I set up a Freifunk Router and was able to connect to the internet via the freifunk network. So it's working now and I am happy :) Thanks for the help Jakob

Flole998 commented 5 years ago

You need a capture of the Wifi Messages to confirm, but I think it is most likely related to short guard Interval being enforced on the Router and the ESP lacking support for that.

bogomips commented 5 years ago

hello, I have the same exact problem with the same exact model TG3442DE My esp8266 perfectly connects to my phone (tethering) while there is no way to connect to my Vodafone router. For two days I am trying to find the root cause, using Wireshark etc... no way. Does someone know what the problem is? (I don't wanna buy a new router!) Thanks!

Flole998 commented 5 years ago

I think it is most likely related to short guard

As I said before.... What does the Wireshark capture say?

ricki-z commented 5 years ago

The sensor only supports 2.4 GHz wifi. And the sensor seems to prefer 811.2n (my Fritz!Box is set to 811.2b+g+n).

ludwigm commented 5 years ago

I have a similiar problem with a Vodafone EasyBox. I also tried to check with Wireshark and see a DHCP Discover package from the MAC address of the controller. It also shows up on the router but does not get an IP assigned. So I think it is mainly a DHCP issue. Would be great to have possibilities to set the IP instead of relying on DHCP for such cases. Not sure if it helps but I would hope. I added now a FritzBox to my Wifi and was able to connect through it but would for sure love to only need one access point (Vodafone EasyBox)

wertzui commented 5 years ago

Same problem here: ESP 8266 works with Fritz Box 6490, but not with TG3442DE. But 2.4 networks are configured the same. All other devices connect fine to the new router without any changes (SSID and passwords are the same). When I unplugged the TG3442DE and turned the Firts Box 6490 on again, the ESP 8266 was immediately able to connect to the Wifi network.

kb-elmo commented 5 years ago

I have the exact same problem with the TG3442DE router. I analyzed the wifi traffic with Wireshark and it seems that the router is completely ignoring the DHCP discovers from the esp8266. The ESP sends one DHCP discover after another and simply never gets a reply.

1552600936

wetterfrosch commented 4 years ago

Does the affected WLAN-accesspoint require some sort of "minimum basic-rate" which might be greater than 1 Megabits/s? Or has some special options like "power-saving" (Unscheduled Automatic Power Save Delivery, U-APSD)? Does it allow WPA1 and WPA2, or just one of these?

dirkmueller commented 4 years ago

It is possible (I can't verify) that the wifi access point needs to support at least 802.11n. is it possible that the users with issues here are trying to connect to an AP without such support?

dirkmueller commented 4 years ago

Google points to https://forum.vodafone.de/t5/Internet-Ger%C3%A4te/ESP8266-verbindet-sich-nicht-mit-TG3442DE/td-p/1974080

not sure if the answer given here is correct though (I can still connect if I turn off on my 802.11n capable router the 802.11n feature)

kb-elmo commented 4 years ago

@dirkmueller It's most likely this. Unfortunately the Vodafone issued routers are built for idiots and don't offer any kind of settings to the user. You can't even change the wifi channel nor the dhcp settings in there. So theres probably not much that users of that router can do (other than setting up an external wifi router for the ESPs)

Stunkymonkey commented 4 years ago

I think I was facing the same problem as you guys did, but now my esp8266 is working with my router:

Productname:               Vodafone Docsis 3.1
Firmware version:          01.02.037.03.12.EURO.SIP

the simple fix was: update the core esp8266 library, rebuild and flash it

ricki-z commented 4 years ago

If this should work then the next firmware release should solve this. We are waiting for the last feedback for some changes.