-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NRZ-2019-127 broke my sensor #580
Comments
Do you see an open wifi access point airrohr-xxxxxx (that being some number) ? |
I would really appreciate the serial output of the sensor with the new firmware. You can capture that with screen under macos or Linux or the Arduino ide in general |
Did you have the same issue with 2019-125-B1 as well? |
you can download and flash the 125 (previous stable release, online between october 31st and december 2nd) from here: https://www.madavi.de/sensor/update/data/previous/NRZ-2019-125-B1/ |
This is what I get from arduino serial port monitor:
And then it dies :( |
Since you seem to have a setup to.manually flash.. can you try if manually flashing this firmware works? Please make sure to temporarily turn off auto update in config prior doing that otherwise it will OTA on boot to the previous version. https://firmware.sensor.community/airrohr/beta/latest_en.bin There are also other language versions, just pick one that you want. There is a bugreport against Arduino core that wifi is not working after OTA while it works after manually flashing via serial. |
also, I see the message "validate request auth" - that means you have set a password for the webui. are you sure there isn't some "authentication" dialog hidden somewhere in some other browser tab waiting for input? can you share some details about the user/password you ahve set? length or maybe other special things? |
Regarding web auth - yes I put some simple 8 char password with one special char from the range: |
So, just to be clear: the web authentication succeeds and the webpage is loading successfully? |
when you configure arduino with the esp8266 integration (you need to add the url to the boardmanager) location. this can be used to flash firmware with:
|
Also, can you please disable the sds011 sensor in configuration menu from a firmware version that works and then update to the newer version (for example by enabling auto-update and "use beta channel" both at the same time). Also, please set debug level to 5 and capture the debug output from serial again, maybe this gives a clue on where it gets stuck. when it is stable without sds011 we have the first hint of where to look. |
Only for a second and then everything dies, also serial debugging stops. |
Disabled SDS011 and enabled update. Still dies:
Same behavior with disabled BME280. |
You are sending to a "custom API". Is this API using HTTPS? If yes, is the certificate 2048 Bit or lower? |
Yes, I use https - standard Let's Encrypt RSA certificate with 2048 bits according to Firefox. |
Well, that should not kick in until there's an actual measurement. Is it actually trying to do a measurement cycle after the 2 minutes or so if uptime if you don't try to access the webui? |
I'm also affected (also have a Mikrotik router in my setup and send data to a local InfluxdDB), downgrading to NRZ-2018-123B from https://www.madavi.de/sensor/update/data/previous/NRZ-2018-123B/ worked for me (tried also 2019-125-B1 but AFAICS I also have troubles there). |
the interesting aspect here is that NRZ-2018-123B and 2019-125-B1 use the same Arduino core version (2.4.2) with the same wifi stack. Can you please try the ARP nping with those versions and tell us which one works which one doesn't (and how well)? |
also, please compare with a firmware from https://static.dmllr.de/airrohr/beta/builds-SDK221/ and |
I tried both firmwares with no luck. After booting it dies same way as 127 version. |
Thanks. can you try https://static.dmllr.de/airrohr/beta/builds-2019-126-B4/ ? |
also, I am not really sure I understand "it dies" correctly. is it merely not responding to http requests, or also not sending data? can you load the build from https://static.dmllr.de/airrohr/beta/builds-128-B1-debug-alive/ and paste the last few dozen lines of text when it "dies" from serial console? it has wifi debug enabled as well as will print a message multiple times a second. |
NRZ-2019-126-B4 works fine. Regarding "dies" I mean that after initial boot COM debgging returns nothing. Working version keeps pushing following messages:
Version 128 provides log below (repeated all the time). It seems that after 4 minutes (19:08 - 19:12) it started working OK!
|
Ok, this is great news. this means NTP is simply not possible in your wifi setup. We can fix that. |
@skibbipl please test if https://static.dmllr.de/airrohr/beta/builds-NRZ-2019-128-B3/ resolves that issue. |
Looks good:
Also as you mentioned NTP I found following info in Mikrotik SNTP Client:
|
thanks. googling that error message leads to: https://de.scribd.com/document/78877210/NTP-Server-Local-Mikrotik which could be the reason why you're having issues with NTP? The problem is without NTP we can not really validate SSL certificates (needed for secure data sending as well as secure PTA) as we have no valid system time. so it is sort of important to get a solution for this :/ |
…gart#580) When NTP is not (yet) completing, we need to still process the rest of the loop() otherwise watchdog might kill us or the webserver is not responding.
I have two NTP servers (both on Raspberry Pi) in my local LAN, however for IoT devices I use dedicated wifi hotspot with blocked access to LAN. Perhaps my Mikrotik broadcasts info about NTP servers in LAN but the sensor cannot access them and therefore gets confused? |
No, we use hardcoded ntp servers in the internet. It seems by default these routers come with firewall / NAT rules that are intended to do NTP on the router but accidentally also apply to lan packets reaching for NTP, which causes them to be dropped . That's how I read the description above. Anyway, thanks a ton for your help in chasing this down! |
@dirkmueller sorry for the delay on my side but I wasn't in front of the device any longer back then and busy with other stuff. Great debugging and impressive turnaround time for the fix, thanks! 👍 BTW, the issue is closed but I don't see the related fix neither in https://github.com/opendata-stuttgart/sensors-software nor as pending PR here, what's the suggested procedure to get this fix for us (except for using https://static.dmllr.de/airrohr/beta/builds-NRZ-2019-128-B3/)? |
The best solution is to work on getting NTP packet routing working in your setup. Without time anything the sensor does including updating itself is insecure because it can not validate certificates. We need to wait for vacation season to end to get a new beta published. This will not go out as a stable release this year because we have another issue that needs to be fixed before we can do a new rollout. |
Hm that's interesting, I'm not aware of any problems related to NTP with any other clients in my network. hmmm Ah ok, thanks for clarification, was just wondering whether anything was forgotten or so. :) |
Since latest version my sensor stoped working. I can see on the router (Mikrotik) that it connects to my wifi network but I cannot enter the setup page either sensor sends any data outside. What is strange that since upgrade senor stopped getting ARP entries on the router.
I downgraded to NRZ-2018-123B and everything is working again. Any tips how to debug this issue?
The text was updated successfully, but these errors were encountered: