Loosing 1 byte on each chunk of URB transfer

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/simtrace@lists.osmocom.org/.

Myonium myonium at gmail.com
Sun Feb 12 13:46:37 UTC 2012


On Feb 12, 2012, at 11:04 AM, Harald Welte wrote:

>> It seems to me that simtrace looses a byte between 2 URB transfers
>> from the device. To trace the problem down, I wrote a little
>> test-program, running the same APDU against the smart card.
> 
> Interesting.  This hasn't been seen so far.  Can you please let us know
> more about your setup, particularly the baud rate you're running at?  My
> immediate assumption would be that the PPS is selecting a high-speed
> rate and we run into an overflow somewhere, possibly in reading the UART FIFO.
> 
> If you can force your reader to use a lower rate (e.g.  by using a very
> old card, or explicit commands on the host/reader side) it would be
> worth trying it at different speeds and checking if there is any change
> in behavior.


Thank you for the fast reply.
Your assumption (speed issue) most probably right. It happened to me with a new “Gemalto .NET v2.0” card which has baud rates up to 223kbps.
Would the simtrace device give me the transfer rate? How would you suggest to measure it?

To contrast it, I run the same setup (different APDUs) with a "old" Cyberflex 32k card. => I got a 100% match. No bytes lost. It's not a general issue.

Btw. a neat idea to run the card with a different speed when tracing ....

Interesting to see from the traces (new Gemalto .NET v2.0 card), that there is not PPS negotiation. I would probably have to make a warm reset to trigger that. Indeed that would be a nice experiment also I currently have no clue how to do it ... in theory that would be something, which could be included into the firmware ... what do you think? (The simtrace firmware would always negotiate a speed it could handle ....)

Regards,
Ben



More information about the simtrace mailing list