View: 19538|Reply: 14

Camera Not Working? OPI_PC

[Copy link]

2

threads

5

posts

23

credits

Novice

Rank: 1

credits
23
Published in 2015-12-29 06:13:47 | Show all floors |Read mode
Hello,

I am trying to use camera in Ubuntu Mate / Debian 8 (laboris img). However my cam is not working.
Maybe someone could share knowledge?
P.S. I was trying to read other posts, however same result :/

My USBs, LAN, GPIO are working fine. Except camera...
I am connecting CAM to OPI PC with extension board.

Some logs:
  1. root@OrangePI:~# ls /media/boot/
  2. lib  OPI_GPIO.txt  orange_pi_pc.fex  script.bin  uImage
Copy code
  1. root@OrangePI:~# modprobe -f vfe_v4l2
  2. ...
  3. [   72.562400] cci: module_layout: kernel tainted.
  4. [   72.562433] Disabling lock debugging due to kernel taint
  5. [   72.564892] [VFE]cci probe start cci_sel = 0!
  6. [   72.564976] [VFE]cci probe end cci_sel = 0!
  7. [   72.565157] [VFE]cci_init end
  8. [   72.680818] [VFE]Welcome to Video Front End driver
  9. [   72.681167] [VFE]pdev->id = 0
  10. [   72.681177] [VFE]dev->mipi_sel = 0
  11. [   72.681184] [VFE]dev->vip_sel = 0
  12. [   72.681191] [VFE]dev->isp_sel = 0
  13. [   72.687314] [VFE_WARN]vfe vpu clock is null
  14. [   72.694887] [VFE]..........................vfe clk open!.......................
  15. [   72.694919] [ISP] isp platform_id = 5!
  16. [   72.695057] [VFE]vfe_init end
  17. [   72.700064] [VFE]probe_work_handle start!
  18. [   72.700088] [VFE]v4l2 subdev register input_num = 0
  19. [   72.700100] [VFE]vfe sensor detect start! input_num = 0
  20. [   72.700114] [VFE]Find sensor name is "gc2035", i2c address is 78, type is "YUV" !
  21. [   72.700126] [VFE]Sub device register "gc2035" i2c_addr = 0x78 start!
  22. [   72.700138] [VFE_ERR]Error registering v4l2 subdevice No such device!
  23. [   72.700148] [VFE_ERR]vfe sensor register check error at input_num = 0
  24. [   72.700428] [VFE]V4L2 device registered as video0
  25. [   72.700460] [VFE]..........................vfe clk close!.......................
  26. [   72.700483] [VFE]probe_work_handle end!
  27. [   72.710907] [VFE]vfe_open
  28. [   72.710926] [VFE]..........................vfe clk open!.......................
  29. [   72.710958] [VFE]vfe_open ok
  30. [   72.711134] [VFE]vfe_close
  31. [   72.711146] [VFE]vfe select input flag = 0, s_input have not be used .
  32. [   72.711163] [VFE]..........................vfe clk close!.......................
  33. [   72.711192] [VFE]vfe_close end
Copy code
Moreover, i2cdump do not detect my CAM too :/

  1. root@OrangePI:~# i2cdetect -y 1
  2.      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
  3. 00:          -- -- -- -- -- -- -- -- -- -- -- -- --
  4. 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  5. 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  6. 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  7. 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  8. 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  9. 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  10. 70: -- -- -- -- -- -- -- --
  11. root@OrangePI:~# i2cdetect -y 0
  12.      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
  13. 00:          -- -- -- -- -- -- -- -- -- -- -- -- --
  14. 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  15. 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  16. 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  17. 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  18. 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  19. 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  20. 70: -- -- -- -- -- -- -- --
Copy code
When trying fswebcam, I get:
  1. root@OrangePI:~# fswebcam
  2. --- Opening /dev/video0...
  3. Trying source module v4l2...
  4. /dev/video0 opened.
  5. No input was specified, using the first.
  6. Unable to query input 0.
  7. VIDIOC_ENUMINPUT: Invalid argument
Copy code
Moreover, I think that something must be made with .fex. But I do not know what.
Any ideas what is wrong?




8

threads

55

posts

252

credits

Intermediate member

Rank: 3Rank: 3

credits
252
Published in 2015-12-29 06:55:02 | Show all floors
Edited by @lex at 2015-12-28 19:56

Try this:
- Edit the script.bin and copy (replace) the Fex section below and compile and replace your new script.bin :

  1. [csi0]

  2. vip_used                 = 1
  3. vip_mode                 = 0
  4. vip_dev_qty              = 1
  5. vip_define_sensor_list   = 0

  6. vip_csi_pck              = port:PE00<2><default><default><default>
  7. vip_csi_mck              = port:PE01<2><default><default><default>
  8. vip_csi_hsync            = port:PE02<2><default><default><default>
  9. vip_csi_vsync            = port:PE03<2><default><default><default>
  10. vip_csi_d0               = port:PE04<2><default><default><default>
  11. vip_csi_d1               = port:PE05<2><default><default><default>
  12. vip_csi_d2               = port:PE06<2><default><default><default>
  13. vip_csi_d3               = port:PE07<2><default><default><default>
  14. vip_csi_d4               = port:PE08<2><default><default><default>
  15. vip_csi_d5               = port:PE09<2><default><default><default>
  16. vip_csi_d6               = port:PE10<2><default><default><default>
  17. vip_csi_d7               = port:PE11<2><default><default><default>
  18. vip_csi_sck              = port:PE12<2><default><default><default>
  19. vip_csi_sda              = port:PE13<2><default><default><default>

  20. vip_dev0_mname           = "gc2035"
  21. vip_dev0_pos             = "front"
  22. vip_dev0_lane            = 1
  23. vip_dev0_twi_id          = 2
  24. vip_dev0_twi_addr        = 0x78
  25. vip_dev0_isp_used        = 0
  26. vip_dev0_fmt             = 0
  27. vip_dev0_stby_mode       = 0
  28. vip_dev0_vflip           = 1
  29. vip_dev0_hflip           = 1
  30. vip_dev0_iovdd           = ""
  31. vip_dev0_iovdd_vol       = 2800000
  32. vip_dev0_avdd            = ""
  33. vip_dev0_avdd_vol        = 2800000
  34. vip_dev0_dvdd            = ""
  35. vip_dev0_dvdd_vol        = 1800000
  36. vip_dev0_afvdd           = ""
  37. vip_dev0_afvdd_vol       = 2800000
  38. vip_dev0_power_en        = port:PA17<1><default><default><1>
  39. vip_dev0_reset           = port:PE14<1><default><default><1>
  40. vip_dev0_pwdn            = port:PE15<1><default><default><0>
  41. vip_dev0_flash_en        =
  42. vip_dev0_flash_mode      =
  43. vip_dev0_af_pwdn         =

  44. vip_dev0_act_used        = 0
  45. vip_dev0_act_name        = "ad5820_act"
  46. vip_dev0_act_slave       = 0x18
Copy code

2

threads

5

posts

23

credits

Novice

Rank: 1

credits
23
 Author| Published in 2015-12-29 17:29:28 | Show all floors
I tryed but same results.

These two lines was different in my decompiled script.fex
  1. vip_dev0_twi_addr        = 0x78 vip_dev0_act_slave       = 0x18
Copy code


I noticed that i2cdump can take address  in interval 0x03 - 0x77, but in .fex I am setting 0x78.
  1. root@OrangePI:~# i2cdump -y 0
  2. Error: No address specified!
  3. Usage: i2cdump [-f] [-y] [-r first-last] I2CBUS ADDRESS [MODE [BANK [BANKREG]]]
  4.   I2CBUS is an integer or an I2C bus name
  5.   ADDRESS is an integer (0x03 - 0x77)
Copy code


Is that OK?

Maybe someone could share working script.bin with cam enabled?

2

threads

5

posts

23

credits

Novice

Rank: 1

credits
23
 Author| Published in 2015-12-30 19:40:38 | Show all floors
Can the problem be my power supply? At the moment I am using 5V/1.5A

1

threads

7

posts

84

credits

Registered member

Rank: 2

credits
84
Published in 2016-2-2 23:38:26 | Show all floors
I am stuck here too.  I have camera board with gc2035 connected to OP-PC.
Trying to stream video from /dev/video0 with no luck. I am able to capture image with fsweb and motion .

Not able to access the camera through ffmpeg/avcon

Frustrating part is OP camaera module is not working on any of the Linux image.

8

threads

55

posts

252

credits

Intermediate member

Rank: 3Rank: 3

credits
252
Published in 2016-2-8 04:21:16 | Show all floors
Edited by @lex at 2016-2-7 17:34

If you are not in such a hurry, may be we can get HW video encoding to work with this:  https://plus.google.com/u/0/phot ... 6248292914478510482

1

threads

7

posts

84

credits

Registered member

Rank: 2

credits
84
Published in 2016-2-28 21:24:41 | Show all floors
Hi Lex,
Video quality is really grate.
are you using  camera board with gc2035 sensor ?
is gc2035 works out of the box wit guvcview.

Thanks,
Yogesh

8

threads

55

posts

252

credits

Intermediate member

Rank: 3Rank: 3

credits
252
Published in 2016-2-29 20:45:54 | Show all floors
yogesh replied at 2016-2-28 10:24
Hi Lex,
Video quality is really grate.
are you using  camera board with gc2035 sensor ?

I am using gc2035.
guvcview does not work out of the box, you need to bypass some checking guvcview does in V4l2.
Without HW encoding you get 2 (~3) fps for streaming and 1 or 2 fps for grabbing it in mkv format.
The idea is to design a very simple program to grab the images and stream it without encoding and let the clients do the job, or use a really good sw enconding algorithm.
Maybe the BIG guys can get the HW encoding to work on H3 and this can change in near future, or the PINE64 people can convince Allwinner to help the community and we all may be happy.
Make your bet.

1

threads

7

posts

84

credits

Registered member

Rank: 2

credits
84
Published in 2016-3-2 13:33:14 | Show all floors
Thanks @lex ... can you can share guvcview hacks for OP.

Trying to get streaming out on board gc2035. As per data sheet its capable of  H.264 1080p @ 30 fps.

Anyone tried gc3035 on ONE .. not able to get it working with or without camera board. fswebcam gives black image with gp-jpeg error.

0

threads

4

posts

62

credits

Registered member

Rank: 2

credits
62
Published in 2016-3-2 20:04:48 | Show all floors
yogesh replied at 2016-2-2 23:38
I am stuck here too.  I have camera board with gc2035 connected to OP-PC.
Trying to stream video fro ...

how do you run fsweb?
I run like that
  1. fswebcam -d /dev/video0 -r 640x480 test.jpg
  2. --- Opening /dev/video0...
  3. Trying source module v4l2...
  4. /dev/video0 opened.
  5. No input was specified, using the first.
  6. --- Capturing frame...
  7. GD Error: gd-jpeg: JPEG library reports unrecoverable error: Not a JPEG file: starts with 0x06 0x06Captured frame in 0.00 seconds.
  8. --- Processing captured image...
  9. Writing JPEG image to 'test.jpg'
Copy code

and got nothing
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list