Skip to content
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

New nodeMCU ChipID already in use since 2018 #633

Open
JanBosNL opened this issue Jan 14, 2020 · 22 comments
Open

New nodeMCU ChipID already in use since 2018 #633

JanBosNL opened this issue Jan 14, 2020 · 22 comments
Labels

Comments

@JanBosNL
Copy link

For the project https://www.arnhemspeil.nl/acties/luchtdata-project.html in Arnhem the Netherlands we are in the proces of rolling out 200 new luftdaten sensors.

During one of the workshops we encountered a problem.
Brand new freshly bought NodeMCU,s are being used.
While trying to connect the chipID of this new Sensor to Meine Luftdaten, we discovered that the ChipID from this new NodeMCU is already in use since 2018. It seems there are 2x esp8266-1342840

Is this an isue that happened before? And how can we still use this NodeMCU for this project? Has espressif manufactured so many ESP8266 chips that they have started re-using the chipid?

The chip ID in question is 1342840

https://www.madavi.de/sensor/graph.php?sensor=esp8266-1342840-sds011

Hope somebody has an idear so we can stilluse the NodeMCU.

Best Regards.

@RikDrabs
Copy link

RikDrabs commented Jan 14, 2020 via email

@JanBosNL
Copy link
Author

Hello @RikDrabs ,

The ChipID and esp https://www.madavi.de/sensor/graph.php?sensor=esp8266-1342840-sds011 has produced data.

It seems we have the same chipID , and only thing I can think of is that the producer of the ESP8266 might have started using the same numbers for a second run. They might have produced 10 milion esp8266 units and restarted at 0000001 etc....

If that is so more people will have the same problem in near future. (lets hope not) but I cant realy think of any other cause of this broblem. Since the ChipID has been producing data since 2018.

@dirkmueller
Copy link
Collaborator

@JanBosNL can you share a screenshot of the device status page? The espid is derived from the lower bytes of the mac address.

It is possible that we get duplicates because the prefix is actually changed

@dirkmueller
Copy link
Collaborator

We might have to change the espid calculation then

@JanBosNL
Copy link
Author

WhatsApp Image 2020-01-14 at 21 16 55

@dirkmueller
Copy link
Collaborator

Yep, so that's a different mac vendor prefix than the usual one. It is registered in espressif inc so we have a valid collision simply because we discard the first 3 bytes of the mac address for the espid calculation.

So we need to get to a different calculation scheme that is less prone to collisions

@dirkmueller
Copy link
Collaborator

This could be fixed server side by grandfathering in the old ids somehow into a larger id space. Gonna be painful to get this correct though.

@dirkmueller
Copy link
Collaborator

@JanBosNL where did you get such an old firmware version? It's not relevant for this issue but current is 2020 not 2018 (which is two years old)

@JanBosNL
Copy link
Author

I use this luftdaten flashingtool. And flash the dutch version to the nodeMCU, maybe the latest dutch version is that old?
luftdaten-tool_HdfTNnFZnl

@JanBosNL
Copy link
Author

@dirkmueller Glad I could help clarify and find the bug. Lets hope we dont get to many collisions in the other nodeMCU's we are still building and rolling out. We are working on 200+ in the coming weeks and rolled out 80+ so far and this is the first that collided.

I hope the rest will just evade this bug.

@dirkmueller
Copy link
Collaborator

No, all language versions are build and updated at the same time. Note you're running the flashing tool from 2018!

I would really appreciate if we could flash be sensors with a current version of firmware. It just avoids a few bugs that have been fixed a long time ago (plus allowing more features)

@JanBosNL
Copy link
Author

Will do, Autoupdate will fix that when the sensors reach the web I hope? Will download new flashing tool.

@JanBosNL
Copy link
Author

The download link on https://luftdaten.info/feinstaubsensor-bauen/#firmware-einspielen links to the old 2018 firmware flashing tool. So thats why I still had that one running.

@JanBosNL
Copy link
Author

Seems there is a bug in the flashing tool? The latest from https://github.com/opendata-stuttgart/airrohr-firmware-flasher is from 2018... And is what I used. Seems it flashes old firmware when using the dutch option? Maybe you can verify by flashing a nodeMCU with the

latest_DHT22_nl.bin

luftdaten-tool_windows_amd64_hG9BuxJV9x

@ricki-z
Copy link
Member

ricki-z commented Jan 15, 2020

@JanBosNL Use the latest_nl.bin . This is preconfigured for SDS011 and DHT22 and it's the latest release.

@dirkmueller
Copy link
Collaborator

This is being discussed in Arduino Core: esp8266/Arduino#2309

@JanBosNL
Copy link
Author

Last Weekend we rolled out another 25 sensors. And we found another chipID problem
We have another double chipID for: 8013503

This one Seems more like the problem @RikDrabs mentioned about people entering the wrong chipID nr on the luftdaten website?
The ChipID can be found in the MADAVI database, but I cant find any generated data for that specific chipID. Have a look for yourself through MADAVI https://www.madavi.de/sensor/graph.php?sensor=esp8266-8013503-sds011#l_year

Is there a way to get this ChipID reset in the database? So we can still use this nodeMCU?

For the rest @dirkmueller thanks for pointing out the root cause of the problem. I now see where the bug originates. Lets hope someone can come up with a solution that wont interfere with the already running nodeMCU's and functions based on this chipID calculated from the MACaddress. If I understand correctly the problem is how the chipID is calculated from the MACaddress. In the current situation The espressif mac adress prefix is skipped and only the latter part of the mac adress is used. Seems Espressif has baked so many esp8266 chips that they needed a new prefix, and started rerunning the rest of the macaddresses.

Best regards,

@ricki-z
Copy link
Member

ricki-z commented Jan 20, 2020

The chipID 8013503 was registered on Jan. 18 2020 for an account in the Netherlands (Arnhem).
Are you sure that it wasn't just a "double click" (second time sending the form because of a slow page load) that caused the message?

@RikDrabs
Copy link

RikDrabs commented Jan 20, 2020 via email

@JanBosNL
Copy link
Author

Hello @ricki-z it seems that someone tried to register the NodeMCU 2 times during our workshop, Thanks for clarifying. So we took this Sensor back. We have a new problem then... Seems that sensor has been connected to someone their personal account during our workshop.

But no idear who, I will ask the people that actually did the workshop if they kept track of whom origionally received this sensor and if we can mail them to hand over the sensor to us.. Lets hope we can trace it back internally.

Thanks for the help and clarification.

@JanBosNL JanBosNL reopened this Jan 20, 2020
@JanBosNL
Copy link
Author

The chipID 8013503 was registered on Jan. 18 2020 for an account in the Netherlands (Arnhem).
Are you sure that it wasn't just a "double click" (second time sending the form because of a slow page load) that caused the message?

@ricki-z Is there a madavi link to check the date of first registration that we can use during the workshop to check this the next workshops may we encounter people trying to double register their sensor?

@ricki-z
Copy link
Member

ricki-z commented Jan 20, 2020

There is no link to check this. We could try to insert this in the error message. But this may need some days. We haven't worked on the source code for my.luftdaten.info for some days ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants