[Muscle] How can I know what's the type of a card through it's
ATR?
Michael Bender
Michael.Bender at Sun.COM
Thu Jan 15 00:05:13 PST 2009
On Jan 14, 2009, at 11:32 PM, lion wrote:
> > http://www.nagravision.com/
> > It should be a pay-tv card. One of the more secret cards.
>
> > I don't think you can do anything with this card (except watch
> TV). In
> > general, the game is to create faked pay-tv cards not try to use a
> > real one.
>
> Yes, that's right. It's used in our set-top box(STB).
> I just try to do some base firmware tests now. And may be added
> supports under OpenCT later.
>
> I changed a card and readed out the ATR:
> TS: 3f T0: ff TA1:95 TB1:00 TC1: ff TD1: 91 TA2: 81 TD2:71 TA3:a0
> TB3:47 TC3:00
> History: 44 4e 41 53 50 30 20 54 65 73 74
> 30 33
>
> So, It should be a nagravision card , and there may be some unknow
> problems in the former card i used.
>
> But I got a new problem.
> The TD1 in the ATR is 0x91, so only protocol T=1 is supported.
> And TA1 is 0x95, that means Fi=9, Di=5,not Fd=Dd=1 any more.
> And TA2 is 0x81, means that it's Specific mode.and it's bit5=0.
>
> Then whether I needed sending PTS to select protocol T=1 after
> receiving ATR ?
Nope, if the card only says it supports T=1 then you need to only talk
to it with
T=1 protocol. I don't think that sending PTS to try to change it to
something else
will work.
> If needed, how to send it ?
> Because "ISO7816 3.4 Protocol type selection (PTS) " said "If
> only one protocol type and FI=D=1 (default value of TA1) and N
> smaller than 255 is indicated in the answer to reset. The
> transmission protocol associated to the protocol type may be started
> immediately after the transmission of answer to reset. "
> So, I can't send PTS because Fi=9 and Di=5, and N=0xff.
>
> If not, the following operations such as SELECT FILE use which F and
> D(Fi, Di or Fd, Dd) ?
>
> I did'not found clear answers in ISO7916-3 about these things. May
> be I shoule read it once more.
This was my point about 7816 ;-(
But, you are stuck using T=1 if that's all that the card will support.
T=1 is an annoying protocol. Actually, having all the T=xxx protocols
is annoying, and shows once
again the lack of cooperation in the smartcard industry.
Here's how the world shakes out:
T=0 : French
T=1 : German
Once you understand that the smartcard technology was predicated on
long-standing
nationalistic rivalries, it all becomes clear ;-)
> > Oh, if you want *my* advice - I would get into pig farming rather
> than smartcard programming,
> > it's a lot more rewarding and you can bring home the bacon at the
> end of the day ;-)
>
> A ha, You have a good sense of humor. But sometimes it's no choice.
Being a pig farmer is always a choice!
mike
More information about the Muscle
mailing list