BBB, Ubuntu 13.10 (RCN distro) - stk1160 (EasyCap) not recognized

Hi

I’m running on my BeagleBone Black Ubuntu 13.10 from Robert Nelson (full prebuilded install from https://rcn-ee.net/deb/rootfs/saucy/, as-is, no customizations) and I’m trying to use USB video capture device, EasyCap which is based on stk1160 chipset. As I’m running kernel 3.8.13-bone28, my understanding was that stk1160 should be supported in the kernel, but when I plug it into USB port, nothing happens. Not even green light on device goes on. Not even dmesg shows anything usefull (not even a evidence that I plugged it in). This is last usb related dmseg entry after reboot, when I plug in the device:

root@arm ~ > dmesg | grep usb
[ 18.899708] usb0: MAC 32:2e:95:52:5c:40
[ 18.899730] usb0: HOST MAC 90:59:af:5f:4d:d9
[ 18.915017] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
[ 18.915395] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 2
[ 18.915427] musb-hdrc musb-hdrc.0.auto: supports USB remote wakeup
[ 18.915509] usb usb2: default language 0x0409
[ 18.915543] usb usb2: udev 1, busnum 2, minor = 128
[ 18.915556] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 18.915569] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 18.915581] usb usb2: Product: MUSB HDRC host driver
[ 18.915591] usb usb2: Manufacturer: Linux 3.8.13-bone28 musb-hcd
[ 18.915602] usb usb2: SerialNumber: musb-hdrc.0.auto
[ 18.918958] usb usb2: usb_probe_device
[ 18.918981] usb usb2: configuration #1 chosen from 1 choice
[ 18.919045] usb usb2: adding 2-0:1.0 (config #1, interface 0)
[ 18.919186] hub 2-0:1.0: usb_probe_interface
[ 18.919201] hub 2-0:1.0: usb_probe_interface - got id
[ 19.020329] usb usb2: bus auto-suspend, wakeup 1
[ 21.270316] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready

lsusb also does not reveal anything:

root@arm ~ > lsusb
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

First I thought maybe device is based on another chipset (as there are many implementation of EasyCap on market), but when I plugged it into my PC, ubuntu 13.04 on VM ware identify s it:

[10499.882695] usb 1-2: new full-speed USB device number 7 using uhci_hcd
[10500.035235] usb 1-2: New USB device found, idVendor=05e1, idProduct=0408
[10500.035239] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[10500.035241] usb 1-2: Product: USB 2.0 Video Capture Controller
[10500.035242] usb 1-2: Manufacturer: Syntek Semiconductor
[10500.038055] usb 1-2: New device Syntek Semiconductor USB 2.0 Video Capture Controller @ 12 Mbps (05e1:0408, interface 0, class 0)
[10500.038058] usb 1-2: video interface 0 found
[10500.038059] usb 1-2: must be connected to a high-speed USB 2.0 port
[10500.038059] You may not be able to stream video smoothly
[10500.362352] saa7115 0-0025: saa7113 found (1f7113d0e100000) @ 0x4a (stk1160)
[10501.067161] stk1160: driver ver 0.9.5 successfully loaded

as well lsusb

user@ubuntu:~$ lsusb
Bus 001 Device 006: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 007: ID 05e1:0408 Syntek Semiconductor Co., Ltd STK1160 Video Capture Device
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

So it is stk1160 chip. Why my BBB setup can not see it. Any hint what could be the the reason? I’m powering BBB from external 2A power supply, so power should not be the problem. Other devices like Logitech USB camera, USB flash drives work fine in that USB slot.

Appreciate any help on this topic :slight_smile:

BR
Ivan

It should be. Checking both my Mint desktop and my Ubuntu bone kernel config options, they both compile stk1160 as a module.

So my question would be, are you plugging the webcam directly into the large USB plug or do you have a USB hub attached to it to allow multiple devices to connect?

I’m plugging EasyCap directly into USB port, without any hub in between. When I search my file system for stk1160 I can found following file:

/lib/modules/3.8.13-bone28/kernel/drivers/media/usb/stk1160/stk1160.ko

BR
Ivan

Any further hint?

BR
Ivan

At a loss. If you could
Unplug it and plug in a device that works
Then unplug the working device and plug the broken one back in.

Afterwards run ‘dmesg | grep usb’ again and post those results it would at least provide a bit more information. IE showing what a “good” insertion looks like in the log vs the “bad” insertion.

So, finally googled skt1160 and after looking through the results, I’m thinking the issue might be the device. Based on http://www.raspberrypi.org/phpBB3/viewtopic.php?f=33&t=18831&sid=057d5de92feb665cf10f4905c1929e32 where you have many different people having varying degrees of failures - including some where it works only if plugged in upon bootup and not unplugged, and others where they have to periodically unplug it and plug it back in - my guess is that because this chip is so generic that the quality of production is all over the place.

I’d also guess that your issue is related to power. Even though your BBB has a decent power supply, I’m betting that TI was very careful with power regulation for the USB host and it just will NOT supply more than 500mA of power[which is what it is clearly rated to for and which is more than enough for any USB compliant device].

Wheras if the producer of your your particular device was sloppy/didn’t care they may need more than 500mA which most PC’s these days will provide despite it being so far out of spec.

Is it viable to get a cheap hub and manually wire the 5V to that hub from the 5V in, completely bypassing the BBB’s circuits entirely? Or are there gotchas with that also, initialisation timing or something else I haven’t thought of?

Is it viable to get a cheap hub and manually wire the 5V to that hub from the 5V in, completely bypassing the BBB’s circuits entirely? Or are there gotchas with that also, initialisation timing or something else I haven’t thought of?

I don’t think that power is the issue. I did check settings of TPS65217, it returns:

root ~ > i2cget -f -y 0 0x24 0x01

0x3e → 0 0 1 1 11 10

That means that USB current limit is set to 1300mA (looking at TPS65217 tech reference)

I will take look a links you mentioned - hope I will find something

Thx.
Ivan

Hello

Did you manage to make the mainline driver work?

Regarding power, the module consumes like 200ma while work. I doubt power is an issue.

I managed to make it work with the old easycap driver made by Thomas work with 3.2.0 psp linux with DMA on. But it stop capture in a few seconds. I am trying to make the make mainlined stk1160 driver work. Did anyone succeed making it work?

Best Regards

Mahammad