Running Technisat DVB-S2 on ARM-NAS
Hi,
I want to turn my Netgear ReadyNAS RN104 into a VDR.
I already run a self made kernel 3.16.3) and plain debian on it. For hardware and software details see http://natisbad.org/NAS3/
I recently compiled those DVB modules into the kernel.
And after a lot of struggle to get a clean build, I succeeded in loading the modules:dvb_usb_technisat_usb2, dvb_usb, dvb_core, stv090x, rc_core
but device recognition somehow does not fully work.
usb 2-1: new high-speed USB device number 3 using xhci_hcd usb 2-1: New USB device found, idVendor=14f7, idProduct=0500 usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 2-1: Product: TechniSat USB device
usb 2-1: Manufacturer: TechniSat Digital
usb 2-1: SerialNumber: ************
technisat-usb2: set alternate setting
technisat-usb2: firmware version: 17.63
dvb-usb: found a 'Technisat SkyStar USB HD (DVB-S/S2)' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
dvb-usb: Technisat SkyStar USB HD (DVB-S/S2) error while loading driver (-12)
usbcore: registered new interface driver dvb_usb_technisat_usb2
How my I find out more about the error -12? It's a lot of wrapped "return ret" in the code...
Is there any way of enabling more logging?
I believe it comes from the dvb-usb-technisat-usb2 module, but there is no c file?
thanks.
Jan
Quoted 29 lines · JPT
Hi,
I want to turn my Netgear ReadyNAS RN104 into a VDR.
I already run a self made kernel 3.16.3) and plain debian on it. For hardware and software details see http://natisbad.org/NAS3/I recently compiled those DVB modules into the kernel.
And after a lot of struggle to get a clean build, I succeeded in loading the modules:dvb_usb_technisat_usb2,dvb_usb,dvb_core, stv090x,rc_corebut device recognition somehow does not fully work.
usb 2-1: new high-speed USB device number 3 using
xhci_hcdusb 2-1: New USB device found, idVendor=14f7, idProduct=0500 usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 2-1: Product: TechniSat USB device
usb 2-1: Manufacturer: TechniSat Digital
usb 2-1: SerialNumber: ************
technisat-usb2: set alternate setting
technisat-usb2: firmware version: 17.63
dvb-usb: found a 'Technisat SkyStar USB HD (DVB-S/S2)' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
dvb-usb: Technisat SkyStar USB HD (DVB-S/S2) error while loading driver (-12)
usbcore: registered new interface driverdvb_usb_technisat_usb2
Quoted 6 lines
How my I find out more about the error -12? It's a lot of wrapped "return ret" in the code...
Is there any way of enabling more logging?I believe it comes from the dvb-usb-technisat-usb2 module, but there is no c file?
http://www.virtsync.com/c-error-codes-include-errno
#define ENOMEM 12 /* Out of memory */
Likely allocating USB stream buffers fails. You could try request smaller buffers. Drop count to 1 and test. Drop framesperurb to 1 and test. Drop framesize to 1 and test. Surely streaming will not work if all buffers are totally wrong and too small, but you will see if it is due to big usb buffers. Then you could try optimize buffers smaller.
.stream = {
.type = USB_ISOC,
.count = 8,
.endpoint = 0x2,
.u = {
.isoc = {
.framesperurb = 32,
.framesize = 2048,
.interval = 1,
}
}
},regards
Antti
Signature · 1 line
http://palosaari.fi/
Quoted 4 lines
Quoted 1 line
How my I find out more about the error -12?
Quoted 8 lines
#define ENOMEM 12 /* Out of memory */
Likely allocating USB stream buffers fails. You could try request smaller buffers. Drop count to 1 and test. Drop framesperurb to 1 and test. Drop framesize to 1 and test. Surely streaming will not work if all buffers are totally wrong and too small, but you will see if it is due to big usb buffers. Then you could try optimize buffers smaller.
Wow, that did it. Thanks Antti!
Works with count = 2, but not with count = 4.
What exactly do I learn from this?
Where are those buffers? In the RAM? or somewhere in onboard USB hardware?
VDR is now able to connect to the device, but I am not sure if it receives anything yet.
Jan
Quoted 15 lines · JPT
Quoted 4 lines
Quoted 1 line
How my I find out more about the error -12?
Quoted 8 lines
#define ENOMEM 12 /* Out of memory */
Likely allocating USB stream buffers fails. You could try request smaller buffers. Drop count to 1 and test. Drop framesperurb to 1 and test. Drop framesize to 1 and test. Surely streaming will not work if all buffers are totally wrong and too small, but you will see if it is due to big usb buffers. Then you could try optimize buffers smaller.
Wow, that did it. Thanks Antti!
Quoted 7 lines
Works with count = 2, but not with count = 4.
What exactly do I learn from this?
Where are those buffers? In the RAM? or somewhere in onboard USB hardware?VDR is now able to connect to the device, but I am not sure if it receives anything yet.
.count = 8,
.framesperurb = 32,
.framesize = 2048,
If I didn't remember wrong, that means allocated buffers are 8 * 32 * 2048 = 524288 bytes. It sounds rather big for my taste. Probably even wrong. IIRC USB2.0 frames are 1024 and there could be 1-3 frames. You could use lsusb with all verbosity levels to see if it is 1024/2048/3072. And set value according to that info.
32 framesperurb sounds absolute too much. You could decrease it a lot, under 10 should be OK. Maybe 8 is good guess. 8 is number of URBs you use for streaming. 8 does not sound bad, but maybe 6 is OK if it works. Smallest value depends largely device USB FIFO size vs. stream size. Bigger the FIFO less the buffers needed. Smaller the stream, less the buffers needed.
So I would recommend
.count = 6,
.framesperurb = 8,
.framesize = 1024,
Use some testing with error and trial to find out smallest working buffers, then add some 20% extra for that.
regards
Antti
Signature · 1 line
http://palosaari.fi/
Quoted 5 lines
If I didn't remember wrong, that means allocated buffers are 8 * 32 * 2048 = 524288 bytes. It sounds rather big for my taste. Probably even wrong. IIRC USB2.0 frames are 1024 and there could be 1-3 frames. You could use lsusb with all verbosity levels to see if it is 1024/2048/3072. And set value according to that info.
lsusb tells:
Interface Descriptor:
Endpoint Descriptor:
wMaxPacketSize 0x0200 1x 512 bytes
Endpoint Descriptor:
wMaxPacketSize 0x0200 1x 512 bytes
Endpoint Descriptor:
wMaxPacketSize 0x0200 1x 512 bytes
Interface Descriptor:
Endpoint Descriptor:
wMaxPacketSize 0x0c00 2x 1024 bytes
Endpoint Descriptor:
wMaxPacketSize 0x0200 1x 512 bytes
Endpoint Descriptor:
wMaxPacketSize 0x0200 1x 512 bytesBut I haven't got any clue about the meaning.
Ask me a question about any bit in the tcp/ip packages, but don't ask me about USB ;)
Where can I get technical details that are, well... readable without studing for weeks?
btw, it's attached to a FT1009 USB3.0 SuperSpeed chip.
Quoted 7 lines
So I would recommend
.count = 6,
.framesperurb = 8,
.framesize = 1024,Use some testing with error and trial to find out smallest working buffers, then add some 20% extra for that.
I set to 8x8x2048 (because max package size is 2x1024) but w_scan doesn't find any transponder.
What should happen if buffers are too small?
Tommorrow I'll swap the sat cable just to make sure this isn't the cause.
thanks,
Jan
Am 21.09.2014 um 19:28 schrieb JPT:
Quoted 1 line
Tommorrow I'll swap the sat cable just to make sure this isn't the cause.
Hi Jan,
Are we talking about this device:
http://www.linuxtv.org/wiki/index.php/Technisat_SkyStar_USB_HD
(You never mentioned the actual model AFAIK)?
If so, it has two LEDs. A red one for "power" and a green one for "tuned"/"locked". So if the green one lights up, the sat cable should be okay.
I remember having tested my one with the RaspberryPi and it worked. So it is not a general problem of the DVB-S2 device and ARM but rather the specific board you are working with.
Just found the link where I reported success:
https://github.com/raspberrypi/linux/issues/82#issuecomment-27253775
Best regards,
Jannis
Am 21.09.2014 um 22:45 schrieb Jannis:
Quoted 7 lines
Am 21.09.2014 um 19:28 schrieb JPT:
Quoted 1 line
Tommorrow I'll swap the sat cable just to make sure this isn't the cause.
Hi Jan,
Are we talking about this device:
http://www.linuxtv.org/wiki/index.php/Technisat_SkyStar_USB_HD
Yes, exactly.
Quoted 1 line
(You never mentioned the actual model AFAIK)?
No, I didn't. I'm sorry.
Quoted 3 lines
If so, it has two LEDs. A red one for "power" and a green one for "tuned"/"locked". So if the green one lights up, the sat cable should be okay.
Swapped cables: now it works. :)
I have to check why this cable is bad :(
Recording works fine, too.
Quoted 5 lines
I remember having tested my one with the RaspberryPi and it worked. So it is not a general problem of the DVB-S2 device and ARM but rather the specific board you are working with.
Just found the link where I reported success:
https://github.com/raspberrypi/linux/issues/82#issuecomment-27253775
That's great to hear. Thanks!
I didn't expect anyone tried DVB on ARM yet. The Linux community is great. I'm so glad I don't need Win any more (in general).
Thank you very much to both of you, and to all that people who wrote the code!
Jan