IMX298 on 64 bit OS

1.Which seller did you purchase the product(s) from?
Scorpion Vision
2.The Model number of the product(s) you have purchased?
IMX298/UC-572
3.Which Platform are you using the product(s) on?
Raspberry Pi4 running Raspberry Pi OS 64 bit
4.Which instruction are you following?
github
5.Has your product ever worked properly?
Yes, on 32 bit
6.What problems are you experiencing?
Hello,

I’m trying to get the UC-572 with the IMX298 camera working on 64 bit Raspberry Pi OS after having successfully got it working on a Raspberry Pi 32 bit OS. I’ve taken the following steps:

Enable camera and arm I2C
Install dependencies as listed on the MIPI_Camera page
There is a lib/aarch64 folder which contains a library for the camera, follow the README.md instructions to build mmal and copy the resultant so files with /usr/lib/aarch64-linux-gnu/
Copy the file lib/aarch64/libarducam_mipicamera.so to /usr/lib
We depend on WiringPi which is not available for the 64 but version so compile the library from a fork of Wiring Pi (https://github.com/WiringPi/WiringPi.git).
make arducamstill

When I test arducamstill I get:

[email protected]:~/MIPI_Camera/RPI $ ./arducamstill -t 0
Open camera…
sh: 1: i2cdetect: not found
I2C check functionality fail.
init camera status = 4098

This also crashes the RPi4 and it becomes unresponsive requiring a hard reboot. After a reboot I try to run ./camera_i2c and get the following:

[email protected]:/home/pi/MIPI_Camera/RPI/utils# ./camera_i2c
setting GPIO for board revsion: c03111
Raspberry Pi3B / Pi3B+ / 3A / 4B(1G/2G/4G)
./camera_i2c: 151: ./camera_i2c: ./rpi3-gpiovirtbuf: not found
./camera_i2c: 155: ./camera_i2c: cannot open 5.0: No such file
./camera_i2c: 155: ./camera_i2c: [[: not found
./camera_i2c: 158: ./camera_i2c: i2cdetect: not found
[email protected]:/home/pi/MIPI_Camera/RPI/utils#

This also crashes the board and it becomes unresponsive requiring a hard reboot again.


This is as far as I have got, can someone please help me to work through the steps to determine where my issue lies?

Thanks very much, I’d be happy to write up a guide on 64 bit raspberry pi OS installation when I’m done!

Regards,

Neil

 
7.What attempts at troubleshooting have you already made?
documentation searching
8.How would you like us to help you?
advise on 64 bit operation

Hello,

For the 64 bit OS, please refer to this document https://github.com/ArduCAM/MIPI_Camera/tree/master/RPI/lib/aarch64

Feel free to let me know if you need more help.

 

Hello,

As you can see from the original post, I followed the README.md from that link plus installed a 64 bit version of wiringpi that this library depended upon. It isn’t working as per the above description. I can’t do much more as the utils tools are 32 bit.

Can you please advise as the steps to follow to determine the problem. Note that I have the hardware working on 32 bit.

Regards,

Neil

If it helps, these are the steps I’m taking:

 

  1. Use the standard systems for burning a 64 bit minimal image to an SD card
  2. sudo rapsi-conifg, go to interfaces and enable camera and i2c
  3. sudo su root
  4. apt-get update
  5. apt-get upgrade
  6. apt-get install libzbar-dev libopencv-dev git python3-opencv cmake
  7. git clone https://github.com/WiringPi/WiringPi.git
  8. cd WiringPi
  9. ./build
  10. gpio -v : this should confirm it is installed
  11. git clone https://github.com/ArduCAM/MIPI_Camera.git
  12. cd MIPI_Camera/RPI/lib/aarch64/
  13. git config --global user.email "[email protected]"
  14. git config --global user.name "Neil Benn"
  15. git clone https://github.com/raspberrypi/userland
  16. cd userland
  17. git revert f97b1af1b3e653f9da2c1a3643479bfd469e3b74 --no-commit
  18. git revert e31da99739927e87707b2e1bc978e75653706b9c --no-commit
  19. export LDFLAGS="-Wl,--no-as-needed"
  20. ./buildme --aarch64
  21. cp build/lib/*.so /usr/lib/aarch64-linux-gnu/
  22. cd ..
  23. cp libarducam_mipicamera.so /usr/lib
  24. cd ../..
  25. make arducamstill
  26. ./arducamstill -t 0
Executing step 26 gives the error of:

[email protected]:~/MIPI_Camera/RPI $ ./arducamstill -t 0
Open camera…
sh: 1: i2cdetect: not found
I2C check functionality fail.
init camera status = 4098

Then the RPi4 just freezes and needs a hard reboot.

I really need some help on this please - once I have this resolved I’m looking to buy 100+ units.

Regards,

Neil

 

Hi,

Don’t worry and I will try my best to help you.

Please attach me your system’s download link and I will help you test it, it seems it does not have i2cdetect tools.

 

Hello,

Thanks, I’m picking up the raspberry pi 64 bit os from https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2020-05-28/2020-05-27-raspios-buster-arm64.zip. I then run an apt update and apt upgrade. I’ve also tried with 64 bit Ubuntu server 21.04 but this has many problems trying to get the camera and i2c working.

Cheers,

Neil

Hello,

Thanks for your sharing, but it tell me Not found

Not Found
The requested URL was not found on this server.

Please check and ensure it.

 

Hello,

I’m not sure why that is, the link is at the top of this forum https://www.raspberrypi.org/forums/viewtopic.php?t=275370. After installing run an apt update & upgrade.

Cheers,

Neil

Hi,
Thanks for your detail’s link, I will test it as soon as possible.

Please keep on contacting me through [email protected]