OEM W01 stuck in bootloader after copying file to /flash via FTP
I've implemented the OEM W01 module according to the "OEM universal schematic" into a prototype project in which I used the WiPy 3 development board before.
However, I cannot mount the SD card, although circuitry wasn't changed except the replacement of WiPy3 with the OEM version. I get the same error as reported in another forum thread: https://forum.pycom.io/topic/4505/l01-oem-module-not-working-with-sd-card
>>> import os >>> from machine import SD >>> sd=SD() >>> os.mount(sd,'/sd') Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: the requested operation failed
My first thought was that this might be a firmware issue which is solved in more recent firmware versions as I am not aware of having used before version 1.7.something which is shipped on the W01.
As a serial-to-usb adapter is not part of my design, I tried to copy the .bin image of the new firmware (which I usually load from the SD card) via FTP to /flash. It is about 1.3 MB in size. I checked before that there was indeed enough space, although the W01 came just fresh out of the box. However, Filezilla (configered as in the docs) couldn't upload much more than about 465 kB. Then the connection got lost. I tried various speed limits, as I had the experience that reducing the speed greatly enhances FTP connection stability. But no matter what speed, the most I could transfer was about 470 kB. Final file sizes varied a bit (+/- 10 kB).
After 5 to 7 copy tries, the connection loss of Filezilla was final. That means, the W01 didn't boot anymore to a state where a Wifi-Hotspot opened. I soldered a usb-to-serial IC onto my prototype board and got this serial output:
ets Jun 8 2016 00:22:57 rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0x00 clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:QIO, clock div:1 load:0x3fff0008,len:4 load:0x3fff000c,len:148 load:0x40078000,len:11876 ho 0 tail 12 room 4 load:0x40080000,len:268 entry 0x40080034 user code done
And here I am stuck. It seems the bootloader doesn't finish what it is supposed to do, right? I tried this on two prototype boards with identical results. How can I rescue the W01 and my boards? Why does an FTP transfer break the W01 module?
@robert-hh Thank you, that worked well! W01 is running with new firmware and that obviously also solved the SD card problem. It is now being mounted peacefully. I am very happy now :)
robert-hh last edited by
@Daniel-Lehmann Since you have a serial connection, you can use that for uploading the firmware. Pull GPIO0 to GND, apply reset and upload the firmware with the PyCom updater. You may tick the box to erase the flash during upload.
P.S.: The place to upload appimg.bin to by ftp is /flash/sys. The file will then be copied directly to the spare firmware partition and not into the file system. But since 1.7 the partitions have been changed. so making a USB reflash is required.