How to REALLY solve the firmware update failures
-
somehow Pycom thinks everyone runs on linux, but prolly most don't. Their upgrade guide at https://forum.pycom.io/topic/88/how-to-solve-the-firmware-update-failures with the latest firmware is therefor (again) incomplete at best.
For windows:
- Make sure you close down PyMakr (else you get permission denied)
- Make sure you have no other devices connected like a TTN Uno or other Arduino as it confuses the upgrader
- Make sure you have PyMakr and the latest firmware tool installed
- Download https://cloud.pycom.io/index.php/s/1j8qBJknD2BAGBj
- Open a window command box (cmd) in Administrator mode (!)
- Make a connection on the expansion board from G23 and GND (left 4th pin, right 2nd pin) with some wire
- run (assuming you installed pymakr in C:):
"C:\Program Files (x86)\Pycom\Pymakr\Python27\python.exe" flash_debug.py COM18 write 0x0 2
please note the quotes arround the python not arround the entire line.
You should see the following output:
D:\flash_debug_tool>"C:\Program Files (x86)\Pycom\Pymakr\Python27\python.exe" flash_debug.py COM18 write 0x0 2
Connecting...
value: 0x0
length: 2
write 0x60002008 0x00000000 0x00400000
write 0x60002010 0x00000000 0x00000000
write 0x60002000 0x08000000 0xffffffff
write 0x60002008 0x00000000 0x00400000
write 0x60002010 0x00000000 0x00000000
write 0x60002000 0x08000000 0xffffffff
write 0x60002008 0x00000000 0x00400000
write 0x60002010 0x00000000 0x00000000
write 0x60002000 0x08000000 0xffffffff
write 0x60002008 0x00400000 0x00400000
write 0x60002010 0x00000000 0x0000ffff
write 0x60002000 0x04000000 0xffffffff
write 0x60002008 0x00000000 0x00400000
write 0x60002010 0x00000000 0x00000000
write 0x60002000 0x08000000 0xffffffff
get status: 0x0
ESP DEV DISCONNECT...- DO NOT ! Start PyMakr IDE, it will deny access to the com port!
- DO NOT ! Remove the cable jumper / wire (pycom, why remove as the updater states you have to do this????
- DO NOT ! Power cycle the WiPy/LoPy (pycom, again why? it resets the flag and then again you have the upgrade issue)
- Run the firmware update tool, finally now you can flash ! You should see something like:
Connecting...
Uploading stub...
Running stub...
Stub running...
Erasing flash...
Compressed 4096 bytes to 2891...
Wrote 4096 bytes (2891 compressed) at 0x00001000 in 0.3 seconds (effective 120.9 kbit/s)...
Hash of data verified.
Erasing flash...
Compressed 256 bytes to 125...
Wrote 256 bytes (125 compressed) at 0x00004000 in 0.0 seconds (effective 136.5 kbit/s)...
Hash of data verified.
Erasing flash...
Compressed 639008 bytes to 385542...
Wrote 639008 bytes (385542 compressed) at 0x00010000 in 34.0 seconds (effective 150.4 kbit/s)...
Hash of data verified.Leaving...
Verifying just-written flash...
Verifying 0x1000 (4096) bytes @ 0x00001000 in flash against C:\Program Files (x86)\Pycom\Pycom Firmware Update\Upgrader/firmware/bootloader.bin...
-- verify OK (digest matched)
Verifying 0x100 (256) bytes @ 0x00004000 in flash against C:\Program Files (x86)\Pycom\Pycom Firmware Update\Upgrader/firmware/partitions.bin...
-- verify OK (digest matched)
Verifying 0x9c020 (639008) bytes @ 0x00010000 in flash against C:\Program Files (x86)\Pycom\Pycom Firmware Update\Upgrader/firmware/lopy_0.9.2.b2_868.bin...
-- verify OK (digest matched)- Now you can remove the jumper wire
- Now you can reset the device
- Now you can start PyMakr and connect your device. You should see:
Connecting to a Pycom device...
MicroPython 7713d55 on 2016-10-28; LoPy with ESP32 <<<< Note the date changed from in my case 2016-10-21
Type "help()" for more information.
-
NOTE: this is an old thread with outdated information. Please use the official upgrade tool instead:
https://docs.pycom.io/pycom_esp32/pycom_esp32/firmware.html
-
@AntonioValente said in How to REALLY solve the firmware update failures:
I will need to work with the I2C module. Where I can find LoPy pinout and I2C library documentation?
See here and further down:
P9 - SDA Bus 0
P10- SCL Bus 0I'm currently testing a 24LC64 eeprom and no external pullup resistors are needed.
-
No. My mistake!
I just have done the firmware upgrade and everything works fine.
Thanks!I will need to work with the I2C module. Where I can find LoPy pinout and I2C library documentation?
Thanks again,
Valente
-
@AntonioValente said in How to REALLY solve the firmware update failures:
The only thing I can't do is firmware upgrade.
Did you connect P2 to GND and reset the module before attempting the firmware upgrade?
-
Hi @AntonioValente, you definitely need to upgrade your firmware in order to properly select your country LoRa frequency, patch several important bugs and get new features. If you haven't, please check here. There you will find the official upgrade tools for upgrading the boards.
If you have any issue with it, feel free to start a new thread.
-
I have connected through an Arduino board and I can connect -
by wireless (I have to place a fixed IP address - solved);
and by COM port.
Also, I can run Python in Pymakr with the two modes (Wi-Fi and COM) - a simple test program to change RGB LED color.
The only thing I can't do is firmware upgrade. Since I have a new LoPy device I don't know if it is necessary to do a firmware upgrade.Thanks,
Valente
-
Do you have a multimeter to check the current used by the LoPy? I can see the LoPy using up to 200mA during boot when powered through VIN at 5V.
It might be that even the 5V output of your particular cable does not provide enough current for the LoPy.
-
My cable have 5V of power supply ans 3.3V communications.
I can get serial communications (115200 baudrate) and get a prompt ">>" but I can't do a firmware update neither a wireless connection through my PC running W10.
Any ideia?Thanks,
Valente
-
It is possible to do firmware update with a FTDI cable (3.3V)? - I'm using Windows 10.
I need to modify this somewhat. Your FTDI cable alone might not provide enough current to power the LoPy at 3.3V.
If you have a module that has both 3.3V and 5V power output then you can power the LoPy with 5V at VIN. If it is a cable that has only VCC (at 3.3V) you might need an additional power supply.
-
@AntonioValente said in How to REALLY solve the firmware update failures:
It is possible to do firmware update with a FTDI cable (3.3V)? - I'm using Windows 10.
Yes.
It is necessary to connect CTS and RTS?
No.
-
Hi,
It is possible to do firmware update with a FTDI cable (3.3V)? - I'm using Windows 10.
It is necessary to connect CTS and RTS?Thanks,
Valente
-
A few comments:
Make sure you close down PyMakr (else you get permission denied)
This only applies if you use PyMakr to connect via serial port.
Make sure you have no other devices connected like a TTN Uno or other Arduino as it confuses the upgrader
I didn't have any problems with other devices connected... it would be interesting to know what problems you encountered.
Make sure you have PyMakr [...] installed
You don't need to install PyMakr. I've never installed it on Windows. You can use the Python 2.7 from the updater if you don't have it installed already.
Open a window command box (cmd) in Administrator mode (!)
This was not necessary for me in Windows 7 or Windows 10. Which windows version are you using?
-
I downloaded the very latest, patched, version yesterday evening.
-
Hi @bartvrancken, can I ask you which is the last version of the upgrader tool you've tried?
Thanks,