aboutsummaryrefslogtreecommitdiffstats
path: root/pySim/transport
AgeCommit message (Collapse)AuthorFilesLines
2018-07-13cosmetic: fix excess space in log output (typo)Philipp Maier1-1/+1
There shouldn't be a space between the end of a sentence and a punctuation mark. Change-Id: I33f9b8c803ccd185ffa370d235363423d82ba9c7
2018-07-03__init__: also fetch response bytes for USIMs automaticallyPhilipp Maier1-1/+7
The method send_apdu() first transmits the APDU in the cards direction. The card may indicate that there is a response available by responding with SW1=9F, where SW2 is the number of bytes. send_apdu() will then craft a get-response APDU to pickup the response bytes. This mechanism works fine for SIM, but USIM uses SW1=61 to indicate the availability of a response, so lets also sense on SW1=61 to support USIMs as well. - Also check on SW1=61 to see if a response is available Change-Id: Ied7fb78873a7c4109de471c7a5e9c3701ba0c7d5 Related: SYS#4245
2018-06-18__init__: allow wildcards in expected SW for send_apdu_checksw()Philipp Maier1-2/+13
The method send_apdu_checksw() is used to check the SW of the final response against some pre defined value. However, in many cases the last two digits of the SW are used to return varying information (e.g. length information or a more specific status info). To cover those cases it would be helfpul to define status words that contain wildcards (e.g. 61**) in order to be able to accept all SWs from 6100 to 61ff. - When the user supplies an expected SW with wildcards, mask out those digits in the response before comparing Change-Id: I5bfc0522b4228b5d9b3415f6e708abcf0da0a7b7
2018-02-18transport/serial: Fix serial transportMartin Hauke1-3/+3
Fix a typo that broke the serial transport. Change-Id: I7fcc97d505a5369f9f14d4a2abda92b7114a58cd
2018-01-10Add methods to get ATR for a card or a link.Alexander Chemeris2-2/+16
Implemented for both serial and PCSC readers. Change-Id: Ic12e4b115d24a8b7e483a5603dd6cec90ad289cc
2010-12-09transport: Change transport api to allow for wait_for_card/connect/disconnectSylvain Munaut3-9/+88
This way, we can re-use the same transport parameters for several cards for a future batch mode Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-08transport/pcsc: Remove obsolete/debug codeSylvain Munaut1-6/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-07transport: Put common methods in LinkBase classSylvain Munaut3-75/+75
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-07Split all things into a more "library-like" packageSylvain Munaut3-0/+318
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>