diff --git a/bk7231tools/serial/cmd_chip.py b/bk7231tools/serial/cmd_chip.py index 6b3ec55..32a6f3a 100644 --- a/bk7231tools/serial/cmd_chip.py +++ b/bk7231tools/serial/cmd_chip.py @@ -72,6 +72,9 @@ def read_chip_info(self) -> str: self.chip_info, _ = CHIP_BY_CRC[crc] # read the protocol here already - it might not support BootVersion self.protocol_type = PROTOCOLS.get(self.chip_info, ProtocolType.UNKNOWN) + else: + # unknown bootloader version - assume minimal protocol support + self.protocol_type = ProtocolType.BASIC_DEFAULT # try BK7231S chip info command command = BkBootVersionCmnd() @@ -89,7 +92,7 @@ def read_chip_info(self) -> str: default = ProtocolType.FULL else: self.chip_info = response.version.decode().strip("\x00\x20") - default = ProtocolType.BASIC_DEFAULT + default = ProtocolType.BASIC_TUYA # get protocol by chip info or SCTRL_CHIP_ID # if not set, use `default` diff --git a/bk7231tools/serial/protocol.py b/bk7231tools/serial/protocol.py index e647a65..ee6cd45 100644 --- a/bk7231tools/serial/protocol.py +++ b/bk7231tools/serial/protocol.py @@ -60,7 +60,7 @@ class ProtocolType(Enum): (0x09, LONG), # CMD_FlashRead4K (0x0F, LONG), # CMD_FlashErase ] - BASIC_DEFAULT = BASIC_TUYA + BASIC_DEFAULT = BASIC_BEKEN # list of protocols with verified command support