PDA

View Full Version : DMM 22BUC03 with BeagleBone Black



barszap
September 16, 2015, 18:55:46
Hello,

I am trying to get the DMM 22BUC03 working with BeagleBone Black and am having a few issues. I followed the getting started guide and updated the firmware and built and installed the drivers. I added a UDEV rule that got the camera recognized as /dev/video0 and attempted to take a picture using fswebcam.

The first issue I noticed was that the resolution that the camera reported, and then fswebcam used, was 372x480. The second issue was that the resulting image was just a big green rectangle.

I tried to reproduce this on a clean install of Ubuntu and am getting the exact same results.

Any help is greatly appreciated.

Thanks!!

Stefan Geissler
September 17, 2015, 08:09:24
Hi

reporting a resolution of 372x480 is funny, because the camera simply does not have this. That means, that does not work. 320x240, 640x480 and 744x480 are the available resolutions of the camera.

What does v4l2-ctl (package "v4l-utils") report about the camera?
What is the output of "sudo ./euvccam-fw -p"?
What is the ouput of "dmesg"?

barszap
September 17, 2015, 17:32:44
Hi

reporting a resolution of 372x480 is funny, because the camera simply does not have this. That means, that does not work. 320x240, 640x480 and 744x480 are the available resolutions of the camera.

What does v4l2-ctl (package "v4l-utils") report about the camera?
What is the output of "sudo ./euvccam-fw -p"?
What is the ouput of "dmesg"?

I made some progress yesterday. Trying to update the firmware using euvccam-fw didn't seem to be working. I ended up using the firmware-update tool and loaded the dmk22uc03_uvc.euvc firmware and then used the tool to put the camera in UVC mode. After doing this the readout from sudo ./euvccam-fw -p was this:


Manufacturer String: The Imaging Source Europe GmbH
Product String: DMM 22BUC03-ML
Serial Number String: 38210070
PID: 8302
Flags: 1
EEProm size: 16384

This changed the PID from 8202 to 8302 but I was then able to connect to it and see video and take images from the camera on the desktop Ubuntu install.

The output from v4l2-ctl is below:


Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : DMM 22BUC03-ML
Bus info : usb-0000:00:06.0-2
Driver version: 3.19.8
Capabilities : 0x84200001
Video Capture
Streaming
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height : 744/480
Pixel Format : 'GREY'
Field : None
Bytes per Line: 744
Size Image : 357120
Colorspace : Unknown (00000000)
Custom Info : feedcafe
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 744, Height 480
Default : Left 0, Top 0, Width 744, Height 480
Pixel Aspect: 1/1
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 7.500 (15/2)
Read buffers : 0
brightness (int) : min=0 max=255 step=1 default=128 value=189
gain (int) : min=16 max=63 step=1 default=16 value=16
exposure_absolute (int) : min=1 max=2500 step=1 default=127 value=300
privacy (bool) : default=0 value=0


On the BeagleBone Black however, the camera shows up under lsusb but there is no longer a /dev/video0. I changed the UDEV rule to reflect the new PID but that still didn't work. I'm also unable to compile the firmware-update tool on the BBB because of the -std=c++11 issue.

I'll be working on this again today so if you have any suggestions I'd greatly appreciate it.

Thanks!!

barszap
September 17, 2015, 17:56:07
Also, on the BBB the output from dmesg is:

[ 2.832042] usb 1-1: New USB device found, idVendor=199e, idProduct=8302
[ 2.832054] usb 1-1: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[ 2.832065] usb 1-1: Product: DMM 22BUC03-ML
[ 2.832076] usb 1-1: Manufacturer: The Imaging Source Europe GmbH
[ 2.832086] usb 1-1: SerialNumber: 38210070
[ 2.832804] usb 1-1: usb_probe_device
[ 2.832822] usb 1-1: no configuration chosen from 0 choices

Stefan Geissler
September 18, 2015, 17:12:31
The eucvvam-fw output is as expected, the V4l2-ctl output too.

the dmesg output misses something like

[26150.415953] uvcvideo: Unknown video format 42474752-0000-0010-8000-00aa00389b71
[26150.415959] uvcvideo: Unknown video format 36314752-0000-0010-8000-00aa00389b71
[26150.415966] uvcvideo: Found UVC 1.10 device DFK 23UP1300 (199e:841c)

Therefore you may have a problem with your Linux at all? I have no experiences with the Beagle, since it is not as powerful as e.g. Raspberry PI2.

barszap
September 18, 2015, 19:54:54
It looks to me like there is an issue with the UDEV rules. I just took the one provided in the firmware and changed the PID to 8302 and updated the path to the uvcvideo drivers. Is there anything that needs to be added or changed to the rule? Without the rule the uvcvideo module doesn't even get loaded.

# if no driver has claimed the interface yet, load uvcvideo
ACTION=="add", SUBSYSTEM=="usb", \
ATTRS{idVendor}=="199e", ATTRS{idProduct}=="8302", \
RUN+="/sbin/modprobe -b uvcvideo"

# add the imaging source VID and PID to the list of devices supported by uvcvideo
ACTION=="add", SUBSYSTEM=="drivers", \
ENV{DEVPATH}=="/sys/bus/usb/drivers/uvcvideo", \
ATTR{new_id}="199e 8302"

barszap
September 18, 2015, 21:13:34
I just went back to a clean install of Debian and only installed the UDEV rule. Now the camera is showing up under /dev/video0. The output from v4l2-ctl however is not the same as it was on the desktop computer. The pixel format is no longer GREY but is now MJPG.


Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : DMM 22BUC03-ML
Bus info : usb-musb-hdrc.1.auto-1.4
Driver version: 3.8.13
Capabilities : 0x84000001
Video Capture
Streaming
Format Video Capture:
Width/Height : 744/480
Pixel Format : 'MJPG'
Field : None
Bytes per Line: 0
Size Image : 5038848
Colorspace : Unknown (00000000)
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 744, Height 480
Default : Left 0, Top 0, Width 744, Height 480
Pixel Aspect: 1/1
Video input : 0 (Camera 1: ok)
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0
Priority: 2

Stefan Geissler
September 21, 2015, 16:51:42
Hi

simply check, wether you receive an image with guvcview.

barszap
September 21, 2015, 17:43:10
I was only able to get the camera to show up as a device that one time. Once I rebooted the BBB it stopped working again. I thought it may be an issue of the camera not getting enough power but I have it connected through a powered USB hub and I'm having the same problem. I then noticed in dmesg that the camera is being found before the uvcvideo module is loaded so it doesn't know what to do with the camera. The output is below. How can I change the order things load so that the module is loaded before the camera?

[ 3.353892] usb 1-1.4: New USB device found, idVendor=199e, idProduct=8302
[ 3.353905] usb 1-1.4: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[ 3.353916] usb 1-1.4: Product: DMM 22BUC03-ML
[ 3.353926] usb 1-1.4: Manufacturer: The Imaging Source Europe GmbH
[ 3.353936] usb 1-1.4: SerialNumber: 38210070
[ 3.354646] usb 1-1.4: usb_probe_device
[ 3.354664] usb 1-1.4: no configuration chosen from 0 choices
[ 4.357109] rtusb init rt2870 --->
[ 4.357251] usbcore: registered new interface driver rt2870
[ 6.372760] usbcore: registered new interface driver uvcvideo

barszap
September 21, 2015, 18:30:11
Actually, I think the issue is more related to the second line in the dmesg output below. "unable to read config index 0 descriptor/start: -32"

[ 1.667871] usb 1-1.4: new high-speed USB device number 3 using musb-hdrc
[ 3.341450] usb 1-1.4: unable to read config index 0 descriptor/start: -32
[ 3.348778] usb 1-1.4: chopping to 0 config(s)
[ 3.353613] usb 1-1.4: default language 0x0409
[ 3.353878] usb 1-1.4: udev 3, busnum 1, minor = 2
[ 3.353892] usb 1-1.4: New USB device found, idVendor=199e, idProduct=8302
[ 3.353905] usb 1-1.4: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[ 3.353916] usb 1-1.4: Product: DMM 22BUC03-ML
[ 3.353926] usb 1-1.4: Manufacturer: The Imaging Source Europe GmbH
[ 3.353936] usb 1-1.4: SerialNumber: 38210070
[ 3.354646] usb 1-1.4: usb_probe_device
[ 3.354664] usb 1-1.4: no configuration chosen from 0 choices

Stefan Geissler
September 22, 2015, 09:59:40
Since I do not have own experiences with the Beagle Bone black, I must admit, I simply can not have experiences with all available hardware in the world, I suggest to try the camera on a normal x86 based computer with Linux and see, how the camera behaves there. Then compare this with your Beagle Bone.

I am very sorry, but I am really running out of knowledge here for your hardware.

barszap
September 22, 2015, 21:00:26
Is there any documentation that will tell me what the different firmware versions are? Or can you tell me which one I should try?

dmk22uc03_135.euvc
dmk22uc03_145.euvc
dmk22uc03_153.euvc
dmk22uc03_163_uvc.euvc

On my Ubuntu desktop machine (not BBB) I can get the driver to load if I have the 163_uvc firmware loaded but it says that it is an unknown USB device. If I switch it to proprietary mode then it recognizes it as a tis camera but then the drivers don't load. Is this correct behavior for Ubuntu?

barszap
September 22, 2015, 23:19:53
Also, should the firmware be put into uvc mode or in proprietary mode? euvccam-fw says it isn't necessary with the new firmware but firmware-update doesn't give that message and lets me put it in uvc mode.

Stefan Geissler
September 23, 2015, 08:02:04
Hi

"dmk22uc03_163_uvc.euv" is needed and the camera must be put into UVC mode as shown at the end of https://github.com/TheImagingSource/tiscamera/wiki/Getting-Started-with-USB-2.0-CMOS-Cameras

barszap
September 24, 2015, 17:37:55
When I try to put it into uvc mode as described in that page I get the following output:

~/tiscamera/tools/euvccam-fw$ sudo ./euvccam-fw -m uvc
Mode setting option is removed from this version.
This setting is not required for latest firmware files

Stefan Geissler
September 25, 2015, 08:03:40
This happens, if the Windows firmware is used. It has no UVC mode. Please use dmk22uc03_163_uvc.euvc.

barszap
September 30, 2015, 21:34:12
I am using dmk22uc03_163_uvc.euvc. I loaded it with both the firmware tool and euvccam-fw tool. I still get that message when I try to put it in UVC mode.

I'm now trying to get it working on a brand new clean install of Ubuntu. I'm able to get it to load fine and show up as /dev/video1 but in guvcview all I'm seeing is a black screen no matter what setting I try. Other than setting the camera to UVC mode are there any drivers that I actually need to install on the computer? Is there a way to tell if the camera is actually working correctly?

Stefan Geissler
October 9, 2015, 11:32:34
Barszap let me know, the 3.8 Kernel installed by default on the Beagle Bone has USB issues. Updating to a more current Kernel solves the proble,

I would like to say thank you to barszap!