Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save slimcdk/9f34d9f7b0b22dcb9f33e3609f238a67 to your computer and use it in GitHub Desktop.
Save slimcdk/9f34d9f7b0b22dcb9f33e3609f238a67 to your computer and use it in GitHub Desktop.
$ toit serial reinstall --firmware v1.5.0-rc.1 -p model.cellular.enabled=1 -p model.cellular.tx=5 -p model.cellular.rx=23 -p model.cellular.rts=19 -p model.cellular.cts=18 -p model.cellular.pwr=27 -p model.cellular.monarch=1 -p cellular.apn=internet --port=/dev/ttyUSB0
Detecting chip type. This can take up to 10s.
Reinstalling hardware with firmware: v1.5.0-rc.1 (using model: esp32-4mb) on port /dev/ttyUSB0
Running "/home/christian/.cache/toit/tools/esptool_linux_v3.0 --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xd000 /tmp/151402654/otadata555026789 0x10000 /tmp/151402654/ota_0924560256"
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting.......
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:0a:c4:c7:26:10
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 8MB
Compressed 8192 bytes to 31...
Writing at 0x0000d000... (100 %)
Wrote 8192 bytes (31 compressed) at 0x0000d000 in 0.0 seconds (effective 24076.2 kbit/s)...
Hash of data verified.
Compressed 1323840 bytes to 804568...
Writing at 0x00010000... (2 %)
Writing at 0x00014000... (4 %)
Writing at 0x00018000... (6 %)
Writing at 0x0001c000... (8 %)
Writing at 0x00020000... (10 %)
Writing at 0x00024000... (12 %)
Writing at 0x00028000... (14 %)
Writing at 0x0002c000... (16 %)
Writing at 0x00030000... (18 %)
Writing at 0x00034000... (20 %)
Writing at 0x00038000... (22 %)
Writing at 0x0003c000... (24 %)
Writing at 0x00040000... (26 %)
Writing at 0x00044000... (28 %)
Writing at 0x00048000... (30 %)
Writing at 0x0004c000... (32 %)
Writing at 0x00050000... (34 %)
Writing at 0x00054000... (36 %)
Writing at 0x00058000... (38 %)
Writing at 0x0005c000... (40 %)
Writing at 0x00060000... (42 %)
Writing at 0x00064000... (44 %)
Writing at 0x00068000... (46 %)
Writing at 0x0006c000... (48 %)
Writing at 0x00070000... (50 %)
Writing at 0x00074000... (52 %)
Writing at 0x00078000... (54 %)
Writing at 0x0007c000... (56 %)
Writing at 0x00080000... (58 %)
Writing at 0x00084000... (60 %)
Writing at 0x00088000... (62 %)
Writing at 0x0008c000... (64 %)
Writing at 0x00090000... (66 %)
Writing at 0x00094000... (68 %)
Writing at 0x00098000... (70 %)
Writing at 0x0009c000... (72 %)
Writing at 0x000a0000... (74 %)
Writing at 0x000a4000... (76 %)
Writing at 0x000a8000... (78 %)
Writing at 0x000ac000... (80 %)
Writing at 0x000b0000... (82 %)
Writing at 0x000b4000... (84 %)
Writing at 0x000b8000... (86 %)
Writing at 0x000bc000... (88 %)
Writing at 0x000c0000... (90 %)
Writing at 0x000c4000... (92 %)
Writing at 0x000c8000... (94 %)
Writing at 0x000cc000... (96 %)
Writing at 0x000d0000... (98 %)
Writing at 0x000d4000... (100 %)
Wrote 1323840 bytes (804568 compressed) at 0x00010000 in 13.2 seconds (effective 800.4 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Hardware successfully reinstalled with the Toit firmware.
The hardware has been reinstalled with the following configurations:
+------------------------+----------------+
| SETTING | VALUE |
+------------------------+----------------+
| context | remote |
| broker.cn | device.toit.io |
| model.cellular.rts | 19 |
| model.cellular.monarch | 1 |
| model | esp32-4mb |
| model.cellular.rx | 23 |
| model.cellular.cts | 18 |
| model.cellular.pwr | 27 |
| broker.host | device.toit.io |
| broker.port | 9426 |
| cellular.apn | internet |
| model.cellular.enabled | 1 |
| model.cellular.tx | 5 |
+------------------------+----------------+
$ toit serial info --output table
+-------------------------------------------------------------------------+-----------+--------------------------------------+
| NAME | MODEL | HARDWARE ID |
+-------------------------------------------------------------------------+-----------+--------------------------------------+
| e1ddb74a-18cb-4b55-8fdf-f214061b6327.457.2021-09-26.device.toitware.com | esp32-4mb | e1ddb74a-18cb-4b55-8fdf-f214061b6327 |
+-------------------------------------------------------------------------+-----------+--------------------------------------+
$ toit serial monitor
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (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:2
load:0x3fff0030,len:188
ho 0 tail 12 room 4
load:0x40078000,len:12180
load:0x40080400,len:2944
entry 0x400805c8
clearing RTC memory: RTC memory is in inconsistent state
[flash reg] address 0x3f46c000, size 0x00134000
[IDENTITY] name=e1ddb74a-18cb-4b55-8fdf-f214061b6327.457.2021-09-26.device.toitware.com,model=esp32-4mb
(0.015893) [toit] INFO: booting toit {sdk: v1.5.0-rc.1, model: esp32-4mb}
(0.020877) [toit.scheduler] INFO: set initial run_level {run_level: 4}
(0.485342) [toit.state] INFO: starting new session {session_id: 1, session_time: 0.492301}
[gc @ 0x3ffcf9f0* | soft limit reached (20480 >= 18432)]
[gc @ 0x3ffcf9f0* | heap: 20kb -> 8kb | external: 0kb -> 0kb | free: 9kb->9kb 1.153ms]
(0.584771) [toit.kernel] INFO: using model parameters {cellular.cts: 18, cellular.enabled: 1, cellular.monarch: 1, cellular.pwr: 27, cellular.rts: 19, cellular.rx: 23, cellular.tx: 5}
(0.687371) [toit.console_sync] INFO: loaded last console sync {time: null}
(0.699410) [toit.scheduler] INFO: running job {job: console_sync}
(0.702308) [toit.scheduler] INFO: running job {job: flush_metrics}
(0.704488) [toit.scheduler] INFO: running job {job: poll_metric_flash_usage}
[gc @ 0x3ffcf9f0* | soft limit reached (24576 >= 24576)]
[gc @ 0x3ffcf9f0* | byte array allocation failed, length = 6 (heap)]
[gc @ 0x3ffcf9f0* | heap: 24kb -> 16kb | external: 0kb -> 0kb | free: 12kb->12kb 1.774ms]
(0.709407) [toit.scheduler] INFO: running job {job: poll_metric_memory_profile}
(0.738259) [toit.console] INFO: waiting for console connection to be established
(0.742632) [toit.network] DEBUG: connecting {network: Cellular (internet)}
(0.749939) [toit.metrics] INFO: persisting metrics
(0.753079) [toit.metrics] INFO: flushing metrics
[gc @ 0x3ffcf9f0* | soft limit reached (36892 >= 36864)]
[gc @ 0x3ffcf9f0* | byte array allocation failed, length = 511 (heap)]
[gc @ 0x3ffcf9f0* | heap: 36kb -> 20kb | external: 0kb -> 0kb | free: 12kb->12kb 1.978ms]
(1.108818) [toit] INFO: -> AT
(1.370196) [toit] INFO: -> AT
(1.630785) [toit] INFO: -> AT
(1.891483) [toit] INFO: -> AT
(2.152263) [toit] INFO: -> AT
[gc @ 0x3ffcf9f0* | soft limit reached (45084 >= 43050)]
[gc @ 0x3ffcf9f0* | string allocation failed, length = 6 (heap)]
[gc @ 0x3ffcf9f0* | heap: 44kb -> 28kb | external: 0kb -> 0kb | free: 6kb->6kb 2.311ms]
(2.412945) [toit] INFO: -> AT
(2.673801) [toit] INFO: -> AT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment