USB Camera on BBB (Debian GNU/Linux 7)

Hello,
Could someone give me a hand? I’m having trouble getting a USB Camera to work on my BeagleBone Black.
I’m using a 5V@1A adapter (I thought it could be a power issue), but it didn’t solve it. I can provide the following information of my system:

$ uname -a
Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l GNU/Linux

$ lsusb
Bus 001 Device 002: ID 1871:0101 Aveo Technology Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ lsmod
Module Size Used by
uvcvideo 53354 0
videobuf2_vmalloc 2418 1 uvcvideo
g_multi 47670 2
libcomposite 14299 1 g_multi

$dmesg | less

[ 1196.227457] usb usb1: usb wakeup-resume
[ 1196.227556] usb usb1: usb auto-resume
[ 1196.227607] hub 1-0:1.0: hub_resume
[ 1196.227706] hub 1-0:1.0: port 1: status 0101 change 0001
[ 1196.329800] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
[ 1196.329910] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
[ 1196.435171] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[ 1196.562835] usb 1-1: skipped 1 descriptor after configuration
[ 1196.562886] usb 1-1: skipped 5 descriptors after interface
[ 1196.562929] usb 1-1: skipped 1 descriptor after endpoint
[ 1196.562967] usb 1-1: skipped 9 descriptors after interface
[ 1196.563301] usb 1-1: default language 0x0409
[ 1196.564922] usb 1-1: udev 3, busnum 1, minor = 2
[ 1196.564969] usb 1-1: New USB device found, idVendor=1871, idProduct=0101
[ 1196.565009] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1196.565044] usb 1-1: Product: USB2.0 Camera
[ 1196.565079] usb 1-1: Manufacturer: AVEO Technology Corp.
[ 1196.566432] usb 1-1: usb_probe_device
[ 1196.566483] usb 1-1: configuration #1 chosen from 1 choice
[ 1196.566782] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[ 1196.568276] uvcvideo 1-1:1.0: usb_probe_interface
[ 1196.568333] uvcvideo 1-1:1.0: usb_probe_interface - got id
[ 1196.568476] uvcvideo: Found UVC 1.00 device USB2.0 Camera (1871:0101)
[ 1196.574639] input: USB2.0 Camera as /devices/ocp.3/47400000.usb/musb-hdrc.1.auto/usb1/1-1/1-1:1.0/input/input2
[ 1196.575902] usb 1-1: adding 1-1:1.1 (config #1, interface 1)
[ 1196.578270] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[ 1196.578369] hub 1-0:1.0: port 1 enable change, status 00000503
[ 1199.015323] usb 1-1: usb auto-suspend, wakeup 0
[ 1199.029051] hub 1-0:1.0: hub_suspend
[ 1199.029145] usb usb1: bus auto-suspend, wakeup 1

$ ls -al /dev/video0
crw-rw—T+ 1 root video 81, 0 Sep 4 23:45 /dev/video0

But when I try to capture some image it fails. I tried with streamer, mjpg-streamer and ffmpeg but always get timeout. My impression is that not all the modules are being loaded. For instance when I plug the camera on my laptop I get the following modules on lsmod:

$ lsmod

uvcvideo 80885 0
videobuf2_vmalloc 13216 1 uvcvideo
videobuf2_memops 13362 1 videobuf2_vmalloc
videobuf2_core 40664 1 uvcvideo
videodev 134688 2 uvcvideo,videobuf2_core

The 3 last aren’t being loaded on the BBB. Do you have any suggestions? What could it be?
Thanks a lot for any hints!

hello

I am no expert but I have found qv4l2 a very good tool to help debug webcams. Often I find the default resolutions are to high for these small boards

sudo apt-get install qv4l2

$ lsmod

uvcvideo 80885 0
videobuf2_vmalloc 13216 1 uvcvideo
videobuf2_memops 13362 1 videobuf2_vmalloc
videobuf2_core 40664 1 uvcvideo
videodev 134688 2 uvcvideo,videobuf2_core

The 3 last aren’t being loaded on the BBB. Do you have any suggestions? What could it be?
Thanks a lot for any hints!

Did you make sure those modules actually exist on the BBB ?

They are built-in:

https://github.com/RobertCNelson/bb-kernel/blob/am33x-v3.8/patches/defconfig#L2574

Regards,

Robert, thanks. However since we’re talking 3.8.13* hotplug still is an issue ?

amerello, have you tried loading these modules manually with modprobe ? Or have you manually edited /etc/modules to include these there ?

Hello all,
same issue with me. i can not find /dev/video0
i am using Debian on beaglebone black rev C

`
debian@beaglebone:~$ uname -a
Linux beaglebone 3.8.13-bone50 #1 SMP Tue May 13 13:24:52 UTC 2014 armv7l GNU/Linux

debian@beaglebone:~$ lsusb
Bus 001 Device 003: ID 413c:1004 Dell Computer Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 413c:2006 Dell Computer Corp.
Bus 001 Device 007: ID 046d:0825 Logitech, Inc. Webcam C270
Bus 001 Device 006: ID 15d9:0a4f Trust International B.V.

debian@beaglebone:~$ lsmod | grep video
uvcvideo 57013 0
videobuf2_vmalloc 2490 1 uvcvideo
`

`
debian@beaglebone:~$ sudo modprobe uvcvideo

`

doesn’t show any output.
any suggestion?

running the same kernel & camera I got it working…my notes are here, … you may find some hints

http://dumb-looks-free.blogspot.fr/2014/05/beaglebone-black-bbb-with-logitech-c270.html

Thanks DLF,
I followed your hints but no change. dmesg output is below. plz suggest what to do.

`

debian@beaglebone:~$ dmesg
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.8.13-bone50 (root@imx6q-wandboard-2gb-0) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Tue May 13 13:24:52 UTC 2014
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=50c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Generic AM33XX (Flattened Device Tree), model: TI AM335x BeagleBone
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] On node 0 totalpages: 130816
[ 0.000000] free_area_init_node: node 0, pgdat c08a85c0, node_mem_map c0923000
[ 0.000000] Normal zone: 1024 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 129792 pages, LIFO batch:31
[ 0.000000] AM335X ES1.0 (neon )
[ 0.000000] PERCPU: Embedded 9 pages/cpu @c0d33000 s14080 r8192 d14592 u36864
[ 0.000000] pcpu-alloc: s14080 r8192 d14592 u36864 alloc=9*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129792
[ 0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 root=UUID=615bdcc1-ddf6-4d7e-9369-96e4bf15c308 ro rootfstype=ext4 rootwait fixrtc quiet init=/lib/systemd/systemd
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] __ex_table already sorted, skipping sort
[ 0.000000] allocated 1048576 bytes of page_cgroup
[ 0.000000] please try ‘cgroup_disable=memory’ option if you don’t want memory cgroups
[ 0.000000] Memory: 511MB = 511MB total
[ 0.000000] Memory: 505372k/505372k available, 18916k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf800000 - 0xbfe00000 ( 6 MB)
[ 0.000000] .text : 0xc0008000 - 0xc07e4770 (8050 kB)
[ 0.000000] .init : 0xc07e5000 - 0xc0822700 ( 246 kB)
[ 0.000000] .data : 0xc0824000 - 0xc08ab580 ( 542 kB)
[ 0.000000] .bss : 0xc08ab580 - 0xc0922d00 ( 478 kB)
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[ 0.000000] NR_IRQS:0 nr_irqs:0 0
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] Total of 128 interrupts on 1 active controller
[ 0.000000] OMAP clockevent source: GPTIMER1 at 24000000 Hz
[ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[ 0.000000] OMAP clocksource: GPTIMER2 at 24000000 Hz
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] console [tty0] enabled
[ 0.000364] Calibrating delay loop… 993.47 BogoMIPS (lpj=969728)
[ 0.029189] pid_max: default: 32768 minimum: 301
[ 0.029327] Security Framework initialized
[ 0.029381] Mount-cache hash table entries: 512
[ 0.035003] Initializing cgroup subsys cpuacct
[ 0.035062] Initializing cgroup subsys memory
[ 0.035107] Initializing cgroup subsys blkio
[ 0.035194] CPU: Testing write buffer coherency: ok
[ 0.035581] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[ 0.035634] Setting up static identity map for 0x804d2348 - 0x804d2394
[ 0.036568] Brought up 1 CPUs
[ 0.036582] SMP: Total of 1 processors activated (993.47 BogoMIPS).
[ 0.037355] devtmpfs: initialized
[ 0.045755] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 0.097876] pinctrl core: initialized pinctrl subsystem
[ 0.098013] rstctl core: initialized rstctl subsystem
[ 0.098309] regulator-dummy: no parameters
[ 0.098626] NET: Registered protocol family 16
[ 0.099173] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.104811] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 0.105397] platform 49000000.edma: alias fck already exists
[ 0.105414] platform 49000000.edma: alias fck already exists
[ 0.105427] platform 49000000.edma: alias fck already exists
[ 0.106027] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
[ 0.106122] OMAP GPIO hardware version 0.1
[ 0.106921] gpiochip_add: registered GPIOs 32 to 63 on device: gpio
[ 0.107637] gpiochip_add: registered GPIOs 64 to 95 on device: gpio
[ 0.108329] gpiochip_add: registered GPIOs 96 to 127 on device: gpio
[ 0.108581] of_get_named_gpio_flags exited with status 52
[ 0.108598] gpio-rctrl rstctl.4: loaded OK
[ 0.111733] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.112958] cpsw.0: No hwaddr in dt. Using 78:a5:04:c0:e3:1f from efuse
[ 0.112978] cpsw.1: No hwaddr in dt. Using 78:a5:04:c0:e3:21 from efuse
[ 0.121158] bio: create slab at 0
[ 0.127459] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[ 0.127601] of_get_named_gpio_flags: can’t parse gpios property
[ 0.127720] vmmcsd_fixed: 3300 mV
[ 0.129229] SCSI subsystem initialized
[ 0.129460] usbcore: registered new interface driver usbfs
[ 0.129518] usbcore: registered new interface driver hub
[ 0.129717] usbcore: registered new device driver usb
[ 0.130944] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[ 0.131853] input: tps65217_pwr_but as /devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0
[ 0.133116] DCDC1: at 1500 mV
[ 0.133954] vdd_mpu: 925 <–> 1325 mV at 1325 mV
[ 0.134787] vdd_core: 925 <–> 1150 mV at 1125 mV
[ 0.135594] LDO1: at 1800 mV
[ 0.136384] LDO2: at 3300 mV
[ 0.137923] LDO3: 1800 mV
[ 0.138739] LDO4: at 3300 mV
[ 0.139453] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[ 0.139899] omap_i2c 44e0b000.i2c: unable to select pin group
[ 0.140360] omap_i2c 4819c000.i2c: bus 1 rev0.11 at 100 kHz
[ 0.141758] omap_i2c 4819c000.i2c: unable to select pin group
[ 0.141899] media: Linux media interface: v0.10
[ 0.141961] Linux video capture interface: v2.00
[ 0.142031] pps_core: LinuxPPS API ver. 1 registered

Hi,

I don’t have access to my BBB right now and won’t be able to take a look until next week.

When I can, I’ll take a look …

cheers,

Hello

I’ve tested my camera and it works with

`
root@beaglebone:/home/debian# uname -a
Linux beaglebone 3.14.17-ti-r15 #1 SMP Wed Aug 27 04:19:29 UTC 2014 armv7l GNU/Linux

`

`
sudo apt-get update
sudo apt-get install mplayer

`

plug camera into USB hub and reboot

`
root@beaglebone:/home/debian# lsusb
Bus 002 Device 002: ID 050d:0231 Belkin Components
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 04f2:0402 Chicony Electronics Co., Ltd Genius LuxeMate i200 Keyboard
Bus 002 Device 004: ID 046d:c058 Logitech, Inc. M115 Mouse
Bus 002 Device 007: ID 046d:0825 Logitech, Inc. Webcam C270

`

`
root@beaglebone:/home/debian# ls /dev/video*
/dev/video0

`
open a LXTerminal on the desktop

`
mplayer tv:// -tv driver=v4l2:width=960:height=720:device=/dev/video0:outfmt=MJPG

`

should work, … or at least it works for me.

good luck

Will 3.8.13 solve the hotplug issue for non mouse/keboard peripherals?
If not, any suggestions are greatly appreciated.

Thank you.

Suzanne

Will 3.8.13 solve the hotplug issue for non mouse/keboard peripherals?If not, any suggestions are greatly appreciated.

Thank you.

Suzanne

This is one of the known issues with 3.8.x. Supposedly it is fixed in 3.14.x, but I can not personally verify that. As I personally use 3.8.x, and have no reason for hotplug.

Still unable to make it work. Do I need to install usb-modeswitch-data package to run this camera?