Customer:
I received Inkplates and am getting errors when trying to upload a sketch to them. Here’s the output from a reset through Serial Monitor:
⸮ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (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:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load: ,len:9720
ho 0 tail 12 room 4
load: ,len:6352
entry 0x400806b8
And from compile/upload of the Inkplate_Slave_Mode example:
Sketch uses 310280 bytes (9%) of program storage space. Maximum is 3145728 bytes.
Global variables use 18296 bytes (5%) of dynamic memory, leaving 309384 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6-beta1
Serial port /dev/ttyUSB1
Connecting.....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: fc:f5:c4:1b:50:78
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
A fatal error occurred: Invalid head of packet (0xE0)
A fatal error occurred: Invalid head of packet (0xE0)
Any suggestions?
Originally submitted via email support on 18 July 2020. Migrated to the forum for community visibility.
Soldered Support:
What board do you have selected? Did you turn the switch to ON position?
In serial monitor you will receive reset debug info because the board resets when you open serial monitor – that’s normal.
Customer:
I’m using the Inkplate 6 (ESP32) board and the power switch is turned on.
I’m on a fresh install of Ubuntu 20.04 LTS with a fresh Arduino installation. I installed the Board information using Board Manager and loaded the Examples from the GitHub repository.
When I loaded the Inkplate_Slave_Mode example and tried to compile and upload, I got the error:
exec: "python": executable file not found in $PATH
Error compiling for board Inkplate 6 (ESP32).
I tried alias python=python3 but that didn’t work. I installed python-is-python3 using sudo apt install python-is-python3 and then got:
Traceback (most recent call last):
File "/home/[user]/.arduino15/packages/Croduino_Boards/tools/esptool_py/2.6.0/esptool.py", line 35, in
import serial.tools.list_ports as list_ports
ModuleNotFoundError: No module named 'serial'
exit status 1
Error compiling for board Inkplate 6 (ESP32).
To fix that I installed pip3 with sudo apt install python3-pip and then ran pip3 install pyserial.
Now when I try to upload, I get:
Sketch uses 310280 bytes (9%) of program storage space. Maximum is 3145728 bytes.
Global variables use 18296 bytes (5%) of dynamic memory, leaving 309384 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6-beta1
Serial port /dev/ttyUSB0
Connecting......
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: fc:f5:c4:1b:50:78
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
A fatal error occurred: Invalid head of packet (0xE0)
A fatal error occurred: Invalid head of packet (0xE0)
The example code compiles and esptool starts to upload it to the Inkplate 6, but then I get this error. I’m not sure where to go from here.
Customer:
I figured it out. The default Upload Speed for the board configuration is 921600. I changed it to 115200 and it compiled and uploaded successfully.
Sketch uses 310280 bytes (9%) of program storage space. Maximum is 3145728 bytes.
Global variables use 18296 bytes (5%) of dynamic memory, leaving 309384 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6-beta1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: fc:f5:c4:1b:50:78
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 6255.2 kbit/s)...
Hash of data verified.
Compressed 16176 bytes to 10658...
Wrote 16176 bytes (10658 compressed) at in 0.9 seconds (effective 136.6 kbit/s)...
Hash of data verified.
Compressed 310448 bytes to 154274...
Wrote 310448 bytes (154274 compressed) at in 13.7 seconds (effective 181.8 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 134...
Wrote 3072 bytes (134 compressed) at in 0.0 seconds (effective 1376.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Customer:
One more thing: using the Inkplate_Slave_Mode example, the screen doesn’t refresh immediately. The command #L(1)* needs to be issued to update the screen. That’s why I wasn’t able to get the various commands to display and didn’t think the program was working.
Soldered Support:
The board definition has been updated so the default upload speed is now 115200. For the Python issue on Ubuntu, we’ll add it to the Troubleshooting section. For Slave Mode, yes, that’s correct – it works the same as calling display.display() – we’ve added some clarification.