Code Monkey home page Code Monkey logo

ltchiptool's Issues

Unknown bootloader CRC - 0x2739019F - please report this on GitHub issues!

Hello,

reporting this issue with a supposedly bk72xx clone chip labled as cc8000.

I was able to download the firmware from the chip but got the above warning for the bootloader crc

Result of ltchiptool -v flash info bk72xx:

D: Found Local data snapshot (v1.5.1) - /usr/local/lib/python3.11/dist-packages/ltchiptool
I: Available COM ports:
I: |-- ttyUSB0 - CP2102 USB to UART Bridge Controller - CP2102 USB to UART Bridge Controller - Silicon Labs (10C4/EA60)
I: |   |-- Selecting this port. To override, use -d/--device
I: |-- ttyS0 - ttyS0
I: Connecting to 'Beken 72xx' on /dev/ttyUSB0 @ 115200
D: Linking: stage 0
W: Unknown bootloader CRC - 0x2739019F - please report this on GitHub issues!
D: Reading 4k page at 0x011000 (0.00%)
D: BK72xx connected - protocol: BASIC_BEKEN, chip: None, bootloader: None, chip ID: None, boot version: None
D: Flash size - detecting...
D:  - Checking wraparound at 0x211000
D: Flash size detected - 0x200000
I: |-- Success! Chip info: Unknown
I: Reading chip info...
I: Chip: Unknown
I: +-----------------------+--------------+
I: | Name                  | Value        |
I: +-----------------------+--------------+
I: | Protocol Type         | BASIC_BEKEN  |
I: | Chip Type             | Unrecognized |
I: | Bootloader Type       | Unrecognized |
I: | Chip ID               | N/A          |
I: | Boot Version String   | N/A          |
I: |                       |              |
I: | Flash Size (detected) | 2 MiB        |
I: +-----------------------+--------------+
I: |-- Finished in 1.953 s

Thanks

Segmentation fault in Fedora 39

Hi, thanks for your hard work. It is appreciated.

I am wanting to flash a module using my linux laptop. But I am hitting an assertion here.

[bouke@Slimbook ~]$ ltchiptool -vvv gui
22:31:53: Debug: Adding duplicate image handler for 'Windows bitmap file'
22:31:53: Debug: Adding duplicate animation handler for '1' type
22:31:53: Debug: Adding duplicate animation handler for '2' type
D: Found Local data snapshot (v1.4.1) - /home/bouke/.local/lib/python3.12/site-packages/ltchiptool
D: Using v1.4.1 (/home/bouke/.local/lib/python3.12/site-packages/ltchiptool) as default
D: Using selector: EpollSelector

(ltchiptool:58704): Gtk-CRITICAL **: 22:31:53.843: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
D: Started DeviceWatcher
Segmentation fault (core dumped)

Using Fedora 39 and using all pypi packages. The GUI first starts normally, but gets this segmentation fault when switching tabs.
Using v4.10.1

Would appreciate if you could take a look. (As a suggestion maybe consider a flatpak in the future?)

question - need socket interface

the chips i need to flash are soldered onto their power supplies - as in most of the LED bulbs i can find around here.

i have built a wifi linked flashed using an esp8266 chip, provides a telnet service direct to the UART, and i have rewritten the hid_download_py scripts to operate over sockets, instead of serial, and all of this works quite well, and can be powered by the supply on the target board.

could itchiptool be converted to operate over wifi socket 23?

i presume it can - should i do the changes, and would these be useful to you?

ltchiptool.gui.base.zc is deprecated ...

When I launch v4.11.1 of Ltchiptool on Windows 10, I get this warning (in yellow text):

W: PyInstaller\loader\pyimod02_importers.py:419: UserWarning: ltchiptool.gui.base.zc is deprecated, migrate to ltchiptool.gui.mixin.zc

Is that important and what should I do to satisfy/fix the warning?

v4.0.0a2 'NoneType' object has no attribute 'get-uf2_ctx' (Windows 10)

I am working with RTL8710BN (AmebaZ) and get this error when using the ltchiptool in Windows 10 with FTDI serial cable connected.
Unable to get this working, so I'll move back to my Linux machine and update the tools there.

I [      0.150] (+0.135s) Loaded settings from C:\Users\brade\AppData\Roaming\ltchiptool\config.json
D [      0.152] (+0.002s) Started PortWatcher
I [      0.360] (+0.208s) Found new device: COM9 - USB Serial Port (COM9) - VID=0403 (FTDI), PID=6001 
I [      0.365] (+0.005s) Found new device: COM3 - Intel(R) Active Management Technology - SOL (COM3) - HWID=PCI\VEN_8086&DEV_8C3D&SUBSYS_221117AA&REV_04\3&33FD14CA&0&B3
E [     33.374] (+33.009s) AttributeError: 'NoneType' object has no attribute 'get_uf2_ctx'
E [    285.473] (+252.100s) |-- File "ltchiptool\gui\utils.py", line 23, in <lambda>
E [    285.474] (+0.001s) |-- File "ltchiptool\gui\panels\flash.py", line 485, in on_start_click

image

v4.11.0 throws errors ...

When I try to use version 4.11.0 on Windows 11 to "Get Chip Info", this is the error I get:

ModuleNotFound

The previous version 4.10.2 will "Get Chip Info" and "Read Flash", but it won't "Write Flash" - instead I get this error:

no response received

I am not having much luck, am I ...

Please let me know if you need more information?
Dennis

Help with a Midea SmartKit Dongle

My Midea dehumidifier came with a WiFi dongle, the case reads EU-SK-105.
It has a USB connector, but the data lines are just UART TTL lines to another board. Those are apparently 5V.

It's rather tiny, not that readable and I don't have a nice cam around, but apparently it has a RTL8720C:
Midea SmartKit back
Midea SmartKit front
Midea SmartKit mcu

If I attach a 3.3V CH341 UART TTL to LOG_TX/RX I can read from and write to it:

== Rtl8710c IoT Platform ==
Chip VID: 5, Ver: 3
ROM Version: v3.0

== Boot Loader ==
Nov 30 2020:20:11:23

Boot Loader <==

== RAM Start ==
Build @ 17:50:15, Dec  2 2022

$8710c>
Initializing WIFI ...
WIFI initialized
count:15, interval:8

init_thread(57), Available heap 0x154c0

#
#
#help

WLAN AT COMMAND SET:
==============================
1. Wlan Scan for Network Access Point
   # ATWS
2. Connect to an AES AP
   # ATW0=SSID
   # ATW1=PASSPHRASE
   # ATWC
3. Create an AES AP
   # ATW3=SSID
   # ATW4=PASSPHRASE
   # ATW5=CHANNEL
   # ATWA
4. Ping
   # ATWI=xxx.xxx.xxx.xxx

(note that the initial prompt reads 8710c)

But I'm not sure how to enter download mode, the flash info ambz2 help reads strapping pin (GPIO 0 / PA00) has to be pulled *to 3.3V*. Since that a current and I try to salvage that thing instead of destroying it.... any idea which contacts I have to short?

Thanks!

Unable to convert some datapoints.

Hi,
Thanks for the amazing software.
I have a 2 channel tuya device with built-in rf module. https://www.primezen.in/products/zen-2c5w/
I successfully extracted the firmware from the device.
While analyzing using ltchiptool, it says tuyamcu found and needs to download schema.
It downloads a schema which is unable to convert few datapoints.
Attached is an image for better understanding.
Screenshot (326)

3 datapoints viz,
102 - sends a pairing command to internal mcu which puts rf device in pairing mode to pair a rf switch.
103 - sends a clear pairing command to internal mcu which clears pairing information from rf device.
116 - switches on both relays at once.

I have two questions.

  1. How do i make above three work.
  2. How to get new schema since the schema used by ltchiptool to poll data differs from the schema available in my device as stated in the image.

Attached below is the firmware binary for your reference.
ltchiptool_dump_2023-12-20_23-13-00.zip

Kindly help.
Thanks.

Microsoft Defender detects trojan in newest Release

Hello,

I wanted to try your newest release, but my Microsoft Defender immediatly raised an alarm and deleted the downloadet file.

It shows the following:

image

The previous Release download shows no problems at all.

Just wanted to make you aware of this. Maybe it is false positive but maybe not. I will always trust defender first ;)

Hung in ambztool for RTL8710BX

I am trying to make a dump of a RTL8710BX from the Govee Lynx Dream String Lights (H7021) to make a backup before putting esphome on the chip. I am able to get into boot mode but end up getting stuck on 'resp += self.read()' in ambztool.py.

LOG:

$ sudo ltchiptool -vvv flash read ambz govee-h7021-stock.bin -d /dev/ttyUSB1                                          
D: Found PlatformIO Package (v1.6.0) - /root/.platformio/platforms/libretiny
D: Found Local data snapshot (v1.5.1) - /home/brian/projects/govee/h7021/venv/lib/python3.12/site-packages/ltchiptool
I: Connecting to 'Realtek AmebaZ' on /dev/ttyUSB1 @ 1500000
D: Linking: stage 0                                         
V: -- UART: Port baudrate set to 1500000
V: -- UART: Port baudrate set to 1500000
V: -- UART: Port baudrate set to 1500000
V: -- UART: Port baudrate set to 1500000
D: Linking: stage 1                                         
V: -- UART: Port baudrate set to 1500000
V: -- UART: Port baudrate set to 1500000
D: Linking: stage 2                                         
V: -- UART: Port baudrate set to 1500000
V: -- UART: Port baudrate set to 1500000
V: -- UART: Port baudrate set to 1500000
V: -- UART: Port baudrate set to 1500000
D: Linking: stage 3                                         
I: Connect UART2 of the Realtek chip to the USB-TTL adapter: 
I:                                                          
I:     --------+        +---------------------
I:          PC |        | RTL8710B            
I:     --------+        +---------------------
I:          RX | ------ | TX2 (Log_TX / PA30)                                                                            
I:          TX | ------ | RX2 (Log_RX / PA29)               
I:             |        |                                                                                                
I:         GND | ------ | GND                               
I:     --------+        +---------------------                                                                           
I:                                                                                                                       
I: Using a good, stable 3.3V power supply is crucial. Most flashing issues
I: are caused by either voltage drops during intensive flash operations,
I: or bad/loose wires.                                      
I:                                                          
I: The UART adapter's 3.3V power regulator is usually not enough. Instead,
I: a regulated bench power supply, or a linear 1117-type regulator is recommended.
I:                                                          
I: In order to flash the chip, you need to enable download mode.
I: This is done by pulling CEN to GND briefly, while still keeping the TX2 pin
I: connected to GND.                                        
I:                                                          
I: Do this, in order:                                       
I:  - connect CEN to GND                                    
I:  - connect TX2 to GND                                    
I:  - release CEN from GND                                  
I:  - release TX2 from GND                                                                                               
V: -- UART: Port baudrate set to 1500000                                                                                 
V: -- UART: Port baudrate set to 1500000                                                                                 
V: -- UART: Port baudrate set to 1500000      
D: XMODEM: transmitting to 0x10002000
V: push_timeout(1.0)
D: Begin start sequence, packet_size=1024
D: Begin start sequence, packet_size=1024
D: standard checksum requested (NAK).
D: standard checksum requested (NAK).
D: send: block 1
D: send: block 1
D: send: at EOF
D: send: at EOF
D: sending EOT, awaiting ACK
D: sending EOT, awaiting ACK
I: Transmission successful (ACK received).
I: Transmission successful (ACK received).
V: pop_timeout()
V: push_timeout(0.1)

Here it will hang indefinitely without timing out on line:

I started to debug it and found that it will loop 2 times before getting stuck. The value of resp is b'\x18\rxmodem_log_open \n\r\rclose xModem Transfer ...\r\n\r'.

Any idea if I am doing something wrong? It seems like xmodem is being closed but I'm not too familiar with what normally occurs.

Problems flashing a new rtl8710bx board

I'm working on a plug HPPA11SW that has a board in it with a rtl8710bx chip. I was able to use the ltchiptool to read the flash no problem. But writing the flash sends information and then errors "Failed to write to 0x80000000" or whatever address I am writing to. I ran it with --dump-serial the last lines are:

S: <- TX: FF FF FF FF FF FF FF 1A                           ........
S: -> RX: b'\x15'
E: ValueError: Failed to write to 0x8000000
E: |-- File "/usr/local/lib/python3.10/dist-packages/ltchiptool/soc/ambz/flash.py", line 148, in flash_write_raw

Note: I can write using the amebaz-image-tool-v2.2.

The board is an unsupported one, that I am trying to get working. If it is helpful it is shown in FCC ID filings 2AB2QHPPA11SZ and 2AB2QHPPA11SZ (it is the same internal board different plug) with markings RL-M, E350220. M-LWK32F510D. Later I was going to look for help adding it to libretiny, but first I wanted to get the ltchiptool working.

Failed to write flash

Hi, I'm trying to flash my first CB3S module with ESPhome firmware. It is a tiny switch module with installed with Matter firmware.

Chip info
image

Flashing the ESPhome FW always fails:

W: Erasing failure @ 0x11000 (Erase failed - flash protected; found non-0xFF bytes @ 0x11000), retrying (attempt 0)
W: Erasing failure @ 0x11000 (Erase failed - flash protected; found non-0xFF bytes @ 0x11000), retrying (attempt 1)
W: Erasing failure @ 0x11000 (Erase failed - flash protected; found non-0xFF bytes @ 0x11000), retrying (attempt 2)
W: Erasing failure @ 0x11000 (Erase failed - flash protected; found non-0xFF bytes @ 0x11000), retrying (attempt 3)
E: An error has occurred
E: ValueError: Erase failed - flash protected; found non-0xFF bytes @ 0x11000
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltchiptool\gui\work\flash.py", line 73, in run_impl
E: |-- File "ltchiptool\gui\work\flash.py", line 126, in _do_write
E: |-- File "ltchiptool\soc\bk72xx\flash.py", line 314, in flash_write_uf2
E: |-- File "ltchiptool\util\streams.py", line 177, in update_from
E: |-- File "bk7231tools\serial\cmd_hl_flash.py", line 185, in program_flash
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 229, in flash_erase_block
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 209, in do_erase_verify

I also tried flashing the Bootloader dump firmware, but it also fails:

W: Writing 4k failure @ 0x132000 (Chip CRC value F154670A does not match calculated CRC value 5AEB8451), retrying (attempt 0)
W: Writing 4k failure @ 0x132000 (Chip CRC value F154670A does not match calculated CRC value 5AEB8451), retrying (attempt 1)
W: Writing 4k failure @ 0x132000 (Chip CRC value F154670A does not match calculated CRC value 5AEB8451), retrying (attempt 2)
W: Writing 4k failure @ 0x132000 (Chip CRC value F154670A does not match calculated CRC value 5AEB8451), retrying (attempt 3)
E: An error has occurred
E: ValueError: Chip CRC value F154670A does not match calculated CRC value 5AEB8451
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltchiptool\gui\work\flash.py", line 73, in run_impl
E: |-- File "ltchiptool\gui\work\flash.py", line 161, in _do_write
E: |-- File "ltchiptool\soc\bk72xx\flash.py", line 286, in flash_write_raw
E: |-- File "ltchiptool\util\streams.py", line 177, in update_from
E: |-- File "bk7231tools\serial\cmd_hl_flash.py", line 192, in program_flash
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 162, in flash_write_4k
E: |-- File "bk7231tools\serial\cmd_ll_chip.py", line 75, in check_crc

What can be wrong? Do I need to somehow unprotect the FLASH? Or use some other tool to erase/flash the FW?

Tuya Storage decryption

Is it possible to decrypt the Tuya Storage partition?
I am certain it contains the device ID and possibly other information as flashing a Tuya storage partition from one device to another changes said device ID.
It would be great to be able to edit and rebuild this partition in order to repair devices.
Attached my flash.bin (added .txt in order to upload)

flash.bin.txt

Error when creating uf2 file from OpenBK firmware

Hi,

I have a device that I will like to flash with OpenBK firmware.
On my Ubuntu I have downloaded ltchiptool and did:

python3 -m ltchiptool uf2 write -b cb2s -o openbkt.uf2 OpenBK7231N_1.17.205.rbl=device:download

and a few other variants of that command. I always get this error:

Error: Invalid value for '-b' / '--board': Board cb2s does not exist

I am not sure what I am doing wrong. Can you please help?

Flashing Tuya WR2

Hello!

I see WR2 module is supported by this project; but has anyone succeeded flashing it ? I've tried everything but failed to put it in flashing mode.

So far, the described procedure is:

  1. Connect CEN to ground
  2. Connect TXD to ground
  3. Release CEN
  4. Release TXD

And no success! As soon as i release CEN the module simply boots up into stock firmware. I determine this by the fact that the smart plug reacts on button press (it should frob the relay, it does).

While playing i've noticed that CEN is only obeyed on powerup. If i short it to GND, then powerup, the device will sit idle until i release CEN. If i connect it to GND after the bootup, simply nothing happens, the module doesn't reset.

Am i doing something wrong ? I've re-read the official flashing procedure; they suggest to power up the module while the pins are held to ground; i did; again no response.

Problems using ltchiptool 4.6.0 to write kickstart-bk7231t-2023-08-29.uf2

Get following error when writing flash with ltchiptool 4.6.0 and file : kickstart-bk7231t-2023-08-29.uf2

S [ 13.255] (+0.000s) -> RX: FF .
S [ 13.255] (+0.000s) -> RX: b'\x01'
S [ 13.255] (+0.000s) -> RX: E0 .
S [ 13.255] (+0.000s) -> RX: FC .
S [ 13.255] (+0.000s) -> RX: F4 .
S [ 13.255] (+0.000s) -> RX: b'\x06\x00\x07'
S [ 13.255] (+0.000s) -> RX: b'\x00\x00\x10!\x00'
S [ 13.553] (+0.299s) <- TX: 01 E0 FC FF F4 06 00 0F 20 00 20 21 00 ........ . !.
E [ 14.563] (+1.009s) ValueError: No response received
E [ 59.191] (+44.628s) |-- File "ltchiptool\gui\work\base.py", line 24, in run
E [ 59.191] (+0.000s) |-- File "ltchiptool\gui\work\flash.py", line 58, in run_impl
E [ 59.191] (+0.000s) |-- File "ltchiptool\gui\work\flash.py", line 109, in do_write
E [ 59.191] (+0.000s) |-- File "ltchiptool\soc\bk72xx\flash.py", line 204, in flash_write_uf2
E [ 59.191] (+0.000s) |-- File "ltchiptool\util\streams.py", line 156, in update_from
E [ 59.191] (+0.000s) |-- File "bk7231tools\serial_init
.py", line 149, in program_flash
E [ 59.191] (+0.000s) |-- File "bk7231tools\serial\cmd_flash.py", line 216, in flash_erase_block
E [ 59.191] (+0.000s) |-- File "bk7231tools\serial\protocol.py", line 210, in command

programing setup works tested with bk_writer1.60 and there firmware works but i like to test kickstart.
only deference i see is the communication speed of 1000000 and not 115200

Avast detects virus in ltchiptool-v4.6.0.exe

The exe is detected as containing Win64:Evo-gen trojen. Couldnt find any other cases with quick google search.

Avast 23.8.6078 (build 23.8.8416.794)
Definition database: 231002-0

Failed to read flash WR3L module

I have a couple of WR3L modules. I've tried reading the flash from them using ltchiptool , but get a funny error once the chip is in download mode:

[ENV: ltchiptool-venv] jrosenth ~ % ltchiptool --verbose flash read ambz ~/bak-009s.bin
D: Found PlatformIO Package (v1.0.2) - /home/jrosenth/.platformio/platforms/libretiny
D: Found Local data snapshot (v1.1.0) - /home/jrosenth/ltchiptool-venv/lib/python3.10/site-packages/ltchiptool
I: Available COM ports:
I: |-- ttyUSB0 - FT232R USB UART - FT232R USB UART - FTDI (0403/6001)
I: |   |-- Selecting this port. To override, use -d/--device
I: |-- ttyS4 - n/a
I: Connecting to 'Realtek AmebaZ' on /dev/ttyUSB0 @ 1500000
D: Linking: stage 0
D: Linking: stage 1
D: Linking: stage 2
D: Linking: stage 3
I: Connect UART2 of the Realtek chip to the USB-TTL adapter:
I: 
I:     --------+        +-------------------------------
I:          PC |        | RTL8710B                      
I:     --------+        +-------------------------------
I:          RX | ------ | TX2 (Log_TX / PA30)           
I:          TX | ------ | RX2 (Log_RX / PA29)           
I:         RTS | ------ | CEN (or RST, optional)        
I:         DTR | ------ | TX2 (Log_TX / PA30, optional) 
I:             |        |                               
I:         GND | ------ | GND                           
I:     --------+        +-------------------------------
I:  
I: Make sure to use a good 3.3V power supply, otherwise the adapter might
I: lose power during chip reset. Usually, the adapter's power regulator
I: is not enough and an external power supply is needed (like AMS1117).
I:  
I: If you didn't connect RTS and DTR, you need to put the chip in download
I: mode manually. This is done by connecting CEN to GND, while holding TX2 (Log_TX)
I: to GND as well. After doing that, you need to disconnect TX2 from GND.
I:  
I: If the download mode is enabled, you'll see a few garbage characters
I: printed to the serial console every second.
I: |-- Success! Chip info: Realtek RTL87xxB
I: Reading 2 MiB @ 0x0 to '/home/jrosenth/bak-009s.bin'
  [----------------------------------------------------------------]    0%
E: ValueError: Failed to read from 0x0
E: |-- File "/home/jrosenth/ltchiptool-venv/lib/python3.10/site-packages/ltchiptool/soc/ambz/flash.py", line 132, in flash_read_raw

This is using an external 3.3V supply. For adapters, I've tried an FTDI 2142C, and a FTDI 2242C. Any advice?

I'm using GPIO_A29 and GPIO_A30 for the UART.

Chip Type - Unrecognized (0x48405F31)

I bought some switches with CB2S chips and BK7231N's on them but am unable to flash them.

Trying to ID the chips it sends back the following.....

ltchiptool -v flash info bk72xx

: |-- Success! Chip info: None
I: Reading chip info...
I: Chip: None
I: +--------------------+---------------------------+
I: | Name               | Value                     |
I: +--------------------+---------------------------+
I: | Chip Type          | Unrecognized (0x48405F31) |
I: | Bootloader Version | Unspecified               |
I: | Protocol Type      | BASIC_BEKEN               |
I: +--------------------+---------------------------+
I: |-- Finished in 5.271 s

9F21D9F6-F432-4CDF-8B99-D36055810003_1_105_c

Error writing ESPhome kickstart uf2 with ltchiptool v4.11.1

I'm attempting to flash with kickstart-bk7231n-2023-12-15.uf2
and get this reported error after it has flashed all the way to 100%

W: The current command timeout of 1.0 second(s) is too low for reading 905216 bytes CRC. Increasing to 3 second(s).

I don't see the Access Point advertised over wifi as expected while still connected to the flashing rig, so presume it has not worked.

There were no issues reading the existing firmware and generating YAML from that dumped firmware so the connection looks good.

Firmware Dump Analysis

I have a firmware file I have read from a device running RTL8710, but it can't be analyzed with ltchiptool.
I receive the following error:

`E: UPK: The chosen device doesn't contain pin configuration.

Possible causes:

  • it has vendor-specific firmware
  • it uses TuyaMCU (report error if that's the case!)

Auto-generating ESPHome YAML is not possible.
`

Which is fine, makes sense because this device is unable to be flashed using tuya-cloudcutter.

I have flashed it with a blank config and am able to access the web server, so OTA updates via ESPHome should be possible.

How can the firmware be analyzed to find the correct configuration for this device?

Unknown bootloader CRC - 0x0939FCDA - please report this on GitHub issues

This is a Tongou TO-Q-SY1-JWT DIN rail power switch/meter: https://www.elektroda.com/rtvforum/topic3990985.html

It had already stopped working, so I got brave and opened it up. Appear to flash firmware just fine (ESPHome, then OpenBK7231N_QIO_1.17.654.bin

|-- Unknown bootloader CRC - 0x0939FCDA - please report this on GitHub issues!
|   |-- Success! Chip info: BK7231N
|-- Writing '/home/dwmw/Downloads/OpenBK7231N_QIO_1.17.654.bin'
|   |-- Start offset: 0x11000 (auto-detected)
|   |-- Write length: 1.1 MiB (auto-detected)
|   |-- Skipped data: 68 KiB (auto-detected)
  [################################################################]  100%          |-- The current command timeout of 1.0 second(s) is too low for reading 1150976 bytes CRC. Increasing to 3 second(s).

|   |-- Finished in 61.297 s

Still doesn't work afterwards. The LEDs come on but there's no apparent WiFi activity, nothing on the serial port if I configure ESPHome to use UART1. But it was like that before with the Tuya firmware (although it was only the status LED that came on, IIRC, while now both do).

Will order a new one to sacrifice and see if that one works.

Error running ltchiptool gui under macOS 13.6.1

I'm trying to use ltchiptool as part of following this guide but I'm having trouble getting ltchiptool to run on my Mac (I see it's "untested" according to the docs, so perhaps this is useful feedback). FWIW, I'm on macOS 13.6.1 (22G313), I have python 3.11.6 via homebrew, and I installed wxPython and ltchiptool, but got this error when starting the gui. I tried both 4.2.3 as used in the guide, and then the current latest version (4.7.0), and got two different errors. The full output is below.

Any ideas how to get the GUI to work under macOS?

Thanks a lot in advance!

OhmBookPro13:~/Downloads > pip3 install wxpython
Collecting wxpython
  Using cached wxPython-4.2.1-cp311-cp311-macosx_10_10_universal2.whl.metadata (2.9 kB)
Requirement already satisfied: pillow in /usr/local/lib/python3.11/site-packages (from wxpython) (10.1.0)
Requirement already satisfied: six in /usr/local/lib/python3.11/site-packages (from wxpython) (1.16.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.11/site-packages (from wxpython) (1.26.1)
Using cached wxPython-4.2.1-cp311-cp311-macosx_10_10_universal2.whl (31.5 MB)
Installing collected packages: wxpython
Successfully installed wxpython-4.2.1
OhmBookPro13:~/Downloads > pip3 install ltchiptool==4.2.3
Collecting ltchiptool==4.2.3
  Using cached ltchiptool-4.2.3-py3-none-any.whl.metadata (3.8 kB)
Requirement already satisfied: bitstruct<9.0.0,>=8.17.0 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool==4.2.3) (8.19.0)
Requirement already satisfied: bk7231tools<2.0.0,>=1.3.6 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool==4.2.3) (1.4.0)
Requirement already satisfied: click<9.0.0,>=8.1.3 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool==4.2.3) (8.1.7)
Requirement already satisfied: colorama<0.5.0,>=0.4.5 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool==4.2.3) (0.4.6)
Requirement already satisfied: hexdump<4.0,>=3.3 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool==4.2.3) (3.3)
Requirement already satisfied: importlib-metadata<5.0.0,>=4.12.0 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool==4.2.3) (4.13.0)
Requirement already satisfied: prettytable<4.0.0,>=3.3.0 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool==4.2.3) (3.9.0)
Requirement already satisfied: py-datastruct<0.5.0,>=0.4.0 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool==4.2.3) (0.4.0)
Requirement already satisfied: pycryptodomex<4.0.0,>=3.15.0 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool==4.2.3) (3.19.0)
Requirement already satisfied: semantic-version<3.0.0,>=2.10.0 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool==4.2.3) (2.10.0)
Requirement already satisfied: xmodem<0.5.0,>=0.4.6 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool==4.2.3) (0.4.7)
Requirement already satisfied: pyserial<4.0,>=3.5 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from bk7231tools<2.0.0,>=1.3.6->ltchiptool==4.2.3) (3.5)
Requirement already satisfied: zipp>=0.5 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from importlib-metadata<5.0.0,>=4.12.0->ltchiptool==4.2.3) (3.17.0)
Requirement already satisfied: wcwidth in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from prettytable<4.0.0,>=3.3.0->ltchiptool==4.2.3) (0.2.9)
Using cached ltchiptool-4.2.3-py3-none-any.whl (159 kB)
Installing collected packages: ltchiptool
Successfully installed ltchiptool-4.2.3
OhmBookPro13:~/Downloads > python3 -m ltchiptool gui
22:34:42: Debug: Adding duplicate image handler for 'Windows bitmap file'
22:34:42: Debug: Adding duplicate animation handler for '1' type
22:34:42: Debug: Adding duplicate animation handler for '2' type
Fatal Python error: PyGILState_Release: thread state 0x105888d28 must be current when releasing
Python runtime state: initialized

Current thread 0x00007ff84f543700 (most recent call first):
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/gui/colors.py", line 128 in apply
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/gui/panels/log.py", line 206 in OnPaletteChanged
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/gui/main.py", line 324 in palette
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/gui/main.py", line 187 in SetSettings
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/gui/main.py", line 242 in OnShow
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/util/../../ltchiptool/gui/__main__.py", line 30 in gui_entrypoint
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/util/../../ltchiptool/gui/__main__.py", line 48 in cli
  File "/Users/cohm/Library/Python/3.11/lib/python/site-packages/click/core.py", line 783 in invoke
  File "/Users/cohm/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1434 in invoke
  File "/Users/cohm/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1688 in invoke
  File "/Users/cohm/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1078 in main
  File "/Users/cohm/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1157 in __call__
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/__main__.py", line 112 in cli
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/__main__.py", line 119 in <module>
  File "<frozen runpy>", line 88 in _run_code
  File "<frozen runpy>", line 198 in _run_module_as_main

Extension modules: wx._core, wx._adv, wx._xml, wx._xrc, wx._dataview (total: 5)
Abort trap: 6
OhmBookPro13:~/Downloads > python3 --version
Python 3.11.6
OhmBookPro13:~/Downloads > pip3 uninstall ltchiptool       
Found existing installation: ltchiptool 4.2.3
Uninstalling ltchiptool-4.2.3:
  Would remove:
    /usr/local/bin/ltchiptool
    /usr/local/lib/python3.11/site-packages/ltchiptool-4.2.3.dist-info/*
    /usr/local/lib/python3.11/site-packages/ltchiptool/*
    /usr/local/lib/python3.11/site-packages/ltctplugin/base/*
    /usr/local/lib/python3.11/site-packages/uf2tool/*
Proceed (Y/n)? Y
  Successfully uninstalled ltchiptool-4.2.3
OhmBookPro13:~/Downloads > pip3 install ltchiptool       
Collecting ltchiptool
  Using cached ltchiptool-4.7.0-py3-none-any.whl.metadata (3.8 kB)
Requirement already satisfied: bitstruct<9.0.0,>=8.1.1 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (8.19.0)
Requirement already satisfied: bk7231tools<2.0.0,>=1.3.6 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (1.4.0)
Requirement already satisfied: click<9.0.0,>=8.1.3 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (8.1.7)
Requirement already satisfied: colorama<0.5.0,>=0.4.5 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (0.4.6)
Requirement already satisfied: hexdump<4.0,>=3.3 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (3.3)
Requirement already satisfied: importlib-metadata in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (4.13.0)
Requirement already satisfied: prettytable<4.0.0,>=3.3.0 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (3.9.0)
Requirement already satisfied: py-datastruct<0.5.0,>=0.4.0 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (0.4.0)
Requirement already satisfied: pycryptodomex<4.0.0,>=3.9.9 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (3.19.0)
Requirement already satisfied: semantic-version<3.0.0,>=2.10.0 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (2.10.0)
Requirement already satisfied: xmodem<0.5.0,>=0.4.6 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (0.4.7)
Requirement already satisfied: zeroconf<1,>=0 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from ltchiptool) (0.123.0)
Requirement already satisfied: pyserial<4.0,>=3.5 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from bk7231tools<2.0.0,>=1.3.6->ltchiptool) (3.5)
Requirement already satisfied: wcwidth in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from prettytable<4.0.0,>=3.3.0->ltchiptool) (0.2.9)
Requirement already satisfied: ifaddr>=0.1.7 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from zeroconf<1,>=0->ltchiptool) (0.2.0)
Requirement already satisfied: zipp>=0.5 in /Users/cohm/Library/Python/3.11/lib/python/site-packages (from importlib-metadata->ltchiptool) (3.17.0)
Using cached ltchiptool-4.7.0-py3-none-any.whl (163 kB)
Installing collected packages: ltchiptool
Successfully installed ltchiptool-4.7.0
OhmBookPro13:~/Downloads > python3 -m ltchiptool gui
22:41:08: Debug: Adding duplicate image handler for 'Windows bitmap file'
22:41:08: Debug: Adding duplicate animation handler for '1' type
22:41:08: Debug: Adding duplicate animation handler for '2' type
Fatal Python error: PyGILState_Release: thread state 0x10617dd28 must be current when releasing
Python runtime state: initialized

Thread 0x0000700004db5000 (most recent call first):
  File "/usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/selectors.py", line 566 in select
  File "/usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 1884 in _run_once
  File "/usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 607 in run_forever
  File "/Users/cohm/Library/Python/3.11/lib/python/site-packages/zeroconf/_core.py", line 223 in _run_loop
  File "/usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 982 in run
  File "/usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1045 in _bootstrap_inner
  File "/usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1002 in _bootstrap

Current thread 0x00007ff84f543700 (most recent call first):
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/gui/colors.py", line 128 in apply
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/gui/panels/log.py", line 247 in OnPaletteChanged
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/gui/main.py", line 334 in palette
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/gui/main.py", line 194 in SetSettings
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/gui/main.py", line 252 in OnShow
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/util/../../ltchiptool/gui/__main__.py", line 32 in gui_entrypoint
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/util/../../ltchiptool/gui/__main__.py", line 50 in cli
  File "/Users/cohm/Library/Python/3.11/lib/python/site-packages/click/core.py", line 783 in invoke
  File "/Users/cohm/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1434 in invoke
  File "/Users/cohm/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1688 in invoke
  File "/Users/cohm/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1078 in main
  File "/Users/cohm/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1157 in __call__
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/__main__.py", line 122 in cli
  File "/usr/local/lib/python3.11/site-packages/ltchiptool/__main__.py", line 129 in <module>
  File "<frozen runpy>", line 88 in _run_code
  File "<frozen runpy>", line 198 in _run_module_as_main

Extension modules: wx._core, wx._adv, wx._xml, wx._xrc, zeroconf._utils.time, zeroconf._dns, zeroconf._protocol.outgoing, zeroconf._protocol.incoming, zeroconf._cache, zeroconf._record_update, zeroconf._updates, zeroconf._handlers.record_manager, zeroconf._services, zeroconf._services.info, zeroconf._services.registry, zeroconf._listener, zeroconf._handlers.answers, zeroconf._handlers.multicast_outgoing_queue, zeroconf._history, zeroconf._handlers.query_handler, zeroconf._services.browser, wx._dataview (total: 22)
Abort trap: 6
OhmBookPro13:~/Downloads > /usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 3 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.