kaisers
July 6, 2024, 16:28

Pico W wifi scan with FreeRTOS

I'm trying to setup wifi scanning similar to the existing wifi scan example on the official repo (https://github.com/raspberrypi/pico-examples/tree/master/pico_w/wifi/wifi_scan). I've written some almost identical code to the functions written in the repo and the cyw43_wifi_scan function returns -4 whenever I call it. I can't find any documentation on this function regarding its error codes so I have no idea what that means. I suspect this issue is caused by the fact that I'm using the pico_cyw43_arch_lwip_sys_freertos library instead of the pico_cyw43_arch_lwip_threadsafe_background or pico_cyw43_arch_lwip_poll libraries used in the example. I need to use freeRTOS since using sockets without it is almost impossible so I'm kind of lost on how to get the cyw43_wifi_scan function to work with FreeRTOS. Has anyone else managed to achieve wifi scanning with the Pico W on FreeRTOS? Anyone have any suggestions on what to do? I've attached the code I'm running for those interested below (just prints "Failed to start scan: -4" repeatedly).
c++
int scanResult(void env, const cyw43_ev_scan_result_t result){
    if (result) {
        printf("ssid: %-32s rssi: %4d chan: %3d mac: %02x:%02x:%02x:%02x:%02x:%02x sec: %u\n",
            result->ssid, result->rssi, result->channel,
            result->bssid[0], result->bssid[1], result->bssid[2], result->bssid[3], result->bssid[4], result->bssid[5],
            result->auth_mode);
    }
    return 0;
}


bool WifiHelper::autoScan(){
    if (cyw43_arch_init()) {
        printf("failed to initialise\n");
        return 1;
    }
    cyw43_arch_enable_sta_mode();
    absolute_time_t scan_time = nil_time;
    bool scan_in_progress = false;

    while(true) {
        if (absolute_time_diff_us(get_absolute_time(), scan_time) < 0) {
            if (!scan_in_progress) {

                cyw43_wifi_scan_options_t scan_options = {0};
                int err = cyw43_wifi_scan(&cyw43_state, &scan_options, NULL, scanResult);
                
                if (err == 0) {
                    printf("\nPerforming wifi scan\n");
                    scan_in_progress = true;
                } else {
                    printf("Failed to start scan: %d\n", err);
                    scan_time = make_timeout_time_ms(10000); // wait 10s and scan again
                }
            } else if (!cyw43_wifi_scan_active(&cyw43_state)) {
                scan_time = make_timeout_time_ms(10000); // wait 10s and scan again
                scan_in_progress = false; 
            }
        }
    }
}
glitchchh
July 6, 2024, 15:57

Is my build good?

I looked up a few parts, its my first one, is it good and can it be better? I'm new, I dont need something like home entertaiment or lke this, I just want to have a project and something that I can customize how I want and like a mini (not powerful gaming) pc (https://pastebin.com/W8hVxXAB )
sykoreaper
July 6, 2024, 15:11

Camera Remote via WiFi

So I’ve got a project i need some help with for my girlfriend. End goal is a small hand held device with a screen and a capture button to control a canon 80D over WiFi with live view. Main question is can I code/configure the hand held to act as a dedicated program that only opens into the camera controls and takes a photo then the capture button is pressed. Ease of use and reliability are top priority due to this being for her work.
chis_
July 6, 2024, 14:43

Identifying Display connector

I am trying to find a connector for the display port and the touch screen monitor that I have. I counted the pins and it seems that it is a 15 pin to 15 pin connection, but i am only seeing this connector online as a camera connector. Am i right to buy a camera cable?
loufish
July 6, 2024, 07:47

Can I connect input AND output to the vsys?

So, I'm making a digital clock with a pi pico and a 16x2 LCD sceen. I'm reading everywhere that if you're going tp use batteries, you should use the VSYS pin, but my LCD is already connected to it to power it. To me it seems not right to connect both a power IN and a power OUT onto the same pin?
nate42272
July 4, 2024, 19:46

I can't install pi OS on the pi 5

Hey, I decided to try using a pi for the first time, so I bought a pi 5. I am trying to run it headless since I don't have a wired mouse and keyboard, but I am facing a couple of issues First off, using the imager, I can't seem to install the raspberry pi OS, directly from the imager, on the micro SD (specifically a Samsung 128 GB micro SD). Specifically I get the following error: "Error downloading: schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - The revocation function was unable to check revocation becsuse the revocation server was offline" I also tried downloading the image seperstely and installing the custom image with the imager. It does install now, but ssh does not work. I definitely had in enabled, but it does not connect Pls help if you can, I have been trying for 3 days to fix this but I can't figure out the issue
lavender1729
July 4, 2024, 16:26

How to drive 40 pin TFT LCD display with RP

I want to drive a 40 pin tft with a microcontroller. for now i'm considering using the rp zero 2. i have bought a hdmi to 40 pin controller, but I think that it would be nicer and less power hungry if I were able to drive the display from the pi. I also would like to avoid giving up all gpio, but am fine giving up most. would I be able to do this? it is an 800x480 display, but i'm not doing anything crazy graphical and I have a lot of overhead
pixelated_planco
July 4, 2024, 12:00

Raspberry PI4 as NAS and media player

Hello! I was wondering if someone might have some suggestions or advice. I want to use my raspberry pi 4 as a NAS as well as it being able to play videos itself. I've added a schematic of the situation. It would be great if I could put videos from my pcs and laptop to the External SSD making it able to play those files directly from the pi to the projector, but also my samsung tv to be able to play video files from the SSD attached to the Pi. I know that last thing is possible, because I've had it working before, by setting up a specific kind of NAS that the smart tv read as a media source, but I don't know if I can also add the possiblity for the pi to just be used as a media player and play the files from the external ssd attached to it. Preferably also while controlling the pi's media player by either the PC or my smart phone. Hope my question is clear 🙂 Any advice or suggestions are appreciated. Thanks in advance!
jellyfishmeal
July 3, 2024, 18:30

Pi Camera Breaks

Hi, I have a raspberry pi 4 and I am trying to connect a Camera Module 3 to the board. The Camera will work for a while, and then will stop working and will be bricked. The only time that I can see it happened right after I did a specific thing was when I installed some python libraries onto the pi. The only libraries that would interact with the camera were opencv and picamera2. This happened a few other times on some other boards, and they would just brick randomly and not work again. To test the cameras, I use libcamera-hello, and it says that there is no camera that is connected to the pi, when the camera is obviously plugged in. Does anyone have any ideas? I have run sudo apt-get update and upgrade, and that didn't fix anything.
keylon
July 2, 2024, 00:36

Best way to do moving graphics

What would be the best way to display something like this? the red dot in the middle moves around rapidly, and the numbers change rapidly. Would C# or Python be better? And what package should i use?
vidrazevasa
July 1, 2024, 23:07

Pi Zero 2 just craps out.

Hello, My new Rpi Zero 2 just... Dies over network. The light is on saying it has activity, but I cant SSH into it, and the mediatmx server running on it becomes unresponsive. It seems to happen faster if I unplug it, and then immediately plug it back in, and slower if I let it wait - which makes me think it's temperature, but I have a heatsink on it. I can't even ssh in to fix or reboot it.
oops.se
July 1, 2024, 13:51

PWM 12V Fan control using Pi5

moexrio
June 30, 2024, 19:35

CM4 PCB Design

Hello every one I am designing a very basic CM4 circuit. I need only one USB port for connecting camera or lte module. I am facing a problem to get the uart switch FSUSB42UMX its out of stock in my country and i dont have alot of time to finish my project so can i connect the USB_P and USB_N pins from the raspi CM4 (103 and 105 pins ) directly to USB A adding 5v and GND does that works any help plzzz.
nerf0
June 29, 2024, 18:36

How to use HID on arduino Mega2560

So basically im doing a school project and im doing a button box, for that i bought the arduino mega because it has more ports. I searched for a while to see like how would i do it, so basically only the arduino leonardo and the mini can use HID so when you connect the arduino to your pc it will recognize it as a keyboard or a gamepad. But the mega doesn't have HID so i saw on reddit a lot of guys using an app called Flip to change the firmware of the atmega16u2 chip so it works as an HID device. But im running into some problems, i already have the hex file but when i try to open a connection usb on the app it says that some .dll are missing and i installed the dll that was missing but i had the some problem still. Then i saw someone again on reddit saying that you need to put the arduino on DFU mode so the app can access the firmware, ive done that too but i think that my aduino is not going into DFU mode. when i try to put my arduino in DFU mode it shows like this on device manager i linked 2 photos the one called "1" is how i should show and the one called "image" is how it shows even after i put it on DFU mode.

_hxil
June 29, 2024, 18:09

sending and receiving data from different scripts

so im working on a project that needs real time audio input, im using just a pico so the pi itself cant take the audio input. to get around this, im trying to use regular python on my laptop to get the sound and then send the data to the pi, but i need advice figuring out how
akkou_
June 28, 2024, 09:41

Stuck in cloud-init on the first boot

Hello there,this is my first time using raspberry pi 4b, I’m now stuck in this page which says cloud-init finish, when I press any button it shows the login page, but when I type in ubuntu/ubuntu for login and password, it says it’s incorrect,I’ve tried many times and wait for a long time. How can I fix it? Board: Raspberry Pi 4b 4GB os: ubuntu server 24.04 LTS
imposter5768
June 28, 2024, 06:26

Has anyone tried emulating RPI5 H/W on QEMU?

or, is it the same set-up as older h/w models?
ritarq
June 28, 2024, 02:18

"Playback of protected content is not enabled" error - Spotify

When I try to listen to Spotify on either Chromium or Firefox it gives me a message saying "Playback of protected content is not enabled" however all of the troubleshooting tips that I've tried (including contacting Spotify) haven't worked. So I was just wondering if this is a known issue or if this is just with me. (I am running a Raspberry Pi 5 with Ubuntu installed)
adde9882
June 28, 2024, 00:13

How to receive RF signals on Raspberry pi 5

I have a raspberry pi 5 and an RF receiver plugged in to GPIO 27. Is there any library or software I can use to find out what RF signal my RF controller is sending?
ritarq
June 27, 2024, 21:58

Will a capture card work

I have a Raspberry Pi 5 8gb with Ubuntu installed and I was just wondering if an HDMI capture card would work with OBS Studio to stream games from a Xbox
goon3390
June 27, 2024, 18:59

Unable to launch python script on startup

I orignially have my script starting up on boot via adding it to "sudo crontab -e", now ive gotten a new pi (same model and ver) yet it dosent work, i have tried a few other options yet none seem to quite work?
incognitas0411
June 27, 2024, 17:10

How to install apps from Github

Hi. Can you help me please what is a correct code to install the below gateway on my raspberry pi 4? https://github.com/helium/gateway-rs Tried several codes, but comes with the error, doing something wrong 🙁 Thank you in advance!
eyes1337
June 27, 2024, 16:52

how do i fix no signal display on pi 4 4gb ram

i can't get a screen on the pi i am installing a new os to USB stick for the pi to see and note is was working before i tryed ubuntu anyone had this before
jonanek
June 27, 2024, 10:35

Raspberry Pi power LED blinking

Hi, i have this Raspberry pi 4 2GB since 2020 and few months ago the pi randomly shut off and wouldn't work after that. I tried searching it online (I found that it is some problem with power like short or the power chip failed) after that I didn't want to deal with it at the moment soo i kinda forgot about it. But now i kinda want it to work, could someone help me? Here's what i kinda got from it: When i plug it with the offical rpi brick it just blinks red I tried switching power bricks, i tried my phone charger (which can do 5V 3A) and for some reason the blinks are more dimmed and less frequent. I include videos of the blinks on the offical brick and my (the black cable is the offical) Anyone know how to fix it?
mackagg
June 26, 2024, 23:54

Help with vibrations on rpi camera

God damn I put WAY too much time to this drone. Basically I've done eveything in software in hardware but there is one problem. Vibrations. They're massively impacting quality. What to do?
nomis1248
June 26, 2024, 15:02

Libary Adafruit not found

Hello there I am a second semester physics student. We want to build a weatherstation equipped with a few sensors. I am new to the raspberry pi programming stuff. I have a code that should read the sensors and create a csv table. Once i try to run it with the sensors on the raspberry i get the following: No modul named AdafruitBMP. (It refers to import AdafruitBMP.BMP280) I know that that means adafruit is not installed, yet i dont find a way to install it. Until now ive gone throught numerous websites to find a solution but none seems to work. Note: Not all of my code is written by me a small portion is made by chatgpt so i dont understand everything the code does but most of it is made by me.
snbreal
June 26, 2024, 07:29

How to Configure Gamecube controller to Dolphin Via Retropie

I had set up retropie today, added my gamecube games and everything and i can use my keybored to control the game, however i really want to use my gamecube controller with it and for some reason it wasn't connecting in game, yet i can use the controller in the menu of retropie.
soupy.ai
June 25, 2024, 21:18

Pressure Sensor for Pi 4

Hi, Im working on a project and i have more experience with software programming than physical anything. basically i have a pi 4 and i need to add a sensor to it that you can attach a tube with a balloon on the other end and have the sensor read the pressure changes. Does anyone have an ideas or sensors that could be used for this? I would ideally like to use the ic2 bus on the board but if i need to get an adp? that can be done too. Thank you!
_xfltx_
June 25, 2024, 14:28

New to Raspberry pi 5 network driver issues with Kali (need help)

I have been simply trying to install a rtl8812au driver to use with my raspberry pi using kali linux for the os, i just cant seem to get it running no matter what i do, would anyone be kind enough to help me out?
khytar_
June 25, 2024, 11:37

Raspberry Pi 3D Scanning Rig

I'm working on a 3D scanner rig and I'm about to buy the necessary components. Can i get some help double checking the components are compatible and the right choice for my system?