Whenever i login to the Raspberry Pi attached to Bittle Nyboard using 2x5 socket using ssh and want to turn off everything safely using "sudo shutdown -h now" the Pi just reboots. Does anyone have an idea how can i avoid this?
Hi, everyone, I deeply thank the developers and supporters for this nice product.
Unfortunately, I have the completely same situation with Oi Tep.
> Unfortunately "sudo shutdown now" does not work too, i get a short beep from the NyBoard and the Raspberry Pi just reboots and green activity LED is switched on again.
This is what I also got.
The Raspberry Pi without Bittle using a USB power supply can shutdown correctly.
I also found that if I pull out the Raspberry Pi from 2x5 pins during the Pi is running, I can also get the short beep from the NyBoard.
My current guess (with no certainty) of this phenomena is that PMIC get some errors when Pi shutdowns (or is pulled out), and it makes intermittent loss of power supply (by self-reset?). This power lost could reset the Pi and it starts its booting process again.
Many thanks for your guess which might be a root cause for our ssh issue. Which Raspberry Pi do you use by the way or does this phenomena hold for all Raspberry Pi's?
The short beep from the NyBoard indicates it receives a signal from the serial port.
So maybe at the moment of shutdown, the voltage fluctuates, causing the NyBoard to receive a signal. NyBoard will execute any command and reply with a confirmation. For example, a skill command "ksit" will return its first character 'k' (token) to confirm completion. An unknown command will return its first character, too. So it may trigger the reboot.
You may disable this line to test.
@Jason Maybe its a big misunderstanding: I expect the Nyboard to be still the master, i.e. the hardware switch is on the Arduino side not Raspberry Pi side. If i switch it a shutdown works but thats not what i want. I want to control the Bottle via serial commands.
@Jason What happens actually to the Raspberry Pi when i press the battery poweroff button? I this safe with regards to the Raspberry Pi resp. sdcard. If not is there a way to trigger a safe shutdown?
You'd better close all the programs on Raspberry Pi OS, then use the shutdown command to power off the Pi first, then long press the battery power off button for >=3s on the battery to power off the robot.
Okay, i see, in other words I need to solve my shutdown issue:-)
No ideas left, maybe its a Pi Zero 2 or pogo pin or Bittle firmware specific. Can't imagine the latter two as potential reasons.
There are some solutions for this issue on the website, maybe it can works for you:
thanks for the link. I already saw this thread but it does not help, i.e. watchdog service is not running at all and there is no "dtoverlay=gpio-poweroff,gpiopin=24" in my /boot/config.txt which is a solution in the above thread.
I have run through https://docs.petoi.com/apis/raspberry-pi-serial-port-as-an-interface again with the same result
The issue does not happen on a standalone RPI without attaching the Nyboard.
Yes, I attached the Pi to the Nyboard using 2x5 pins and power everything using the Bittle's battery and shutdown works for me. It can't reboot automatically unless power off and power on the battery.
Then i am completly lost. "sudo shutdown now" command on RPI does not work for me, by the way the same holds for me if i power the RPI directly. The hardware switch ist still on the Arduino side.
Any ideas what could be the reason?
Please try this command: "sudo shutdown now", it will shutdown the Pi, the Raspberry Pi on my side is:
Unfortunately "sudo shutdown now" does not work too, i get a short beep from the NyBoard and the Raspberry Pi just reboots and green activity LED is switched on again. With other words you attached your Pi to the Nyboard using 2x5 pins and power everything using the Bittle battery and shutdown works for you?
My setup is the similar:
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"