Jump to content

Armbian 5.25 on OrangePI PC: The gc2035 video camera doesn't work


Recommended Posts

Posted
  On 9/2/2018 at 3:57 PM, jps said:

Excuse my clumsiness, but I don't know what to do with the files in https://github.com/avafinger/gc2035

 

i can not find the paths related in this link.... i can not make the camera work in last Armbian. Thanks any help...

Expand  

Hello,

Could you tell us which nano computer you are using, which version of armbian, and which camera ? thanks

Posted
  On 9/3/2018 at 7:51 PM, Ucino said:

Hello,

Could you tell us which nano computer you are using, which version of armbian, and which camera ? thanks

Expand  

Sure. Orange Pi Lite + CSI camera orange Pi native (Shenzhen Xunlong Software CO.,Limited) camera, and last Armbian  for Lite Armbian_5.59_Orangepilite_Ubuntu_bionic_next_4.14.65.

Thank you very much

Posted
  On 9/6/2018 at 11:40 AM, Ucino said:

Thanks for your feedback. As olivluca suggest, I think the first step you can try to do is using the 3.X kernel : https://www.armbian.com/orange-pi-lite/ at the end of the page : https://dl.armbian.com/orangepilite/Ubuntu_xenial_default_desktop.7z

Expand  

Yes, 3.X kernel have the drivers. Works fine. Thank you.

 

But... but I still have the doubt that what to do with the content of https://github.com/avafinger/gc2035.

Thank again.

Posted

Cool if it works.

 

Sorry I didn't remember about the content of gc2035 on github . If it's works fine for you, maybe you have nothing to do ?  Why do you think you have to care about it, maybe  you have some other problems with the video ?

Posted

For me the version on github works better than the version included with armbian:

 

  On 3/29/2018 at 6:04 PM, olivluca said:

I compiled the module from here https://github.com/avafinger/gc2035 (gc2035.c, without trying to apply the patch in the same repository) and it works much better than the one included in armbian (though it has other quirks, see below).

I tried many of the advertised resolutions and they all work:

  • 640 x 480 (flipped horizontally)
  • 800x600 (ok)
  • 1280x720 (slightly washed up)
  • 1600x1200 (too much for motion)

Let's see if it lasts or if it causes more problems, but if nobody is going to fix the current driver I propose to revert to the older one.

 

Expand  
Posted
  On 9/9/2018 at 1:22 PM, Ucino said:

Cool if it works.

 

Sorry I didn't remember about the content of gc2035 on github . If it's works fine for you, maybe you have nothing to do ?  Why do you think you have to care about it, maybe  you have some other problems with the video ?

Expand  

But... I still have the doubt that what to do with the content of https://github.com/avafinger/gc2035...........

 

I mean ... i don't know how to build a module. Anyway, all it's working, so thanks.

Posted
  On 9/9/2018 at 3:57 PM, jps said:

But... I still have the doubt that what to do with the content of https://github.com/avafinger/gc2035...........

 

I mean ... i don't know how to build a module. Anyway, all it's working, so thanks.

Expand  

I'm newbie about drivers and compiling things, so becarefull of what I'm writting, it's certainly wrong. You maybe have 3 possibilities :

1) - copy and past a file (this what I have done one time :

2) - compiling the full armbian and adding to him the patch during compiling ( cf. https://docs.armbian.com/Developer-Guide_Build-Preparation/ )

3) - or compiling inside your armbian.

 

When we are looking in https://github.com/avafinger/gc2035

we can see at the end of the page an example of compiling for BSP, so it seems that the right way is the option 3).

 

It seems that you will have to adapt  things of the compiling step :
 

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 INSTALL_MOD_PATH=output SUBDIRS=drivers/media/video/sunxi-vfe/device modules CC [M] drivers/media/video/sunxi-vfe/device/gc2035.o Building modules, stage 2. MODPOST 40 modules CC drivers/media/video/sunxi-vfe/device/gc2035.mod.o LD [M] drivers/media/video/sunxi-vfe/device/gc2035.ko

But I'm sorry, I have no idea on how you can adapt this for armbian.

Maybe, after you have done a backup of your files and OS, you can give it a try, and tell us the result ?

Posted

Thanks Ucino, i arrived till there. In my first post i wrote:

  Quote

i can not find the paths related...

Expand  

so, i need to read much more about how to compile a driver in a live Armbian distribution. Thank you anyway.

Posted


In case it is useful for somebody else, I put the source and the module here: https://drive.google.com/open?id=1KM3AFoSJCpJ0RpafeKRmH8iZWr3waQlH

There you'll find the binary module (I compiled for my current kernel which is 3.4.113-sun8i #68) and the tar.gz with the source I used to compile it.

It's just the files from github (in the "device" directory), I added a Makefile and the files from the drivers/media/video/sunxi-vfe in the original kernel source (taken from the linux-source-default-sun8i_5.60_all.deb package...well, actually I don't remember where I took those files, but I have compared them to the one provided in the deb and they are the same).

To compile it just cd to the device directory and issue a make (provided you have the linux-headers package installed for the current kernel, but IIRC that's installed by default in armbian).

I don't understand why armbian supplies a worse implementation of the gc2035 module but since I can use the good (or at least not so bad) one I don't care.

Posted
  On 9/29/2018 at 1:34 PM, olivluca said:

I don't understand why armbian supplies a worse implementation

Expand  

 

Because someone needs to implement and test. We seriously lack "someones".

Posted

Well, I didn't implement it, I just took what was already available. Maybe what doesn't work for me works for somebody else or vice-versa, I don't know.
In theory the version supplied with armbian should be better (it should auto select the parameters at device opening time instead of determining them at module load time), in practice it doesn't work.

Posted

Hi! Did anybody solved the problem with gc2035?

$ uname -a
Linux orangepipcplus 4.19.20-sunxi #5.75 SMP Sat Feb 9 19:02:47 CET 2019 armv7l armv7l armv7l GNU/Linux

$ modprobe gc2035
modprobe: FATAL: Module gc2035 not found in directory /lib/modules/4.19.20-sunxi

$ modprobe vfe_v4l2
modprobe: FATAL: Module vfe_v4l2 not found in directory /lib/modules/4.19.20-sunxi
 

 

Posted
  On 3/28/2019 at 8:43 AM, r3mu5 said:

Hi! Did anybody solved the problem with gc2035?

$ uname -a
Linux orangepipcplus 4.19.20-sunxi #5.75 SMP Sat Feb 9 19:02:47 CET 2019 armv7l armv7l armv7l GNU/Linux

 

 

Expand  

In short, there is no hope to get the camera working on 4.x kernels, because they don't have CSI support ATM. I did not get it to work yet, but, first, grab something using 3.4.x kernel. Spent 3 days on it, still stuck.

 

Also, try gc_2035 ... just in case ... or with dash ... not sure.

Posted (edited)
  On 3/28/2019 at 8:43 AM, r3mu5 said:

Hi! Did anybody solved the problem with gc2035?

 

Expand  

At last, I have found something that works, and produces images. In short, use ubuntu_lxde_desktop_OrangePipc_v0_9_1.img . Long story is here: http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=4270&page=1&extra=#pid25253

 

Edit: I also suceeded with image Armbian_5.75_Orangepione_Ubuntu_xenial_default_3.4.113_desktop.7z

Edited by DoubleHP
Posted

the CSI driver isn't the problem here.. iirc @@lex already had successfully cameras working under mainline linux (ov5640 if I'm right).. Problem is, there's to my knowledge no gc2035 mainline driver available (at least, there wasn't the last time I checked it).. As long as nobody touches this up we won't see gc2035 cameras working on mainline.

Posted

http://ix.io/1Ps7

 

sudo apt-get install motion

sudo nano /etc/motion/motion.conf

 

Edit line bellow:

 

stream_localhost off

width 640

height 480

framerate 2
 

If crash is happened:

mkdir ~/motion

chmod 777 motion

 

Start motion server:

sudo /etc/init.d/motion start

 

Here you are:

localhost:8081

 

 

More detail

 

But !

 DO NOT touch /etc/modules. Leave it like that:

#w1-sunxi
#w1-gpio
#w1-therm
#gc2035
#vfe_v4l2

 

 

Here my /etc/rc.local

 

modprobe gc2035
modprobe vfe_v4l2

sunxi-pio -m "PG11<1><0><1><1>" #DOVDD
sunxi-pio -m "PE15<1><0><1><0>" #Power_Down
sunxi-pio -m "PE14<1><0><1><1>" #reset
 

 

 

Posted

Dear friends!

 

Of all the topics on this forum and elsewhere, this only one really looks like the truth! So I ask for help here ...

 

I bought from Steven Zhao Orange Pi PC+ and CSI camera 5mp! On Android camera is working... But I like Armbian and want to use camera here!

I tried all from this topic, but /dev/video0 does not appear...

uname -a:
Linux smart 3.4.113-sun8i #2 SMP PREEMPT Wed May 8 15:09:43 CEST 2019 armv7l armv7l armv7l GNU/Linux

modprobe vfe_v4l2
modprobe gc2035
modprobe ov5640
sunxi-pio -m "PG11<1><0><1><1>"

lsmod
Module                  Size  Used by
ov5640                 42238  0
vfe_v4l2             1016182  0
videobuf_dma_contig     3509  1 vfe_v4l2
videobuf_core          14682  2 vfe_v4l2,videobuf_dma_contig
gc2035                 19554  0
vfe_subdev              4507  3 vfe_v4l2,gc2035,ov5640
cci                    22800  3 vfe_v4l2,gc2035,ov5640
vfe_os                  4277  3 cci,vfe_v4l2,vfe_subdev
mali_drm                2732  2
drm                   178282  3 mali_drm
zram                    8964  5
pcf8591                 3363  0
bmp085                  3487  0
mali                  123158  0
ump                    29379  3 mali
8189fs               1050875  0
btrfs                 712473  0

 ls /dev/v*
/dev/vcs   /dev/vcs2  /dev/vcs4  /dev/vcs6  /dev/vcsa   /dev/vcsa2  /dev/vcsa4  /dev/vcsa6  /dev/vmouse
/dev/vcs1  /dev/vcs3  /dev/vcs5  /dev/vcs7  /dev/vcsa1  /dev/vcsa3  /dev/vcsa5  /dev/vcsa7

 

Posted
  On 8/18/2019 at 5:54 PM, olivluca said:

I think you have to activate the gpio before loading the modules

Expand  

Dear friend, I tried it!

sunxi-pio -m "PG11<1><0><1><1>"
modprobe vfe_v4l2
modprobe gc2035
modprobe ov5640

This give same result...

/dev/video0 does not appear...

 

May be someone have some description (or link on description), like "how to work CSI" ?

 

What does udev need to identify a CSI-device?

Posted
  On 8/18/2019 at 5:54 PM, olivluca said:

I think you have to activate the gpio before loading the modules

Expand  

I also would perform a sleep 1 or sleep 3 between the two. GPIO handling may take some time, on chipset side. If the pins we talk about are power, or ENABLE pins for the client, even longer time may be required (for internal firmware to startup).

 

Before complaining /dev/video0 does not appear, you need to report the output of dmesg, which gives details about what driver found ... or not.

 

Also check 10 times your sunxi line; many tuto may give wrong addresses; and sometimes even for the same board, different libs may use different numbering schemes ... (had the issue on rPi).

Posted

Well, if you look earlier in the thread, I solved the problem by activating the gpio in uboot (and even then the pin could be different depending on the board). I never managed to make it work using sunxi-pio (though I never really tried).

Posted
  On 8/19/2019 at 3:23 PM, DoubleHP said:

Before complaining /dev/video0 does not appear, you need to report the output of dmesg, which gives details about what driver found ... or not.

Expand  

 

It's output of my dmesg:

  Reveal hidden contents

 

Posted
  On 7/19/2017 at 5:17 PM, olivluca said:

I finally worked around the issue by modifying boot.cmd adding the lines

gpio set PL10
gpio set PG11

at the beginning, right after the "DO NOT EDIT THIS FILE " comment.

The I regenerated boot.scr

 

mkimage -A arm -T script -O linux -d boot.cmd boot.scr

And rebooted.

Expand  

 

Dear olivluca, I read "man gpio". There no command "set"! May be need to use command "write"? And I dont know, how can understand what pin need activate for supply CSI of  OrangePiPcPlus??? PL10? PG11? where can I to read it? I'm really afraid to give voltage on wrong pin!

Posted
  On 8/22/2019 at 8:38 AM, kreston said:

 

Dear olivluca, I read "man gpio". There no command "set"! May be need to use command "write"? And I dont know, how can understand what pin need activate for supply CSI of  OrangePiPcPlus??? PL10? PG11? where can I to read it? I'm really afraid to give voltage on wrong pin!

Expand  

 

The "gpio" there is an uboot command, not a linux one, so "set" is correct. I cannot help on the correct gpio to set for your board, mine is an opi pc.

Posted

Hi everyone .

first of all i'm sorry for bad English and I hope you can help .
I spent the last three days trying to make the camera work again on Orange pi Lite but did not work , the camera was working fine before two years ago but after I used the current version this --> ( Armbian_5.91_Orangepilite_Debian_buster_next_4.19.59  ) it's no longer working, I tried to install other distro available but all are not working on it .
one version ( Armbian_5.91_Orangepilite_Debian_buster_next_4.19.59 ) that i can install driver on it ,but when try open the motion software in browser only i get black screen with Unable to open video device .
Can you help me again to make it alive again .
Thanks.

Posted

There are no drivers for the camera in mainline kernel. You have to use a version based on a legacy kernel (https://dl.armbian.com/orangepilite/Ubuntu_xenial_default_desktop.7z). I don't know the progress in mainline regarding gc2035.

Edit: looking  at the table here  I see that the csi driver has been mainlined in kernel 5.0. Without that the camera cannot work. What I don't know is if the gc2035 driver is available in 5.0

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

Important Information

Terms of Use - Privacy Policy - Guidelines