We can do a factory reset through ssh, serial console or sd card autorun script. When a ssh session or the serial console is available, just run:
SD card autorun script
The system will automatically run
autorun file of the sd card's first part if the sd card is mounted. The start-up sequence is
When a sd card is inserted, its first part will be mounted at
/tmp/run/mountd/mmcblk0p1/. If your sd card is not automatically mounted, try to format it with sd card formatter.
We can add
firstboot to sd card's
autorun to perform a factory reset. For example, copy the following script and save it to the sd card's root directory with filename
#!/bin/sh if [ ! -f /tmp/run/mountd/mmcblk0p1/reset_once ]; then firstboot touch /tmp/run/mountd/mmcblk0p1/reset_once reboot -f fi
If you re-program a new Arduino sketch to the ReSpeaker's ATmega32U4, you can get the serial console back by re-programming the default sketch
Windows 10, Linux or macOS
the serial port will be available and no extra driver is required.
Get ReSpeaker's drivers from https://github.com/Seeed-Studio/Signed_USB_Serial_Driver and Arduino IDE's drivers.
If ATmega32U4 bootloader is broken :(
- Wi-Fi connection is available
Get it back through OpenWrt, run:
/etc/init.d/mopidy stop # stop mopidy if it's running, mopidy-hallo plugin will use SPI /etc/init.d/alexa stop # stop alexa if it's running mt7688_pinmux set ephy gpio cd /etc/arduino avrdude -c linuxgpio -p m32u4 -e -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB:m \ -U flash:w:Caterina-ReSpeaker.hex -u -U lock:w:0xEF:m
- the worst case - re-program a new bootloader via ICSP pins