Troubleshooting the recent Pycom Firmware Release 1.20.1.r1

Kleiner Erfahrungsbericht zur 1.20.1er firmware mit altem code:

Blinkies

Bei der RGB-LED die Farbe wechseln geht noch.

Basic Wifi

Ein einfacher WLAN-Sketch funktioniert und liefert die lokale IP des Geräts.

OTA-Sketch

Mein OTA-Sketch funktioniert nicht mehr und steigt mit einem core dump aus

Hiverize-Software

Traceback (most recent call last):
  File "main.py", line 11, in <module>
  File "webserver.py", line 124, in <module>
  File "/flash/lib/microDNSSrv.py", line 19, in Create
  File "/flash/lib/microDNSSrv.py", line 161, in Start
OSError: Network card not available

Hiveeyes-Software

Lief nach initialem upload mit einigen Fehlern zumindest durch!!

   35.9418 [terkin.network.core      ] ERROR  : Starting HTTP server failed
Traceback (most recent call last):
  File "/flash/lib/terkin/network/core.py", line 110, in start_services
  File "/flash/lib/terkin/network/core.py", line 131, in start_httpserver
  File "/flash/lib/terkin/api/http.py", line 70, in start
  File "/flash/dist-packages/microWebSrv.py", line 219, in Start
OSError: Network card not available
[...]
   37.5036 [terkin.network.wifi      ] INFO   : WiFi STA+AP: Starting interface
Unhandled exception in thread started by <bound_method>
Traceback (most recent call last):
  File "/flash/lib/terkin/network/ip.py", line 24, in start_real
OSError: Network card not available

Nach einem Reset dann

   40.4971 [terkin.sensor.core       ] INFO   : Found 0 I2C devices: [].
   40.5218 [terkin.sensor.core       ] INFO   : Registering bus "i2c:0"
Guru Meditation Error: Core  1 panic'ed (Cache disabled but cached memory region accessed)
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4020f958: bad00bad bad00bad bad00bad

Externe Sensoren HX711, BME280, DS18B20 waren nicht angeschlossen.

Maybe:

https://github.com/pycom/pycom-micropython-sigfox/releases/tag/v1.20.1

moduos:
[…]
mkfs() API is removed and is replaced by fsformat()

make format-flash is already using the new API.

1 Like

9 posts were merged into an existing topic: Installing the recent Pycom Firmware 1.20.1.r1 requires erasing the flash completely

Just invoking

make connect-wifi ssid=GartenNetzwerk password=<redacted>

gives us the same thing observed by @clemens after following the update procedure [1] using FiPy-1.20.1.r1-rebundled.tar.gz.

Device port: usb => /dev/cu.usbmodemPy001711
Guru Meditation Error: Core  1 panic'ed (Cache disabled but cached memory region accessed)
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4020fd14: bad00bad bad00bad bad00bad

  1. hiveeyes-micropython-firmware/pycom-firmware-upgrade.rst at master · hiveeyes/hiveeyes-micropython-firmware · GitHub ↩︎

1 Like

We just updated the upgrade instructions [1] to favor a different release tarball built by @robert-hh which looks like it would work without flaws. At least, make connect-wifi and make recycle-ng worked for us.

The firmware identifies itself on the REPL as

Pycom MicroPython 1.20.1.r1 [d4b4717] on 2019-10-12; FiPy with ESP32

  1. hiveeyes-micropython-firmware/pycom-firmware-upgrade.rst at master · hiveeyes/hiveeyes-micropython-firmware · GitHub ↩︎

1 Like

This error has been going away for us when adding a /flash/pybytes_config.json file containing {"pybytes_autostart": false} in order to turn off Pybytes, see also Firmware Release v1.20.1 | Pycom user forum.

When adding an appropriate pybytes_config.json file, the boot process will display these messages:

Pybytes configuration read from /flash/pybytes_config.json
Not starting Pybytes as auto-start is disabled

You can read more about the pybytes_config.json at

1 Like

MicroPython 1.11 shipped with the new Pycom firmware brings some significant performance gains when loading code into memory. This will tremendously reduce the startup time. We’ve outlined some details at MicroPython module freezing.

2 Likes

Zuerst ist alles OK.

PS C:\Users\admin\Documents\uPython\PycomFlash> .\pycom-fwtool-cli.exe --port COM11 erase_all
Running in PIC mode
Erasing the board can take up to 40 seconds.
Board erased successfully in 29.06 seconds
PS C:\Users\admin\Documents\uPython\PycomFlash> .\pycom-fwtool-cli.exe --port COM11 flash --tar FiPy-1.20.1.r1-annapurna-0.1.0.tar.gz
Running in PIC mode
Script Version: 2.1
Flash operation successful.

Dann gibt es andere Fehler:

Uploading project (main folder)...
Not safe booting, disabled in settings

Reading file status
Failed to read project status, uploading all files
Creating dir lib
Creating dir logger
Creating dir sensors
Creating dir www
Creating dir www/css
Creating dir www/js
[1/30] Writing file boot.py (2kb)
[2/30] Writing file default_settings.json (2kb)
[3/30] Writing file lib/config.py (2kb)
[4/30] Writing file lib/microDNSSrv.py (8kb)
[5/30] Writing file lib/microWebSrv.py (35kb)
[6/30] Writing file lib/onewire.py (4kb)
[7/30] Writing file lib/urequests.py (3kb)
[8/30] Writing file lib/wlanmanager.py (3kb)
[9/30] Writing file lib/__init__.py (0kb)
[10/30] Writing file logger/beep.py (0kb)
[11/30] Writing file logger/csv.py (3kb)
[12/30] Writing file logger/__init__.py (0kb)
[13/30] Writing file main.py (16kb)
[14/30] Writing file sensors/bme280.py (9kb)
[15/30] Writing file sensors/ds18x20.py (3kb)
[16/30] Writing file sensors/hx711.py (3kb)
[17/30] Writing file sensors/ssd1306.py (6kb)
[18/30] Writing file sensors/__init__.py (2kb)
[19/30] Writing file settings_preset_clemens.json (2kb)
[20/30] Writing file settings_preset_didi.json (2kb)
[21/30] Writing file user_settings-oben.json (1kb)
[22/30] Writing file user_settings-oben2.json (1kb)
[23/30] Writing file user_settings-oben3.json (1kb)
[24/30] Writing file user_settings-unten1.json (1kb)
[25/30] Writing file user_settings.json (1kb)
[26/30] Writing file webserver.py (4kb)
[27/30] Writing file www/css/app.222e65cd.css (3kb)
[28/30] Writing file www/index.html (1kb)
[29/30] Writing file www/js/app.fcdbc555.js (35kb)
[30/30] Writing file www/js/chunk-vendors.06953575.js (47kb)
Upload done, resetting board...
OKets Jun  8 2016 00:22:57
rst:0x7 (TG0WDT_SYS_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:0x3fff8020,len:8
load:0x3fff8028,len:2136
load:0x4009fa00,len:19944
entry 0x400a05e8
Starting boot process...
9 SSIDS found
Boot finished.
main -> import sensors
ssd1306.py:  esp32
Traceback (most recent call last):
  File "main.py", line 22, in <module>
  File "sensors/__init__.py", line 14, in <module>
AttributeError: 'module' object has no attribute 'OneWire'
Pycom MicroPython 1.20.1.r1 [3138a13d-dirty] on 2019-10-20; FiPy with ESP32
Type "help()" for more information.

Wo ist der Fehler ?

Hi Didi,

Das kann in der Tat von einer ungünstigen Inkompatibiliät mit den in die annapurna-Firmware eingebauten Bibliotheken zusammenhängen.

Probiere doch in diesem Fall, für den Betrieb des Hiverize-Datenloggers die Firmware https://packages.hiveeyes.org/hiveeyes/foss/pycom/FiPy-1.20.1.r1-robert.tar.gz zu verwenden.

Viele Grüße,
Andreas.

Hiermit funktioniert mein hiverize/fipy wieder. Danke

1 Like

Korrektur: es lief nur 1 Stunde. Jetzt wieder:

Gain & initial value set
Initialised CSV logger in directory /sd/hiverizelog
Traceback (most recent call last):
  File "main.py", line 26, in <module>
  File "webserver.py", line 124, in <module>
  File "/flash/lib/microDNSSrv.py", line 19, in Create
  File "/flash/lib/microDNSSrv.py", line 161, in Start
OSError: Network card not available
Pycom MicroPython 1.20.1.r1 [d4b4717] on 2019-10-12; FiPy with ESP32
Type "help()" for more information.

Dann liegt es u.U. an etwas anderem, was noch näher erforscht werden müsste. Tut mir leid.

Der Autor dieses Moduls, Jean-Christophe Bos scheint aber sehr zuvorkommend, so dass sich u.U. eine Anfrage bei Issues · jczic/MicroDNSSrv · GitHub lohnen könnte, die das Problem in unserem Kontext mit der neuen Pycom Firmware schildert. Vielleicht kann @clemens das übernehmen?

@didilamken hattest du pybyte wie hier von Andreas beschrieben deaktiviert?

Also im Verzeichnis wo auch main.py liegt eine Datei pybytes_config.json anlegen.

Ich hatte alles gelöscht … Ja.
Ich hatte nur bei DEEPSLEEP ein TRUE … naja … jetzt ist das Thema schon mal erledigt mit ein zweites Mal löschen und flashen.
Jetzt komme ich via TelNet und FTP auf den FiPy …

und mit einem neuen USB Kabel meckert auch ATOM nicht mehr

Wahrtscheinlich hätte ein CTRL+ C auch genügt um dann die Settings noch einmal auf den FiPy uploaden zu können :slight_smile:

Jetzt kommt Schritt 2. Anschließen und Waage neu kalibirieren …

1 Like

Wir haben gerade ein neues Release-Paket gebaut, das sich nun auch besser selbst identifiziert:

Pycom MicroPython 1.20.1.r1-annapurna-0.2.0 [3138a13d-dirty] on 2019-10-28; FiPy with ESP32

Mit etwas Glück ist es nun per [1] auch mit der Hiverize-Firmware kompatibel, zumindest an der Stelle, die @didilamken hier identifizieren konnte. Thanks for spotting this!

Erhältlich ist es unter https://packages.hiveeyes.org/hiveeyes/foss/pycom/FiPy-1.20.1.r1-annapurna-0.2.0.tar.gz.


  1. Fix import path of "onewire" module · hiveeyes/terkin-datalogger@bf08b50 · GitHub ↩︎

1 Like

After @Thias also reported about these core panics at Unlocking LoRaWAN / TTN on the LoPy4 within Terkin - #12, we reported these findings upstream to Firmware Release v1.20.1 | Pycom user forum.


Another thing not related to core panics is at

4 posts were merged into an existing topic: Investigating core panics (Guru Meditation) with BLE on Pycom devices

We sublimated us into the details of Random memory corruption faults on ESP32-WROVER rev.1 and rev.2 when running in dual-core mode to shed some more light onto whether that might be the reason for these core panics occurring sporadically, especially in situations with increased memory pressure.

As an outcome of working through the details of https://github.com/espressif/esp-idf/issues/2892 thoroughly, we built respective firmware images and would like to encourage you to try them out, @clemens, @Thias and @poesel.

We will be happy to hear back from you about this.

2 Likes