dresden-elektronik / gcfflasher

GCFFlasher is the tool to program the firmware of dresden elektronik's Zigbee products.
BSD 3-Clause "New" or "Revised" License
34 stars 3 forks source link

[MacOS] Error flashing firmware #21

Closed dannyyy closed 3 months ago

dannyyy commented 3 months ago

I followed the steps on the Readme.md to build the gcfflasher tool. The build was (I guess) successful, as there were no errors and I can list the device with gcfflasher -l.

Despite listing, the tool doesn't seem to work. I tried the command for reboot and flash firmware. In both cases, the tool crashes.

./gcfflasher/build/GCFFlasher -r -d /dev/cu.usbserial-DExxx
PL_Connect
connected to /dev/cu.usbserial-DExxx, baudrate: 115200
send: C00D0500090000000000E5FFC0 (13)
send uart reset
send: C00B03000C0005002602000000B9FFC0 (16)
invalid CRC
recv_packet: 0D0500090000094E26 (9)
recv_packet: 818204000100105B77FC (10)
shutdown
PL_Disconnect
./gcfflasher/build/GCFFlasher -f deCONZ_ConBeeIII_0x26510900.bin.GCF -t 60 -d /dev/cu.usbserial-DExxx
read file success: deCONZ_ConBeeIII_0x26510900.bin.GCF (181950 bytes)
GCF header0: magic: 0xCAFEFEED, type: 60, address: 0x00004000, data.size: 181936
GCF header1: product: 0xDEC0DE03, img.type: 61, img.address: 0x00004000, img.data.size: 181900, crc32: 0x7ABA8D12
flash firmware
PL_Connect
connected to /dev/cu.usbserial-DExxx, baudrate: 115200
send uart reset
send: C00B03000C0005002602000000B9FFC0 (16)
recv_packet: 8104000000000001 (8)
recv_packet: 8104000000000001 (8)
recv_packet: 8104000000000001 (8)
invalid CRC
recv_packet: 818204000100105B77FC (10)
PL_Connect
device already connected /dev/cu.usbserial-DE03216114
query bootloader id V3
send: C081027DFFC0 (6)
recv_packet: 818204000100105B77FC (10)
bootloader version 0x00010004, app crc 0xFC775B10

send: C08103B0C60200004000003CAAAAAAAAE0FAC0 (19)
recv_packet: 818300 (3)
recv_packet: 8104000000000001 (8)
BTL data request, offset: 0, length: 256
zsh: trace trap  ./gcfflasher/build/GCFFlasher -f deCONZ_ConBeeIII_0x26510900.bin.GCF -t 60 -d

In both cases, an invalid CRC seems to be the issue.

manup commented 3 months ago

Thanks for reporting, fixed via https://github.com/dresden-elektronik/gcfflasher/commit/0b4094feca4156b343b2dd88070329d5e2525ac2

Ref: https://forum.phoscon.de/t/crc-invalid-while-updating-conbee-iii-on-macos/4958

dannyyy commented 3 months ago

Really nice service! I can confirm, after a git pull and a rebuild of the source code, I was able to flash the new firmware.