No LoPy 4 WiFi after updating the firmware
hi, yesterday i have updated my LoPy 4 firmware. but now there is no LoPy4 wifi available. I can't see any ssid on my computer. Please help
@Xykon Thanks, yes. I had seen that already and I am using it now, since the CLI firmware updater 1.16 does not work anymore with the new tar files. Reason unkown.
I just thought I'd mention it here that we now release the CLI firmware updater as source code here: https://github.com/pycom/pycom-micropython-sigfox/tree/Dev/esp32/tools/fw_updater
@robert-hh That explains a lot! Thanks for taking the time to reply. Just received these the other day.
@robert-hh I thought I had read that the newer revisions did it automatically thus not needing to connect P2 to GND. Anyways I am using a PySense for programming, but I assume the same would apply.
Thanks Robert. I haven't used this to flash an image to the device yet and if this is incompatible, then I want to discourage people from doing that.
However, I haven't been able to find out the revision of the ESP32 by using
pycom-fwtool-cli, it will only report
ESP32D0WDQ6 (revision (unknown 0xa))
esptoolworked perfectly fine on this
esptool.py --port $MCU_PORT --after no_reset chip_id Detecting chip type... ESP32 Chip is ESP32D0WDQ6 (revision 1) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz
In order to make this work, I had to put the PIC into programming mode as outlined above. Otherwise, I received the very same error message about
Invalid head of packet (0x08).
robert-hh last edited by robert-hh
@andreas pycom-fwtool-cli knows the PIC and will use the PIC to switch the xxPy into bootloader mode.
esptool.py is provided by espressif, and they use a different logic to do so, which is not supported by the Pycom expansion boards. This espressif mode is also supported by pycom-fwtool-cli with by the option -r (thanks to @Xykon ).
In any case, pulling P2 low and pushing reset will set the device into bootloader mode.
P.S.: In any case I want to be absolutely sure I use esptool.py.
I have been unable to get esptool to properly connect and wipe the firmware.
The result each time is
Invalid head of packet (0x08).
We observed the same thing even when trying to invoke that using a vanilla
esptoolinstallation while our FiPy was sitting on the native expansion board. So we figured we might be doing things wrong.
with the Pycom expansion boards you have to conect P2 to GND and push reset.
While I'm not sure about this, the steps outlined below might also save you from this procedure, Robert.
pypic.pyto the rescue
Eventually I remembered that
pycom-fwtool-cliwill probably also control the PIC sitting on the expansion board appropriately and after some research into that direction we found this is just the case.
So in order to make things work, you will have to put the PIC into firmware update / programming mode.
pypic.pyis available from the Pycom repositories at .
We've also added a more detailed guide at https://community.hiveeyes.org/t/read-information-about-the-chip-and-flash-on-pycom-devices-through-the-expansion-board/2699, which you might enjoy.
After the PIC is pulled into programming mode, you will also be able to retrieve the chip revision of the ESP32. This is handy to know about whether this thing might have any silicon bugs in order to prepare for respective glitches and workarounds. This is the very topic outlined within the walkthrough  referenced above.
With kind regards,
@JaRay For esptool.py with the Pycom expansion boards you have to conect P2 to GND and push reset.
V1.20.1r1 from pycom is the pybytes variant, which disables WiFi AP on boot. You can deavtivate pybytes by putting a file on your devioce with the name pybytes_config.json and the content:
The pybytes will not start. Still Soft reset with Ctrl-D is disabled.
@robert-hh I have been unable to get esptool to properly connect and wipe the firmware. This is the result each time:
A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (0x08)
What does work is using the Pycom tool to erase the flash:
pycom-fwtool-cli --port /dev/ttyACM0 erase_all
However upon reflashing the latest using the pycom updater, the wifi is still not enabled. Using the FTP has been my go to method for uploading code due to pymakr being broken in VSCode as of 1.14. It looks like recently the update 1.15 has fixed the issue though.
@robert-hh Thanks it worked for me :)
@robert-hh Ah, i see:
erase_flashis the appropriate subcommand for
esptool.py, while the
erase_allsubcommand we have been putting into our muscle memory is the appropriate thing for the
This latter guy in turn just has
$ pycom-fwtool-cli --help erase_fs Erase flash file system area erase_all Erase entire flash!
Sorry for the confusion!
So, we conclude
We have now emphasized this on a dedicated topic on our forum , which might also help others.
I am wondering if this should actually be the
erase_allsubcommand which should be issued here, see also our recommendation at Full erase FTW.
With kind regards,
python3 esptool.py --port <usb port> erase_flash
That will erase the complete flash. After that, use the pycom updater to install the firmware again. On a windows system, python3 may be called python. For no reason, the new 1.20.1.r1 version cannot be installed using the pycom updater. There is only the release note https://github.com/pycom/pycom-micropython-sigfox/releases/tag/v1.20.1.r1, but no install package.