Chat freely about anything...

User avatar
By Thomas Meier
#85602 Hi guys,

just starting out on the ESP8266 platform so forgive my ignorance on what might be obvious... :)

After being able to successfully compile and upload the blink sketch on a WeMos R1 D1 I'm now getting error messages for any sketch.

Now getting the message "esptool.FatalError: Invalid head of packet (0x46)"

Scanning through the log, what caught my attention is the message about the crystal frequency...

WARNING: Detected crystal freq 20.39MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?
Crystal is 26MHz

Could this be a hardware issue?

Interestingly the monitor seems to work looking at the COM port and when I press Reset on the board the boars seems to respond without any errors. I can connect to the http server from my mobile

Monitor out attached
_______________________________________
Arduino: 1.8.10 (Windows 10), Board: "WeMos D1 R1, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, All Flash Contents, 921600"

Executable segment sizes:

IROM : 227612 - code in flash (default or ICACHE_FLASH_ATTR)

IRAM : 26776 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)

DATA : 1252 ) - initialized variables (global, static) in RAM/HEAP

RODATA : 672 ) / 81920 - constants (global, static) in RAM/HEAP


BSS : 24880 ) - zeroed variables (global, static) in RAM/HEAP


Sketch uses 256312 bytes (24%) of program storage space. Maximum is 1044464 bytes.
Global variables use 26804 bytes (32%) of dynamic memory, leaving 55116 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.8
Serial port COM4
Connecting....
Chip is ESP8266EX
Features: WiFi
WARNING: Detected crystal freq 20.39MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?
Crystal is 26MHz
MAC: 00:08:ff:00:00:00
Uploading stub...
Running stub...
Traceback (most recent call last):
File "C:\Users\tfmei\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3/tools/upload.py", line 65, in <module>
esptool.main(cmdline)
File "C:/Users/tfmei/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2909, in main
esp = esp.run_stub()
File "C:/Users/tfmei/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 637, in run_stub
p = self.read()
File "C:/Users/tfmei/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 292, in read
return next(self._slip_reader)
File "C:/Users/tfmei/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2057, in slip_reader
raise FatalError('Invalid head of packet (0x%s)' % hexify(b))
esptool.FatalError: Invalid head of packet (0x46)
esptool.FatalError: Invalid head of packet (0x46)
User avatar
By Kasey00
#85694
Thomas Meier wrote:Hi guys,

just starting out on the ESP8266 platform so forgive my ignorance on what might be obvious... :)

After being able to successfully compile and upload the blink sketch on a WeMos R1 D1 I'm now getting error messages for any sketch.

Now getting the message "esptool.FatalError: Invalid head of packet (0x46)"

Scanning through the log, what caught my attention is the message about the crystal frequency...

WARNING: Detected crystal freq 20.39MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?
Crystal is 26MHz

Could this be a hardware issue?

Interestingly the monitor seems to work looking at the COM port and when I press Reset on the board the boars seems to respond without any errors. I can connect to the http server from my mobile

Monitor out attached
_______________________________________
Arduino: 1.8.10 (Windows 10), Board: "WeMos D1 R1, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, All Flash Contents, 921600"

Executable segment sizes:

IROM : 227612 - code in flash (default or ICACHE_FLASH_ATTR)

IRAM : 26776 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)

DATA : 1252 ) - initialized variables (global, static) in RAM/HEAP

RODATA : 672 ) / 81920 - constants (global, static) in RAM/HEAP


BSS : 24880 ) - zeroed variables (global, static) in RAM/HEAP


Sketch uses 256312 bytes (24%) of program storage space. Maximum is 1044464 bytes.
Global variables use 26804 bytes (32%) of dynamic memory, leaving 55116 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.8
Serial port COM4
Connecting....
Chip is ESP8266EX
Features: WiFi
WARNING: Detected crystal freq 20.39MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?
Crystal is 26MHz
MAC: 00:08:ff:00:00:00
Uploading stub...
Running stub...
Traceback (most recent call last):
File "C:\Users\tfmei\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3/tools/upload.py", line 65, in <module>
esptool.main(cmdline)
File "C:/Users/tfmei/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2909, in main
esp = esp.run_stub()
File "C:/Users/tfmei/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 637, in run_stub
p = self.read()
File "C:/Users/tfmei/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 292, in read
return next(self._slip_reader)
File "C:/Users/tfmei/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2057, in slip_reader
raise FatalError('Invalid head of packet (0x%s)' % hexify(b))
esptool.FatalError: Invalid head of packet (0x46)
esptool.FatalError: Invalid head of packet (0x46)


This is most-times a hardware issue (USB port or cables) or a driver issue. The core repo is not the appropriate place to get help for these kinds of things.