LoPy4 fresh after firmware flash hangs after main.py runs
-
I now have a dozen different Lopy 4 units. Most of them are working great. Trying to get this new unit online and it's giving me a bit of a headache. I've flashed it with new firmware, erased the filesystem and updated the pybytes registration several times. Even tried deleting the device and adding it as a new device. When it first boots up, the serial output indicates it connected to the wifi successfully. But it never shows online and I can't get any response from REPL. When rebooted, this is all I get on the serial:
ets Jun 8 2016 00:22:57 rst:0x1 (POWERON_RESET),boot:0x32 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff8028,len:8 load:0x3fff8030,len:1688 load:0x4009fa00,len:0 load:0x4009fa00,len:14592 entry 0x400a059c WMAC: 807D3A937CEC Firmware: 1.18.2.r6 Pybytes: 0.9.12 Pybytes configuration read from /flash/pybytes_config.json Initialized watchdog for WiFi and LTE connection with timeout 660000 ms WiFi connection established WARNING: consider enabling TLS by using pybytes.enable_ssl() Connected to MQTT mqtt.pybytes.pycom.io Pybytes connected successfully (using the built-in pybytes library) Now starting user code in main.py
I checked with Wireshark and I see DHCP discovery, DHCP request and ARP broadcasts. About 10 packets filtered out by eth.src[0:3]==80:7D:3A
After that, crickets.Input voltage is 5.05vdc and the heartbeat flashes blue every few seconds. Tried to FTP in with FileZilla to the IP address but it never connects. Ping fails
-
@dnear1 can you use FTP to check the contents of the file system including main.py?
Also what happens if you Send Ctrl-C on the serial interface?
-
@dnear1 How did you erase the flash, with esptool.py?
And did you try to load the standard (non-pybytes) firmware?
-
For this unit, it theoretically shouldn't have ANY code loaded to it. I've tried erase flash filesystem, update pybytes registration, reset lora region, etc. from the pycom firmware uploader. Firmware flash is successful. Afterwards, It briefly pings pybytes but doesn't stay online so I can't access the filesystem from there either.
I removed it from my PCB and put another one in its place. That unit is fully operational.. so the PCB itself isn't the issue.. just the Pycom Lora4 module.
-
@dnear1 REPL is started after main.py finishes. So if main.py is not terminated, you will not get the REPL prompt. You can try to put your code from main.py in a new thread, wich allows you to leave main.py while the thread continues to run.