/r/raspberry_pi

3,211,784 Subscribers

3

Pin 1 (3.3v) measures at 4.7v on Pi 3 B+?

I haven't used my Raspberry Pi 3 B+ for a good while, and finally found a use for it again. I'm trying to use the GPIO pins with the DHT22 sensor. I couldn't get it to work so I measured the output of the 3.3v on the sensor and it was only around 1.3volts, which I thought was normal because it's obviously using some power. O I then tested the actual pin 1 (3.3v) and it shows as 4.7volts. it's definitely not pin 2/5v pin because that reads at 4.89v.

Is it cooked? Or is there something I just haven't read?

I've tried 2 different cables and 2 power supplies - both are 60w.

2 Comments
2025/02/01
07:38 UTC

0

XRDP not working after upgrading to bookwork, also with fresh install

Hi I was using my Pi 3 with bullseye and decided to upgrade to bookworm today.

As soon as I upgraded I noticed I couldn't RDP into my pi anymore. It would accept my creds but just stay on a turquoise screen and then give an error saying "connection problem - giving up".

I tried changing to X11 but it didn't work so I changed back to Wayland using the raspi-config tool.

I also tried creating a new user as I read posts where this fixed the issue as well but it didn't fix it for me.
https://www.reddit.com/r/raspberry_pi/comments/qw1cdw/comment/huqutq1/?utm_source=share&utm_medium=ios_app&utm_name=iossmf&context=3

Because I want to use RDP and I thought I messed up the install I tried a fresh install of bookworm x64 but I am having the same issues.

Any idea what I am doing wrong and what is causing my issue?

I was really was hoping to get RDP working instead of SSH or VNC .

1 Comment
2025/01/31
23:03 UTC

1

Create Hotspot (uap0) on Kali running on RPi Zero 2w

I have kali linux running on Raspberry Pi Zero 2W, I interact with the Pi using ssh, as my resources don't allow me to connect it to a monitor and give keyboard interrupts at the same time.

I have a WiFi adapter (Terabyte W777mi) which does not support AP mode while being on Kali, I can create hotspot from windows easily though (yet another problem)
So I managed a workaround, where I was using the wlan1 (the adapter) to ssh into the pi and wlan0 was left free to create an Access Point as inbuilt RPi adapter does support AP mode.

I want to create a Fake Access Point and do a credential harvesting attack (simulation ofcourse).
I tried using wifiphisher to set this up. Everytime I run this, the ssh session crashes on me, because it kills the NetworkManager processs and some other processes which is allowing me to ssh into the pi.
Although the Access Point gets created, but I cannot manage it because the ssh session is now gone.

Is there anyway I can do this without breaking the ssh connection to the Pi?

I was using this tutorial here to use Raspbian instead to create a hotspot (uap0) from the inbuilt adapter that would boot up with the Pi itself. But this tutorial didn't work in Kali because apparently the sysctl.conf file is not the same in Kali, it's a .d file with multiple .conf files in it.

Any workaround to get this working in Kali?

TL;DR: I want to create a fake access point for credential harvesting in Linux running on RPi managed by ssh, such that the ssh doesn't close on me while I'm doing the things and I can manage it well later on.

2 Comments
2025/01/31
23:06 UTC

1

Does the official m.2 hat+ accept 2280 ssd?

I did not find any answer specifically for this online. I can get a 2280 easily. I understand that the size can overshoot the hat, i'll just print a support for it in that case. Ordering a smaller ssd will take time.

5 Comments
2025/01/31
18:07 UTC

2

First post Rpi5 Fan always on after shutdown

I'm new to the Raspberry Pi scene. I have just built/setup a Raspberry Pi5 with an nvme hat. I bought a 10" touchscreen monitor which has mounts on the back for the Pi. Everything works well, the pi boots and runs from the nvme drive, so no sd card. The monitor works well just like it should... except, on system shut down the active cooling fan powers on and runs full speed even though the pi is off. I researched and found suggestions for modifying the config file, checked my fan cable, etc but every time I would shut down, the fan kicked on and stayed on. Removed the pi from the back of the monitor and connected it to a 27" non touch screen display and shutdown works like it should, the cooling fan shuts down as it should. Re assembled the pi and touchscreen setup and the problem returned. after playing with it a bit I figured out that if I had the usb cable that runs the touch part of the monitor is left disconnected, everything works fine (except for the touch part) So it seems that the Rpi5 which powers the monitor via gpio shuts down, the monitor shuts down, but power is still passed to the monitor from the gpio pins, the monitor still passes power through the usb touch connector back to the pi which somehow keeps the fan running at full speed. The only way to stop it is to disconnect the touchscreen cable or unplug the pi. This is not good! I've contacted the manufacturer of the monitor, and am waiting to hear back from them. All of my internet searching showed lots of people with this issue (fan keeps running) but none of them mentioned having a touchscreen. Don't know if this is a known issue, but maybe this might help others and save some time trying to figure it out.

4 Comments
2025/01/31
21:06 UTC

3

Threading memory overflow?

I have the program below loaded on my raspberry pi 3B+ for an engineering project. The goal of this code is to record the time it takes between cycles (when the break beam is broken) for the first ~1000 cycles to create a baseline average and then compare a rolling average to that value to check if the time between cycles has decreased meaning the speed of our motor sped up.

The break beam sensor runs properly in a standalone program just to count the cycles as expected, but in this code, it has issues recording the cycles and adding the cycle time to the average array. I have been testing with the max cycles to record set to 20 and even then it still doesn't work.

I am thinking because the cycle time is a floating point variable I am very quickly filling up the memory, but I haven't gotten any errors thrown. Even when the array does get to the max number of points, the calculate baseline average doesn't seem to ever get thrown. I have checked with threading.enumerate() that both threads are running, but don't know why this wouldn't be working. Any insight would be greatly appreciated.

# -*- coding: utf-8 -*-

"""

IR Break Beam Sensor for Detecting Plate Breaks

"""

import threading

import time

import RPi.GPIO as GPIO

BEAM_PIN = 18

MAX_CYCLES_TO_RECORD = 1000 # Number of cycles to calculate baseline

THRESHOLD = 0.2 # Deviation threshold (adjust as needed)

# Shared variables

prevTime = None

averageArray = []

n = 0

baseline_average = None

lock = threading.Lock()

def break_beam_callback(channel):

"""Callback function triggered by IR break beam events."""

global prevTime, n

currentTime = time.time()

with lock:

if prevTime is not None:

cycle_time = currentTime - prevTime

if n < MAX_CYCLES_TO_RECORD:

averageArray.append(cycle_time)

n += 1

prevTime = currentTime

def calculate_baseline_and_monitor():

"""Calculate baseline average and monitor for deviations."""

global baseline_average

while len(averageArray) < MAX_CYCLES_TO_RECORD:

time.sleep(0.01) # Wait until the baseline is calculated

with lock:

# Calculate baseline average

baseline_average = sum(averageArray) / len(averageArray)

print(f"Baseline average time: {baseline_average:.6f} seconds")

while True:

with lock:

# Check if there are enough recent cycles for a rolling average

if len(averageArray) >= 10:

recent_average = sum(averageArray[-10:]) / 10

deviation = recent_average - baseline_average

print(f"Recent average: {recent_average:.6f}, Deviation: {deviation:.6f}")

if deviation < -THRESHOLD: # Negative deviation indicates speed-up

print("Plate break detected! Speed increased significantly.")

break # Exit the monitoring loop if a plate break is detected

time.sleep(0.1) # Small delay to reduce CPU usage

def main():

"""Main program entry point."""

GPIO.setmode(GPIO.BCM)

GPIO.setup(BEAM_PIN, GPIO.IN, pull_up_down=GPIO.PUD_UP)

GPIO.add_event_detect(BEAM_PIN, GPIO.FALLING, callback=break_beam_callback)

try:

print("Monitoring started. Waiting for baseline to calculate...")

# Start the baseline and monitoring thread

threading.Thread(target=calculate_baseline_and_monitor, daemon=True).start()

# Main loop for displaying cycle counts

while True:

with lock:

print(f"Total cycles: {n}")

time.sleep(1) # Update every second

except KeyboardInterrupt:

print("Exiting program.")

finally:

GPIO.cleanup()

if __name__ == "__main__":

main()

3 Comments
2025/01/31
20:08 UTC

1

I just killed my pi4. how can I prevent future damage

I was powering over gpio using this 18650 holder. it has a 5v header which was connected to pin 4 and ground.

It was working well on my robot with motors and sensors using raspberry pi os, I installed ubuntu on it for software compatibility.

I'm not sure if that caused the pi to be more power thirsty or just a coincidence but the dupont wire connecting the power melted. I unplugged everything but it was too late.

Now the board gets hot straight away and no green light flickers.

Before I drop money on a new pi, I would like advise on how to not be an idiot. What preventative measures would you guys take.

Many Thanks

2 Comments
2025/01/31
12:40 UTC

4

Pirate Audio Headphone AMP for MP3? (RP02W)

Hello Raspberry Pi Community people! Shortly, context: I was curious about what would I do with my RP02W and finally found a mini project for my buddy, I wanted to build my own MP3-Player.

So I bought those(I already had Raspberry Pi Zero 2W in the beginning, I won't mention that below):

So I found some kind of documentation about Pirate Audio:

and so on. My problem is, I want an MP3-Player, but stand-alone. Because, whenever I boot up my device (I'll add a photo/video of my device) the IP address shows up, and I cannot open any music on local, even though I SCP'ed them to my RP0. If I'm offline (like I'm outside and cannot reach to my router, so no WiFi connection), then nothing shows up and it is just blank player GUI, cannot shuffle open or normal open any music.

Shortly, every time I boot my RP0, I don't want to use Web GUI, mopidy-iris or anything like that to control or begin to play any music file with.

I appreciate it for reading my post, I'll be waiting for your help.

2 Comments
2025/01/31
12:32 UTC

1

I Attached Case Fans to My Raspberry Pi 5s (x3) in "Fanless" Cases – Now They Stay Cool Under FFmpeg Load

I recently set up three Raspberry Pi 5 machines in so-called "fanless" cases, but under heavy FFmpeg rendering, temps were creeping beyond 50-55°C. Before adding fans, they were hot to the touch, which made me uncomfortable leaving them without active cooling. Now, with case fans, idle temps are 28-29°C.

So, I attached case fans to each Pi, and the difference is huge! Now, even after extended rendering, temps have stayed under 50°C consistently, and they’re no longer hot to the touch. The highest I’ve seen post-fan install is 54.3°C, but for the most part, they stay in the mid-40s under load.

These cases are labeled as fanless, but personally, I wasn’t comfortable letting them run that hot for long periods without airflow. If you're pushing your Pi 5 with CPU/GPU-heavy tasks like encoding, emulation, or AI workloads, I’d highly recommend adding a fan—it’s a simple mod that makes a big difference.

Anyone else running their Pi 5 under heavy workloads? How are you keeping temps in check?

3 Comments
2025/01/30
23:48 UTC

1

How do I watch GPIO pins at a fast rate

I have a RPi 3B+ with node-red flows watching 4 GPIO inputs. 1 of the 4 is shows 'ok' and does not give a pin value (1,0) where the other 3 show and give the pin value.

I can move the wire that connects my sensor system to the RPi for the 'bad' pin to other pins and the problem follows. Sometimes the pin works, but ultimately goes 'bad'.

I can run raspi-gpio get in terminal and see the input switching to 1 when the sensor trips, and reset when sensor resets.

An o-scope shows similar noise on the bad and a good pin, and the voltage switching between 0V & 3V is the same on the bad and a good pin.

I am at a loss as to the problem and am wondering if there is a way to watch with a faster refresh rate (raspi-gpio get is every 2 seconds).

Node red sees something I cannot.

Any recommendations are appreciated.

2 Comments
2025/01/30
23:59 UTC

1

Is my pico broken or?

Hey everyone,

I’m new to working with the Pico 2 W and running into a weird issue. Whenever I try to run one of the simple example C projects, my Pico just disconnects from my laptop.

It connects fine at first and is recognized, but as soon as I run the project code , the terminal says: "The device was rebooted to start the application." - and then it disconnects from my laptop.

1 Comment
2025/01/30
21:56 UTC

0

Password works on pi4, permission denied on pc

So I've had no issues up until now when I wanted to try putting a pivpn on my rpi4 along with pihole im currently using. Went to try to connect and I get permission denied, please try again.

So I grabbed my keyboard and went on the rpi and works just fine to log in. But it's not allowing me now on my laptop to connect via ssh. I even disabled pihole through its UI for 30 seconds to login and that didn't work either. So I would think it's not pihole doing this..

Anyone have a idea?

12 Comments
2025/01/30
20:31 UTC

474

OpenAI's nightmare: Deepseek R1 on a Raspberry Pi [Jeff GeerlingGuy]

79 Comments
2025/01/30
20:20 UTC

1

Running a Raspberry Pi Wi-Fi Bridge

I am creating a wifi bridge for a hotspot network using a raspberry pi. These is what I have done so far:

sudo nmcli c add con-name wifibridge type ethernet ifname eth0 ipv4.method shared ipv6.method ignore

sudo nmcli con up wifibridge

for some reason my bridged network is on a private network (10.42.x.x) and I cant access the web interface for a server I connected to the bridged network when I connect to the hotspot via wifi (192.168.x.x) but when I connect via ethernet I can access the web interface. I'm new to raspberry pi's

1 Comment
2025/01/30
17:18 UTC

1

Can i somehow install a newer version of Java 17 on 3B+(32 bits ARM)?

So i got Java 17 and im trying to use Minifi but it wont support that version of Java, it seems that i need a newer version, jdk21+, can i somehow install this on my rasperry 3B+ ? Ive tried a little now but no success at all, im using SSH.

Is there some version that support 32 bit? And can i get this to work with ssh somehow or do i need a mouse&monitor?

Would appreciate your guys help! Thanks :)

23 Comments
2025/01/30
16:16 UTC

1

CCTV multicam viewer

hey all ive been working on a remote viewing setup of my local CCTV and have been using chatgpt and deepseek on using boot scripts to view 4 stream with vlc, omxplayer, chromium and mpv either using rtsp or mpeg stream links.. with chromium and chrome on windows for some weird reason only opens one stream of these although they are formatted as the same with a go2rtc restreamer server and all these 4 mpeg streams work fine with windows Edge.. *shrug*
with vlc, omxplayer and mpv although i have the booth script to do a quad layout it only display a single stream in Fullscreen. ive worked for days trying to find a way to get this to work..

SO.. im throwing in the towel, is there a way outside of these methods to stream these using a pi.. ive found some projects but they seem to be abandoned.

1 Comment
2025/01/30
03:11 UTC

0

Pi Zero as Wireless Print Server for Lexmark CX510de?

Bought Pi Zero 2 W.

Did headless setup, SSH from my PC is working fine, installed CUPS and Samba, did a thing using vi to edit the Samba config file (guided by https://www.youtube.com/watch?v=hdwqQjDjMzU)

Pi server connected to the correct USB port on the back of my Lexmark CX510de printer. It powers up fine (taking power from that USB port on the printer) and logs onto my wi fi network quickly.

Accessed the CUPS web interface (192.168.1.248:631 on my PC's web browser) but in the "add printer" section, my printer doesn't show up.

lsusb from the Pi command line just says:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

…which doesn't sound like it's related to my printer at all. Seems like the printer and the Pi aren't talking to each other.

Does anyone know if/how I can fix this please?

Thank you.

2 Comments
2025/01/30
09:55 UTC

8

Help, I'm stuck! Trying to convert a Pi Zero 2W + Pi Camera module 3 in a webcam

Hello everyone,
I’ve been trying to repurpose an old Apple iSight camera into a Pi Webcam, following a tutorial I found on the Raspberry Pi website (https://www.raspberrypi.com/tutorials/p ... sb-webcam/), but unfortunately, I haven’t had any luck.

I also tried some of the suggestions from this thread (viewtopic.php?p=2286552&hilit=webcam#p2286552), but while I didn’t encounter any error messages, the camera wasn’t recognized when plugged into the Raspberry Pi. Instead, it showed up as an "unknown USB device (device descriptor request failed)."

I’m using a Raspberry Pi Zero 2 W with a Pi Camera Module 3 and a 64GB microSD card.

I don’t have much experience with coding, so if anyone could help me turn this old piece of tech into something useful and enjoyable again, I’d really appreciate it!

Thanks so much in advance! 

28 Comments
2025/01/30
14:34 UTC

0

Does the Raspberry Pi detect the Geekworm x862 v2.0 without an M.2 connected?

So I'm trying to figure out if my M.2 drive I got is bad, or if the board or USB adapter that plugs into RPi and x862 board is bad.

Does anyone know if the Pi detects the x862 when plugged in with the USB adapter while there is no M.2 drive connected on the x862 board? Or if someone would kindly test this out by removing their M.2 and seeing if the Pi detects it. (Can run `lsusb` to see if it does/doesn't.)

Many thanks

4 Comments
2025/01/30
01:09 UTC

1

RPI Zero 2 W/Adafruit stereo bonnet/neopixel Ring - unable to run ALSA commands as sudo.

I've been chasing this around all day. I'm running a script that involves using a neopixel, an SSD1306 OLED display, and the adafruit stereo bonnet.

Neopixels require sudo to work properly. so I'm running the script as sudo. THe problem i've discovered is that when I try to use basically anything ALSA related when running sudo commands, i'm getting the following error:

ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave

I know it's typically best to run without sudo when possible, but I can't find anything from neopixels that allows me to run it without. So that leaves me with trying to figure out a fix for this odd problem.

3 Comments
2025/01/30
00:42 UTC

25

iPhone Shortcuts 🤝 pi

Screenshot of the Shortcuts app

I was toying with setting up cron jobs like I set my alarms through Siri where I say “wake me up at 7 tomorrow.” Voila, my phone knows I mean 7am and the alarm is set.

I stumbled upon running scripts over SSH via Shortcuts. All I’ve successfully done is reboot, but seems like there’s a fair bit of possibilities here. I’ve also used Termius to connect with my pi, but I haven’t seen much use of the shortcut anywhere. I’m curious if anyone’s played around with this or found any real use for it. I’m going to see if I can’t make a cron scheduler from a voice prompt

4 Comments
2025/01/29
22:30 UTC

1

I want to connect to a wifi network using the terminal, but it doesn't work.

I am trying to connect to a wifi connection by entering this into the terminal:

sudo nmcli dev wifi connect "WifiSSID" password "Password1!"

But it gives the error:

Error: Connection activation failed: Secrets were required, but not provided.

How can I fix this?

2 Comments
2025/01/29
12:13 UTC

4

Is there a replacement to RaspberryCast 3.0?

I really wanted to use this so anyone with the web address could add an audio file into the playlist and have it play.

The original version of this has been dead for 2 years and has no plans of coming back. If it wasn't for the fact that it needs omxplayer to work I would just try and use it.

1 Comment
2025/01/29
11:52 UTC

0

Help! USB serial port randomly disappeared for no apparent reason!

Hi All

I have a raspberry pi running remotely that for over a year has been logging data received over a USB serial port. Node-red takes this data and passes it to a database.

All of a sudden this has stopped working....

Nothing has really changed recently... Except I had an issue where I was getting errors to do with a disk being full... The disk wasn't really full, the network location that the pi was trying to write logs to has been turned off so that broke a load of stuff. I've now removed references to that network location and removed the mount details.

I can't understand why this device has suddenly gone after working for so long. As I said I am remote so don't have physical access to it but I can get people to go and prod it. Someone has already gone to make sure that the usb cable is still plugged in.

Any help very much appreciated.

In the node red logs I see:

[error] [serialconfig:064dbcc85c43b2be] serial port /dev/ttyUSB0 error: Error: Error: No such file or directory, cannot open /dev/ttyUSB0

if I do lsusb I see:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and if I do dmesg -w I find some mentions of USB stuff:

[ 1.838994] usb 1-1: new high-speed USB device number 2 using xhci_hcd

[ 1.839328] Run /sbin/init as init process
[ 1.839342] with arguments:
[ 1.839351] /sbin/init
[ 1.839361] splash
[ 1.839370] with environment:
[ 1.839379] HOME=/
[ 1.839388] TERM=linux
[ 1.989570] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[ 1.989608] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 1.989623] usb 1-1: Product: USB2.0 Hub
[ 1.991642] hub 1-1:1.0: USB hub found
[ 1.991883] hub 1-1:1.0: 4 ports detected

12 Comments
2025/01/29
06:41 UTC

1

Pi zero OTG power question regarding GND from another source.

Hey all,

I'm trying to set my zero in otg with a different power than the pi it's plugged in. So I've made a custom wire that only sends data (green, white and black) and and gets the VCC (red) from another source. I've connected all 3 grounds together (source data, source power and the output data+power) but it can't detect it. Everything works fine when I use both ports instead of just the otg one.

5 Comments
2025/01/29
02:55 UTC

2

RPI 5 Music Player install

Good Day, I have a brand new pi5 that I would like to setup as a dedicated music player, like a Touch Tunes.

I have tried installing Volumino, and a couple options via network install and via imaging, it installs fine, and gets to the splash screen and shuts off.

It will install and run Raspbian just fine…

Any leads?

4 Comments
2025/01/28
23:02 UTC

1

Raspberry Pi to run the motor

hi everyone,
i am trying to use a Raspberry pi model 4B to spin my Nema17 motor, which has MKS servo42A motor board. i was able to just spin it. but i want to do more than spinning the motor. i want to get its position reading and velocity/speed reading (which i am able to see on its LCD board) along with its voltage and control signals.

Later i realized that the motor board does not have a com port so I maybe that's the case that i am not able to get the readings so i bought another motor(Nema17 MKS Servo42C motor) but with this motor I not even able to spin the motor with the same connection of servo42A.

I don't have any background in this field but i need the readings for one of my project. can anyone please help me on how to get these readings? Also i am sticking with Raspberry PI because it uses Python and i want to modify few more things on the motor like adding my own controller algorithms (Model predictive controller).

Thank you

1 Comment
2025/01/28
23:11 UTC

Back To Top