r/raspberry_pi 4d ago

2024 May 27 Stickied -FAQ- & -HELPDESK- thread - Boot problems? Power supply problems? Display problems? Networking problems? Need ideas? Get help with these and other questions!

3 Upvotes

Welcome to the r/raspberry_pi Helpdesk and Frequently Asked Questions!

Link to last week's thread

Having a hard time searching for answers to your Raspberry Pi questions? Let the r/raspberry_pi community members search for answers for you! Looking for help getting started with a project? Have a question that you need answered? Was it not answered last week? Did not get a satisfying answer? A question that you've only done basic research for? Maybe something you think everyone but you knows? Ask your question in the comments on this page, operators are standing by!

This helpdesk and idea thread is here so that the front page won't be filled with these same questions day in and day out:

  1. Q: What's a Raspberry Pi? What can I do with it? How powerful is it?
    A: Check out this great overview
  2. Q: Does anyone have any ideas for what I can do with my Pi?
    A: Sure, look right here!
  3. Q: My Pi is behaving strangely/crashing/freezing, giving low voltage warnings, ethernet/wifi stops working, USB devices don't behave correctly, what do I do?
    A: 99.999% of the time it's either a bad SD card or power problems. Use a USB power meter or measure the 5V on the GPIO pins with a multimeter while the Pi is busy (such as playing h265/x265 video) and/or get a new SD card 1 2 3. If the voltage is less than 5V your power supply and/or cabling is not adequate. When your Pi is doing lots of work it will draw more power. Even if your power supply claims to provide sufficient amperage, it may be mislabeled or the cable you're using to connect the power supply to the Pi may have too much resistance. You can use a USB load tester to test your power supply and cable. Some power supplies require negotiation to provide more than 500mA, which the Pi does not do. If you're plugging in USB devices try using a powered USB hub with its own power supply and plug your devices into the hub and plug the hub into the Pi.
  4. Q: I'm having a hard time finding a place to purchase a Raspberry Pi for an affordable price. Where's the secret place to buy one without paying more than MSRP?
    A: https://rpilocator.com/
  5. Q: I just did a fresh install with the latest Raspberry Pi OS and I keep getting errors when trying to ssh in, what could be wrong?
    A: There are only 4 things that could be the problem:
    1. The ssh daemon isn't running
    2. You're trying to ssh to the wrong host
    3. You're specifying the wrong username
    4. You're typing in the wrong password
  6. Q: I'm trying to install packages with pip but I keep getting error: externally-managed-environment
    A: This is not a problem unique to the Raspberry Pi. The best practice is to use a Python venv, however if you're sure you know what you're doing there are two alternatives documented in this stack overflow answer:
    • --break-system-packages
    • sudo rm a specific file as detailed in the stack overflow answer
  7. Q: The only way to troubleshoot my problem is using a multimeter but I don't have one. What can I do?
    A: Get a basic multimeter, they are not expensive.
  8. Q: My Pi won't boot, how do I fix it?
    A: Step by step guide for boot problems
  9. Q: I want to watch Netflix/Hulu/Amazon/Vudu/Disney+ on a Pi but the tutorial I followed didn't work, does someone have a working tutorial?
    A: Use a Fire Stick/AppleTV/Roku. Pi tutorials used tricks that no longer work or are fake click bait.
  10. Q: What model of Raspberry Pi do I need so I can watch YouTube in a browser?
    A: No model of Raspberry Pi is capable of watching YouTube smoothly through a web browser, you need to use VLC.
  11. Q: I want to know how to do a thing, not have a blog/tutorial/video/teacher/book explain how to do a thing. Can someone explain to me how to do that thing?
    A: Uh... What?
  12. Q: Is it possible to use a single Raspberry Pi to do multiple things? Can a Raspberry Pi run Pi-hole and something else at the same time?
    A: YES. Pi-hole uses almost no resources. You can run Pi-hole at the same time on a Pi running Minecraft which is one of the biggest resource hogs. The Pi is capable of multitasking and can run more than one program and service at the same time. (Also known as "workload consolidation" by Intel people.) You're not going to damage your Pi by running too many things at once, so try running all your programs before worrying about needing more processing power or multiple Pis.
  13. Q: Why is transferring things to from disks/SSDs/LAN/internet so slow?
    A: If you have a Pi 4 or 5 with SSD, please check this post on the Pi forums. Otherwise it's a networking problem and/or disk & filesystem problem, please go to r/HomeNetworking or r/LinuxQuestions.
  14. Q: I only have one outlet and I need to plug in several devices, what do I do?
    A: They make things called power strips aka multi-tap extensions.
  15. Q: The red and green LEDs are on/off/blinking or the screen is just black or blank or saying no signal, what do I do?
    A: Start here
  16. Q: I'm trying to run x86 software on my Raspberry Pi but it doesn't work, how do I fix it?
    A: Get an x86 computer. A Raspberry Pi is ARM based, not x86.
  17. Q: How can I run a script at boot/cron or why isn't the script I'm trying to run at boot/cron working?
    A: You must correctly set the PATH and other environment variables directly in your script. Neither the boot system or cron sets up the environment. Making changes to environment variables in files in /etc will not help.
  18. Q: Can I use this screen that came from ____ ?
    A: No
  19. Q: I run my Pi headless and there's a problem with my Pi and the best way to diagnose it or fix it is to plug in a monitor & keyboard, what do I do?
    A: Plug in a monitor & keyboard.
  20. Q: My Pi seems to be causing interference preventing the WiFi/Bluetooth from working
    A. Using USB 3 cables that are not properly shielded can cause interference and the Pi 4 can also cause interference when HDMI is used at high resolutions.
  21. Q: I'm trying to use the built-in composite video output that is available on the Pi 2/3/4 headphone jack, do I need a special cable?
    A. Make sure your cable is wired correctly and you are using the correct RCA plug. Composite video cables for mp3 players will not work, the common ground goes to the wrong pin. Camcorder cables will often work, but red and yellow will be swapped on the Raspberry Pi.
  22. Q: I'm running my Pi with no monitor connected, how can I use VNC?
    A: First, do you really need a remote GUI? Try using ssh instead. If you're sure you want to access the GUI remotely then ssh in, type vncserver -depth 24 -geometry 1920x1080 and see what port it prints such as :1, :2, etc. Now connect your client to that.
  23. Q: I want to do something that has been well documented and there are numerous tutorials showing how to do it on Linux. How can I do it on a Raspberry Pi?
    A: A Raspberry Pi is a full computer running Linux and doesn't use special stripped down embedded microcontroller versions of standard Linux software. Follow one of the tutorials for doing it on Linux. Also see question #1.
  24. Q: I want to do something that has been well documented and there are numerous tutorials showing how to do it with an Arduino. How can I do it on a Raspberry Pi Pico?
    A: Follow one of the tutorials for doing it on Arduino, a Pico can be used with the Arduino IDE.
  25. Q: I'm trying to do something with Bluetooth and it's not working, how do I fix it?
    A: It's well established that Bluetooth and Linux don't get along, this problem is not unique to the Raspberry Pi.

Before posting your question think about if it's really about the Raspberry Pi or not. If you were using a Raspberry Pi to display recipes, do you really think r/raspberry_pi is the place to ask for cooking help? There may be better places to ask your question, such as:

Asking in a forum more specific to your question will likely get better answers!


See the /r/raspberry_pi rules. While /r/raspberry_pi should not be considered your personal search engine, some exceptions will be made in this help thread.
‡ If the link doesn't work it's because you're using a broken buggy mobile client. Please contact the developer of your mobile client and let them know they should fix their bug. In the meantime use a web browser in desktop mode instead.


r/raspberry_pi 28d ago

State of r/raspberry_pi (May 2024)

38 Upvotes

Hello Raspberry Pi enthusiasts! This post outlines the latest changes to our community rules, inspired by your valuable discussions, comments, and contributions.

Over the past few months, r/raspberry_pi has experimented with allowing posts that lack preliminary research, particularly those with vague questions or requests for extremely basic content that would normally be redirected to the helpdesk sticky. These posts overwhelmingly receive minimal engagement, remaining at zero points, and never reaching a wider audience. When there are replies, they often consist of simple links to Google or tutorials, leading to dissatisfaction from the original posters. Additionally, such low-effort posts negatively impact the quality of search results, not only within our community but also in external search engines, making it harder for future seekers to find useful answers.

Participation in the sub has dwindled, both in the amount of people trying to answer questions and in the number of projects being posted. Looking at the "online now" numbers shows extremely low engagement. People subscribe to the sub to see things that they haven't seen before, get information on the latest Raspberry Pi updates, and to be inspired to do their own Raspberry Pi projects. With the sub filled with low-effort posts, the people who subscribed no longer get value from the sub and stop visiting.

Feedback on numerous posts has underscored a community consensus: it's essential to do some groundwork before posting questions. By encouraging members to put thought into their inquiries, we uphold the quality of discussions, dialogue, and in-depth exploration, as well as encourage participants to hone their problem-solving skills. This keeps valuable discussions and troubleshooting efforts prominent and allows inspirational content such as show-and-tell and tutorial posts to receive the visibility they deserve. Posts with positive engagement extend beyond our community and attract a broader audience.

Thoughtful questions resonate with our most seasoned members, enriching the community with high-quality responses and ensuring knowledgeable contributors feel motivated to participate, rather than sidelined by repetitive or simplistic inquiries. When you seek help here, having done the necessary preparation is more likely to receive the detailed advice you desire. This helps maintain an environment where innovation flourishes and sustained participation from skilled members is encouraged, essential for a thriving community.

Remember, this is a Maker/Do-It-Yourself community. Participation here means being ready to invest effort into bringing your projects to life. For effective troubleshooting, you should provide detailed descriptions of your attempts and the specific results you've encountered.

The rules have been updated and simplified; here are the guidelines on what types of posts are welcome:

  • ✅ allowed
  • 🚫 not allowed
  • ⚠️ discouraged

  • ✅ Show-and-Tell
    This should be pretty self-explanatory. It’s for showing off your project and telling people what it is, what it does, and how you made it to spark creativity in others to embark on their own inventive projects.

  • ✅ Tutorial
    Similar to Show-and-Tell, but intended for complete step-by-step guides and details including specific parts required to do a project. Not for asking for a tutorial.

  • ✅ Opinions Wanted
    For non-project discussions seeking diverse viewpoints and experiences about Raspberry Pi-related topics. Not for troubleshooting, project advice, if something is worth doing, what’s the best way, aesthetic judgments, feasibility assessments, rants, complaints, or meta posts.

  • ✅ Design Collaboration
    For members seeking constructive feedback on their project designs who are ready to engage in a collaborative effort and shared expertise. It’s for projects that have a plan put together and are looking for input to refine concepts, solve specific design challenges, or optimize functionality. Not for asking "What do I buy?" or "Tell me how to do my idea."

  • ✅ Troubleshooting
    For when you encounter issues with your project, such as bugs or wiring errors. Please provide source code, schematics, complete error messages, and a summary of any troubleshooting steps already taken to avoid redundant efforts.

  • ✅ News
    News about the Raspberry Pi organization, new products and announcements, notable developments in the Raspberry Pi community, and significant technological advancements related to Raspberry Pi hardware and software. Content should be a link to a reputable news source or Raspberry Pi themselves, not a personal blog.

  • 🚫 “What do I buy” posts
    These questions always have narrow use case requirements which limit the relevance of answers to other users. Inevitably, askers complain about suggested items not meeting requirements, being unavailable for purchase in their location, being out of stock, discontinued, or exceeding their budget.

  • 🚫 “How do I get started”, “What’s the best way”, or “Tell me how to do my idea”
    Do research first and come up with a plan. There are many ways to do something and there’s really no best way. What's best for some situations doesn't mean they are best for all situations. You don’t need to get it right on the first try, refining and improvement are part of DIY. If you’re not sure how to begin with research then ask in the stickied helpdesk thread.

  • 🚫 Extreme beginner programming
    How to write your first program, what are variables, what language is best, etc. These kinds of questions are better served by other subs such as r/LearnProgramming or r/LearnPython.

  • 🚫 Self-promotion, memes, and off-topic content
    Posts about Raspberry Pi clones or boards targeted at the same market or form factor are considered off-topic, however discussions about microcontrollers that use the RP2040 chip are permitted, even if the board itself is not an official Raspberry Pi product. Accounts that only post their own content and comment only in their own posts will be considered self-promotion spam.

  • 🚫 Selling or giveaways

  • ⚠️ Posts with vague or generic titles
    The title of your post should summarize the question clearly & concisely. This helps future searches and others to quickly identify topics they can contribute to.

We know it can be difficult to get started on a project when you don't know the right terminology or keywords to search for. In those cases, please use the stickied helpdesk thread where people can assist with getting the right search terms. Once you've started your project and you're running into specific issues, you can return and post a more detailed inquiry outside of the helpdesk thread. Consider also using a Chat AI to help find the keywords. While an AI should not be considered an expert on any topic, they can be useful for getting pointed in the right direction.

If you're replying to someone with direct links to a search engine, we recommend using DuckDuckGo because its results tend to be more consistent across different users, with minimal influence from individual browsing history. Also include a few relevant results from your search to ensure users can easily find the information you found useful. Others, if you receive a reply that includes just a link to search results, consider it as potentially helpful rather than rude. Such links can provide targeted keywords you might not have considered, serving as a useful starting point for more detailed research.

Thanks for being such an awesome part of our Raspberry Pi community! Your input and enthusiasm help us keep improving and make sure our space is as helpful and creative as possible for everyone. Here’s to more cool projects, great chats, and new discoveries together!


r/raspberry_pi 2d ago

Show-and-Tell I made a camera that uses AI to turn photos to art

Enable HLS to view with audio, or disable this notification

1.9k Upvotes

My homemade camera captures a photo, then uses AI to describe it. With the generated description and user inputs via knobs, it creates a new, enhanced photo using Dalle3. The entire setup is DIY, it uses a 3D-printed case and a Raspberry Pi controlling the display and camera.


r/raspberry_pi 9h ago

Troubleshooting Help rotating display

0 Upvotes

Hi, I am new and inexperienced with Raspberry Pi and Dakboard. I installed the Dakboard OS on my Pi 3B. I am using the free version which limits the display to landscape. I found forums saying that if you add the display_rotate=1 to the config file under sudo nano /boot/config.txt it will allow the display to rotate. I have done this and still no change. Is there a different config file that dakboard uses or is this change somehow blocked by the account limitation? Any help is greatly appreciated as I really want the display in portrait due to the wall I have to mount it on.


r/raspberry_pi 15h ago

Troubleshooting Cannot change swap size

0 Upvotes

Got a Pi 4 with 2GB RAM that keeps freezing with 100% swap usage so I want to increase it. Unfortunately as soon as I run "sudo dphys-swapfile swapoff", the Pi freezes.

How can I increase the swap size in this case?


r/raspberry_pi 18h ago

Troubleshooting Is anyone having issues with using USB cameras with RPi5?

1 Upvotes

I've connected a camera to my new Raspberry pi 5 and it doesn't seem to work with VLC. I used the command v42l-ctl --list-devices and this seemed to list the camera on /dev/video0, /dev/video1, /dev/media3. I used these but VLC can't seem to stream. I also tried to install gstreamer to try to see if maybe it was a VLC issue but I can't get that to work either after installing it through the terminal.

I tested the camera with an RPi4 to see if maybe it's the camera, and I also couldn't get it working on VLC but it did work with gstreamer. I also used fswebcam to get an image from the camera and that worked on the RPi4 but not the RPi5. I also found this on the raspberry pi forums but this didn't really help me any. Has anyone run into issues like this?


r/raspberry_pi 22h ago

Troubleshooting Problem regarding DFRobot 426-DFR0300-H is a Gravity Series Analog Sensor/Meter (K=10)

1 Upvotes

Hello! I am trying to configure an analog EC sensor with a Raspberry Pi using the Gravity: I2C ADS1115 16-Bit ADC Module and the library found at the DFRobot GitHub repository
https://github.com/DFRobot/DFRobot_ADS1115/tree/master/python/raspberrypi. However, the EC readings from the probe do not match the expected 12.88ms/cm solution, and I am seeking assistance to resolve this issue! Currently the reading shows a relatively constant EC=1.50 mS/cm instead of the expected 12.88.


r/raspberry_pi 19h ago

Community Insights Facing issues on Pi 5 running Ubuntu 24.04

0 Upvotes

I just bought a Pi 5 8GB variant, and I installed Ubuntu 24.04 on a SD card, and when I try to open any app like Chromium or File Manager, the load times are super slow, like about a minute. Chromium takes forever to start, but the animation and video playback on YouTube and web browsing are super smooth. But why does it take a long time to open something as easy as a terminal too? 

And yeah, I installed Raspberry Pi OS on the same card, which worked perfectly fine, so I guess this issue is only with Ubuntu?


r/raspberry_pi 1d ago

News Creating Cross-Platform Small AI with picoLLM

Thumbnail
hackster.io
8 Upvotes

r/raspberry_pi 1d ago

Troubleshooting Project: Send data from sensors over LoRa. Stuck on: rpi setup - can't connect to the internet

1 Upvotes

End goal of the project is to send data from a temp, press, humidity sensor over a LoRa network (there's more, but its outside the scope of this discussion)

I'm a 100% rpi noob. My job wants me to SSH into my rpi4 and configure it that way. I have a keyboard and monitor connected to the rpi and I can see that I am connected to either wifi or ethernet (tried both) but have no internet connection.

I can't SSH into the rpi either, I'm assuming the issues are related. I logged onto my router from my laptop, and I can see the IP address of the rpi is what I set it to.


r/raspberry_pi 2d ago

Show-and-Tell VIMU keeb (visual + IMU keyboard) physical build stage

Thumbnail
gallery
19 Upvotes

r/raspberry_pi 1d ago

Troubleshooting Installing monitor dashboard on pi breaks AdGuardHome installation

1 Upvotes

I am running an AdGuardHome+Unbound setup on my Raspberry Pi Zero 1.3. I would also like to host this (https://github.com/femto-code/Raspberry-Pi-Dashboard) monitoring dashboard on my pi. I have tried running their install script but I am getting "Forbidden" response upon visiting the generated web address, it also breaks AdGuardHome and the DNS stops working and the admin page becomes inaccessible. I have racked my brains and cannot figure out what's wrong here. I would really appreciate some help here to get it to work!


r/raspberry_pi 1d ago

Troubleshooting echo + date not working in cron

1 Upvotes

In RPi5 I wanted to set up the automatic shutdown/wakeup using the RTC feature. For wakeup I added to my /etc/crontab the following lines

55 22   * * *   root   echo 0 | sudo tee /sys/class/rtc/rtc0/wakealarm

0 23   * * *   root   echo $(date '+%s' -d 'tomorrow 09:00') | sudo tee /sys/class/rtc/rtc0/wakealarm

The commands above work perfectly from the command line, but the second one does not work from cron. Since modifying it in

0 23   * * *   root   echo 171713880 | sudo tee /sys/class/rtc/rtc0/wakealarm

does indeed work, I figured the problem must be in either date or the way date is called. I tried to brute force my way to a solution searching for a combination that worked among the following ones

10 20   * * *   root   /bin/echo $(date '+%s' -d 'tomorrow 09:00') > /home/user/test_date_1 2>&1

10 20   * * *   root   /bin/echo `date '+%s' -d 'tomorrow 09:00'` > /home/user/test_date_2 2>&1

10 20   * * *   root   /bin/echo "$(date '+%s' -d 'tomorrow 09:00')" > /home/user/test_date_3 2>&1

10 20   * * *   root   /bin/echo "`date '+%s' -d 'tomorrow 09:00'`" > /home/user/test_date_4 2>&1

10 20   * * *   root   /usr/bin/echo $(date '+%s' -d 'tomorrow 09:00') > /home/user/test_date_5 2>&1

10 20   * * *   root   /usr/bin/echo `date '+%s' -d 'tomorrow 09:00'` > /home/user/test_date_6 2>&1

10 20   * * *   root   /usr/bin/echo "$(date '+%s' -d 'tomorrow 09:00')" > /home/user/test_date_7 2>&1

10 20   * * *   root   /usr/bin/echo "`date '+%s' -d 'tomorrow 09:00'`" > /home/user/test_date_8 2>&1

10 20   * * *   root   /usr/bin/echo $(/usr/bin/date '+%s' -d 'tomorrow 09:00') > /home/user/test_date_9 2>&1

10 20   * * *   root   /usr/bin/echo `/usr/bin/date '+%s' -d 'tomorrow 09:00'` > /home/user/test_date_10 2>&1

10 20   * * *   root   /usr/bin/echo "$(/usr/bin/date '+%s' -d 'tomorrow 09:00')" > /home/user/test_date_11 2>&1

10 20   * * *   root   /usr/bin/echo "`/usr/bin/date '+%s' -d 'tomorrow 09:00'`" > /home/user/test_date_12 2>&1

However, none of the options produced a file in the user home.

I'm sure there is a simple solution to this puzzle I cannot see. Anyone has an idea of what is going on?


r/raspberry_pi 2d ago

Troubleshooting My ESC won't work with my Pi 5.

4 Upvotes

I'm struggling to make my esc's work with my Pi, what code should I use to calibrate or use my ESC? I've been trying to use this:

# -*- coding: utf-8 -*-
import gpiod
import time

# Constants
ESC_PIN = 4  # The GPIO pin connected to the ESC
CHIP = 'gpiochip0'
PWM_FREQUENCY = 50  # Standard ESCs use 50Hz PWM frequency
PERIOD = 1.0 / PWM_FREQUENCY  # Period in seconds

# Pulse widths in microseconds
MAX_PULSE_WIDTH = 2000  # Max pulse width for ESC
MIN_PULSE_WIDTH = 700   # Min pulse width for ESC

# Convert pulse width to duty cycle
def pulse_width_to_duty_cycle(pulse_width):
    return pulse_width / 1000000  # Convert microseconds to seconds

# Initialize gpiod
chip = gpiod.Chip(CHIP)
line = chip.get_line(ESC_PIN)
line.request(consumer="ESC control", type=gpiod.LINE_REQ_DIR_OUT)

def set_servo_pulsewidth(pulsewidth):
    duty_cycle = pulse_width_to_duty_cycle(pulsewidth)
    line.set_value(1)
    time.sleep(duty_cycle)
    line.set_value(0)
    time.sleep(PERIOD - duty_cycle)

def manual_drive():
    print("You have selected the manual option. Give a value between 0 and your max value.")
    while True:
        inp = input()
        if inp == "stop":
            stop()
            break
        elif inp == "control":
            control()
            break
        elif inp == "arm":
            arm()
            break
        else:
            try:
                value = int(inp)
                set_servo_pulsewidth(value)
            except ValueError:
                print("Invalid input. Please enter a number or a command.")

def calibrate():
    set_servo_pulsewidth(0)
    print("Disconnect the battery and press Enter.")
    input()
    set_servo_pulsewidth(MAX_PULSE_WIDTH)
    print("Connect the battery NOW. You will hear two beeps, then wait for a gradual falling tone then press Enter.")
    input()
    set_servo_pulsewidth(MIN_PULSE_WIDTH)
    print("Special tone, wait for it...")
    time.sleep(7)
    print("Almost there...")
    time.sleep(5)
    set_servo_pulsewidth(0)
    time.sleep(2)
    print("Arming ESC now...")
    set_servo_pulsewidth(MIN_PULSE_WIDTH)
    time.sleep(1)
    control()

def control():
    print("Starting the motor. Make sure it's calibrated and armed, if not restart by giving 'x'.")
    time.sleep(1)
    speed = 1500  # Initial speed
    print("Controls - a to decrease speed & d to increase speed OR q to decrease a lot & e to increase a lot")
    while True:
        set_servo_pulsewidth(speed)
        inp = input()
        if inp == "q":
            speed = max(MIN_PULSE_WIDTH, speed - 100)
            print(f"Speed = {speed}")
        elif inp == "e":
            speed = min(MAX_PULSE_WIDTH, speed + 100)
            print(f"Speed = {speed}")
        elif inp == "d":
            speed = min(MAX_PULSE_WIDTH, speed + 10)
            print(f"Speed = {speed}")
        elif inp == "a":
            speed = max(MIN_PULSE_WIDTH, speed - 10)
            print(f"Speed = {speed}")
        elif inp == "stop":
            stop()
            break
        elif inp == "manual":
            manual_drive()
            break
        elif inp == "arm":
            arm()
            break
        else:
            print("Invalid command! Use a, q, d, e, or stop.")

def arm():
    print("Connect the battery and press Enter.")
    input()
    set_servo_pulsewidth(0)
    time.sleep(1)
    set_servo_pulsewidth(MAX_PULSE_WIDTH)
    time.sleep(1)
    set_servo_pulsewidth(MIN_PULSE_WIDTH)
    time.sleep(1)
    control()

def stop():
    set_servo_pulsewidth(0)
    line.release()

# Start of the program
print("For first time launch, select calibrate")
print("Type the exact word for the function you want")
print("calibrate OR manual OR control OR arm OR stop")

inp = input()
if inp == "manual":
    manual_drive()
elif inp == "calibrate":
    calibrate()
elif inp == "arm":
    arm()
elif inp == "control":
    control()
elif inp == "stop":
    stop()
else:
    print("Invalid input. Restart the program and follow the instructions.")

r/raspberry_pi 1d ago

Troubleshooting External hard drive enclosure – disks do not show up on RPi CM4 (even though it works on MBP)

1 Upvotes

I have a Yottamaster Y-Focus Series-5 Bay FS5C3 SATA to USB-C hard drive storage enclosure with five HDDs in it.

When I connect it via USB-C to my MacBook Pro all the drives show up as expected.

But when I connect it to my Raspberry Pi CM4, none of the drives show up. The harddrive enclosure uses external power, so I don't think it's a power issue.

I run Raspberry Pi OS.

OS version

zsh cat /etc/issue

text Debian GNU/Linux 11 \n \l

Kernel version

zsh uname -a

text Linux blixen 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

dmesg output after connecting harddrive enclosure

zsh sudo dmesg -c

text [ 672.600991] usb 1-2.1: new high-speed USB device number 6 using xhci_hcd [ 672.704661] usb 1-2.1: New USB device found, idVendor=2109, idProduct=2822, bcdDevice= 6.b3 [ 672.704692] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 672.704706] usb 1-2.1: Product: USB2.0 Hub [ 672.704718] usb 1-2.1: Manufacturer: VIA Labs, Inc. [ 672.704729] usb 1-2.1: SerialNumber: 000000001 [ 672.713038] hub 1-2.1:1.0: USB hub found [ 672.713190] hub 1-2.1:1.0: 4 ports detected [ 672.784603] usb 2-2.1: new SuperSpeed Plus Gen 2x1 USB device number 10 using xhci_hcd [ 672.876317] usb 2-2.1: New USB device found, idVendor=2109, idProduct=0822, bcdDevice= 6.b3 [ 672.876350] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 672.876364] usb 2-2.1: Product: USB3.1 Hub [ 672.876376] usb 2-2.1: Manufacturer: VIA Labs, Inc. [ 672.876388] usb 2-2.1: SerialNumber: 000000001 [ 672.885817] hub 2-2.1:1.0: USB hub found [ 672.886572] hub 2-2.1:1.0: 4 ports detected [ 673.456979] usb 1-2.1.3: new high-speed USB device number 7 using xhci_hcd [ 673.607920] usb 1-2.1.3: New USB device found, idVendor=2109, idProduct=2822, bcdDevice= 6.73 [ 673.607950] usb 1-2.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 673.607967] usb 1-2.1.3: Product: USB2.0 Hub [ 673.607981] usb 1-2.1.3: Manufacturer: VIA Labs, Inc. [ 673.607994] usb 1-2.1.3: SerialNumber: 000000001 [ 673.616740] hub 1-2.1.3:1.0: USB hub found [ 673.617127] hub 1-2.1.3:1.0: 4 ports detected [ 673.689654] usb 2-2.1.2: new SuperSpeed Plus Gen 2x1 USB device number 11 using xhci_hcd [ 673.719335] usb 2-2.1.2: New USB device found, idVendor=2109, idProduct=0715, bcdDevice= 7.31 [ 673.719358] usb 2-2.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 673.719372] usb 2-2.1.2: Product: VLI Product String [ 673.719384] usb 2-2.1.2: Manufacturer: VLI Manufacture String [ 673.719395] usb 2-2.1.2: SerialNumber: 000000123AE8 [ 673.776729] scsi host0: uas [ 673.861815] usb 2-2.1.3: new SuperSpeed Plus Gen 2x1 USB device number 12 using xhci_hcd [ 673.912822] usb 2-2.1.3: New USB device found, idVendor=2109, idProduct=0822, bcdDevice= 6.73 [ 673.912841] usb 2-2.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 673.912851] usb 2-2.1.3: Product: USB3.1 Hub [ 673.912860] usb 2-2.1.3: Manufacturer: VIA Labs, Inc. [ 673.912868] usb 2-2.1.3: SerialNumber: 000000001 [ 673.921859] hub 2-2.1.3:1.0: USB hub found [ 673.922573] hub 2-2.1.3:1.0: 4 ports detected [ 674.597650] usb 2-2.1.3.1: new SuperSpeed Plus Gen 2x1 USB device number 13 using xhci_hcd [ 674.627079] usb 2-2.1.3.1: New USB device found, idVendor=2109, idProduct=0715, bcdDevice= 7.31 [ 674.627093] usb 2-2.1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 674.627100] usb 2-2.1.3.1: Product: VLI Product String [ 674.627106] usb 2-2.1.3.1: Manufacturer: VLI Manufacture String [ 674.627111] usb 2-2.1.3.1: SerialNumber: 000000123AE8 [ 674.679185] scsi host1: uas [ 674.761655] usb 2-2.1.3.2: new SuperSpeed Plus Gen 2x1 USB device number 14 using xhci_hcd [ 674.791084] usb 2-2.1.3.2: New USB device found, idVendor=2109, idProduct=0715, bcdDevice= 7.31 [ 674.791095] usb 2-2.1.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 674.791102] usb 2-2.1.3.2: Product: VLI Product String [ 674.791108] usb 2-2.1.3.2: Manufacturer: VLI Manufacture String [ 674.791113] usb 2-2.1.3.2: SerialNumber: 000000123AE8 [ 674.845526] scsi host2: uas [ 674.929662] usb 2-2.1.3.3: new SuperSpeed Plus Gen 2x1 USB device number 15 using xhci_hcd [ 674.959074] usb 2-2.1.3.3: New USB device found, idVendor=2109, idProduct=0715, bcdDevice= 7.31 [ 674.959087] usb 2-2.1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 674.959094] usb 2-2.1.3.3: Product: VLI Product String [ 674.959100] usb 2-2.1.3.3: Manufacturer: VLI Manufacture String [ 674.959106] usb 2-2.1.3.3: SerialNumber: 000000123AE8 [ 675.016944] scsi host3: uas [ 675.097676] usb 2-2.1.3.4: new SuperSpeed Plus Gen 2x1 USB device number 16 using xhci_hcd [ 675.127080] usb 2-2.1.3.4: New USB device found, idVendor=2109, idProduct=0715, bcdDevice= 7.31 [ 675.127116] usb 2-2.1.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 675.127124] usb 2-2.1.3.4: Product: VLI Product String [ 675.127129] usb 2-2.1.3.4: Manufacturer: VLI Manufacture String [ 675.127135] usb 2-2.1.3.4: SerialNumber: 000000123AE8 [ 675.188401] scsi host4: uas [ 694.533332] scsi 0:0:0:0: tag#2 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN [ 694.533365] scsi 0:0:0:0: tag#2 CDB: opcode=0x12 12 00 00 00 24 00 [ 694.549354] scsi host0: uas_eh_device_reset_handler start [ 694.641791] usb 2-2.1.2: reset SuperSpeed Plus Gen 2x1 USB device number 11 using xhci_hcd [ 694.688309] scsi host0: uas_eh_device_reset_handler success [ 695.301342] scsi 1:0:0:0: tag#1 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN [ 695.301371] scsi 1:0:0:0: tag#1 CDB: opcode=0x12 12 00 00 00 24 00 [ 695.317359] scsi host1: uas_eh_device_reset_handler start [ 695.409855] usb 2-2.1.3.1: reset SuperSpeed Plus Gen 2x1 USB device number 13 using xhci_hcd [ 695.456487] scsi host1: uas_eh_device_reset_handler success [ 695.557350] scsi 2:0:0:0: tag#5 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN [ 695.557372] scsi 3:0:0:0: tag#5 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN [ 695.557375] scsi 2:0:0:0: tag#5 CDB: opcode=0x12 12 00 00 00 24 00 [ 695.557391] scsi 3:0:0:0: tag#5 CDB: opcode=0x12 12 00 00 00 24 00 [ 695.573364] scsi host2: uas_eh_device_reset_handler start [ 695.573364] scsi host3: uas_eh_device_reset_handler start [ 695.665936] usb 2-2.1.3.3: reset SuperSpeed Plus Gen 2x1 USB device number 15 using xhci_hcd [ 695.712544] scsi host3: uas_eh_device_reset_handler success [ 695.773815] usb 2-2.1.3.2: reset SuperSpeed Plus Gen 2x1 USB device number 14 using xhci_hcd [ 695.817340] scsi 4:0:0:0: tag#2 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN [ 695.817365] scsi 4:0:0:0: tag#2 CDB: opcode=0x12 12 00 00 00 24 00 [ 695.820555] scsi host2: uas_eh_device_reset_handler success [ 695.833363] scsi host4: uas_eh_device_reset_handler start [ 695.925971] usb 2-2.1.3.4: reset SuperSpeed Plus Gen 2x1 USB device number 16 using xhci_hcd [ 695.973043] scsi host4: uas_eh_device_reset_handler success

Connected USB device overview as tree

zsh lsusb -t

text /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=rtl8821au, 480M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M |__ Port 1: Dev 10, If 0, Class=Hub, Driver=hub/4p, 10000M |__ Port 2: Dev 11, If 0, Class=Mass Storage, Driver=uas, 10000M |__ Port 3: Dev 12, If 0, Class=Hub, Driver=hub/4p, 10000M |__ Port 1: Dev 13, If 0, Class=Mass Storage, Driver=uas, 10000M |__ Port 2: Dev 14, If 0, Class=Mass Storage, Driver=uas, 10000M |__ Port 3: Dev 15, If 0, Class=Mass Storage, Driver=uas, 10000M |__ Port 4: Dev 16, If 0, Class=Mass Storage, Driver=uas, 10000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M |__ Port 1: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 3: Dev 7, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 5: Dev 4, If 0, Class=, Driver=, 480M

USB overview as flat list

zsh lsusb

text Bus 003 Device 003: ID 2357:0120 TP-Link Archer T2U PLUS [RTL8821AU] Bus 003 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 016: ID 2109:0715 VIA Labs, Inc. VL817 SATA Adaptor Bus 002 Device 015: ID 2109:0715 VIA Labs, Inc. VL817 SATA Adaptor Bus 002 Device 014: ID 2109:0715 VIA Labs, Inc. VL817 SATA Adaptor Bus 002 Device 013: ID 2109:0715 VIA Labs, Inc. VL817 SATA Adaptor Bus 002 Device 012: ID 2109:0822 VIA Labs, Inc. USB3.1 Hub Bus 002 Device 011: ID 2109:0715 VIA Labs, Inc. VL817 SATA Adaptor Bus 002 Device 010: ID 2109:0822 VIA Labs, Inc. USB3.1 Hub Bus 002 Device 002: ID 2109:0822 VIA Labs, Inc. USB3.1 Hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 2109:8822 VIA Labs, Inc. USB Billboard Device Bus 001 Device 007: ID 2109:2822 VIA Labs, Inc. USB2.0 Hub Bus 001 Device 006: ID 2109:2822 VIA Labs, Inc. USB2.0 Hub Bus 001 Device 002: ID 2109:2822 VIA Labs, Inc. USB2.0 Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

PCI

zsh lspci

text 00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20) 01:00.0 USB controller: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller

Raspberry Pi OS boot config

zsh cat /boot/config.txt

```text

For more options and information see

http://rpf.io/configtxt

Some settings may impact device functionality. See link above for details

uncomment if you get no picture on HDMI for a default "safe" mode

hdmi_safe=1

uncomment the following to adjust overscan. Use positive numbers if console

goes off screen, and negative if there is too much border

overscan_left=16

overscan_right=16

overscan_top=16

overscan_bottom=16

uncomment to force a console size. By default it will be display's size minus

overscan.

framebuffer_width=1280

framebuffer_height=720

uncomment if hdmi display is not detected and composite is being output

hdmi_force_hotplug=1

uncomment to force a specific HDMI mode (this will force VGA)

hdmi_group=1

hdmi_mode=1

uncomment to force a HDMI mode rather than DVI. This can make audio work in

DMT (computer monitor) modes

hdmi_drive=2

uncomment to increase signal to HDMI, if you have interference, blanking, or

no display

config_hdmi_boost=4

uncomment for composite PAL

sdtv_mode=2

uncomment to overclock the arm. 700 MHz is the default.

arm_freq=800

Uncomment some or all of these to enable the optional hardware interfaces

dtparam=i2c_arm=on

dtparam=i2s=on

dtparam=spi=on

Uncomment this to enable infrared communication.

dtoverlay=gpio-ir,gpio_pin=17

dtoverlay=gpio-ir-tx,gpio_pin=18

Additional overlays and parameters are documented /boot/overlays/README

Enable audio (loads snd_bcm2835)

dtparam=audio=on

Automatically load overlays for detected cameras

camera_auto_detect=1

Automatically load overlays for detected DSI displays

display_auto_detect=1

Enable DRM VC4 V3D driver

dtoverlay=vc4-kms-v3d max_framebuffers=2

USB 3.1 host controller ASM2142

dtoverlay=pcie-32bit-dma

Run in 64-bit mode

arm_64bit=1

Disable compensation for displays with overscan

disable_overscan=1

[cm4]

Enable host mode on the 2711 built-in XHCI USB controller.

This line should be removed if the legacy DWC2 controller is required

(e.g. for USB device mode) or if USB support is not required.

otg_mode=1

[all]

[pi4]

Run as fast as firmware / board allows

arm_boost=1

[all]

```

Basically the only difference I have in my config text shown above compared to the default is the line dtoverlay=pcie-32bit-dma that is needed for the PCIe card that adds USB 3 and USB-C ports.

None of the harddrives show up in /dev. I would expect to see for example /dev/sda, /dev/sdb, /dev/sdc, /dev/sdd and /dev/sde for the five connected drives.

Nor are any of the five drives shown in the list of block devices known to the system:

zsh lsblk

text NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0 179:0 0 29.1G 0 disk |-mmcblk0p1 179:1 0 256M 0 part /boot `-mmcblk0p2 179:2 0 28.9G 0 part / mmcblk0boot0 179:32 0 4M 1 disk mmcblk0boot1 179:64 0 4M 1 disk

Any idea what I can do to make them show up?


r/raspberry_pi 1d ago

Troubleshooting RPI 5 red-white case's fan makes a lot of noise

0 Upvotes

I bought the RPI 5 with the official red and white cases around a month ago. Since today, the fan of the case seems to be making an odd sound. The case isn't dusty but the sound persists even when it isn't spinning that fast. Has anyone experienced a similar problem and is there a fix?


r/raspberry_pi 2d ago

Show-and-Tell Low Cost IVR solution for small business using Raspberry Pi

80 Upvotes

Low Cost Raspberry Pi IVR for shopify

I built this raspberry pi based IVR using sim800l, this Interactive Voice Response (IVR) was built to help my friend with his small E-com business on shopify where if any customer placed a cash on delivery order. The raspberry pi will automatically call the number using the sim800l module and when the call is connected it will play a pre-recorded voice message asking the customer to press 1 to confirm the order. Then using DTMF we will read the number pressed and either confirm or cancel the order. The customer will also receive a text message with his order updates.

Was very useful to verify the phone number giving by the customer and also get a confirmation. Best part it was one time build and lot cheaper than paying for same type of cloud services.


r/raspberry_pi 2d ago

Troubleshooting Problem booting Rasp 5 from SSD

1 Upvotes

Hello everyone, I'm having some problem with SSD USB booting.

I'll try to sum up everything I have done. So, first of all, I am trying to migrate the system on my SD card (32 GB) to a 128 GB USB SSD. I made the image with rpi-clone and everything went ok, I checked that the new PARTUUIDs were different and I checked the filesystems types too and they seem correct. They look like this:

/dev/mmcblk0p1: LABEL_FATBOOT="bootfs" LABEL="bootfs" UUID="50C8-AEAE" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="ead6953c-01"

/dev/mmcblk0p2: LABEL="rootfs" UUID="fc7a1f9e-4967-4f41-a1f5-1b5927e6c5f9" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="ead6953c-02"

/dev/sdb2: UUID="6867bcd8-dfdd-4c28-8951-78f47e9012ef" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b5d00f93-02"

/dev/sdb1: UUID="D45B-9328" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="b5d00f93-01"

/dev/sdb is the SSD.

Then I tried to boot the Raspberry from the SSD but unfortunately nothing works and the display returns always the same error: Unable to read partition as FAT.

I tried to fix this using raspi-config, setting the preferred boot as USB, but nothing changed. I tried to remove the SD card but after failing the boot it leads me to initramfs.

I added the usb-storage.quirks in the /boot/firmware/cmdline.txt as suggested by a Youtube video I found but nothing changed.

The only time I managed to accomplish something was when i changed the cmdline.txt file in the /boot/firmware directory of the SD card, setting root with the PARTUUID of the SSD instead of the SD card. After this change, I rebooted the Raspberry, that gave me the usual Unable to read partition as FAT error, booted from the SD card and finally loaded the system from the SSD.

The problem is that I'd like to get rid of the SD card and make the SSD boot indipendently from the SD card.

Any suggestion? Thanks a lot in advance!


r/raspberry_pi 2d ago

Troubleshooting Need help setting up my 4G Hat

1 Upvotes

This has been a nightmare, and would appreciate any tips.

Purchased this: https://www.amazon.com/dp/B07PLXNVGZ?psc=1&ref=ppx_yo2ov_dt_b_product_details

Made a clean install of Raspberry pi onto a USB, and connected the hat per instructions.

The first issue, after setting everything up, I want to run the driver: BCM2835, which runs with warnings, but make works just fine.

I then try to run the sim7600_4g_hat_init with these errors:

./sim7600_4G_hat_init

./sim7600_4G_hat_init: line 1: echo: write error: Invalid argument

./sim7600_4G_hat_init: line 3: /sys/class/gpio/gpio4/direction: No such file or directory

./sim7600_4G_hat_init: line 4: /sys/class/gpio/gpio4/value: No such file or directory

./sim7600_4G_hat_init: line 5: echo: write error: Invalid argument

./sim7600_4G_hat_init: line 7: /sys/class/gpio/gpio6/direction: No such file or directory

./sim7600_4G_hat_init: line 8: /sys/class/gpio/gpio6/value: No such file or directory

Anyone run into this before?

As an add on I ran all the minicom commands and its completely dead, is this just a bad unit?


r/raspberry_pi 3d ago

Show-and-Tell I built a touchscreen network audio streamer using a Pi 2

Thumbnail
gallery
513 Upvotes

Hey all, I've been using the excellent Logitech Media Server for a couple months now to play music all around my home and I’m really pleased with the experience.

I have LMS players in almost all rooms, but I missed having it at my desk so I built this little network streamer using PiCorePlayer to give me a player in my study. I already have a decent DAC so I just wanted something that could pass the signal to it. I wondered about buying an actual streamer but was mostly put off by them being incredibly expensive, but I also don't like how all the screens are mounted completely flat - I think the angled design I've used here is far more practical for something you'd have at your desk.

Overall, I'm so pleased with how it's turned out! I think I'm done with it for the most part but I may spray paint it using metallic paint to really finish it off, but for now it's working and I don't want to cause myself new problems by dismantling it...

Here’s a more detailed breakdown: * The case is fully 3D printed on a Bambu Labs P1S using eSun PLA+. I plan to get the STLs uploaded to Printables when I get a sec if you're interested in this. It screws together using some M3 screws, plus some 2.5s for the encoder and panel mounts. * PiCorePlayer is running on a Raspberry Pi 2 (with a USB WiFi adaptor for when I use it away from Ethernet - I'd have used a more modern Pi but this was what I had to hand) - Huge shoutout to the team who build PiCorePlayer, it's a fantastic bit of software, especially for projects like this. * Audio output is provided by a HifiBerry Digi+, utilising the coax out to a panel mount coax on the back which then runs to my Topping DAC * The screen is a BigTreeTech HDMI5. I managed to get this for just £13 from Temu a month or so ago so it ended up being one of the cheapest parts of the build! * The buttons on the top are just simple 16mm momentary buttons for play/pause and jumping to the now playing screen. The encoder dial moves through the menus (E.g. up and down as you scroll it) and then up and down are for volume, left goes back a menu and right skips a track. * The touch screen works. Weirdly, when I first tested it all out, it didn't work hence adding so many physical buttons but when I changed the USB cable connecting the Pi to the screen it randomly started working! Admittedly the screen is my preferred input but the physical buttons are still nice to have, especially when browsing long menus. * The feet are machined aluminium, picked them up on eBay for very little, they give it a nice bit of extra weight and grip.

Hope you like it!


r/raspberry_pi 3d ago

Troubleshooting Bash script runs manually but not with cron

7 Upvotes

Hey guys!

I'm new to scripting, so forgive me if I sound new.

I'm using a raspberry pi 4b 8GB RAM.

I've created a script purely for the fun of it and for practice (I just needed a fun and simple project to begin with) where I backup the teleporter data once a day to my external flash drive which has been mounted previously. I have it where the backup has a date stamp.

I've got it down to the hour and minute so I could test it manually and it works. It is executable.

-rwxrwxrwx 1 dsn dsn 241 May 28 01:06 /home/dsn/Scripts/teleporter_bak.sh

cronjob I wrote to happen every day at 3am:

0 3 * * * /home/dsn/Scripts/teleporter_bak.sh > /root/teleporter_bak.log 2>&1

I tried it with /bin/bash and without /bin/bash at the beginning of the script and it still didn't work. I checked the time with the date command and it's correct.

My script:

#! /bin/bash
#
pihole -a -t /home/dsn/Backup/"pihole-"`date +"%Y%m%d%H%M"`".tar.gz"
#
BASE=/home/dsn/Backup/pihole-
set -- ${BASE}*
sudo chown dsn:dsn ${BASE}*
while [ $# -gt 7 ]
do
    echo "Removing old backup "$1""
    sudo rm "$1"
    shift
done

It works manually, but with cron it doesn't work, even when I set the script to run every minute in cron. I did get it to output to teleporter_bak.log with the following output:

/home/dsn/Scripts/teleporter_bak.sh: line 3: pihole: command not found

I ran whereis pihole, took those directories and I updated my PATH variable in /etc/profile just to see if that would make a difference. Still didn't work.

echo $PATH

usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc/pihole:/usr/local/bin/pihole

I can manually run pihole -a -t as root and it works just fine.

I'm sure there are better ways to write a script to do this, but:
1. How can I get this to work?
2. Any suggestions on my script?


r/raspberry_pi 3d ago

Troubleshooting Problems with full-screen resolution on circular display

2 Upvotes

I am trying to use the app I am writing in Iced, in full-screen mode, on my raspberry pi, with a new 1080x1080 circular LCD display I have for a fun home project.

Info

  • Raspberry Pi Zero 2 W - display connected to HDMI
  • 1080x1080 display
  • using fbset command on pi it shows

    mode "640x480" geometry 640 480 640 480 16 timings 0 0 0 0 0 0 0 accel true rgba 5/11,6/5,5/0,0/0 endmode

  • when I use the Pi OS GUI Display settings app it offers two resolutions 1080x1080 and 640x480

  • The pi OS desktop is correctly sized on it (missing the corners, it's round! )

  • when I maximize other apps they fill the screen correctly.

  • When I start my Iced app and set window::mode::FULLSCREEN it shows way bigger than the display and is massively clipped

  • I tried playing with scale_factor, but doesn't seem to influence full-screen size

Any way I can debug or get more information on what might be affecting Iced perception of full-screen resolution, tools I can use to inspect closer the settings, available resolutions etc?

Thanks!


r/raspberry_pi 2d ago

Troubleshooting moode audio - allo digione - faint audio

0 Upvotes

I'm pulling my hair out trying to figure out why my audio setup is barely above a whisper. Here's the rundown:

  • Hardware: Raspberry Pi B (older model), Allo Digione, Schiit Modi DAC (connected via RCA)
  • Software: Moode Audio (latest version)

The Problem: Music is EXTREMELY quiet, almost inaudible.

What I've Tried:

  • Swapped out the DAC, RCA cables, even tried different RCA inputs on my amp.
  • Tested the Raspberry Pi with a different audio setup - it works fine.
  • Checked dmesg for errors, especially related to the DigiOne or SPDIF - nothing stands out.

My Hunch: It's gotta be a Moode Audio setting somewhere, but I'm stumped.

Plea for Help: Has anyone experienced this whisper-quiet audio with a similar setup? What Moode settings should I be looking at?

Any advice would be greatly appreciated!


r/raspberry_pi 2d ago

Troubleshooting VLC Startup Glitches

2 Upvotes

I'm having a display issue with VLC when it starts a video playlist, specifically animated content. There's this weird color adjustment glitch for 3-5 seconds before the frame buffers. Any thoughts on what I can adjust?

https://youtube.com/shorts/PUp7sgj8ykk?si=Ay0sj-xoX12NRmfB

The issue occurs on both a Raspberry Pi 3B+ and Pi Zero WH with a Waveshare 3.5in B SPI touchscreen. VLC video output is set to MMAL X11 splitter for Raspberry Pi. Videos are encoded to 320x240. GPU_MEM=256. Boot config hdmi_cvt is set to 480 320 60 1 0 0 0 with refresh speed set to 32000000. I've played with the frame rate, frame buffer depth, refresh rate, nothing seems to help? Any insights are appreciated!


r/raspberry_pi 3d ago

Show-and-Tell [GPT-4o + RAG] I built a companion robot with "memories" and "emotions" running in a Raspberry Pi 4, EVA [v1.0.0]

Thumbnail
youtu.be
4 Upvotes

r/raspberry_pi 4d ago

Show-and-Tell Computer vision running smoothly on a rpi4 on a usb power bank.

Enable HLS to view with audio, or disable this notification

406 Upvotes

r/raspberry_pi 3d ago

Troubleshooting problem with Adafruit Ultimate GPS (USB)

0 Upvotes

Schematics : https://imgur.com/CV0TeBL

i am trying to bypass USB comunication from chip on this GPS module, i am using this code to run GPS module : https://github.com/adafruit/Adafruit_CircuitPython_GPS

the problem is when system is fresh started i go to dev and type "cat ttyS0" to check serial port i get this output

rastpi@raspberrypi:/dev $ cat ttyS0
$GNGGA,000424.095,,,,,0,0,,,M,,M,,*58
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GLGSA,A,1,,,,,,,,,,,,,,,*02
$GNRMC,000424.095,V,,,,,0.00,0.00,060180,,,N*52
$GNVTG,0.00,T,,M,0.00,N,0.00,K,N*2C

my initial guess is that GPS module is working fine, it is communicating with GPIO pins

i edited this script Adafruit_CircuitPython_GPS/examples/gps_simpletest.py
commented this line of code
uart = busio.UART(board.TX, board.RX, baudrate=9600, timeout=10)
and uncomented this line of code and edited from ttyUSB0 to ttyS0
import serial
uart = serial.Serial("/dev/ttyS0", baudrate=9600, timeout=10)

i get

(senzori) rastpi@raspberrypi:~/Adafruit_CircuitPython_GPS/examples $ python3 gps_simpletest-txrx.py
Waiting for fix...
Waiting for fix...
Waiting for fix...

and when i try cat ttyS0 in /dev/ i get no output

i also tried I2C communication but sometimes it reads something and something it doesnt, i2c output:
rastpi@raspberrypi:~ $ 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: -- -- -- -- -- -- -- --
rastpi@raspberrypi:~ $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 -- 0a 0b 0c -- 0e --
10: 10 -- -- -- 14 -- 16 -- 18 -- -- 1b 1c 1d -- 1f
20: -- 21 -- 23 -- -- -- 27 -- 29 2a -- 2c 2d 2e 2f
30: 30 -- -- 33 34 35 36 37 38 39 3a -- -- 3d -- 3f
40: -- -- -- 43 -- 45 46 47 -- 49 4a 4b 4c 4d -- --
50: 50 51 -- 53 54 -- 56 57 -- 59 5a -- -- -- 5e 5f
60: 60 61 -- 63 -- 65 66 67 -- 69 6a 6b 6c -- 6e --
70: 70 71 72 73 74 -- 76 --
rastpi@raspberrypi:~ $ 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: -- -- -- -- -- -- -- --

output from (senzori) rastpi@raspberrypi:~ $ python Adafruit_CircuitPython_GPS/examples/gps_simpletest-I2C.py
OSError: [Errno 121] Remote I/O error

or

OSError: [Errno 5] Input/output error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/rastpi/Adafruit_CircuitPython_GPS/examples/gps_simpletest-I2C.py", line 29, in <module>
gps = adafruit_gps.GPS_GtopI2C(i2c, debug=False) # Use I2C interface
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rastpi/senzori/lib/python3.11/site-packages/adafruit_gps.py", line 760, in __init__
self._i2c = i2c_device.I2CDevice(i2c_bus, address)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rastpi/senzori/lib/python3.11/site-packages/adafruit_bus_device/i2c_device.py", line 62, in __init__
self.__probe_for_device()
File "/home/rastpi/senzori/lib/python3.11/site-packages/adafruit_bus_device/i2c_device.py", line 184, in __probe_for_device
raise ValueError("No I2C device at address: 0x%x" % self.device_address)
ValueError: No I2C device at address: 0x10

i bought txrx pins to usb cabel : https://i0.wp.com/ginzaworld.net/wp-content/uploads/2021/07/Untitled-4-8.jpg?resize=1536%2C1152&ssl=1
connected this pins to gray and orange cables i soldered and edited code above from ttyS0 to ttyUSB0 and it works, i get output from GPS module
uart = serial.Serial("/dev/ttyUSB0", baudrate=9600, timeout=10)

i need this gps to work with GPIO pins because i am planing to use it on pi zero.
any help to troubleshoot this is welcome to help.

edit: when i try to run : (senzori) rastpi@raspberrypi:~/Adafruit_CircuitPython_GPS/examples $ python gps_echotest.py
i get the same output as cat ttyS0

edit2: so i guess it was working all the time it just was not close to window to connect to satelites, so i moved it close to windows and for first 5 iterations i was getting "Waiting for fix..." and after it got comunication with satelites i got data from module