Christina Quast
2a9c063d6b
gsmtap.py: gsmtap_send_apdu and test main function
...
ATRs should probably be treated differently?
Also, is there a performance penalty when using scapy instead of holding a connection open?
2015-05-12 19:31:04 +02:00
Christina Quast
b894691841
gsmtap.py: send example msg using scapy
...
The GSM message appears in wireshark when sniffing on localhost
2015-05-12 16:03:23 +02:00
Christina Quast
96025dbb69
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
2015-05-08 17:31:14 +02:00
Christina Quast
049772e688
phone.c: Removed comment about wait time extension
...
Wait time extension commands are not implemented yet.
They are a nice-to-have for the future, since they would enable
the board to work with phones that expect a higher frequency.
With a wait time extension request towards the phone, SIMtrace could
signal the phone to wait for a longer time period while SIMtrace is
still waiting for a response from the SIM card.
2015-05-08 17:19:16 +02:00
Christina Quast
3b544a1217
cciddriverdesc: Atmel bug fix of slot status register
...
Atmel library mixes up the value for two different messages.
Explanation can be found here:
http://permalink.gmane.org/gmane.comp.mobile.osmocom.simtrace/29
Actually, a better fix for this problem would be to go through the
Atmel code and replace ICC_INSERTED_EVENT with ICC_BS_PRESENT_NOTACTIVATED
where appropriate and in accordance with the Smart Card CCID standard
(and libccid, for this matter).
2015-05-08 16:59:47 +02:00
Christina Quast
3735039b59
firmware, host: Changed vendor and product id
...
The code used a vendor and product id taken from Atmel example code.
Now it is changed to the vendor and product id, which was also previously
used in the original SIMtrace code.
2015-05-08 16:47:29 +02:00
Christina Quast
14f6399c03
tc_etu.c: Removed, because was never used
...
Since the host side does the parsing of the packets, (not the firmware,
as it was in the old simtrace version), we do not need to check for expired
max waiting time.
Instead, every byte received from the phone is filled into a ring buffer.
As soon as the USB endpoint to the host is not busy anymore, it is sent
to the host over the respective USB endpoint.
2015-05-08 16:45:28 +02:00
Christina Quast
5f83861b17
mitm.c: Removed unused commented out code
2015-05-08 16:45:28 +02:00
Christina Quast
560ade3239
main.c: Removed TC_Start/_Stop (was commented out)
...
Removed FIXME comment
Removed TC_Start, TC_Stop function call, which was commented out anyways.
2015-05-08 16:45:28 +02:00
Christina Quast
1b65ad0329
sniffer.c: Removed unused PR macro defnition
2015-05-08 16:45:28 +02:00
Christina Quast
0bf65dc0b6
usb.c: Removed FIXME comment
...
MITM does not support two interface settings.
The comment mixed up interface configurations and alternative
interface settings.
2015-05-08 16:45:28 +02:00
Christina Quast
ae82155866
USBDDriver.c: swaped args to memset
2015-05-08 16:45:15 +02:00
Christina Quast
bfd7354c86
usb.c: removed comment, named phone interface of MITM conf
...
String descriptor #0 always is the language descriptor.
The second USB interface is in the MITM configuration is
the interface to the phone.
2015-05-08 16:00:51 +02:00
Christina Quast
2c68f9c825
Makefile: Removed unused object file target tc_etu
2015-05-08 15:37:57 +02:00
Christina Quast
4a30a3700b
Remove PR define, replace with TRACE_DEBUG
...
The define PR was introduced to switch quickly between TRACE levels
for specific debug print messages.
Now, it all became debug output, since it is not needed in normal
operation.
2015-05-08 15:34:45 +02:00
Christina Quast
9dbf1c90ac
main.c: Set green LED when USB is configured
2015-05-06 08:46:32 +02:00
Christina Quast
34d4eb3f5f
mitm.py: Intercept phonebook request
2015-05-04 17:50:32 +02:00
Christina Quast
789a4013b4
Added pts parsing
2015-05-04 15:29:07 +02:00
Christina Quast
05ba5232db
removed pySim dead link
2015-05-04 15:28:50 +02:00
Christina Quast
b6e005cec1
mitm.py: Working pts parsing and answer
2015-05-04 15:28:03 +02:00
Christina Quast
7c5d13401c
constants.py: added atr
2015-05-04 15:27:26 +02:00
Christina Quast
fafa54b37c
sm_emul: ff 00 ff is the ans to ff 00 ff
2015-05-03 18:02:33 +02:00
Christina Quast
08ea861b11
mitm.py: to be removed, hack to answer pts request
2015-05-03 16:34:32 +02:00
Christina Quast
6118146598
sm_emul: send ATR with 0x18 and answer to pts
2015-05-03 16:34:06 +02:00
Christina Quast
dace491c65
mitm.py: No ATR replacing
2015-05-03 15:48:09 +02:00
Christina Quast
0d98b9f53f
python files: first PTS handling
2015-05-03 14:22:51 +02:00
Christina Quast
cb646bc729
command to change fidi send by host
2015-05-03 14:21:26 +02:00
Christina Quast
6246000b3a
iso7816_uart.c: Do not compile
2015-05-03 14:18:59 +02:00
Christina Quast
40670422c8
apdu_split.py: Recover from failure in parsing on 0xa0
2015-05-03 12:59:44 +02:00
Christina Quast
be235275fa
Added not working PTS parsing to host communication
2015-05-02 17:56:32 +02:00
Christina Quast
7a7f98c9f2
ringbuf.c: rbuf peek function
2015-05-02 17:53:13 +02:00
Christina Quast
bf12a6f79e
iso7816_uart: starting point for pts parsing
2015-05-02 13:22:07 +02:00
Christina Quast
4bec8d8e26
host_communication.c: printf becomes TRACE_DEBUG
2015-04-21 23:03:59 +02:00
Christina Quast
ddb1e7be1a
cciddriver.c: Removed loop waiting for host on CCID_Read
2015-04-21 23:02:43 +02:00
Christina Quast
46a93672d3
mitm.py: Dirty hack for replacing ATR live
2015-04-21 23:00:52 +02:00
Christina Quast
e4cbfe6f47
Moved ISR_PhoneRST into iso code file and simtrace header
2015-04-20 13:07:28 +02:00
Christina Quast
3d5e3ab612
simtrace_iso7816.c: Remove unused _ISO7816_Init
2015-04-20 12:20:50 +02:00
Christina Quast
b85f140636
iso7816_4.c: Removed time guard
2015-04-18 15:05:43 +02:00
Christina Quast
fb91bb7069
Parsing ajusted: respond to phone requests
2015-04-18 14:34:08 +02:00
Christina Quast
158c1dd448
simtrace.py: Use mitm.py in phone and mitm mode
2015-04-17 20:34:09 +02:00
Christina Quast
4b8149363a
iso7816_4.c: CLK div differs for Master and Slave
...
Attention: Each init function has to enable and disable receiver and
transmitter on its own!
2015-04-17 18:50:25 +02:00
Christina Quast
dea1f55fb7
board.h: RST pin low per default on startup
2015-04-17 17:16:42 +02:00
Christina Quast
ad215aaf66
ccid.c: removed SMARTCARD_CONNECT_PIN check (always defined)
2015-04-16 15:00:07 +02:00
Christina Quast
5384061761
mitm.py: Added apdu splitter code
2015-04-16 11:10:59 +02:00
Christina Quast
2379ac8e32
main.c: Removed double declaration of var i
2015-04-16 11:09:37 +02:00
Christina Quast
68cc859870
iso7816_4.c: Moved around lines, only sniffer works
2015-04-16 11:08:32 +02:00
Christina Quast
ec9c09e9b9
Moved global Usart state into usart struct
2015-04-16 10:45:39 +02:00
Christina Quast
f3211e6424
board.h: init more phone pins (as input)
2015-04-16 10:41:12 +02:00
Christina Quast
9547e9f149
sniffer.py: Added apdu_split support
2015-04-14 22:18:30 +02:00
Christina Quast
51925a6bec
apdu_split.py: Corrected last error
2015-04-14 21:04:14 +02:00
Christina Quast
d4c8b51e86
apdu_split working with test message
2015-04-14 15:53:13 +02:00
Christina Quast
e64aa5b878
apdu_split without C code remains
2015-04-14 15:07:33 +02:00
Christina Quast
79c2a3a0c8
apdu_split: first try
2015-04-14 14:55:13 +02:00
Christina Quast
2571458595
sniffer.py: Write out every received char
2015-04-13 22:40:40 +02:00
Christina Quast
911bf26a55
sniffer.c: Enable/disable interrupts in init/exit function
2015-04-13 22:39:11 +02:00
Christina Quast
d52201f6db
phone.c: Enable/disable interrupts on init/exit
2015-04-13 22:38:05 +02:00
Christina Quast
dcce4c3244
phone.c: Callback routine for reenabling RST interrupt
2015-04-13 22:20:12 +02:00
Christina Quast
c63da3f6d5
Makefile: Check for already opened ttyUSBx
...
If two ttyUSBx interfaces are read from by ts at the same time,
some letters arrive at one terminal and others in the second one.
Therefore only one terminal should be open at all times.
2015-04-13 22:09:50 +02:00
Christina Quast
de68867402
main.c: Reset board if USB not configured
2015-04-12 15:20:57 +02:00
Christina Quast
fd069dce73
iso7816_4.c: Increased max interations
2015-04-12 13:32:12 +02:00
Christina Quast
b595e7cb53
Merge branch 'new_iso_init' (sniffer not working)
...
Conflicts:
firmware/src_simtrace/phone.c
firmware/src_simtrace/simtrace.h
2015-04-12 13:31:01 +02:00
Christina Quast
2b8a18bf3a
Sniffer with ringbuf, works SOMETIMES
...
* Sniffer uses phone endpoints for communication and the ringbuffer
routines the phone communication uses
* Most times the Usart1 interrupt is not triggered, and therefore
no values are recorded
2015-04-12 09:31:36 +02:00
Christina Quast
5c6a299c71
phone.c: Sniffer bus config make switch
2015-04-11 20:03:14 +02:00
Christina Quast
3a47a4f10e
mitm.py: Decreased timeout
2015-04-11 18:16:14 +02:00
Christina Quast
611bea8b4b
tc_etu: Corrected compiler warning
2015-04-11 18:15:51 +02:00
Christina Quast
4db82e092f
ringbuffer implementation
2015-04-11 18:15:27 +02:00
Christina Quast
94ddb91e33
mitm.py: New smartcard ATR, expanded pattern match
2015-04-11 12:29:41 +02:00
Christina Quast
2ee3ec73f4
tc_etu.c: Fixed PIN initialisation compiler waring
2015-04-11 12:27:46 +02:00
Christina Quast
542f9183bb
basic ringbuffer implementation
2015-04-11 09:31:15 +02:00
Christina Quast
87ddfa8c23
phone.c: Bug fix: USB err format string interchanged
2015-04-11 08:44:40 +02:00
Christina Quast
a0ca2d34ec
cciddriver.c: Remove ccid write printout
2015-04-11 08:43:31 +02:00
Christina Quast
f2e53f0553
array to hex function, reduced usb timeout
2015-04-11 08:42:38 +02:00
Christina Quast
e24b9ace89
ISO7816_Init: Initialized with USART
...
* ISO7816_Init: Takes Usart_info and CLK_SLAVE/CLK_MASTER as param
* ISO7816_SendChar, ISO7816_GetChar: Usart_info is passed
* ISO7816_Set_Reset_Pin function for CCID part
* iso7816_4.c: BOARD_ISO7816_BASE_USART replaced by USART_SIM
* Redundant _ISO7816_Init, _ISO7816_SendChar, _ISO7816_GetChar
functions removed
* All simtrace modes use iso7816_4.c functions instead of redefined
_ISO7816_xxx functions
2015-04-10 17:44:49 +02:00
Christina Quast
3eab56e079
ISO7816_Init with more parameters, slave/master clock
2015-04-10 15:38:49 +02:00
Christina Quast
95d6616ba1
Split init into configure and init
...
* Implemented configure, init, exit functions:
When a configuration is changed, interrupts for reset pins
should be disabled
* Moved variables shared between code files to simtrace.h
2015-04-09 22:38:47 +02:00
Christina Quast
abcf3038d2
gitignore: Ignore ctags file
2015-04-09 19:47:45 +02:00
Christina Quast
bf464ae566
Moved ccid related files to bord related folders
2015-04-09 19:47:45 +02:00
Christina Quast
6b02775638
phone.c: Check return values of USB_Write
2015-04-09 19:47:27 +02:00
Christina Quast
e2dddd5885
Renamed simtrace_src to src_simtrace
2015-04-09 17:40:48 +02:00
Christina Quast
590c221893
Remove redundant ccid files in atmel lib
2015-04-09 17:06:16 +02:00
Christina Quast
aab3d7c82b
phone.c: Check status val in Callback func
2015-04-09 17:02:17 +02:00
Christina Quast
6038eebaf7
cciddriver.h: Include USBD.h, remove function def
2015-04-09 16:55:48 +02:00
Christina Quast
b878df92f4
cciddriver.c: Check USB status in Callback
2015-04-09 16:54:36 +02:00
Christina Quast
7dab6abf47
cciddriver.c: Replace USBD_Write with CCID_Write
2015-04-09 16:53:32 +02:00
Christina Quast
362a4da94a
simtrace.py: Sleep a sec after changing the config
2015-04-09 13:39:38 +02:00
Christina Quast
20a6814c46
cciddriver.c: Fixed slot status bugs
...
The atmel lib takes the wrong values to signalize the current
slot status to the PC.
2015-04-09 13:36:28 +02:00
Christina Quast
7f634868dd
cciddriver.c: Off by one error when setting config
2015-04-09 13:34:53 +02:00
Christina Quast
c870b52233
iso7816: Hold RST line low for longer time period
...
Based on the sniff with a logic analyzer the time when the RST line
is holded low by simtrace is too short.
A better timeout value should be searched for later anyways.
2015-04-09 13:31:58 +02:00
Christina Quast
2831b8c1a0
cciddrv: Remove MIN macro
2015-04-09 09:02:50 +02:00
Christina Quast
55cd8734be
Makefile: 'make log' for debug dumps over serial
2015-04-08 00:12:17 +02:00
Christina Quast
7b6f7b084a
phone.c: Rename state NONE to WAIT_FOR_RST
2015-04-07 21:17:41 +02:00
Christina Quast
90393b3392
phone.c: Replace defines with enum
2015-04-07 21:15:12 +02:00
Christina Quast
4396fee97e
Rename simtrace/ to simtrace_src
2015-04-07 21:12:53 +02:00
Christina Quast
86bf2c3f4d
atmellib: Remove pngs in usb/
2015-04-07 21:03:12 +02:00
Christina Quast
0cc6142506
Remove USBLib_Trace.h
2015-04-07 20:53:45 +02:00
Christina Quast
b6f77d390c
Makefile: Compile silently and show code files used
2015-04-07 20:51:44 +02:00
Christina Quast
29c99b97af
Makefile: Enabled iprintf, removed comment
2015-04-07 20:13:44 +02:00
Christina Quast
85951cef7f
Deleted unused examples folder
2015-04-07 20:06:51 +02:00
Christina Quast
b0bbb1b52e
Removed sym links, replaced them with actual folders
2015-04-07 20:04:19 +02:00
Christina Quast
fbcd8a1bfd
simtrace: Rename main
2015-04-07 19:43:18 +02:00