mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
phone.c: removed comments
Removed comment describing the typical first few packets between the SIM card and phone I used for development and testing: SuperSIM, Motorola C123
This commit is contained in:
@@ -95,7 +95,6 @@ static struct Usart_info usart_info = {.base = USART_PHONE, .id = ID_USART_PHONE
|
|||||||
#define USART_SEND 0
|
#define USART_SEND 0
|
||||||
#define USART_RCV 1
|
#define USART_RCV 1
|
||||||
|
|
||||||
// FIXME: Comments
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
* Internal variables
|
* Internal variables
|
||||||
*-----------------------------------------------------------------------------*/
|
*-----------------------------------------------------------------------------*/
|
||||||
@@ -171,34 +170,12 @@ void Phone_init( void ) {
|
|||||||
USART_SetTransmitterEnabled(USART_PHONE, 0);
|
USART_SetTransmitterEnabled(USART_PHONE, 0);
|
||||||
USART_SetReceiverEnabled(USART_PHONE, 1);
|
USART_SetReceiverEnabled(USART_PHONE, 1);
|
||||||
|
|
||||||
USART_EnableIt(USART_PHONE, US_IER_RXRDY); // TODO: interrupt enable/disable is shared with sniffer
|
USART_EnableIt(USART_PHONE, US_IER_RXRDY);
|
||||||
NVIC_EnableIRQ(USART1_IRQn);
|
NVIC_EnableIRQ(USART1_IRQn);
|
||||||
|
|
||||||
/* Configure ISO7816 driver */
|
|
||||||
// FIXME: PIO_Configure(pPwr, PIO_LISTSIZE( pPwr ));
|
|
||||||
|
|
||||||
// FIXME: Or do I need to call VBUS_CONFIGURE() here instead, which will call USBD_Connect() later?
|
|
||||||
// USBD_Connect();
|
|
||||||
|
|
||||||
//Timer_Init();
|
|
||||||
|
|
||||||
receive_from_host();
|
receive_from_host();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Sniffed Phone to SIM card communication:
|
|
||||||
// phone > sim : RST
|
|
||||||
// phone < sim : ATR
|
|
||||||
// phone > sim : A0 A4 00 00 02 (Select File)
|
|
||||||
// phone < sim : A4 (INS repeated)
|
|
||||||
// phone > sim : 7F 02 (= ??)
|
|
||||||
// phone < sim : 9F 16 (9F: success, can deliver 0x16 (=22) byte)
|
|
||||||
// phone > sim : ?? (A0 C0 00 00 16)
|
|
||||||
// phone < sim : C0 (INS repeated)
|
|
||||||
// phone < sim : 00 00 00 00 7F 20 02 00 00 00 00 00 09 91 00 17 04 00 83 8A (data of length 22 -2)
|
|
||||||
// phone <? sim : 90 00 (OK, everything went fine)
|
|
||||||
// phone ? sim : 00 (??)
|
|
||||||
|
|
||||||
void Phone_run( void )
|
void Phone_run( void )
|
||||||
{
|
{
|
||||||
check_data_from_phone();
|
check_data_from_phone();
|
||||||
|
|||||||
Reference in New Issue
Block a user