Copyright ©

Mongoose OS Forum


Rare behavior - ESP32 board fails when encrypting

bs_alexbs_alex Barcelona

Hi there,

I am trying to flash a piece of firmware on a ESP32 board (4MB) that is already encrypted. The flashing is successful but when it starts to re-encrypt the board, it fails when trying to encrypt ca.pem file.
I am using the latest version of mos tool and the encryption key is correct. This is what appears on my logs:

[Jun  8 10:13:56.415] mgos_vfs_fs_spiffs_e ca.pem: write failed: -10001 
[Jun  8 10:13:56.415] mgos_vfs_fs_spiffs_m SPIFFS mount failed
[Jun  8 10:13:56.424] mgos_vfs_mount       FS SPIFFS {"encr": true}: mount failed
[Jun  8 10:13:56.424] mgos_task            MGOS init failed: -5
[Jun  8 10:13:56.933] mgos_vfs_umount_all  Unmounting filesystems
[Jun  8 10:13:56.937] /opt/Espressif/esp-idf/components/freertos/queue.c:620 (xQueueTakeMutexRecursive)- assert failed!

[Jun  8 10:13:56.946] abort() was called at PC 0x4008efd3 on core 0

[Jun  8 10:13:56.950] 

[Jun  8 10:13:56.950] Backtrace: 0x4009149b 0x4009159b 0x4008efd3 0x40082f65 0x400ea888 0x400eaedf 0x400e350a 0x40082d7e

[Jun  8 10:13:56.959] --- BEGIN CORE DUMP ---
[Jun  8 10:13:56.961] {"arch": "ESP32", "cause":29,
[Jun  8 10:13:56.964] "REGS": {"addr": 1073545568, "data": "
[Jun  8 10:13:56.967] mxQJQJ4VCYCgJf4/LwAAAC8AAAAMAAAA/////wAAAAD+////AAAAAIAl/j8AAAAAMSX+P98k/j8wAAAAAAAAAOkk/j/vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd6sNghAtjYIQAAAAAAFAAAAAAAAAAEAAADvvq3e776t3iALBgDEMvk/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},
[Jun  8 10:13:57.016] "DRAM": {"addr": 1073405952, "data": "

That said, if I try to **flash the demo-js ** firmware, it works and the board is encrypted well. So, it obviously depends on the firmware I am trying to flash. This is the mos.yml file of the app I want to flash:

version: 1.0
manifest_version: 2017-05-18
libs_version: ${mos.version}
modules_version: ${mos.version}
mongoose_os_version: ${mos.version}

  - ["mqtt.server", ""]
  - ["i2c.enable", true]
  - ["claim", "o", {"title": "Hello app settings"}]
  - ["claim.code", "s", "0", {"title": "Hello app settings"}]
  - ["shadow.ota_enable", "b", true, {title: "Enable OTA via shadow"}]
  - ["shadow.autocommit", "b", true, {title: "Autocommit OTA if the shadow connection is successful"}]

  - js

  - fs

  - origin:
  - origin:
  - origin:
  - origin:

  - src

  - mqttUnsubscribe


If anyone has an idea of what it could be I would be very appreciated.
Thanks in advance.

Sign In or Register to comment.