Respeaker Core V1.0 total factory reset, how do I do it?

Hi, I have been trying to set up a Respeaker V1.0 with mic array V1.0 and speaker/battery drive unit.

I have followed the instructions and all has gone well up to a certain point but then my results don’t match the instructions so I want to completely reset and start again but can’t. Part of the instructions are for creating an overlay on the SD card as a memory extension but I cannot get rid of it. The firstboot command doesn’t delete it, it says something like “deleting files only” and the overlay is still there.

It can’t connect to the internet anymore, none of the things I’ve found about deleting overlay file systems have worked and now it won’t reboot at all…

Please help Seeed Studio !

I have tried firstboot command in ssh terminal. I have copied the firstboot script to the sd card (freshly formatted with sd card formatter), named the file “autorun” and tried a reboot with sd card inserted. I am not sure about soldering wires onto the card but then again I can ssh in so why would I need to ?

But, why do these previously tried reset methods not work ?

I am currently trying to reprogram the default sketch ( as found on github) with Arduino IDE 2 but the sketch won’t upload as there are dozens of things the Arduino IDE doesn’t like in the sketch so after commenting out all the “comments” I then found it wasn’t happy with some of the code at which point I realised it was never going to work. What am I doing wrong ?

Hi there,

Can you post a link to it , I can have a look.
The SD card needs to be of High Quality and the Power needs to be very good as well.

Sounds like you are close , so keep digging.

HTH
GL :slight_smile: PJ :v:

Power should be ok, card is Sandisk Ultra.

What can I post a link to ? The sketch is here respeaker_arduino_library/examples/pixels_pattern/pixels_pattern.ino at master · respeaker/respeaker_arduino_library · GitHub

I have been trying to get my head around extroot to undo the overlay process but all documentation that I have found is all about doing, there is precious little about undoing…

Thanks for the reply by the way.

Hi there,

Sure, No worries… Ok so How dead is it?
I would ditch the SD card portion, just do the restore to ATmega24u bootloader, then load the Getting started basic code to it.
You will need to use the re-program a new bootloader via ICSP pins tech for it.
Have you seen this?

HTH
GL :slight_smile: PJ :v:

It’s not very dead really, I can SSH in and input commands etc, so hoping I didn’t need to solder or anything that drastic.

I just need to reset to factory so I can try again to make use of it but the “firstboot” command doesn’t delete this overlay and I think with trying to delete things manually I have stopped the wifi from working but comms with a usb cable works fine.

I tried to upload the original sketch as it says on the Respeaker page but the arduino IDE didn’t like it, kept throwing up syntax errors.

Hi there

Well that’s good news then, “It’s not completely dead”
No, No soldering then.
Can you describe how you tried? Following the factory reset procedure and where it fails. Paste the error message you get.
It’s NOT rocket science but there is a procedure, so you will get there.

HTH
GL :slight_smile: PJ :v:

root@ReSpeaker:/# firstboot
This will erase all settings and remove any installed packages. Are you sure? [N/y]
y
/dev/mtdblock6 is mounted as /overlay, only erasing files
root@ReSpeaker:/#

So I don’t understand why firstboot doesn’t really do a factory reset and is there another command that definitely does ?

I’ve also copied the script/file Autorun onto the sd and rebooted.

After trying again with the firmware update: download file onto sd then input the following:
mount /dev/mmcblk0p1 /mnt
cd /mnt
sysupgrade -n -F ramips-openwrt-latest-LinkIt7688-squashfs-sysupgrade.bin

I get the error “FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck” after about 40 seconds. If I try to run fsck I get “fsck: not found”.

The boot continues on but hangs around 99 seconds and never gets to the bit where I should get “writing from stdin to firmware”.

Hi there,

Sounds like the Rootfs is corrupted somehow? The firstboot not working is a clue of sorts. Something is missing? AI say’s this about it :crossed_fingers:

The firstboot script on embedded Linux systems like the ReSpeaker Core (which is based on an OpenWRT or Debian variant depending on version) is typically a user-defined or system-initiated script that runs once on the first boot after flashing or factory reset.

:rocket: What does firstboot usually do?

On the ReSpeaker Core and similar boards, it may:

  • Initialize system settings (hostname, network config, timezone).
  • Expand filesystem if you’re using an SD card or eMMC image.
  • Set up audio services, like PulseAudio, ALSA, or wake word engines.
  • Install or enable default packages.
  • Enable GPIO or mic array settings.
  • Create necessary configuration files or symbolic links.

:hammer_and_wrench: Where is it found?

On OpenWRT-based systems (older ReSpeaker firmware):

  • The firstboot command resets the system to factory defaults.
  • User scripts may hook into /etc/rc.local, /etc/init.d, or use UCI configs to add their own logic.

On Debian-based ReSpeaker firmware:

  • A firstboot.sh may be placed in /etc/init.d/ or handled by systemd (/etc/systemd/system/firstboot.service).
  • Sometimes included in a flashing image to run on first power-on.

Some stuff to try…YMMV :v:

umount /overlay
jffs2reset -y
reboot

This forces the reset by wiping the writable overlay partition. Make sure to run jffs2reset only if you’re using JFFS2 (check with mount command).

Run:

cat /etc/os-release

if it says Debian or Raspbian, then firstboot is likely not a system utility but a userland script.

Manual reset (Debian-style systems)

If firstboot is custom but not working, try:

bash

CopyEdit

sudo rm -rf /etc/network/interfaces.d/*
sudo rm -rf ~/.asoundrc ~/.config ~/.cache
sudo rm -rf /etc/NetworkManager/system-connections/*
sudo rm -rf /var/lib/NetworkManager/*

Then reboot:

sudo reboot

Or just re-flash the system image via SD card or USB.

If nothing else works:

  1. Download the latest image from Seeed’s GitHub or wiki (for ReSpeaker Core).
  2. Flash it using dd or Balena Etcher.
  3. Boot and test from clean state.

HTH
GL :slight_smile: PJ :v:

Thanks for your reply, I tried a few commands here are the results :
root@ReSpeaker:/# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
mountd(pid1620) on /tmp/run/mountd type autofs (rw,relatime,fd=5,pgrp=1618,timeout=60,minproto=5,maxproto=5,indirect)
/dev/mmcblk0p1 on /tmp/run/mountd/mmcblk0p1 type vfat (rw,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

root@ReSpeaker:/# cat /etc/os-release
cat: can’t open ‘/etc/os-release’: No such file or directory

root@ReSpeaker:/# umount /overlay
umount: can’t umount /overlay: Invalid argument

root@ReSpeaker:/#

No mention of Debian or Raspbian.

Could you expand a little bit on the reflashing please? I have tried to flash with Balena etcher using the “Ramips Openwrt latest LinkIt7688 Squashfs…” file but Balena says there is no partition table, “might not be recognised or bootable” etc. Do I just carry on anyway or does that mean it won’t work ?

Or did you mean something else entirely ?

Hi there,

So, it’s OpenWRT based system btw,
The ReSpeaker is booting into an OpenWRT-based rootfs with overlayfs, which means:

  • /rom is the read-only factory image (in squashfs)
  • /overlay contains all changes (config, packages, etc.)
  • A factory reset means clearing /overlay entirely

You tried Firstboot that didn’t work i.e “firstboot && reboot”
Try running this manually:

jffs2reset && reboot

This also clears the overlay on OpenWRT systems.

can you attach a pic of the model you have? Is it this one?

what output do you get whe you run “cat /etc/banner”
This often returns:

OpenWrt Chaos Calmer 15.05...

or similar. That will confirm the OS.

step 4. is the reflash. but you can also doit with (fastboot) or “dd”
Yes, Ignore the errors in the windows app, BalenaEtcher just finish the process

HTH
GL :slight_smile: PJ :v:

The “firstboot && reboot” and “jffs2reset && reboot” both return

This will erase all settings and remove any installed packages. Are you sure? [N/y]
y
/dev/mtdblock6 is mounted as /overlay, only erasing files

Yes it is the Respeaker core model that you link to.

It’s Chaos Calmer v0.9.99

Actually I can’t flash with Balena as when I press “continue” after the no partition warning, next step is to choose the target and it doesn’t offer me the Respeaker as an option.

Hi again, I’ve found this:

sysupgrade -n /path/to/firmware

which is about a hard reset but I could do with a few pointers with regard to the “/path/to/firmware” bit if you wouldn’t mind in very simple terms please.

Thanks,