Hi everyone,
I'm hoping I can get some help with this issue I'm having using the DFRobot IoT Router Mini Carrier Board, as I'm trying to make a video on it and to showcase it's abilities. As noted in the title, I'm using a CM4 with 32 gb eMMC, 8 GB RAM, and with WiFi.
I first flashed it with the DFRobot OpenWrt image, however, I found it unsatisfactory for a few reasons, but one reason in particular, was because the image provided was a ext format, and not in sqaushfs. Having a reset button, I'm surprised they offered an ext filesystem, as it makes the reset button a moot point.
Anyway, I went ahead and flashed a custom image of OpenWrt using squashfs. After that, I made a minor network change for a different /24 subnet, then attempted a reset by holding the button down for ten seconds, as noted in OpenWrt documentation. After it reboot, I was surprised to see that it still retained its /24 network that I had changed it too. As you'd figure, I expected it to change to the factory default network, but alas it did not.
I started doing some research and I dug into the script /etc/rc.button/reset to see what it did. It seemed to make sense, and so I did more testing.
In the script, I noticed this part that was responsible for the reset.
case "$ACTION" in
...
released)
if [ "$SEEN" -lt 1 ]
then
echo "REBOOT" > /dev/console
sync
reboot
elif [ "$SEEN" -ge 5 -a -n "$OVERLAY" ]
then
echo "FACTORY RESET" > /dev/console
jffs2reset -y && reboot &
fi
;;
esac
So to me, it looks like I need to hold down the reset button for at least 5 seconds (along with checking the filesystem is overlay) and then it initiates the reset.
To me, it looks like it's initiating a reboot, and not a reset. However, this is where my hit a roadblock. I am not sure how I can check within a serial console, if a reset (or reboot) is actually happening. In the serial console, I don't see any output after I release the button. I'm not sure if this is expected, but just thinking out loud.
I will say I noticed as soon as I pushed down the reset button, the networking stopped (my host machine lost it's IP address assigned by OpenWrt).
I also tried to create random text files on the filesystem, and those persisted after pressing and holding down the reset button.
Lastly, I verified the command in the reset button script to see if it did the hard reset I expected, by copying it and pasting it in my console, and sure enough it worked.
jffs2reset -y && reboot &
This was at least to me, a verification that indeed it was initiating the reset, or the script was not being called by the reset but press, and hold down for 5 seconds.
Has anyone else used the DFRobot CM4 carrier board and experienced this? Or does anyone have additional troubleshooting steps I can do to at least see what script, or commands, are being called when I press the reset button? If so, then at least from here I can maybe see whats going on, and try to fix or get the reset button working.
From my research, I figured this would work be default, standard for a squashfs build on hardware that has a reset button, but maybe I'm wrong.
Here is a link to the DFRobot CM4 Carrier board wiki, for reference.
Thanks in advance,
Orest