tuya-cloudcutter / bk7231tools

This is a collection of tools to interact with and analyze artifacts for BK7231 MCUs
MIT License
40 stars 6 forks source link

Reading fails after a few successful reads #18

Closed alexrkopp closed 1 year ago

alexrkopp commented 1 year ago

Hello, I am trying to capture a firmware dump and am unable to get it to complete successfully. Any idea what I am doing wrong? Here's the output:

me@mycomputer ~ % bk7231tools read_flash -d /dev/tty.usbserial-A5XK3RJT -s 0 -l 0x200000 dump.bin
Connected! Chip info: BK7231S_1.0.6 / Flash ID: 00 00 00 / Protocol: BASIC_TUYA
Reading 2097152 bytes from 0x0
Reading 4k page at 0x200000 (0.00%)
Reading 4k page at 0x201000 (0.20%)
Reading 4k page at 0x202000 (0.39%)
Reading 4k page at 0x203000 (0.59%)
Reading 4k page at 0x204000 (0.78%)
Reading 4k page at 0x205000 (0.98%)
Reading 4k page at 0x206000 (1.17%)
Reading 4k page at 0x207000 (1.37%)
Reading 4k page at 0x208000 (1.56%)
Reading failure (Chip CRC value 64D5C715 does not match calculated CRC value 6B57883A), retrying (attempt 0)
Reading 4k page at 0x209000 (1.76%)
Reading 4k page at 0x20A000 (1.95%)
Reading 4k page at 0x20B000 (2.15%)
Reading 4k page at 0x20C000 (2.34%)
Reading 4k page at 0x20D000 (2.54%)
Reading 4k page at 0x20E000 (2.73%)
Reading 4k page at 0x20F000 (2.93%)
Reading failure (Incomplete response read: 1168 != 4101), retrying (attempt 0)
Reading failure (No response received), retrying (attempt 1)
Reading failure (No response received), retrying (attempt 2)
Reading failure (No response received), retrying (attempt 3)
Reading failure (No response received), retrying (attempt 4)
Reading failure (No response received), retrying (attempt 5)
Reading failure (No response received), retrying (attempt 6)
Reading failure (No response received), retrying (attempt 7)
Reading failure (No response received), retrying (attempt 8)
Reading failure (No response received), retrying (attempt 9)
Reading failure (No response received), retrying (attempt 10)
Reading failure (No response received), retrying (attempt 11)
Reading failure (No response received), retrying (attempt 12)
Reading failure (No response received), retrying (attempt 13)
Reading failure (No response received), retrying (attempt 14)
Reading failure (No response received), retrying (attempt 15)
Reading failure (No response received), retrying (attempt 16)
Reading failure (No response received), retrying (attempt 17)
Reading failure (No response received), retrying (attempt 18)
Reading failure (No response received), retrying (attempt 19)
Reading 4k page at 0x210000 (3.12%)
Reading failure (No response received), retrying (attempt 0)
Reading failure (No response received), retrying (attempt 1)
...
alexrkopp commented 1 year ago

Update: after trying this on a raspberry pi instead of a mac, I was able to get it to complete