Discussion:
DVB-T (siano sms1xxx) w Video4BSD/Cuse4BSD
(too old to reply)
Joerg Pulz
2010-02-15 14:35:46 UTC
Permalink
Hi,

today i found some time to try the latest stuff regarding Video4BSD and
DVB-T USB devices.
My system is:
FreeBSD hades.admin.frm2 8.0-STABLE FreeBSD 8.0-STABLE #2: Thu Jan 21
12:42:55 CET 2010 ***@hades.admin.frm2:/usr/obj/usr/src/sys/GENERIC
amd64

My device is a Hauupauge WinTV MiniStick:
usbconfig -u 7 -a 3 dump_device_desc

ugen7.3: <WinTV MiniStick Hauppauge Computer Works> at usbus7, cfg=0
md=HOST spd=HIGH (480Mbps) pwr=ON

bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x2040
idProduct = 0x5500
bcdDevice = 0x0001
iManufacturer = 0x0001 <Hauppauge Computer Works>
iProduct = 0x0002 <WinTV MiniStick>
iSerialNumber = 0x0003 <f0683e81>
bNumConfigurations = 0x0001

I svn up'ed the sources (revision 1469) and recompiled. So far everything
wnet fine. I kldload'ed video4bsd and cuse4bsd without errors.
After plugging in the DVB-T stick i tried to start webcamd and it just
bails out with a segmentation fault:
./webcamd
Attached ugen7.3[0] to cuse unit 0
Segmentation fault (core dumped)

After recompiling webcamd with "-g" and using gdb i found that it faults
at: v4l-dvb-82bbb3bd0f0a/linux/drivers/media/dvb/siano/smsusb.c (line 358)
Which is the following line:
snprintf(params.devpath, sizeof(params.devpath),
"usb\\%d-%s", dev->udev->bus->busnum, dev->udev->devpath);

As i'm not that deep inside Video4BSD i'm lost at this point.

The only thing i already tried was uncommentig the above line and trying
again. This in fact, solved the segmentation fault and results in the
following output:

./webcamd -f /tmp
Attached ugen7.3[0] to cuse unit 0
Loading firmware at '/tmp/sms1xxx-hcw-55xxx-dvbt-02.fw', f=7
Creating /dev/dvb/adapter0/demux0
Creating /dev/dvb/adapter0/dvr0
Creating /dev/dvb/adapter0/frontend0

So it seems the device should work but it doesn't. Whatever i try no
application identifies it as a usable device.
A simple 'cat /dev/dvb/adapter0/dvr0' results in "Device not configured".
May be this is due to uncommenting the code in smsusb.c, i don't know.
What i found by doing a simple 'ls -l /dev/dvb/adapter0' is that the above
mentioned devices (demux0, dvr0 and frontend0) exist twice!

ls -l /dev/dvb/adapter0
<snip>
crw-r--r-- 1 root operator 0, 224 Feb 15 15:25 demux0
crw-r--r-- 1 root operator 0, 224 Feb 15 15:25 demux0
crw------- 1 root operator 0, 225 Feb 15 15:25 demux_daemon0
crw-r--r-- 1 root operator 0, 226 Feb 15 15:25 dvr0
crw-r--r-- 1 root operator 0, 226 Feb 15 15:25 dvr0
crw------- 1 root operator 0, 227 Feb 15 15:25 dvr_daemon0
crw-r--r-- 1 root operator 0, 228 Feb 15 15:25 frontend0
crw-r--r-- 1 root operator 0, 228 Feb 15 15:25 frontend0
crw------- 1 root operator 0, 229 Feb 15 15:25 frontend_daemon0
<snap>

I don't know how this is possible?

Anyway, any help is much appreciated.

Thanks and kind regards
Joerg

- --
The beginning is the most important part of the work.
-Plato
Hans Petter Selasky
2010-02-15 14:37:19 UTC
Permalink
Post by Joerg Pulz
Hi,
today i found some time to try the latest stuff regarding Video4BSD and
DVB-T USB devices.
FreeBSD hades.admin.frm2 8.0-STABLE FreeBSD 8.0-STABLE #2: Thu Jan 21
amd64
usbconfig -u 7 -a 3 dump_device_desc
ugen7.3: <WinTV MiniStick Hauppauge Computer Works> at usbus7, cfg=0
md=HOST spd=HIGH (480Mbps) pwr=ON
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x2040
idProduct = 0x5500
bcdDevice = 0x0001
iManufacturer = 0x0001 <Hauppauge Computer Works>
iProduct = 0x0002 <WinTV MiniStick>
iSerialNumber = 0x0003 <f0683e81>
bNumConfigurations = 0x0001
I svn up'ed the sources (revision 1469) and recompiled. So far everything
wnet fine. I kldload'ed video4bsd and cuse4bsd without errors.
After plugging in the DVB-T stick i tried to start webcamd and it just
./webcamd
Attached ugen7.3[0] to cuse unit 0
Segmentation fault (core dumped)
After recompiling webcamd with "-g" and using gdb i found that it faults
at: v4l-dvb-82bbb3bd0f0a/linux/drivers/media/dvb/siano/smsusb.c (line 358)
snprintf(params.devpath, sizeof(params.devpath),
"usb\\%d-%s", dev->udev->bus->busnum, dev->udev->devpath);
As i'm not that deep inside Video4BSD i'm lost at this point.
The only thing i already tried was uncommentig the above line and trying
again. This in fact, solved the segmentation fault and results in the
./webcamd -f /tmp
Attached ugen7.3[0] to cuse unit 0
Loading firmware at '/tmp/sms1xxx-hcw-55xxx-dvbt-02.fw', f=7
Creating /dev/dvb/adapter0/demux0
Creating /dev/dvb/adapter0/dvr0
Creating /dev/dvb/adapter0/frontend0
So it seems the device should work but it doesn't. Whatever i try no
application identifies it as a usable device.
A simple 'cat /dev/dvb/adapter0/dvr0' results in "Device not configured".
May be this is due to uncommenting the code in smsusb.c, i don't know.
What i found by doing a simple 'ls -l /dev/dvb/adapter0' is that the above
mentioned devices (demux0, dvr0 and frontend0) exist twice!
ls -l /dev/dvb/adapter0
<snip>
crw-r--r-- 1 root operator 0, 224 Feb 15 15:25 demux0
crw-r--r-- 1 root operator 0, 224 Feb 15 15:25 demux0
crw------- 1 root operator 0, 225 Feb 15 15:25 demux_daemon0
crw-r--r-- 1 root operator 0, 226 Feb 15 15:25 dvr0
crw-r--r-- 1 root operator 0, 226 Feb 15 15:25 dvr0
crw------- 1 root operator 0, 227 Feb 15 15:25 dvr_daemon0
crw-r--r-- 1 root operator 0, 228 Feb 15 15:25 frontend0
crw-r--r-- 1 root operator 0, 228 Feb 15 15:25 frontend0
crw------- 1 root operator 0, 229 Feb 15 15:25 frontend_daemon0
<snap>
I don't know how this is possible?
Hi,

Try to kldload video4bsd, and only have cuse4bsd in the kernel.

I will try to fix that segmentation fault.

--HPS
Hans Petter Selasky
2010-02-15 14:38:55 UTC
Permalink
Post by Joerg Pulz
kldload
I mean:

kldunload

--HPS

Loading...