Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects
Notifications
Clear all

Help: Witty Pi 4 L3V7 shuts down immediately after Pi splash screen

6 Posts
2 Users
0 Likes
92 Views
(@arjenr)
Posts: 24
Eminent Member Customer
Topic starter
 

I have had this Pi4B with a WittyPi4 L3v7 running fine before, but I had to wait for hardware like a cable to connect USB power from inside the box it is in, so it has been without power or battery for a few weeks.

It runs from an SSD. The OS is Raspberry PI OS bookworm, 64 bit with desktop and everything.

Without WittyPi mounted on the header, the Pi runs fine. I have a monitor connected for now. Normally I use this with realVNC only, or use an SSH terminal session.

With the WittyPi mounted on the header, the Pi stops right after the splash screen (the multicoloured square). It very much looks like it's the witty pi that cuts the power to the pi.

I have an 18650 Li battery connected.

To reset old settings from the WittyPi board, I have pressed the button more than once for more than 10 seconds. Whenever I let go of the button after that, the Pi starts, but stops immediately at the splash screen.

I have also deleted the wittypi and uwi directories and executed the uninstall commands as per the manual.

Then I reinstalled the software, but it made no difference. Whenever the wittypi board is in place, no boot messages ever start coming. The USB drive light blinks a few times, then just the splash screen shows on the monitor for a few seconds and then the pi stops and its red LED goes off, too.

I checked the pi settings in raspi-config are OK (without witty pi board).

So, when power is connected to the witty pi hat and the battery is in place, the pi won't run, but the white LED on the witty Pi board blinks every 8(?) seconds.

I have no reason to believe the witty pi board to be defective. I suppose there is something wrong with its settings, but I cannot get at them.

I have tried everything I could think of, but I'm puzzled.

 
Posted : 06/10/2024 1:55 am
(@arjenr)
Posts: 24
Eminent Member Customer
Topic starter
 

It was the button I had connected to the header P3 that I had fitted, in parallel with the button on the board. I still have to find out what exactly is wrong with it, but when I disconnected it from the header pins (P3, GND & SWITCH), the Pi started up normally.

As I mentioned in the above, I had uninstalled and re-installed the wittypi software during the debugging.

As it now turned out, the wittypy and uwi services were not running as reported by sudo systemctl status wittypi and sudo systemctl status wittypi. The wittyPi.log remained mostly empty as can be seen at the start of the terminal output below. I changed the power cut delay value using the wittypi.sh and that was logged, but otherwise normal log messages did not appear.

I remember a problem like that from the original succesful installation (before the extra, 'broken', button) and also compared the status with the other pi with a same witty pi hat fitted and working.

To get the services enabled and started I had to do what can be seen in the terminal output below.

I haven't noticed anything about needing these systemctl commands in the manual, but perhaps this is because this Pi runs the latest 64-bit Raspberry Pi OS ... it is odd.

pi@PiHole2:~ $ cat wittypi/wittyPi.log
[2024-10-06 01:13:16] Seems Witty Pi board is not connected? Quitting...
[2024-10-06 10:12:18] Power cut delay set to 25 seconds!
pi@PiHole2:~ $ sudo systemctl status wittypi
○ wittypi.service - LSB: Witty Pi 4 initialize script
     Loaded: loaded (/etc/init.d/wittypi; generated)
     Active: inactive (dead)
       Docs: man:systemd-sysv-generator(8)
pi@PiHole2:~ $ sudo systemctl enable --now wittypi
wittypi.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable wittypi
pi@PiHole2:~ $ sudo systemctl status wittypi
○ wittypi.service - LSB: Witty Pi 4 initialize script
     Loaded: loaded (/etc/init.d/wittypi; generated)
     Active: inactive (dead)
       Docs: man:systemd-sysv-generator(8)
pi@PiHole2:~ $ sudo systemctl start wittypi
pi@PiHole2:~ $ sudo systemctl status wittypi
● wittypi.service - LSB: Witty Pi 4 initialize script
     Loaded: loaded (/etc/init.d/wittypi; generated)
     Active: active (running) since Sun 2024-10-06 10:20:56 CEST; 373ms ago
       Docs: man:systemd-sysv-generator(8)
    Process: 4604 ExecStart=/etc/init.d/wittypi start (code=exited, status=0/SUCCESS)
      Tasks: 2 (limit: 446)
        CPU: 390ms
     CGroup: /system.slice/wittypi.service
             ├─4605 /bin/bash /home/pi/wittypi/daemon.sh
             └─4796 sleep 1

okt 06 10:20:56 PiHole2 systemd[1]: Started wittypi.service - LSB: Witty Pi 4 initialize script.
okt 06 10:20:56 PiHole2 sudo[4681]: pam_unix(sudo:session): session closed for user root
okt 06 10:20:56 PiHole2 sudo[4717]:     root : PWD=/ ; USER=root ; COMMAND=/usr/bin/date -s @1728202855
okt 06 10:20:56 PiHole2 sudo[4717]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
okt 06 10:20:55 PiHole2 sudo[4717]: pam_unix(sudo:session): session closed for user root
okt 06 10:20:55 PiHole2 wittypi[4605]:   Done :-)
okt 06 10:20:55 PiHole2 wittypi[4605]: Firmware ID: 0x37
okt 06 10:20:55 PiHole2 wittypi[4605]: Firmware Revison: 0x07
okt 06 10:20:55 PiHole2 wittypi[4605]: Current Vout=5.18V, Iout=0.81A
okt 06 10:20:55 PiHole2 wittypi[4605]: System starts up because the button is clicked.
pi@PiHole2:~ $ sudo systemctl status uwi
○ uwi.service - LSB: UUGear Web Interface initialize script
     Loaded: loaded (/etc/init.d/uwi; generated)
     Active: inactive (dead)
       Docs: man:systemd-sysv-generator(8)
pi@PiHole2:~ $ sudo systemctl start uwi
pi@PiHole2:~ $ sudo systemctl status uwi
● uwi.service - LSB: UUGear Web Interface initialize script
     Loaded: loaded (/etc/init.d/uwi; generated)
     Active: active (running) since Sun 2024-10-06 10:21:19 CEST; 2s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 5057 ExecStart=/etc/init.d/uwi start (code=exited, status=0/SUCCESS)
      Tasks: 7 (limit: 446)
        CPU: 29ms
     CGroup: /system.slice/uwi.service
             ├─5058 /bin/bash /home/pi/uwi/uwi.sh
             ├─5062 /home/pi/uwi/websocketd --address=192.168.1.62 --port=8000 --staticdir=/home/pi/uwi /home/pi/uwi/messanger.sh
             └─5063 sleep 5

okt 06 10:21:19 PiHole2 systemd[1]: Starting uwi.service - LSB: UUGear Web Interface initialize script...
okt 06 10:21:19 PiHole2 uwi[5057]: Starting UWI server...
okt 06 10:21:19 PiHole2 systemd[1]: Started uwi.service - LSB: UUGear Web Interface initialize script.
pi@PiHole2:~ $ sudo systemctl status wittypi
● wittypi.service - LSB: Witty Pi 4 initialize script
     Loaded: loaded (/etc/init.d/wittypi; generated)
     Active: active (running) since Sun 2024-10-06 10:20:56 CEST; 1min 3s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 4604 ExecStart=/etc/init.d/wittypi start (code=exited, status=0/SUCCESS)
      Tasks: 3 (limit: 446)
        CPU: 547ms
     CGroup: /system.slice/wittypi.service
             ├─4605 /bin/bash /home/pi/wittypi/daemon.sh
             └─4898 gpio -g wfi 4 falling

okt 06 10:20:56 PiHole2 sudo[4717]:     root : PWD=/ ; USER=root ; COMMAND=/usr/bin/date -s @1728202855
okt 06 10:20:56 PiHole2 sudo[4717]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
okt 06 10:20:55 PiHole2 sudo[4717]: pam_unix(sudo:session): session closed for user root
okt 06 10:20:55 PiHole2 wittypi[4605]:   Done :-)
okt 06 10:20:55 PiHole2 wittypi[4605]: Firmware ID: 0x37
okt 06 10:20:55 PiHole2 wittypi[4605]: Firmware Revison: 0x07
okt 06 10:20:55 PiHole2 wittypi[4605]: Current Vout=5.18V, Iout=0.81A
okt 06 10:20:55 PiHole2 wittypi[4605]: System starts up because the button is clicked.
okt 06 10:21:00 PiHole2 wittypi[4605]: Send out the SYS_UP signal via GPIO-17 pin.
okt 06 10:21:00 PiHole2 wittypi[4605]: Pending for incoming shutdown command...
pi@PiHole2:~ $ 
 
Posted : 06/10/2024 10:39 am
(@arjenr)
Posts: 24
Eminent Member Customer
Topic starter
 

Posted by: @arjenr

It was the button I had connected to the header P3 that I had fitted, in parallel with the button on the board. I still have to find out what exactly is wrong with it, but when I disconnected it from the header pins (P3, GND & SWITCH), the Pi started up normally.

Well, what do you know ... all the other small pushbuttons in my junkbox were also NC ... i.e. breaking contact when pushed! The only good thing about them is that they fit in the 4mm wide slit on the side of the aluminum GeeekPi case. A new, NO-button will require a bigger hole, and drilling which requires taking the whole thing apart first.

 

 
Posted : 06/10/2024 4:00 pm
(@arjenr)
Posts: 24
Eminent Member Customer
Topic starter
 

The question about separately enabling/starting wittypi and uwi services after software installation, as presented in the post above with the terminal output still stands ...

 
Posted : 06/10/2024 4:03 pm
(@admin)
Posts: 454
Member Admin
 

@arjenr You should be able to get more information from the system log (sudo dmesg) about why wittypi service failed starting for the first time.

As for UWI serivce, most probably it was due to the IP address had not been allocated when the service tried to start.

 
Posted : 07/10/2024 9:09 am
(@arjenr)
Posts: 24
Eminent Member Customer
Topic starter
 

I looked through the dmesg output and also used these commands:

pi@PiHole2:~ $ sudo dmesg | grep -i wittypi
pi@PiHole2:~ $ sudo dmesg | grep -i uwi

but these is nothing there. I should probably have done this before ever enabling these services as I did when I found that they were not running many sessions ago:

pi@PiHole2:~ $ sudo systemctl enable --now wittypi
wittypi.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable wittypi
pi@PiHole2:~ $ sudo systemctl status wittypi
○ wittypi.service - LSB: Witty Pi 4 initialize script
     Loaded: loaded (/etc/init.d/wittypi; generated)
     Active: inactive (dead)
       Docs: man:systemd-sysv-generator(8)
pi@PiHole2:~ $ sudo systemctl start wittypi
pi@PiHole2:~ $ sudo systemctl status wittypi
● wittypi.service - LSB: Witty Pi 4 initialize script
     Loaded: loaded (/etc/init.d/wittypi; generated)
     Active: active (running) since Sun 2024-10-06 10:20:56 CEST; 373ms ago
       Docs: man:systemd-sysv-generator(8)
    Process: 4604 ExecStart=/etc/init.d/wittypi start (code=exited, status=0/SUCCESS)
      Tasks: 2 (limit: 446)
        CPU: 390ms
     CGroup: /system.slice/wittypi.service
             ├─4605 /bin/bash /home/pi/wittypi/daemon.sh
             └─4796 sleep 1

So, that output is from soon after wittypi installation. Now that this has been done, wittypi service starts up after each reboot and the status output is as below:

pi@PiHole2:~ $ sudo systemctl status wittypi
● wittypi.service - LSB: Witty Pi 4 initialize script
     Loaded: loaded (/etc/init.d/wittypi; generated)
     Active: active (running) since Sun 2024-08-25 19:35:45 CEST; 1 month 12 days ago
       Docs: man:systemd-sysv-generator(8)
      Tasks: 3 (limit: 446)
        CPU: 1.815s
     CGroup: /system.slice/wittypi.service
             ├─ 545 /bin/bash /home/pi/wittypi/daemon.sh
             └─1631 gpio -g wfi 4 falling

okt 07 00:54:26 PiHole2 wittypi[545]:   Done :-)
okt 07 00:54:26 PiHole2 wittypi[545]: Firmware ID: 0x37
okt 07 00:54:26 PiHole2 wittypi[545]: Firmware Revison: 0x07
okt 07 00:54:26 PiHole2 wittypi[545]: Current Vout=5.19V, Iout=0.83A
okt 07 00:54:26 PiHole2 wittypi[545]: System starts up because it previously reboot.
okt 07 00:54:30 PiHole2 wittypi[545]: Send out the SYS_UP signal via GPIO-17 pin.
okt 07 00:54:30 PiHole2 sudo[1603]:     root : PWD=/ ; USER=root ; COMMAND=/usr/bin/systemctl enable --now chrony
okt 07 00:54:30 PiHole2 sudo[1603]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
okt 07 00:54:30 PiHole2 wittypi[545]: Pending for incoming shutdown command...
okt 07 00:54:38 PiHole2 sudo[1603]: pam_unix(sudo:session): session closed for user root
pi@PiHole2:~ $ 

 

If in the future I need to do a fresh installation of wittypi, I hope to remember to check dmesg before enabling the services. From the output, it looks to me like the wittypi service is maybe defined in a legacy way: 'not a native service, redirecting ....', but I have no idea really. Normally from enabling a service you don't get this sort of output.

In all my wittypi installations I have had to run diagnose.sh to get the uwi service working. One time I looked at uwi.conf before running diagnose.sh and noticed that it didn't have the IP -address, but the hostname if I remember correctly. Nothing wildly wrong, but not functional.

I would have to do a fresh installation to find out, I guess.

 

I am not a Linux journal, log and dmesg wizard, but it now looked like dmesg contains only (debug?) messages starting from the last boot. Not overly long. Before I thought it hopeless to find anything there.

 
Posted : 07/10/2024 10:50 am
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.