Pi 4 / Bookworm: unable to get DS3231 RTC module working

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Pi 4 / Bookworm: unable to get DS3231 RTC module working

Post by /RaspberryPi »


I'm setting up a Pi 4 on which I want to use an Adafruit DS3231 RTC module. I've got one running already on another Pi 4, but that other Pi 4 is on Bullseye and my new Pi 4 is on Bookworm and it seems that Bookworm is causing me issues, as I cannot setup everything according to the instructions.

I'm following the setup instructions at https://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi/set-up-and-test-i2c and https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c

Now the configuring I2C is giving me problems. I've enabled the I2C interface using raspi-config (followed by a reboot, obviously). For I2C I'm told to issue the following commands:

sudo apt-get install -y python-smbus

sudo apt-get install -y i2c-tools

The 2nd one installs without problems, but the smbus one fails:

Package python-smbus is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'python-smbus' has no installation candidate

I went on with the setup instructions, however. The sudo i2cdetect -y 1 commands shows 68, as it should. I've then added dtoverlay=i2c-rtc,ds3231 to config.txt (using sudo nano /boot/config.txt), of course followed by a reboot. However, i2cdetect still shows 68 when it now should be showing UU.

I have tried sudo apt-get install -y python3-smbus and that does install, however my problem remains the same.

How do I get this fixed? I'm not a Linux guy so I'm out of my league here...

-- Edit: I ran sudo apt update && sudo apt full-upgrade -y too to make sure everything else was up-to-date.

-- Edit #2: just to be sure, I've swapped the DS3231 RTC module between the two Pi 4 boards. It's not a faulty module, the one that I was having issues with on my Bookworm Pi 4 works just fine on my Bullseye Pi 4.
submitted by /u/Wild4fire
[link] [comments]

Source: https://www.reddit.com/r/raspberry_pi/c ... tc_module/
/RaspberryPi
Post Reply

Return to “Raspberry Pi Forum”