Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PiJuice on Rpi 3b+ with Raspberry Pi OS Bookworm #1049

Open
larsbjorndal opened this issue Dec 14, 2023 · 4 comments
Open

PiJuice on Rpi 3b+ with Raspberry Pi OS Bookworm #1049

larsbjorndal opened this issue Dec 14, 2023 · 4 comments

Comments

@larsbjorndal
Copy link

With the Bookworm OS, the pijuice.service won't start, due to a timout message: "A dependency job for pijuice.service failed." In the log, the following message are related: "/dev-i2c\x2d1.device: Job dev-i2c\x2d1.device/start timed out." I also notice that on the same hardware with Bullseye running, I have the device file /dev/i2c-1. With Bookworm I instead have /dev/i2c-2. Hope this problem can be fixed. Thanks

@tvoverbeek
Copy link
Contributor

On Pi 3B+ /dev/i2c-2 is the videocore i2c used e.g. for HAT eeprom and controlling the camera.
It smells like the arm i2c is not enabled (should have been done by the pijuice-base post-install script).
Try to enable I2C using raspi-config in a terminal window:
sudo raspi-config -> Interface Options -> I2c -> Yes
Check then if /dev/i2c-1 exists.
If it does i2cdetect -y 1 should detect the PiJuice at 0x14 and the PiJuice RTC at 0x68.

Are you sure the PiJuice is properly mounted on the 40-pin GPIO header?
(Not shifted by 1 row or column, have made this mistake several times)
Anyway after installing 64-bit bookworm-lite and the pijuice-base package everything works fine for me.
Note: in PiJuice_cli General tab make sure Power Regulator Mode is set to POWER_SOURCE_DETECTION. Otherwise the PiJuice battery will not charge when external power is applied to the Pi3B+

@larsbjorndal
Copy link
Author

larsbjorndal commented Dec 18, 2023 via email

@tvoverbeek
Copy link
Contributor

Since you are running a 32-bit userland there is a problem when you are installing the pijuice-base package.
On a Pi3B+ with a 32-bit userland the linux kernel is 64-bit.
Look at the output from ls -l /usr/bin/pijuice*.
/usr/bin/pijuice_cli should point to /usr/bin/pijuice_cli32 and not to /usr/bin/pijuice_cli64.
Similar for /usr/bin/pijuice_gui and /usr/bin/pijuiceboot.
Here is my output on a 64-bit userland system:

$ ls -l --color=none /usr/bin/pij*
lrwxrwxrwx 1 root    root        22 Nov 25 21:18 /usr/bin/pijuiceboot -> /usr/bin/pijuiceboot64
-rwxr-xr-x 1 root    root     22732 Jan 29  2022 /usr/bin/pijuiceboot32
-rwxr-xr-x 1 root    root     23904 Jan 30  2022 /usr/bin/pijuiceboot64
lrwxrwxrwx 1 root    root        22 Nov 25 21:18 /usr/bin/pijuice_cli -> /usr/bin/pijuice_cli64
-rwsr-xr-x 1 pijuice pijuice   9096 Dec 17  2018 /usr/bin/pijuice_cli32
-rwsr-xr-x 1 pijuice pijuice  14872 Jan 30  2022 /usr/bin/pijuice_cli64
-rw-r--r-- 1 pijuice pijuice 101552 May 16  2021 /usr/bin/pijuice_cli.py
lrwxrwxrwx 1 root    root        22 Nov 25 21:18 /usr/bin/pijuice_gui -> /usr/bin/pijuice_gui64
-rwsr-xr-x 1 pijuice pijuice   9096 Dec 17  2018 /usr/bin/pijuice_gui32
-rwsr-xr-x 1 pijuice pijuice  14872 Jan 30  2022 /usr/bin/pijuice_gui64
-rw-r--r-- 1 pijuice pijuice 105446 May 16  2021 /usr/bin/pijuice_gui.py
-rwxr-xr-x 1 root    root     11275 Jan 30  2022 /usr/bin/pijuice_log.py
-rwxr-xr-x 1 root    root     15664 Jan 30  2022 /usr/bin/pijuice_sys.py
-rwxr-xr-x 1 root    root      6205 Jan 30  2022 /usr/bin/pijuice_tray.py

@larsbjorndal
Copy link
Author

larsbjorndal commented Dec 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants