lyusupov / SoftRF

:airplane: Multi-functional, compatible DIY general aviation proximity awareness system
GNU General Public License v3.0
777 stars 216 forks source link

wrong chip id 0xafd8 #125

Closed kolod1am closed 2 years ago

kolod1am commented 2 years ago

Hardware

20211122_145023

~/.local/bin/esptool.py --chip esp32 -p /dev/ttyUSB0 flash_id
esptool.py v3.2
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WDQ6-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:0a:c4:f7:e8:80
Uploading stub...
Running stub...
Stub running...
Manufacturer: 68
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...

Firmware version

SoftRF-firmware-v1.0.bin

Firmware settings

Does not apply.

Describe the bug

After writing SoftRF to the board, no WiFi SSID appears, no bluetooth device can be scanned. No wonder, as reading from ttyUSB0 gains:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
wrong chip id 0xafd8
wrong chip id 0xafd8
wrong chip id 0xafd8
wrong chip id 0xafd8
wrong chip id 0xafd8
wrong chip id 0xafd8
wrong chip id 0xafd8
wrong ch�ets Jul 29 2019 12:21:46

and running.

The board came with Meshtastic. It boots and the bluetooth device appears in smartphone. So I know that the board is operational. I wonder where message "wrong chip id" comes from as I cannot find it in SoftRF source code nor in the binary.

To Reproduce

~/.local/bin/esptool.py --chip esp32 -p /dev/ttyUSB0 write_flash 0x00000 ESP32/SoftRF-firmware-v1.0.bin

This is what esptool reported:

~/.local/bin/esptool.py --chip esp32 -p /dev/ttyUSB0  write_flash 0x00000 ESP32/SoftRF-firmware-v1.0.bin
flash 0x00000 ESP32/SoftRF-firmware-v1.0.bin
esptool.py v3.2
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WDQ6-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:0a:c4:f7:e8:80
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00085fff...
Compressed 548672 bytes to 394555...
Wrote 548672 bytes (394555 compressed) at 0x00000000 in 34.8 seconds (effective 126.0 kbit/s)...
Hash of data verified.

Expected behavior

SoftRF boots to operational state.

lyusupov commented 2 years ago

Reporter is trying to flash ESP32 SoC with firmware binary been built for ESP8266 SoC.

Resolution: invalid

kolod1am commented 2 years ago

Many thanks for your guidance. I have got ESP32 binary from ESP32 binaries location, unzipped the archive and did separate esptool write_flash command for each line in firmware.txt. In my case it was:

~/.local/bin/esptool.py --chip esp32 -p /dev/ttyUSB0  write_flash 0xe000  boot_app0.bin
~/.local/bin/esptool.py --chip esp32 -p /dev/ttyUSB0  write_flash 0x1000  bootloader_dio_80m.bin
~/.local/bin/esptool.py --chip esp32 -p /dev/ttyUSB0  write_flash 0x8000  SoftRF.ino.partitions.bin
~/.local/bin/esptool.py --chip esp32 -p /dev/ttyUSB0  write_flash 0x10000 SoftRF.ino.bin

Now SoftRF is up and running. I can see its WiFi ESSID.