This happens because of power management for the WIFI card is activated by default. [1]
Deactivate with:
iw dev wlan0 set power_save off
Use pishrink.sh script:
https://github.com/Drewsif/PiShrink
Before booting the SD card for the first time do the following:
cfdisk /dev/sdd
This will block the possibility of extending the current partition
Remove the following lien on file /boot/cmdline.txt:
init=/usr/lib/raspi-config/init_resize.sh
Remove the following symlink:
/etc/rc3.d/S01resizefs_once
sudo iwlist wlan0 scan
To get wifi information
network={
ssid="testing"
psk="testingPassword"
}
wpa_cli -i wlan0 reconfigure
raspivid -t 0 -fps 5 -o udp://192.168.2.22:1234
Or with bullseye OS (libcamera):
libcamera-vid -t 0 --width 1920 --height 1080 --inline --framerate 0.1 -o udp://192.168.2.22:1234 --codec h264
sudo modprobe v4l2loopback exclusive_caps=1 max_buffers=2
sudo ffmpeg -i "udp://@:1234/?fifo_size=2000&overrun_nonfatal=1" -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video2
mpv av://v4l2:/dev/video2 --profile=low-latency --untimed
Camera V2.1 is supported out of the box automatically just run:
libcamera-still -o test.jpg
And it will work
With camera v1.3 you need to edit /boot/config.txt [4]
dtoverlay=ov5647
This was not tested
[1] https://stackoverflow.com/questions/49131159/cant-disable-wifi-power-management-raspberry-pi-3
[2] https://raspberrypi.stackexchange.com/questions/56621/temporarily-disable-expand-filesystem-during-first-boot
[3] https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-networking
[4] https://raspberrypi.stackexchange.com/questions/133281/raspberry-os-bullseye-camera-module-no-cameras-available