summaryrefslogtreecommitdiff
path: root/firmware/src/simtrace/iso7816_uart.c
Commit message (Collapse)AuthorAgeFilesLines
* convert from u_int*_t to uint*_tHarald Welte2015-09-281-28/+28
|
* Don't split req_ctx with ATR payloadMin Xu2014-11-111-1/+4
| | | | | | | | | | | | | The codnition for flushing a req_ctx on UART idle is fixed to flush only if 1) There has been no new data since last check, and 2) There are no req_ctx currently pending to be transmitted to USB, and 3) We did NOT just got a reset and waiting for ATR I saw an ATR split in two different req_ctx prior, presumably flush decided to send req_ctx after ATR but got a new character just before sent). If we did get a RESET, let original logic decide to send the req_ctx -- presumably when ATR data is fully received.
* iso_uart: Print more errors, not just overrunsMin Xu2014-11-111-2/+8
|
* Ensure to transmit current req_ctx on RESET/VCC eventsMin Xu2014-11-111-0/+21
| | | | | | | | | | | | | | | | | | When any of the following events occur: * VCC_PHONE off * nRST * RST we tranmsit the current req_ctx, if there is data pending. This ensures that for any successive data, the ATR flag in the next req_ctx containing the data, not in the previous req_ctx. It also ensures that the ATR is aligned at 0 offset in the new req_ctx, which is an assumption the host software makes but the previous code didn't ensure. Furthermore, we introduce a periodic flushing of any pending but incomplete req_ctx.
* simtrace: Add heartbeat message to debug consoleMin Xu2014-11-111-0/+10
|
* iso7816_uart: Make sure ATR is separated from normal APDU in all casesHarald Welte2012-05-181-7/+12
| | | | | Prior to this patch, the ATR was not send in a separate USB message for cards that are T=0 only.
* 7816_uart: add comment about f/d calculationHarald Welte2012-05-181-0/+2
|
* simtrace: introduce statisticsv0.5Harald Welte2012-03-231-1/+32
| | | | | | the statistics count various events like overruns, parity errors, missing rctx and can dump those stats via USB as well as on the serial console.
* simtrace: Inform host of Fi/Di values (and flag change due to PPS)Harald Welte2012-02-121-0/+5
|
* simtrace: 7816 UART: Add missing entry in Di tableSylvain Munaut2012-01-261-1/+1
| | | | | | Add missing entry in Fi_table. It's apparently used as '64' in some reader and 'unsupported' in some other. For simtrace I guess we should consider it 64.
* Fix fi/di calculation for certain mobiles like GT-S770 or HTC RaphaelBjoern Kerler2011-10-211-3/+3
| | | | | There were some mistakes while copying the tables from ISO 7816-3, and also a quite old version of 7816-3 was used.
* SIMTRACE: ISO7816: Deal with ATR that don't have historical bytesv0.2Harald Welte2011-08-161-11/+21
| | | | | In case there are no historical bytes, we immediately transition from the last TD byte into the WAIT_TCK or WAIT_APDU state.
* ISO7816: Properly handle T=0 only cards without TCK in ATRHarald Welte2011-08-161-1/+13
|
* SIMTRACE UART: Reset error status on error related IRQHarald Welte2011-08-151-0/+9
| | | | | This prevents an IRQ-flood after a parity or overrun error, which in turn would cause a watchdog reset.
* simtrace UART: set INACK flag to make sure we ignore any parity errorHarald Welte2011-08-151-3/+3
| | | | | | | As a SIM card tracer, we want to remain completely passive and thus not signal back parity errors with the ISO 7816 NACK. The UART INACK flag does exactly that...
* simtrace: Make sure ATR is sent in its own RCTX and we re-allocate in timeHarald Welte2010-11-211-1/+11
|
* simtrace: Introduce code for proper handling of PTS / PPSHarald Welte2010-11-181-12/+148
|
* simtrace: add TC based waiting time counter, signal ATR / expiry via USBHarald Welte2010-11-181-75/+151
|
* simtrace: introduce RST pin handlingHarald Welte2010-11-141-12/+32
|
* Initial version of a SAM7 USART based ISO7816-3 T=0 snifferHarald Welte2010-11-141-0/+399
personal git repositories of Harald Welte. Your mileage may vary