we have a bunch of RAK2287-USB modules. If I try to get their chip ID for the first time, I get an MCU version mismatch:
cd ~/lora/sx1302_hal-master/tools ; sudo ../util_chip_id/chip_id -u -d /dev/ttyACM0 Opening USB communication interface INFO: Configuring TTY INFO: Flushing TTY INFO: Setting TTY in blocking mode INFO: Connect to MCU WARNING: MCU version mismatch (expected:01.00.00, got:V00.02.06) INFO: Concentrator MCU version is V00.02.06 INFO: MCU status: sys_time:42671 temperature:-0.0oC ERROR: received wrong ACK type (0xFF) ERROR: failed to read REQ_MULTIPLE_SPI ack ERROR: failed to start the gateway
I then use
dfu-util to flash a new firmware:
cd ~/lora/sx1302_hal-master/util_boot ; ./boot -d /dev/ttyACM0 sudo dfu-util -a 0 -s 0x08000000:leave -t 0 -D ../mcu_bin/rlz_010000_CoreCell_USB.bin
When this works, I can get the EUI afterwards. But on some modules, it fails:
sudo dfu-util -a 0 -s 0x08000000:leave -t 0 -D ../mcu_bin/rlz_010000_CoreCell_USB.bin dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ dfu-util: Invalid DFU suffix signature dfu-util: A valid DFU suffix will be required in a future dfu-util release!!! Opening DFU capable USB device... ID 0483:df11 Run-time device DFU version 011a Claiming USB DFU Interface... Setting Alternate Setting #0 ... Determining device status: state = dfuERROR, status = 10 dfuERROR, clearing status Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 011a Device returned transfer size 2048 DfuSe interface name: "Internal Flash " Downloading to address = 0x08000000, size = 35724 Download [= ] 5% 2048 bytesdfu-util: Error during special command "ERASE_PAGE" get_status
Afterwards, I’m unsure if and how I can reset the module to a state where I can try again. Running the boot utility disables serial access, and there doesn’t seem to be an additional switch to undo that. What do I do to salvage these chips?