[linux-dvb] usb-dvb and endpoints question

Dennis Noordsij dennis.noordsij at movial.fi
Sat May 31 16:32:53 CEST 2008


Hi Antti,

Thank you for your reply!

> Other thoughts, wMaxPacketSize 0x0040 1x 64 bytes looks rather small for
> TS.

Yeah it would be, but somehow this seems to just be ignored. A tyical
response would be a single USB packet containing exactly 21 TS packets,
and 8 bytes of header (for a total of 3956 bytes)

See example below where it seems to interrupt the request-response with
TS data.

As for reading-writing, I've got a specific version of the
usb_dvb_generic_rw (using 2 endpoints) and it works fine by itself. But
I haven't got around to how the the TS streaming is going work.

What is the read-loop going to be like ? :-)


> Can you provide sample usb-sniff from windows? Parsed with usb-replay
> parser.pl -script would be enough if whole sniff is very large.


I've used different programs, but some example:


000820: Bulk or Interrupt Transfer (UP), 30.05.2008 14:06:09.336 +0.125.
Status: 0x00000000
Pipe Handle: 0xffad2bec (Endpoint Address: 0x81)
Get 0xf74 bytes from the device
 B5 02 14 01 74 0F 05 00 47 00 12 1B 67 65 72 05   ....t...G...ger.
 05 52 65 62 61 0C 05 56 6F 6C 6C 65 73 20 48 61   .Reba..Volles Ha
 75 73 54 02 15 00 4E FA 02 67 65 72 00 F4 05 55   usT...N..ger...U
 6E 74 65 72 68 61 6C 74 75 6E 67 73 73 65 72 69   nterhaltungsseri
 ... etc

Note that this contains TS data, "74 0F" is the length of the USB packet
(0xF74 = 3956), after 8 bytes of header the TS sync 0x47 can be seen.
Exactly 21 TS packets are contained.



Since the packets are so large, and I can't get the TerraTec software to
do too much in terms of sending commands in between, I don't really have
 many good logs of the mixing of TS and responses.

But one example:

000392: Bulk or Interrupt Transfer (DOWN), 30.05.2008 18:31:14.919 +0.0
Pipe Handle: 0x8118b66c (Endpoint Address: 0x2)
Send 0xc bytes to the device
 67 02 C9 0B 0C 00 00 00 20 00 20 81               g.�..... . �

000393: Bulk or Interrupt Transfer (UP), 30.05.2008 18:31:14.919 +0.0.
Status: 0x00000000
Pipe Handle: 0x8118b66c (Endpoint Address: 0x2)
Send 0xc bytes to the device
000394: Bulk or Interrupt Transfer (UP), 30.05.2008 18:31:14.919 +0.0.
Status: 0x00000000
Pipe Handle: 0x8118b64c (Endpoint Address: 0x81)
Get 0xf74 bytes from the device
 B5 02 14 01 74 0F 05 00 47 0F B4 1B 27 0B BA C2   �...t...G.�.'.��
 ... TS data follows ..

000395: Bulk or Interrupt Transfer (DOWN), 30.05.2008 18:31:14.919 +0.0
Pipe Handle: 0x8118b64c (Endpoint Address: 0x81)
Get 0x1000 bytes from the device
000396: Bulk or Interrupt Transfer (UP), 30.05.2008 18:31:14.935 +0.015.
Status: 0x00000000
Pipe Handle: 0x8118b64c (Endpoint Address: 0x81)
Get 0xe0 bytes from the device
 68 02 0B C9 E0 00 00 00 00 00 00 00 00 00 00 00   h..��...........
 01 00 00 00 01 00 00 00 00 00 00 00 1B 00 00 00   ................
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
 1D 00 00 00 D2 FF FF FF 2D C5 FF FF 70 CE 34 1D   ....����-���p�4.
 00 00 00 00 01 00 00 00 0D 00 00 00 03 00 00 00   ................
 02 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00   ................
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................

1) What data was sent in 393 ?
2) The response came after the TS packet (396 is the response to 392).
3) What data was received in 395 ?

Note that I've basically ignored the 395-type responses, they're shown
also in the firmware initialization but if I just look at logs which
actually show data then everything works correctly, so 395 and 393 would
be noise ?

Hope I am not missing some basic USB thing that makes you slap your
forehead and say "aha it's just the device telling you to do X!"  :-)


Cheers,
Dennis


>> Cheers,
>> Dennis
> 
> regards
> Antti




More information about the linux-dvb mailing list