Looking for working USB borescope recommendation..

Search This thread

vbtalent

Member
Apr 21, 2014
13
0
I'm wanting to add a borescope to my Nexus and realize that not all of them are compatible. I've purchased a USB model that is not compatible even after a jailbreak so I was hoping someone has had the opportunity to test any that are compatible?

I purchased the following:

ebay item: 141214106067

and was looking at the following since it appears to have a USB2.0 UVC interface

ebay item: 111107144638

Any help or guidance would be appreciated..

VB,
 

vbtalent

Member
Apr 21, 2014
13
0
I managed to pry out the following information from the command line

#dmesg | grep video

Linux Video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
uvcvideo: Found UVC 1.00 device USB camera (0bda:5801)


I believe this means the my USB camera is already using the UVC driver in attempt to work properly..

Anyone have any suggestions on how to possibly get this to work?
 

vbtalent

Member
Apr 21, 2014
13
0
Actually looks like its supported at Linux UVC

0bda:5801 Realtek 2SF022 (HP Pavillon DV7 4151SG notebooks) Realtek
 

vbtalent

Member
Apr 21, 2014
13
0
Continuing to dig and finding this in dmesg- firewalled???

130|root@flo:/ # dmesg | grep video
<6>[ 7539.970855] uvcvideo: Found UVC 1.00 device USB Camera (0bda:5801)
<6>[ 8885.732574] uvcvideo: Found UVC 1.00 device USB Camera (0bda:5801)
<5>[ 8917.306060] type=1400 audit(1398128520.701:44): avc: denied { getattr } for pid=5504 comm="ra.simplewebcam" path="/dev/video0" dev="tmpfs" ino=7536 scontext=u:r:untrusted_app:s0 tcontext=u:eek:bject_r:video_device:s0 tclass=chr_file
<6>[ 9269.163787] uvcvideo: Found UVC 1.00 device USB Camera (0bda:5801)
<6>[ 9537.000366] uvcvideo: Found UVC 1.00 device USB Camera (0bda:5801)
<5>[ 9575.854766] type=1400 audit(1398129235.463:47): avc: denied { getattr } for pid=6112 comm="ra.simplewebcam" path="/dev/video0" dev="tmpfs" ino=7536 scontext=u:r:untrusted_app:s0 tcontext=u:eek:bject_r:video_device:s0 tclass=chr_file
<6>[ 9686.335266] uvcvideo: Found UVC 1.00 device USB Camera (0bda:5801)
<6>[ 9902.219024] uvcvideo: Found UVC 1.00 device USB Camera (0bda:5801)
<5>[ 9994.940917] type=1400 audit(1398129654.551:48): avc: denied { read write } for pid=6406 comm="ra.simplewebcam" name="video0" dev="tmpfs" ino=7536 scontext=u:r:untrusted_app:s0 tcontext=u:eek:bject_r:video_device:s0 tclass=chr_file
<5>[ 9994.941192] type=1400 audit(1398129654.551:49): avc: denied { open } for pid=6406 comm="ra.simplewebcam" name="video0" dev="tmpfs" ino=7536 scontext=u:r:untrusted_app:s0 tcontext=u:eek:bject_r:video_device:s0 tclass=chr_file

<6>[10049.950195] uvcvideo: Found UVC 1.00 device USB Camera (0bda:5801)
 

vbtalent

Member
Apr 21, 2014
13
0
I've temporarily disabled SELinux.. still no luck but the avc: denied errors are gone.

It looks like there is a device conflict as it seems to not be able to open the /dev/video0?

Anyone have any thoughts?

D/dalvikvm( 2962): Trying to load lib /data/app-lib/com.camera.simplewebcam-1/libImageProc.so 0x41ea2f78
D/dalvikvm( 2962): Added shared lib /data/app-lib/com.camera.simplewebcam-1/libImageProc.so 0x41ea2f78
D/dalvikvm( 2962): No JNI_OnLoad found in /data/app-lib/com.camera.simplewebcam-1/libImageProc.so 0x41ea2f78, skipping init
D/dalvikvm( 2962): GC_FOR_ALLOC freed 71K, 2% free 9181K/9284K, paused 17ms, total 17ms
I/dalvikvm-heap( 2962): Grow heap (frag case) to 10.166MB for 1228816-byte allocation
D/dalvikvm( 2962): GC_FOR_ALLOC freed 1K, 2% free 10380K/10488K, paused 14ms, total 14ms
E/TEST ( 2962): Cannot open '/dev/video0': 16, Device or resource busy
D/dalvikvm( 2962): GC_CONCURRENT freed <1K, 2% free 10381K/10488K, paused 3ms+2ms, total 18ms
I/ActivityManager( 590): Displayed com.camera.simplewebcam/.Main: +211ms



I'm guessing this has something to do with the 2 built in camera's... not sure if they can be temporarily disabled or somehow mount the USB camera on another /dev maybe like /dev/video3?
 

vbtalent

Member
Apr 21, 2014
13
0
making very little progress but I think I know what's going on.. the USB device is being loaded as /dev/video3 and not as /dev/video0 which I assume is what most applications are looking for.

This was me plugging and unplugging the camera. I believe this also tells me that the kernel already is set for the camera.

root@flo:/ # ls -l /dev/v*
crw-rw---- system camera 81, 1 2014-04-22 21:54 v4l-subdev0
crw-rw---- system camera 81, 2 2014-04-22 21:54 v4l-subdev1
crw-rw---- system camera 81, 3 2014-04-22 21:54 v4l-subdev2
crw-rw---- system camera 81, 4 2014-04-22 21:54 v4l-subdev3
crw-rw---- system camera 81, 5 2014-04-22 21:54 v4l-subdev4
crw-rw---- system camera 81, 7 2014-04-22 21:54 v4l-subdev5
crw-rw---- system camera 81, 9 2014-04-22 21:54 v4l-subdev6
crw-rw---- system camera 81, 10 2014-04-22 21:54 v4l-subdev7
crw-rw---- system camera 81, 11 2014-04-22 21:54 v4l-subdev8
crw-rw---- system camera 81, 12 2014-04-22 21:54 v4l-subdev9
crw------- root root 7, 0 2014-04-22 21:54 vcs
crw------- root root 7, 1 2014-04-22 21:54 vcs1
crw------- root root 7, 128 2014-04-22 21:54 vcsa
crw------- root root 7, 129 2014-04-22 21:54 vcsa1
crw------- root root 10, 127 2014-04-22 21:54 vga_arbiter
crw-rw---- system camera 81, 0 2014-04-22 21:54 video0
crw-rw---- system camera 81, 6 2014-04-22 21:54 video1
crw-rw---- system camera 81, 8 2014-04-22 21:54 video2
root@flo:/ # ls -l /dev/v*
crw-rw---- system camera 81, 1 2014-04-22 21:54 v4l-subdev0
crw-rw---- system camera 81, 2 2014-04-22 21:54 v4l-subdev1
crw-rw---- system camera 81, 3 2014-04-22 21:54 v4l-subdev2
crw-rw---- system camera 81, 4 2014-04-22 21:54 v4l-subdev3
crw-rw---- system camera 81, 5 2014-04-22 21:54 v4l-subdev4
crw-rw---- system camera 81, 7 2014-04-22 21:54 v4l-subdev5
crw-rw---- system camera 81, 9 2014-04-22 21:54 v4l-subdev6
crw-rw---- system camera 81, 10 2014-04-22 21:54 v4l-subdev7
crw-rw---- system camera 81, 11 2014-04-22 21:54 v4l-subdev8
crw-rw---- system camera 81, 12 2014-04-22 21:54 v4l-subdev9
crw------- root root 7, 0 2014-04-22 21:54 vcs
crw------- root root 7, 1 2014-04-22 21:54 vcs1
crw------- root root 7, 128 2014-04-22 21:54 vcsa
crw------- root root 7, 129 2014-04-22 21:54 vcsa1
crw------- root root 10, 127 2014-04-22 21:54 vga_arbiter
crw-rw---- system camera 81, 0 2014-04-22 21:54 video0
crw-rw---- system camera 81, 6 2014-04-22 21:54 video1
crw-rw---- system camera 81, 8 2014-04-22 21:54 video2
crw-rw---- system camera 81, 14 2014-04-22 21:56 video3
root@flo:/ # ls -l /dev/v*
crw-rw---- system camera 81, 1 2014-04-22 21:54 v4l-subdev0
crw-rw---- system camera 81, 2 2014-04-22 21:54 v4l-subdev1
crw-rw---- system camera 81, 3 2014-04-22 21:54 v4l-subdev2
crw-rw---- system camera 81, 4 2014-04-22 21:54 v4l-subdev3
crw-rw---- system camera 81, 5 2014-04-22 21:54 v4l-subdev4
crw-rw---- system camera 81, 7 2014-04-22 21:54 v4l-subdev5
crw-rw---- system camera 81, 9 2014-04-22 21:54 v4l-subdev6
crw-rw---- system camera 81, 10 2014-04-22 21:54 v4l-subdev7
crw-rw---- system camera 81, 11 2014-04-22 21:54 v4l-subdev8
crw-rw---- system camera 81, 12 2014-04-22 21:54 v4l-subdev9
crw------- root root 7, 0 2014-04-22 21:54 vcs
crw------- root root 7, 1 2014-04-22 21:54 vcs1
crw------- root root 7, 128 2014-04-22 21:54 vcsa
crw------- root root 7, 129 2014-04-22 21:54 vcsa1
crw------- root root 10, 127 2014-04-22 21:54 vga_arbiter
crw-rw---- system camera 81, 0 2014-04-22 21:54 video0
crw-rw---- system camera 81, 6 2014-04-22 21:54 video1
crw-rw---- system camera 81, 8 2014-04-22 21:54 video2
root@flo:/ #
 

vbtalent

Member
Apr 21, 2014
13
0
Found an interesting thread where I believe the developer is trying to make the USB camera /dev/video0... I'd post the URL but I've only posted 7 times to the forum.

sorry... gonna post a few more time to meet the 10 post limit to post URL's... and I have to wait 5 minutes between posts.. a bit on the paranoid side around here..
 

vbtalent

Member
Apr 21, 2014
13
0
Wow.. no suggestions or reply's to this thread. Huge bummer..

Still digging around and seeing some noise about using the /system/etc/nvcamera.conf file however that file is not on my Nexus 7? I trieed creating one but not sure its being read.. maybe it is. Anyway, it didn't work..


Need to make /system directory read/write:

# mount -o rw,remount /system

# vi /etc/nvcamera.conf# format, cameraName=device,direction,orientation,type

This is the file before mods
# type can be 'stereo' for stereo capable, 'mono' for not stereo capable,
# 'usb' to enable searching for a usb device and where to put it in the list
# if found. Lines must be shorter then 256 characters
version=1
camera0=/dev/ov5640,back,0,mono
#camera1=/dev/ov5650,back,0,mono // 2nd camera for stereo once supported
camera1=/dev/mi1040,front,0,mono
#camera4=/dev/ov5650,back,0,stereo // virtual stereo device once supported


Change this line:
camera0=/dev/ov5640,back,0,mono

to:
camera0=/dev/ov5640,front,0,mono

And this line:
camera1=/dev/mi1040,front,0,mono

to:
camera1=/dev/mi1040,back,0,mono

I could really use some help with this.. anyone?
 

vbtalent

Member
Apr 21, 2014
13
0
Just wanted to close the loop and let the forum know that I got my generic borescope working on my Nexus via the USB port, I did have to root it but might not have had to assuming I could give permissions of /ueventd.xxxx.rc set to 0666. SInce its rooted its a moot point..

I also modified the source code for simplewebcam (https://bitbucket.org/droidperception/simplewebcam/overview)

VB,