PiSupply / PiJuice

Resources for PiJuice HAT for Raspberry Pi - use your Pi Anywhere
https://uk.pi-supply.com/collections/pijuice/products/pijuice-portable-power-raspberry-pi
GNU General Public License v3.0
437 stars 104 forks source link

Communication error #1017

Open BramWerbrouck opened 11 months ago

BramWerbrouck commented 11 months ago

HI, I have - like a lot of other people here - a communication error on my RPI and PiJuice: 176fc61c4089d79ca2432aa9ab4dc2a93d8d6a19_2_843x750

unlike the other posts here, it don't alternate between this communicatin error and 'a normal' screen (it stays on the communication error)

I2U is enabled

what can I do?

tvoverbeek commented 11 months ago

Which RPi (3, 4, zero, etc.)? Which OS (Bullseye, Bookworm, other)? Can you provide the output of running i2cdetect -y 1 in a terminal? Maybe obvious: HAT mounted correctly on the 40-pin header?

BramWerbrouck commented 11 months ago

It is a Raspberry pi 4 with Bullseye.

This is the output of i2cdetect -y 1: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

The HAT is correctly mounted.

tvoverbeek commented 11 months ago

This smells like I2C is not enabled. Check if /dev/i2c-1 exists (ls -l /dev/i2c*). You can enable it via raspi-config -> Interfaces.

BramWerbrouck commented 11 months ago

This is the output of ls -l /dev/ic*:

crw-rw---- 1 root i2c 89, 1 14 okt 22:15 /dev/i2c-1

BramWerbrouck commented 11 months ago

I changed the dip-switches on the back from DIPS

-ON---CTS-
[ON ][OFF] 
--1----2-- 

to DIPS2

-ON---CTS-
[ON ][ON] 
--1----2-- 

and now I have this as output of i2cdetect -y 1:

0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

But still the communication error :-(

tvoverbeek commented 11 months ago

I suspect your username when executing i2cdetect is not member of the i2c group. If you run sudo i2cdetect -y 1 do you get a different output? The "UU" for address 0x68 means the OS has recognized the simulated RTC in the PiJuice firmware. Are you on a 32-bit version of Bullseye on your Pi4?

BramWerbrouck commented 11 months ago

sudo i2cdetect -y 1 gives me the same result:

0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

BramWerbrouck commented 11 months ago

Hi,

I found a similar problem and this was (then) the solution:

_What did help somehow was to put__ dtoverlay=i2c-bcm2708 into the /boot/config.txt. That uses the older i2c-bcm2708 module instead of the default i2c-bcm2835.

But this has no effect with my RPI. Is there something else I can try?