abovefreezing
August 8, 2024, 20:09

USB devpath. What does it mean and does it stay the same per USB port?

In this post are 4 questions. On a Raspberry Pi 4, for example, I can plug a device into one of the USB ports and then the output of ls /dev/tty will include a new entry which is /dev/ttyUSB0. Nice : ) The command udevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB0) | grep "ATTRS{devpath}" will return one of the following, depending on which port the USB device is plugged into: ATTRS{devpath}=="1.1" ATTRS{devpath}=="1.2" ATTRS{devpath}=="1.3" ATTRS{devpath}=="1.4" So it appears each physical USB outlet has a certain devpath. Does that path remain the same, does it ever change, and if so when? How are the USB outlets enumerated? Also, the devpath == "1.2", for example... Does "1" denote USB controller number 1? * Does the "2" represent output/port/channel/serial# or something?
.shvne
August 8, 2024, 17:52

Microservices cluster design questions

Hi, all. Not sure if I'm in the right place for this question or not but here goes.. I'm designing a small microservices application and I've grown beyond what is reasonable to pay for using cloud servies and have been working to design a small 5 or 6 node cluster computing solution using rasberry pi modules. I have somequestions that I'm hoping you can help me with.
pfeunetos
August 8, 2024, 17:50

no Pull Up Pin connected to SDA and SCL

Connection OLED 1.3Inch SH1106 to Raspberry Pi Pico W. Pin : GND - GND 3v3 - VDD GP5 - SCK GP4 - SDA Question : Im using a breadboard for ease, but Iā€™m told to add a pull up resistor. No pull up found on SDA or SCL; check wiring Ive been trying to solve for days but still couldnt. How do I connect the resistor? And how do I solve this issue? I just want my OLED to display Hello world..
boobeshappu
August 8, 2024, 06:55

PI 4 Model B taking around 5 mins to boot

Hi Guys, Iā€™m new to the raspberry pi community. I recently bought an Pi 4 B. I have booted it with Pi OS Desktop via pi imager in my 64 gb Sandisk Class 10 sdxc card. It took me more than 5 mins for every boot. I thought it was an issue while buring so I have burned it another time using etcher tool. Still same issue so I have tried the lite version even the lite version took 4 mins of booting time. I didnā€™t know what was the issue here. In the logs I can see one failure but Iā€™m not sure that was the issue. Take a look at the failed log below


expandedglue974
August 8, 2024, 06:45

Help with a google voice pi idea

I'm running a side hobbie of fixing computers and use a google voice number to communicate but if you are inactive for 30 days you lose your number, which is a problem for reoccurring customers. I was wondering if there was a way to have the pi send me a text through google voice once a week to keep myself from losing my number instead of manually doing it. I have a pi5 8gb and no coding experience other than the little block coding I did in middle school so if someone could point me in the direction to make this project a reality it would help me out a lot
rat_is_the_best
August 8, 2024, 05:59

Need help with voltages in pi pico

I'm doing a home automation project, In my bathroom I have a room freshener, that sprays every 10 minutes. It has a replaceable can, like a pressurized deodorant. It seems to work based on a motor, first it rotates clockwise then counterclockwise, to move the levers that push the spray. My aim: It should detect movement in the room every once in 10 seconds. When movement is detected, it should spray and then sleep for 30 mins. I have some experience in pico and basic electronics. Now my question is on controlling the motor, In the exiting setup, the motor seems to use around 3-4v and consumer around 150mA current. The setup runs on 2 AA batteries. I'm thinking of using a pico, and a motor driver like L293D to control the motor. But the L293D seems to need 5v for logic, but the pico provides only 3.3v. How can this be solved? Also the L293D seems to need 4.5v atleast for the supply, I was thinking of using a single 3.7v 18650 battery to power the pico and the motor driver. But that will not give 4.5v to the L293D. So do I need 2 18650 batteries in series to power the L293D? In that case charging becomes difficult, as I can't just use a tp4056 directly. For the motion sensor, I was thinking of using HC SR501, that also seems to require 5v.
minossc
August 7, 2024, 21:00

Need help installing a font on my Pico LCD screen.

Hi, pretty much I'm working on a project and on my lcd documentation there is an 8x5 font that seems like it can be used with my screen and I need it, however it is a "C" file and I don't know how to work with that, for now i am stuck with framebuf 8x8. if anyone knows how to install this c file into my pico and screen it would be awesome! here is the documentation https://www.waveshare.com/wiki/Pico-LCD-1.3#Bottom_hardware_interface scroll down the tiniest bit it says. on the website font8.c which is what I want. thanks :)
flixi
August 7, 2024, 19:21

Qbittorrent

Hello guys, so i just got my raspberry 5 and i installed qbittorrent on it, but everytime i start a download it directly goes to "Stalled". The Torrents work on my PC, which is in the same network.
fictionss
August 6, 2024, 22:28

gipo powered display proper shutoff

Can I just write this to the positive gipo pin? The timeout doesnā€™t seem to work. XScreensaver doesnā€™t work either. Would just drilling a hole in the case for this latch switch be the best practice? The ribbon will be fine staying plugged in while cutting the 5 volt + pole?
pixpaw
August 6, 2024, 13:30

RP4 as wifi bridge

I want to use my RP4 as a access point / bridge, meaning i have the Pi connected via LAN to my switch (unmanaged), the Pi should have a static ip (e.g. 192.168.85.4), clients should be able to connect to the wifi of the pi and get a IP from my local DHCP server via LAN (not from the Pi). Everything should be all one network 192.168.85.0/24 with traffic being able to go in both directions (basiaclly removing the Access Point Part of my router). I already tried a lot the past 48 hours but im lost and i cant get it to work (even it should not be that hard i guess). Anyone can guide me through a config? Im using raspi os lite
nick06259
August 4, 2024, 09:05

Photo slideshow to projector on boot using RPi 1

Hi there, I have an old RPi 1 and an old Sanyo projector with VGA in and I'd like to project a photo slideshow for a family event this coming weekend. It's something I've been wanting to do for a while but never got around to it. I'm not an expert by any measure so would maybe need my hand held a bit but how would I go about doing this? I'm thinking something that runs on boot with the media on a USB drive, a male HDMI > female VGA plug from the RPi to a VGA lead and into the projector. Is a version 1 even capable of this and does anyone have any easy to follow guides on how to do it and do you guys have any recommendations for a lightweight OS that can be run headless and accessed via SSH when needed? Thanks! Nick. PS, I am OK with using Docker.
luufff
August 4, 2024, 00:22

Hi, I'm looking for a small battery for a Raspberry Pi Zero. Does anyone have any recommendations?

matthewmojo1806
August 3, 2024, 23:22

Bluez refuses to work

Im just using an old pi 02w and trying to use it for bluetooth audio. Bluez doenst seem to work, i've uninstalled and reinstalled bluez, uninstalled and reinstalled the OS, rebooted multiple times. Nothing. When running sudo nano /etc/systemd/system/bt-agent.service it tries to create a new file. When running sudo systemctl enable bt-agent i get the error Failed to enable unit: Unit file bt-agent.service does not exist. Ive tried googling the error with no help and im pretty knew to linux and things like this so any help is appreciated šŸ‘
wazfoodle
August 3, 2024, 16:49

Raspberry Pi Stops internet

I was installing Klipperscreen on my raspberry pi 4b, when it reset i lost wireless access, Using an IP scanner it is no longer on the network. I tried hooking it up via ethernet cable with no differenece. i know the pi is at least partially working because the printer goes thru its start up cycle when i turn on the rpi4. Is this fixable? can i get my info off the sd card another way?
_korbindallas
August 3, 2024, 07:11

Bluetooth sound issue

I have a Raspberry Pi 4 Model B 2019 Quad Core 64 Bit WiFi Bluetooth (4GB). Also got Kinivo USB Bluetooth Adapter BTD500. So I am trying to make my raspberry pi play music over Bluetooth so I can have my car sound audio through Bluetooth. I read many places online to not use internal Bluetooth as it causes issues that I was having which is distorting like static sound which seems to lag and skip which may mean it has an issue to do with the buffering. I made sure the static noise wasnā€™t the cars power supply by testing it on a wall plug and portable battery pack and still seems to have the issue. I run the raspberry pi os with gui I also did verify my Bluetooth is coming from the dongle and not the internal Bluetooth. Any help would be appreciated thank you.
qccv
August 2, 2024, 23:17

board need newer software version

I was trying to run a retropie disk image and when I tried to boot it up I just get told that I need a newer software version related to the boot so I followed a guide were I have to create a new retropie install and copy itā€™s boot files to the boot files of the non working disk image and everything is working up to when I turn my pi on itā€™s just on a black screen with a blinking white bar, itā€™s been like that for like 45 minutes, do I just keep wait or something else?
filipdam
August 2, 2024, 09:10

Errno 9

Hi, im currently coding program that would display on my 2.13inch e-paper through Raspberry Pi zero 2W info from MQTT. It partially works because it displays all 3 values i want but they are static they are not updating. And i keep getting OSError: [Errno 9] Bad file descriptor.
justaccsolol
August 2, 2024, 01:06

Rpi Bluetooth

So I use a pi zero 2w, i tried using the GUI version and I was able to pair & connect to my phone however when i tried with the lite ver of rpi OS it now gives me an error I'm able to pair but not to connect I have ran out of ideas The error is org.bluez.error.failed
filipdam
August 1, 2024, 14:34

Display not working

I am trying to setup a 2.13inch Touch e-Paper on my Raspberry Pi4 and the display does not seem to be working. I have followed everything in this manual here https://www.waveshare.com/wiki/2.13inch ... HAT_Manual but it still does not seem to be working. When I touch the E-paper I can see inputs on my terminal which says that the E-paper is responding but the screen is not lighting up.
ashlin4010
July 31, 2024, 22:39

CM4 Libcamera with a custom device tree

I have been trying to get Libcamera to work on a cm4 system for a few days now with no success. My main issue is I have been unable to get i2c0 to show up or any muxed version of it (i2c10...) As far as I can tell my device tree is about right, I would have expected to have seen some effect with all the things I have tried. Looking for some info. What are the requirements of Libcamera, kernel module, does it expect to find a cam on i2c10 or does it check them all? How does the VideoCore and bcm2711 share BSC0 (i2c0)? What if any dtb does the VideoCore need, what is its default? What setting in config.txt may override my dtb or change the way the hardware is working? I should say the device tree is just a flattened version of the devices tree, overlays have been added inline.
goingfrickincraycray
July 30, 2024, 22:46

macro / steam deck with raspberry pi pico

Hey guys, I have a raspberry pi pico and im trying to make a macro / steam deck type thing where when you press a button it does a certain action. Would anyone be able to help me code this / get the materials for it?
captan220708
July 30, 2024, 16:46

Bluetooth not working, not scanning any devices (Rpi4)

I have bought a raspberry pi 4 from a store, its been 1.5 years by now i usually dont use rpi much but when i need it like for some projects and research related things... toady i wanted to use my Bluetooth of my rpi for many reasons like sharing some python files from my PC to rpi and basically connecting my headphones... i tried many times like changing the OSs and connecting external USB blutooth BUT IT JUST DONT SHOW ANYTHING! whenever i click on Add devices then a windows popups showing that it is scanning the nearby devices... like literally i have many Bluetooth devices near me and it is all showing in my phone and the PC but the that "Scanning Devices" window is blanck! Please help!

freeze
July 30, 2024, 11:57

Raspberry Pi Zero W not booting with a pre-installed SD card?

Hi there, I purchased a Raspberry Pi Zero W starter kit from The Pi Hut which came with a pre-installed OS on a SD card. However when I try to boot all I get is a rainbow screen and 7 blinking green flashes. Apparently the flashes mean "Kernel image not found" but as I say it's a pre-installed card that came with it so it seems unlikely the OS is installed wrong. Any help would be much appreciated! šŸ™
koukatsuwu
July 30, 2024, 04:55

(Arduino) Trying to send a web request with OpenAI API

cpp
# include <WiFi.h>

char  ssid = "";
char  password = "";
char * key = "Bearer "; 
//pretend these were filled out

void setup() {
    Serial.begin(9600);
    if (!Serial) { delay(5000); }
    Serial.print("Connecting to WiFi\n");
    WiFi.begin(ssid, password);
    while (WiFi.status() != WL_CONNECTED) { continue; }
    Serial.print("Connected!\n");
    WiFiSSLClient client;
    Serial.print("Connecting to OpenAI\n");
    if (!client.connectSSL("api.openai.com", 443)) {
        Serial.print("Connection failed!");
        return;
    }
    Serial.print("Connected!\n");
    String payload = "{\
model: gpt-3.5-turbo,\
messages: [{\
role: system,\
content: Why is grass green?\
}]\
}";
    client.println("POST /v1/chat/completions HTTPS/1.0");
    client.println("Host: api.openai.com");
    client.println("Content-Type: application/json");
    client.print("Content-Length: ");
    client.println(payload.length());
    client.print("Authorization: ");
    client.println(key);
    client.println();//separate data from headers
    client.println(payload);
    while (client.available()) {
        char c = client.read();
        Serial.print(c);
    }
    if (!client.connected()) {
        Serial.print("disconnected\n");
        client.stop();
    }
}
This is the code I'm using ^^ I've tried a ton of stuff but I only ever get an error code 400.... For reference, here's the request working
bash
curl https://api.openai.com/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: $KEY"   -d '{
    "model": "gpt-3.5-turbo",
    "messages": [
      {
        "role": "system",
        "content": "Why is grass green?."
      }
    ]
  }'
^^ the above command actually returns a ChatGPT-generated response
wille____
July 29, 2024, 17:02

Control a led lamp using my phone with Bluetooth on rasp4

How can I control a led lamp connected to raspberry pi 4b using the Bluetooth on my phone?
ihatenetworkchuck
July 28, 2024, 21:55

make[1]: *** /lib/modules/6.1.21-v8+/build: No such file or directory. Stop.

make -C /lib/modules/6.1.21-v8+/build M=/home/dietpi/r8152-2.16.3 modules
make[1]:  /lib/modules/6.1.21-v8+/build: No such file or directory.  Stop. 
make:  [Makefile:24: modules] Error 2
shabzup
July 28, 2024, 14:44

Smart glasses project using raspberry pi zero wh

Hey, I am struggling with connecting and accessing my raspberry pi zero wh with ssh, i have done all the steps correctly but it does not connect to my wifi network, I have tried both 2.4GHz and 5GHz networks with a dual band wifi router
mathewb_06264
July 28, 2024, 14:21

tv tunner

Hi there is there anyone her who know anything about tv tunners.I would like to connect one to a cm4.
pweppapig2
July 28, 2024, 05:17

Pi 4B not booting

Hey! So I've gone through the troubleshooting sticky guide and I can't seem to figure out what's wrong with my pi. I'm getting 4 slow green blinks and then 7 fast ones which supposedly indicates that kernel.img is not found but I've properly formatted and then flashed my SD card MULTIPLE times with different OS's using the Raspberry pi imager. I have put the correct version of the OS (64 bit) so I'm lost now. What is wrong?
h_0_p
July 27, 2024, 22:11

Auto-Forcing the cursor to move to lower corner

I have a project that runs a python script when the pi boots up. When it boots, it checks how many days left until Halloween, and displays an image on the screen to reflect how many days left. It also spins 2 stepper motors ...This part works. The issue I am having is the cursor is displayed right smack in the middle of the screen, and I need it moved out of the way. This is going to run on its own with no mouse/kb installed. I've tried using the following methods:
python
pyautogui
  - attempt to move the cursor using pyautogui.moveTo(screen_width - 1, screen_height - 1)
xdotool via subprocess
  - subprocess.run(["xdotool", "mousemove", str(screen_width - 1), str(screen_height - 1)])
  - also tried to execute xdtool before initializing pygame:
      subprocess.run(["xdotool", "mousemove", "1919", "719"])
pynput
  - mouse.position = (screen_width - 1, screen_height - 1)
evdev
  - ui.write(e.EV_REL, e.REL_X, screen_width - 1)
    ui.write(e.EV_REL, e.REL_Y, screen_height - 1)
    ui.syn()
Nothing seems to make the cursor move out of the way - I am trying to move it to the lower right of the screen where it will be hidden. Any input is greatly appreciated.