Jump to content

Guvcview for Pine64+


@lex

Recommended Posts

Pine64+ camera is not HIMAX HM5065 (**), it is Samsung S5K4EC . It may well be Himax IC but the buyout was not completed (that's what i read), so they may supply Samsung.

S5K4EC documentation is scarce and recently AW move seems not helping, but it is just an opinion. Some manufacturers are now willing to help and they are welcome.

 

To get this sensor working:

 

* Update DTB with this sensor activated ( https://github.com/avafinger/pine64_camera )

* Use kernel 3.10.102 or later (it may or not work with previous kernel, you have to find out)

* use a distro that has no broken dependencies, you will not be able to compile Guvcview and it is NOT Guvcview fault.

* Use the modified Guvcview ( https://github.com/avafinger/guvcview )

unisntall any Guvcview stock version.

apt-get purge guvcview

* install dependencies before builkding Guvcview:
sudo apt-get install git build-essential autoconf libtool
sudo apt-get install intltool autotools-dev libsdl1.2-dev libgtk-3-dev portaudio19-dev libpng12-dev libavcodec-dev libavutil-dev libudev-dev libusb-1.0-0-dev libpulse-dev libgsl0-dev libv4l-dev libsdl2-dev libv4l2rds0
* Load the modules in correct order or put it in /etc/modules
 

The stripes, pink and violet artifacts you will see is not Guvcview fault but S5K4EC driver.

 

And finally, this is a WIP in a hope it can be useful. 

 

Edited:

** If you have the very first sensor released, this instructions will not work if you activate S5K4EC instead of HM5065.

Link to comment
Share on other sites

I use Ubuntu Xenial LXDE 16.04 LTS from Ubuntu Core for development, but it should not matter, although Ubuntu/Linaro are optimizing the code.

 

Sounds like you are recording video and unfortunately AW platform (Exception A10/A20) still lack HW encoding and Guvcview does that in software but i get 2 fps@640x480 encoded videos with OPi PC (H3).

 

So, back to you, what exactly are you doing?

 

H3 Encondig here: https://github.com/uboborov/h264_encoder_H3/tree/master/h264enc

Link to comment
Share on other sites

I'm trying to make himax camera work.

 

Going step-by-step that you provided in you manual on https://github.com/avafinger/pine64_camerai've got /dev/video0

Installing guvcview from your binaries wasn't success, because you use more fresh libraries on your distro, so I've built guvcview by myself from https://github.com/avafinger/guvcviewand got a picture from camera, but fps is very low. only 0.79.

top shows 0.25 total load, with almost zero on system side (so I guess DMA/driver/kernel part works fine), and 100% on guvcview. I guess this may be an issue with rendering, not v4l/camera itself.

 

Link to comment
Share on other sites

I downloaded and tested yesterday the previous debian XCFE version and confirm that it worked and i was just recovering the link and found they deleted it. The new XCFE has broken dependencies and it is possible to fix but certanly would break others running applications.

If you have had downloaded the previous one it would be ok and it is know to work.

 

For Armbian i would suggest building the new image as described here:

http://forum.armbian.com/index.php/topic/751-rfc-support-cortex-a53arm64/?hl=pine64

http://forum.armbian.com/index.php/topic/1645-banana-pi-m64/?p=12859

There are more talented image builders here that can help with this.

 

I would suspect there is rendering issue only, maybe gtk3 issue or possibly SDL issue. There is a possibility to build guvcview with SDL2 the could be a fix, but i found it very slow. Perhaps you built with SDL2?

If the gtk3 interface does not start appropriately it will eat 100% cpu from one core and you have to KILL the process and start again. When this happens you don't have the main gui interface.

Link to comment
Share on other sites

I am trying to install the modified version of guvcview following the above instructions.  The OS I have ( from cat /proc/version) is
Linux version 3.10.102-0-pine64-longsleep (longsleep@mose2) (gcc version 5.3.1 20160413 (Ubuntu/Linaro 5.3.1-14ubuntu2) ) #7 SMP PREEMPT Fri Jun 17 21:30:48 CEST 2016

 

When I run sudo apt-get install intltool autotools-dev libsdl1.2-dev libgtk-3-dev portaudio19-dev libpng12-dev
libavcodec-dev libavutil-dev libudev-dev libusb-1.0-0-dev libpulse-dev libgsl0-dev libv4l-dev libsdl2-dev libv4l2rds0  I get

 

Building dependency tree
Reading state information... Done
autotools-dev is already the newest version.
autotools-dev set to manually installed.
libpng12-dev is already the newest version.
libpng12-dev set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgtk-3-dev : Depends: libglib2.0-dev (>= 2.41.2) but it is not going to be installed
                Depends: libgdk-pixbuf2.0-dev (>= 2.27.1) but it is not going to be installed
                Depends: libpango1.0-dev (>= 1.36.7) but it is not going to be installed
                Depends: libatk1.0-dev (>= 2.7.5) but it is not going to be installed
                Depends: libatk-bridge2.0-dev but it is not going to be installed
                Depends: libcairo2-dev (>= 1.10.0) but it is not going to be installed
 libpulse-dev : Depends: libpulse0 (= 5.0-13) but 7.1-2~bpo8+1 is to be installed
                Depends: libpulse-mainloop-glib0 (= 5.0-13) but 7.1-2~bpo8+1 is to be installed
                Depends: libglib2.0-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

What should I do to correct the problem please?  The instructions for modifying the boot code and etc/modules worked as I have got /dev/video0



 

Link to comment
Share on other sites

@lex Thank you for your help

 

>cat /etc/lsb-release
cat: /etc/lsb-release: No such file or directory
>lsb-release
-bash: lsb-release: command not found

>lsb_release
No LSB modules are available.

>cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
 

>dmesg | grep OK
[   13.744289] [VFE]registered sensor subdev is OK!
[   14.312136] [VFE]Sub device register "s5k4ec" is OK!

 




 

Link to comment
Share on other sites

Ok, your camera is working!

 

Trying to fix this broken packages will certainly break something else and you will end up with an unstable distro.

I know that in the previous image i could compile Guvcview without problems so if you are prepared to learn new things and get your hands dirty i would suggest one of this:

 

* Get previous image release, update the kernel and then compile Guvcview (make sure you remove any stock version or deb package : sudo apt-get remove --purge guvcview, this is really important!!),

Maybe you can ask @pfeerick here and he can provide the previous image and some instructions to update the kernel or ask the moderator on their forum for that previous image, i know he has it and if he is kind he can provide one to you.

 

or

 

* get another SD card and install Armbian and LXDE, there is no bells and whistles but works,

 

or

 

* if you can't live without xfce distros ( i suppose you have it ) or mate or just want to use the camera, please install motion (and follow the configuration instructions) and you can see your camera working.

 

Please, use this instructions here (or search the forum):

http://www.cnx-software.com/2015/09/26/how-to-use-orange-pi-camera-in-linux-with-motion/

If you have the s5k4ec updated you can set any resolution up to 1280 x 960 that will work. Be aware that firefox (arm64) has some instabilities but you can try to install the armhf version (good news - latest update on firefox (arm64) is stable now), or just browse from another computer pointing it to your board and watch the images from the camera.

 

Sorry if i cannot help on the broken package thing, maybe someone else can.

 

Hope it helps.

Link to comment
Share on other sites

What should I do to correct the problem please?

 

Stop using broken/outdated OS images? You're obviously using one of those from pine64.org or pine64.pro -- they're all broken more or less except longsleep's original Ubuntu Xenial image (not the Ubuntu images on pine64.org, they're all broken!). Why wasting time with broken stuff? Especially the lennyraposo Debian images are known to suffer from broken dependencies, the only thing you can do with this is to overwrite it.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines