ArduCAM / Arduino

This is ArduCAM library for Arduino boards
MIT License
472 stars 348 forks source link

ArduCAM Host app with Ubuntu 16.04 #147

Open UMecamat opened 7 years ago

UMecamat commented 7 years ago

Hi, I am running ubuntu 16.04 LTS. Can you please provide additional info on how to run ArduCAM_Host_V2 host in linux system? Is there any mandatory directory/folder where to download/extract the app folder? I am trying to launch the ArduCAM_Mini.QT as a stand-alone application (and, yes, I do have installed Qt creator... just in case) Thank you

supprot commented 7 years ago

@UMecamat Hi, Please refer to the link www.arducam.com/downloads/app//arducam.com/downloads/app to download the host_V2 which can work on linux system.

But you should run this command first:

  1. Open a terminal and into the software in the folder
  2. Input: sudo chmod + x run. Sh / / to run. Sh scripts run permissions
  3. Input: sudo. / run / / run the script to the software running depend on file configuration link
  4. Input: sudo chmod u + x ArduCAM_Host_V2. 0 (software) / / to the software operation permissions
  5. Input: sudo chmod u + x ArduCAM_Host_V2. 0. Sh / / to the software scripts run permissions
  6. Input: sudo. / ArduCAM_Mini_QT. Sh / / running software

Let us know if you need more help. Regards, ArduCAM support team.

UMecamat commented 7 years ago

Hi, Thank you for the response, I finally was able to run the host_V2 for linux. However, I still have problems with both ArduCAM_MINI_4CAM_Capture2SD and ArduCAM_MINI_4CAM_VideoStreaming examples. I am using a Mega + Arducam adapter board + 2 ArduCAM MINI_5MP (in both sketches I excluded CAM3 and CAM4, just to be sure not to have the SPI not detected error...).
As for the 2SD sketch, when opening the ArduCAM_Mini_QT.sh using linux terminal (sudo ./ArduCAM_Mini_QT.sh) the following happen:

1) the host_V2 opens 2) but in linux terminal I get the following message: ./ArduCAM_Mini_QT.sh: 5: [: .: unexpected operator QMetaObject::connectSlotsByName: Connecting slot on_comboBox_pix_currentIndexChanged() with the first of the following compatible signals: ("currentIndexChanged(int)", "currentIndexChanged(QString)") QMetaObject::connectSlotsByName: Connecting slot on_comboBox_function_currentIndexChanged() with the first of the following compatible signals: ("currentIndexChanged(int)", "currentIndexChanged(QString)") QMetaObject::connectSlotsByName: Connecting slot on_comboBox_type_currentIndexChanged() with the first of the following compatible signals: ("currentIndexChanged(int)", "currentIndexChanged(QString)")

After setting parameters in host_V2, (same baudrate, single mode, ov5642) I push the open button I get the following message in linux terminal: bool QSerialPort::setDataTerminalReady(bool): device not open

and in host_V2 terminal always the same "SD Card Error" (I also tried 3 different SD cards...)

As for the streaming sketch, things seems better (but I always get the message at point 2 above when opening the host_V2). As you can see in the screenshot below, in single mode I can take pictures. However, only the picture from CAM2 appears on the pop-up window, and the files are stored with .jpeg extension, but are in fact plain text documents... screenshot from 2017-02-22 15-49-15

Trying to connect to the IP assigned automatically I always get a "request fail !" message. Any idea about all these issues (SD failing, streaming failing, only 1 cam capturing, jpeg are plain text files)?

Finally, an additional info for other users that might be interested in run ArduCAM with linux: do please note that the host_V2 for linux is not available at the link http://www.arducam.com/downloads/app/arducam.com/downloads/app you suggested, but can still be found at http://www.arducam.com/downloads/app/ArduCAM_Mini_V2.0_Linux_x86_64bit.zip Thank you very much in advance

supprot commented 7 years ago

@UMecamat Hi, Thank you for pointing out our problem and we have update our Host_V2 at http://www.arducam.com/downloads/app/ArduCAM_Mini_V2.0_Linux_x86_64bit.zip link. But at present our Host_v2 can not support ArduCAM_4CAM_VideoStreaming demo. You can try ArduCAM_Mini_Video_Streaming demo . We have tested it and Please refer the picture we send to you: 2017-02-23 11-01-23

Let us know if you need more help. Regards, ArduCAM support team.

supprot commented 7 years ago

@UMecamat Hi, Before running the softwae do the command firstly:

  1. Input: sudo chmod + x run. Sh / / to run. Sh scripts run permissions
  2. Input: sudo. / run. Sh / / run the script to the software running depend on file configuration link
  3. Input: sudo chmod u + x ArduCAM_Mini_QT (software) / / to the software operation permissions
  4. Input: sudo chmod u + x ArduCAM_ Mini_QT. Sh / / to the software scripts run permissions
  5. Input: sudo. / ArduCAM_Mini_QT. Sh / / running software

Regards, ArduCAM support team.

UMecamat commented 7 years ago

Hi, thank you very much for these explanations about using Host_v2 with linux os and streaming options. However, 1) I still get the "SD Card Error" when trying the ArduCAM_MINI_4CAM_Capture2SD example 2) and - surprisingly - I get the "open file failed" if using ArduCAM_Mini_5MP_4CAM_TimeElapse2SD_LowPower example (from former examples now not uploaded on your GitHub rep, why?)

In both cases I try with two different ArduCAM adapter board and using different SD cards. Any help? Thank you as always

UMecamat commented 7 years ago

update: tried 2 OV2640 instead of 2 OV5642, still getting "SD Card Error" independently from microSD or ArduCAM Adapter Board used... very frustrating...

supprot commented 7 years ago

@UMecamat Hi, Very sorry to reply you so late because of busying other things. Please don't worry and we will test it for you tomorrow.
Regards, ArduCAM suport team.

supprot commented 7 years ago

@UMecamat Hi, We have tested it and it can work fine. Please refer to the picture to learn more details. test_pic

Let us know if you need more help. ArduCAM support team.

UMecamat commented 7 years ago

Hi again, thank you for replying me. However, as I tried to explain above, configuration is not the point: SD_CS pinout is fine, as well as memorysaver option, wiring, etc... Independently from the micro SD card I am using, and trying with two different but identical ArduCAM Adapter boards, as well as two pairs of 2MP and 5MP rev B, the result is always the same and it concerns a failure of SD card initialization... I'll let this thread open just in case, but I will open another one hopefully waiting for some other user that could have solve this issue

dilpreetdan commented 7 years ago

image

I tried all 6 steps to run the linux version as stated later, but I QXcbConnection: Could not connect to display

Please suggest.

shyam1992atri commented 7 years ago

shyam@shyamprasadvatri:~/Downloads/ArduCAM_Mini_V2shyam@shyamprasadvatri:~/Downloads/ArduCAM_Mini_V2nux_x86_64bit$ sudo chmod +x run.Sh [sudo] password for shyam: chmod: cannot access 'run.Sh': No such file or directory shyam@shyamprasadvatri:~/Downloads/ArduCAM_Mini_V2.0_Linux_x86_64bit$ sudo chmod +x run.sh shyam@shyamprasadvatri:~/Downloads/ArduCAM_Mini_V2.0_Linux_x86_64bit$ sudo ./run.sh shyam@shyamprasadvatri:~/Downloads/ArduCAM_Mini_V2.0_Linux_x86_64bit$ sudo chmod u+x ArduCAM_Mini_QT shyam@shyamprasadvatri:~/Downloads/ArduCAM_Mini_V2.0_Linux_x86_64bit$ sudo chmod u+x ArduCAM_Mini_QT .sh shyam@shyamprasadvatri:~/Downloads/ArduCAM_Mini_V2.0_Linux_x86_64bit$ sudo ./ArduCAM_Mini_QT.sh ./ArduCAM_Mini_QT.sh: 5: [: .: unexpected operator ./ArduCAM_Mini_QT: error while loading shared libraries: libQt5SerialPort.so.5: cannot open shared object file: No such file or directory shyam@shyamprasadvatri:~/Downloads/ArduCAM_Mini_V2.0_Linux_x86_64bit$

shyam1992atri commented 7 years ago

can anyone help debugging this thing?

UCTRONICS commented 7 years ago

@shyam1992atri Hi, Have you solved your problems?

dilpreetdan commented 7 years ago

Can anyone assist in the problem I received in the post above?

QXcbConnection: Could not connect to display

shyam1992atri commented 7 years ago

Hi I have not yet resolved the problem It would be great if you help me out

On Wed, Jun 28, 2017 at 7:10 AM, Dilpreet Kaur notifications@github.com wrote:

Can anyone assist in the problem I received in the post above?

QXcbConnection: Could not connect to display

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ArduCAM/Arduino/issues/147#issuecomment-311671415, or mute the thread https://github.com/notifications/unsubscribe-auth/Abf3TUJ0p0qb81RViLUpJmDmucB42KNXks5sIl7QgaJpZM4MHETX .

-- Shyam Prasad V Atri Graduate Student Mechanical Engineering University of Southern California Los Angeles +12132551698

UCTRONICS commented 7 years ago

@shyam1992atri

Hi, We have add run.sh please try it again. For ArduCAM_Mini_V2.0_Linux_x86_64bit, Please refer to this link: www.arducam.com/downloads/app/ArduCAM_Mini_V2.0_Linux_x86_64bit.zip

Step1: Open the terminal and enter the folder of the software Step2: Input:sudo chmod +x run.sh Step3: Input:sudo ./run.sh Step4: Input:sudo chmod u+x ArduCAM_Mini_QT(name of software) Step5: Inout:sudo chmod u+x ArduCAM_Mini_QT.sh Step6: Inout:sudo ./ArduCAM_Mini_QT.sh

JoustingLion commented 5 years ago

When I do sudo ./run.sh, I get this ln: target 'libQt5Core.so.5' is not a directory ln: target 'libQt5Widgets.so.5' is not a directory ln: target 'libQt5Gui.so.5' is not a directory ln: target 'libQt5Network.so.5' is not a directory ln: target 'libQt5SerialPort.so.5' is not a directory ln: target 'libicudata.so.56' is not a directory ln: target 'libicui18n.so.56' is not a directory ln: target 'libicuuc.so.56' is not a directory ln: target 'libQt5XcbQpa.so.5' is not a directory ln: target 'libQt5DBus.so.5' is not a directory ./run.sh: 13: export: (1):: bad variable name

and no files are created

Is there an updated way to do this for ubuntu 18.04?

UCTRONICS commented 5 years ago

Don't worry, tomorrow we will try it again.

atekgul commented 5 years ago

Hello, What is "(name of software)" in the shell file?

UCTRONICS commented 5 years ago

@atekgul For ArduCAM_Mini_V2.0_Linux_x86_64bit, Please refer to this link: www.arducam.com/downloads/app/ArduCAM_Mini_V2.0_Linux_x86_64bit.zip

Step1: Open the terminal and enter the folder of the software Step2: Input:sudo chmod +x run.sh Step3: Input:sudo ./run.sh Step4: Input:sudo chmod u+x ArduCAM_Mini_QT(name of software) Step5: Inout:sudo chmod u+x ArduCAM_Mini_QT.sh Step6: Inout:sudo ./ArduCAM_Mini_QT.sh

atekgul commented 5 years ago

Hi, I have already downloaded ArduCAM_Mini_V2.0_Linux_x86_64bit.zip and applied the steps. I run "sudo chmod u+x ArduCAM_Mini_QT" in step 4. But when i run the shell file, i got an error message like "./ArduCAM_Mini_QT.sh: 5: [: .: unexpected error". That is why i am asking what the term "name of software" means to check if I made something wrong.

russiancosmo commented 4 years ago

Hi everyone, just to make some steps clear:

  1. you need to download and install the libQt5SerialPort libraries to Ubuntu. Do so by typing the following in a terminal window: sudo apt-get install libqt5serialport5

  2. You need to edit the run.sh in a text editor and change the versions of the files ending with ".so.x.x.x", to whatever version you downloaded of the libraries. Check your version by doing a search in the file manager in your hard drive. Example: ln -s $PWD/libQt5Core.so.5.12.4 libQt5Core.so.5 ln -s $PWD/libQt5Widgets.so.5.12.4 libQt5Widgets.so.5 ln -s $PWD/libQt5Gui.so.5.12.4 libQt5Gui.so.5 ln -s $PWD/libQt5Network.so.5.12.4 libQt5Network.so.5 ln -s $PWD/libQt5SerialPort.so.5.12.4 libQt5SerialPort.so.5 ln -s $PWD/libicudata.so.63.2 libicudata.so.56 ln -s $PWD/libicui18n.so.63.2 libicui18n.so.56 ln -s $PWD/libicuuc.so.63.2 libicuuc.so.56 ln -s $PWD/libQt5XcbQpa.so.5.12.4 libQt5XcbQpa.so.5 ln -s $PWD/libQt5DBus.so.5.12.4 libQt5DBus.so.5

export set LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH

  1. Then run the following commands. AND FORGET THE "name of software" or "software". It's just confusing. Step1: Open the terminal and enter the folder of the software Step2: Input:sudo chmod +x run.sh Step3: Input:sudo ./run.sh Step4: Input:sudo chmod u+x ArduCAM_Mini_QT Step5: Inout:sudo chmod u+x ArduCAM_Mini_QT.sh Step6: Inout:sudo ./ArduCAM_Mini_QT.sh

  2. The next time you need to run the SW just go to the path of the SW and type. You'll be asked for your root passwd everytime you need to change the permissions: Step5: Inout:sudo chmod u+x ArduCAM_Mini_QT.sh Step6: Inout:sudo ./ArduCAM_Mini_QT.sh

russiancosmo commented 3 years ago

Hi, I did not receive any resolution from this. Maybe it was solved after all of this time...

On Sun, Oct 4, 2020 at 9:29 PM Ralf Leggett notifications@github.com wrote:

Is this issue now closed? I'm looking to buy a stereo camera HAT, but for me its mandatory for it to work on Ubuntu. Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ArduCAM/Arduino/issues/147#issuecomment-703304019, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH4CZG3Y6LNGU7W3R43S5B3SJDEKHANCNFSM4DA4ITLQ .

-- Cristóbal Hormazábal Guerra MBA | M.Sc. Vehicle Engineer

Via Masaccio 12, 20032 Cormano (Milan), Italy

T: +39-331-1261062 | cmh.guerra@gmail.com