BitMaker-hub / NerdMiner_v2

Improved version of first ESP32 NerdMiner
Other
1.37k stars 250 forks source link

ESP-WROOM-32 with UART CH9102X #266

Open PSLLSP opened 7 months ago

PSLLSP commented 7 months ago

I have new toy, ESP-WROOM-32 module; it is ESP-WROOM-32 with UART CH9102X, it has micro-USB connector and module has 30 pins, 2 buttons (BOOT, EN) and two small LED diodes (RED for power, BLUE is connected to GPIO).

I flashed ESP-WROOM-32 module with firmware v1.6.3 for ESP32-devkit

I see errors in console during device boot, Invalid pin selected:

--- Miniterm on /dev/ttyACM0  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jul 29 2019 12:21:46

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:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
NerdMiner v2 starting......
[   138][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected
E (132) gpio: gpio_set_level(226): GPIO output gpio_num error
[   141][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected
E (140) gpio: gpio_set_level(226): GPIO output gpio_num error
Mounting File System...
mounted file system
reading config file
Opened configuration file
...

It can mine at hasharate about 50 kHps, Blue LED flashes (mining status)...


This is boot log from ESP-WROOM-32 module, it has UART cp210x, 30 pin, 2 buttons (EN, BOOT), 2 small LEDs. It can mine, hashrate is about 50 kHps, blue LED blinks (mining status)...

It is interesting that errors related to GPIO pins are not there:

--- Miniterm on /dev/ttyUSB0  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_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:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
NerdMiner v2 starting......
No display driver initialized
Initializing...
SPIFS: Mounting File System...
SPIFS: Mounted
SPIFS: Loading config file
...

UPDATE. I updated firmware, I used esptool.py and flashed 4 images from github reporistory. I see errors after update:

--- Miniterm on /dev/ttyUSB0  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_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:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
NerdMiner v2 starting......
[   162][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected
E (130) gpio: gpio_set_level(226): GPIO output gpio_num error
[   165][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected
E (138) gpio: gpio_set_level(226): GPIO output gpio_num error
Mounting File System...
mounted file system
reading config file
Opened configuration file
...

This is the firmware, all 4 files were flashed with esptool.py:

user@ubuntu:~/NerdMiner_v2/bin/bin ESP32-devKit$ ls -l
total 2768
drwxrwxr-x  2 user user    4096 Dec 11 13:54 ./
drwxrwxr-x 11 user user    4096 Nov 30 07:50 ../
-rw-rw-r--  1 user user 1848400 Nov  6 16:53 0x10000_firmware.bin
-rw-rw-r--  1 user user   17488 Nov  6 16:53 0x1000_bootloader.bin
-rw-rw-r--  1 user user    3072 Nov  6 16:53 0x8000_partitions.bin
-rw-rw-r--  1 user user    8192 Nov  6 16:53 0xe000_boot_app0.bin

Firmware in git repository is not the same as firmware used by WebFlasher

Files in git repository:

$ md5sum 0x*.bin
d2ccd8b68260859296c923437d702786  0x1000_bootloader.bin
70007348574201233bc0cb17155e9d12  0x8000_partitions.bin
e6327541e2dc394ca2c3b3280ac0f39f  0xe000_boot_app0.bin
8ac4012b560888194fedecc32f3ca011  0x10000_firmware.bin

Files used by WebFlasher are the same except the main firmware, that has different md5 checksum (and is significantly shorter):

$ md5sum 0x10000_firmware.bin 
799c71b1b0f2292b67e77bac909997b6  0x10000_firmware.bin

$ ls -l 0x10000_firmware.bin 
-rw-rw-r-- 1 user user 968768 Nov 29 17:12 0x10000_firmware.bin

0x1000_bootloader.bin 0x8000_partitions.bin 0xe000_boot_app0.bin 0x10000_firmware.bin

When I flash firmware from the web, I do not see the error:

--- Miniterm on /dev/ttyUSB0  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
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:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
NerdMiner v2 starting......
No display driver initialized
Initializing...
SPIFS: Mounting File System...
SPIFS: Mounted
SPIFS: Loading config file
...

I miss explanation why I was flashing firmware from git repository. I have two modules with ESP-WROOM-32 and UART CH9102X. They look the same, they were bough with the same order. It is interesting, that MAC addresses are very different, like devices from different manufacturers. Other difference is that one device cannot be flashed with WebFlasher (I tried many times); that is why I start to use esptool.py flasher and files from git repository. I cannot explain, what is the difference, but one of modules just cannot be flashed with WebFlasher. The modules looks like the same device, no visible difference...


I am not sure why but maybe that may git was not updated. I missed one file.

$ md5sum 0x*.bin
8ac4012b560888194fedecc32f3ca011  0x10000_firmware.bin
799c71b1b0f2292b67e77bac909997b6  0x10000_firmware_v1.6.3.bin
d2ccd8b68260859296c923437d702786  0x1000_bootloader.bin
70007348574201233bc0cb17155e9d12  0x8000_partitions.bin
e6327541e2dc394ca2c3b3280ac0f39f  0xe000_boot_app0.bin

File 0x10000_firmware_v1.6.3.bin is the same as 0x10000_firmware.bin from the WebFlasher. Fiie 0x10000_firmware.bin in the git repository is different and it reports errors to the serial console...