ivmech / ivport-v2

Raspberry Pi Camera Module V2 Multiplexer
http://ivmech.com
42 stars 11 forks source link

Camera not detected on restart (except reboot) #25

Open ghostiek opened 2 years ago

ghostiek commented 2 years ago

I followed the guide to setting up ivport-v2 on my RPi and running sudo python2 test_ivport.py fine, if I also run sudo reboot it still works. When I run vcgencmd get_camera I get supported=1 detected=1. So everything works.

However when I poweroff my device and turn it back on (either by running sudo poweroff/sudo shutdown/simply plugging it out) I run sudo python2 test_ivport.py and get picamera.exc.PiCameraError: Camera is not enabled. Try running 'sudo raspi-config' and ensure that the camera has been enabled.

However when I run raspi-config get_camera and raspi-config get_i2c I get 0 (which means it's on https://pi3g.com/2021/05/20/enabling-and-checking-i2c-on-the-raspberry-pi-using-the-command-line-for-your-own-scripts/)

And when I run vcgencmd get_camera I get supported=1 detected=0

So I enable camera and reboot and I get an I/O error that subsides when I re-enable i2c and reboot. This means that ivport cannot detect my camera and i2c unless I explicitely do it and reboot everytime I want to use it. This is not sustainable for me as I need to take pictures reliably (I won't be logging into it to take pics) and the RPi may turn off from time to time.

Also the issue is definitely not related to forgetting to run init_ivport.py I run it everytime I boot up my RPi.

Extra Info:

ghostiek commented 2 years ago

Update: This is definitely an ivport-v2 problem because running the camera without the Multiplexer works just fine when I turn back my RPi back on.