Page 1 of 1

Firmware 0.0.0 error

Posted: 18 Oct 2018 13:13
by budm
This makes the second Zuno I've received this error on after spending days trying to port the MFRC522 library to the Zuno.

"Z-Uno core version and device version mismatch. You have 0.0.0 firmware version on the board. Core version is 2.1.4. Please upgrade the bootloader."
"An error occurred while uploading the sketch"

Everything was going fine as I tried to debug what I think are stack overflows. The Zuno would lock up, I would reset it, upload a new version of my sketch and continue working.

If I try to re-burn the bootloader, it says:

"Error 0 There is no firmware "myhome/.arduino15/packages/Z-Uno/hardware/zw8051/2.1.4/bootloaders/zuno_bootloader_AAAABBBB1B0000000000000002*.bin" that is needed for your Z-Uno"

What's going on here? Have I really nuked the firmware simply by uploading a sketch? How can I fix my Zunos that report this error?

Re: Firmware 0.0.0 error

Posted: 20 Oct 2018 00:13
by PoltoS
I don't think you killed the bootloader. But looks your sketch overflows the stack and this harms Serial API of Z-Uno.

Try to go into rescue mode to disable your sketch. It should help.

Re: Firmware 0.0.0 error

Posted: 23 Oct 2018 00:29
by budm
I have two Zunos, A and B. I started on Zuno A. The stack was regularly being clobbered, so I would routinely enter rescue mode, upload an updated sketch, then continue debugging. Eventually this Zuno hit the error where it said it had Firmware 0.0.0 installed, and I tried a factory reset. After that the Zuno won't even accept a device id on the USB bus. It seems completely hosed.

I dug through my wiring and realized that the MOSI and MISO pins were not connected to the correct pins (but no power or ground wires/pins were wrong). I fixed that, verified that everything else seemed right, and hooked up Zuno B. I got much further with Zuno B; I could get the library to perform a self test that succeeded, and I eventually got it to detect an RFID card. I did encounter a very odd persistent error wherein the library would fail to initialize in the "setup" function. By setting a global boolean and running the initialization in the loop function, I could get the library to initialize. So I was testing that way, figuring I would go back later and see why the library wouldn't initialize in "setup". During all of my debugging, I was constantly having to enter rescue mode, then upload an updated sketch. Everything was going smoothly.

While debugging the library's "read card" code, the device just failed to upload once, and said it was because the device had firmware 0.0.0 installed. Same as Zuno A had done.

This is where I sit right now. I'm a little afraid of the factory reset, since the last time I tried that the device was hosed bad enough to not even work on the USB bus.

If I hose this Zuno, I'm definitely not attempting another library port, because I'm worried that my stack overflows have overwritten something important in the Zuno that I can't fix. And these things are not cheap. :)

I can write off Zuno A, but is there any way you might know of to figure out if the firmware really i trashed, and if so any way to fix it?

Re: Firmware 0.0.0 error

Posted: 23 Oct 2018 00:47
by budm
Below are the last few lines from my IDE output when I try to upload the sketch. I had real problems getting this Zuno to attach to the USB bus as well, had to go into rescue mode a few times and unplug/replug the device.


*** ZME Z-UNO Compiler. Platform:Linux Version:1.05b1 Text: ***

Sketch uses 15895 bytes (49%) of program storage space. Maximum is 32256 bytes.
Global variables use 658 bytes of dynamic memory.

Openning port ..............................
Openning port .............................. OK

Stoping the user code ..............................
Stoping the user code .............................. OK

Closing port ..............................
Closing port .............................. OK

Openning port ..............................
Openning port .............................. OK

RAW Info:
AA AA BB BB 1B 00 00 00
00 00 00 00 9A CE 3B A7
00 7F C6 65 67 7F FF 7F
FC 01 15 02 0E FE A1 01
00 17 13 FF FF FF FF FF
FF FF FF 0E 11 06 0A 06
C9 01 23 00 01 1E
MAIN:00 TX: 17 13
HEX: 5F D2 E9 64 11 03 DF 54 C9 BE F7 A5 72 BE 5D BF 0B 5A 05 F4 F9 72 4A 7B 14 A9 5A 7E BA 17 5A 39
DEC: 24530-59748-04355-57172-51646-63397-29374-23999-02906-01524-63858-19067-05289-23166-47639-23097
YOUR ZUNO S/N: 0E 11 06 0A 06 C9 01 00 01
WEEK:14 YEAR:2017
Z-Uno core version and device version mismatch. You have 0.0.0 firmware version on the board. Core version is 2.1.4. Please upgrade the bootloader.
An error occurred while uploading the sketch

Re: Firmware 0.0.0 error

Posted: 28 Oct 2018 12:37
by PoltoS
Are you using S2 variant of bootloader? If so, looks we have one nesty bug with sketch upgrade. Please contact me by mail

Re: Firmware 0.0.0 error

Posted: 29 Oct 2018 10:57
by p0lyg0n1
Please provide a sketch code & IDE settings.

Re: Firmware 0.0.0 error

Posted: 29 Oct 2018 12:21
by budm
Attached is the code I have been working with, verbatim. I cannot submit a stripped-down version because I wouldn't know if it caused the same problem (both Zunos are basically unusable now).


- A few buttons
- LiquidCrystal, Hitachi hd44780 chip (
- MFRC522 / RFID RC522, RFID reader (

IDE Settings:

Board: Z-Wave>ME Z-Uno
Logging: Disabled
Multicommand: Disabled
Frequency: Europe
Erase NVM: Disabled
Security: Disabled
Programmer: Z-Uno programmer

Additional Boards Manager URLs: ... index.json


Both included libraries were ported/being ported to the Zuno. The LiquidCrystal required minor mods, but the MFRC522 was much more. I took a lot of stack arguments and just crammed them into a struct, made it a member variable and used those values instead of passing values in. (Please bear in mind this was for testing purposes only. :) )


If you look at the ".ino" file, you will notice that I was pressing the blue button to initialize both libraries. For some reason I could not get the libraries to initialize in "setup".


The big issue here, of course, is that I highly suspect that I damaged the Zunos using a sketch upload. Power draw on the hardware seemed acceptable, so I don't think that was a problem. I have two RFID-522 chips that I alternated between when testing. I would upload this sketch, press the blue button, then wave an RFID chip over the reader.

The one thing I would be interested in knowing is whether there is a stack overflow that causes any "protected" area of the Zuno to be modified.

Re: Firmware 0.0.0 error

Posted: 31 Oct 2018 17:26
by p0lyg0n1
Hi, I tried you code with RC522 connected and I can't reproduce the issue. It doesn't work, but I can go to rescue mode anytime and I can reflash the sketch. I have no "REVISION:00. 0" in the output.
Lets try these steps:
1. Unplug all the external modules from Z-Uno (LCD/RC522/Buttons). Just a naked Z-Uno itself.
2. Go to rescue mode (BTN + RST, RST UP, BTN UP). Z-Uno pulses with green LED.
3. Select "Erase NVM"->All In IDE.
4. Select a "Blink" sketch and try to flash it. If you see Error: "Can't upload sketch! Something went wrong. Bad CRC16 :'(" it is OK.
5. Select "Erase NVM"->Disabled
6. Reupload the sketch.
If you have the same result as it was I need all the log files you will find in the "<...>/Arduino15/packages/Z-Uno/tools/zuno_toolchain/00.08.71/*.log"

The issues looks very strange, I didn't see the cases when somebody corrupt the internal flash memory of Z-Uno using a sketch, cause it's impossible, you can corrupt it only if you unplug the power (or some peripheral device eats too much and makes voltage less the 2.6V) during uploading of the bootloader, not the user sketch. Anyway lets try to find the reason and the way to fix it.


Re: Firmware 0.0.0 error

Posted: 05 Nov 2018 14:45
by budm
Ok, naked Zuno, went into reset mode (+BTN, +RST, -RST, -BTN).

Set Erase NVM=All, cleared the logs, uploaded an empty sketch. Result says invalid Firmware 0.0.0. Think it also said "Found corrupt S2 key", which was something I'd noticed before I hosed it.

Set Erase NVM=Disabled, moved the log out of the way, uploaded an empty sketch. Same error, firmware Both logs are attached, as well as a screenshot of my tools menu.

Re: Firmware 0.0.0 error

Posted: 05 Nov 2018 14:47
by budm