The libarducam_mipicamera.so is compiled on Raspibian system,which is not compatible with the Ubuntu system. we will try to recompiled the so file on ubuntu system.
Just so that you know, I did just install the 32bit version of Ubuntu18.04 for the Raspberry and it seems like iv’e manage to build the MIPI_Camera examples.
But when I run them I just get some messages like,
> ./preview-camera0
Open camera…
can’t open /dev/gpiomem
Couldn’t open I2C device
init camera status = 4097
and
> sudo ./preview-camera0
Open camera…
init camera status = 4100
But no streaming images. I tried some of the other programs too but without success.
I also thought maybe I attached the camera wrong and swapped the direction of the brown strip/band. But no success either way.
setting GPIO for board revsion: b03111
Raspberry Pi3B / Pi3B+ / 3A / 4B(1G/2G/4G)
./camera_i2c: 125: ./camera_i2c: gpio: not found
./camera_i2c: 126: ./camera_i2c: gpio: not found
./camera_i2c: 127: ./camera_i2c: gpio: not found
./camera_i2c: 128: ./camera_i2c: gpio: not found
./camera_i2c: 130: ./camera_i2c: gpio: not found
./camera_i2c: 131: ./camera_i2c: gpio: not found
./camera_i2c: 132: ./camera_i2c: gpio: not found
./camera_i2c: 133: ./camera_i2c: gpio: not found
./camera_i2c: 137: ./camera_i2c: ./rpi3-gpiovirtbuf: Permission denied
./camera_i2c: 140: ./camera_i2c: i2cdetect: not found
Thanks for that! I had started looking for ‘gpio’ but realized it has been deprecated.
I tried your download but when running ./camera_i2c I get this:
setting GPIO for board revsion: b03111
Raspberry Pi3B / Pi3B+ / 3A / 4B(1G/2G/4G)
gpio: /lib/arm-linux-gnueabihf/libc.so.6: version GLIBC_2.28' not found (required by /usr/lib/libwiringPi.so) gpio: /lib/arm-linux-gnueabihf/libc.so.6: version GLIBC_2.28’ not found (required by /usr/lib/libwiringPi.so)
gpio: /lib/arm-linux-gnueabihf/libc.so.6: version GLIBC_2.28' not found (required by /usr/lib/libwiringPi.so) gpio: /lib/arm-linux-gnueabihf/libc.so.6: version GLIBC_2.28’ not found (required by /usr/lib/libwiringPi.so)
gpio: /lib/arm-linux-gnueabihf/libc.so.6: version GLIBC_2.28' not found (required by /usr/lib/libwiringPi.so) gpio: /lib/arm-linux-gnueabihf/libc.so.6: version GLIBC_2.28’ not found (required by /usr/lib/libwiringPi.so)
gpio: /lib/arm-linux-gnueabihf/libc.so.6: version GLIBC_2.28' not found (required by /usr/lib/libwiringPi.so) gpio: /lib/arm-linux-gnueabihf/libc.so.6: version GLIBC_2.28’ not found (required by /usr/lib/libwiringPi.so)
./camera_i2c: 137: ./camera_i2c: ./rpi3-gpiovirtbuf: Permission denied
./camera_i2c: 140: ./camera_i2c: i2cdetect: not found
I looked at the Ubuntu site for a ‘libc-2.28.so’ but I haven’t found one. And it sounds like a pretty crucial library for the OS so it might not even be a good idea to try to swap.
I did try to do a sneaky symbolic link to pretend I had that file but it didn’t work.
There seem to be some alternatives to gpio around. Maybe its time to upgrade to a more multi platform tool?
setting GPIO for board revsion: b03111
Raspberry Pi3B / Pi3B+ / 3A / 4B(1G/2G/4G)
error: open: /dev/vcio: Permission denied
Error: Could not open file /dev/i2c-0’ or/dev/i2c/0’: No such file or directory
and
> sudo apt-get install i2c-tools for ‘i2cdetect’
Then tried again. I first had to do
> sudo chmod a+r /dev/vcio
as I got an Permission error. Probably not a good thing to do.
finally
> ./camera_i2c
setting GPIO for board revsion: b03111
Raspberry Pi3B / Pi3B+ / 3A / 4B(1G/2G/4G)
Set state of 133 to 1
Error: Could not open file /dev/i2c-0’ or/dev/i2c/0’: No such file or directory
I do have an ‘/dev/i2c-1’
but if I run
> sudo i2cdetect -y 1