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
Christina Quast
2279b75c26
gitignore: stop ignoring main.c
2015-04-07 19:38:44 +02:00
Christina Quast
d0339af87b
Removed unused code and header files from atmel lib
...
Also, remove includes of unused header files in chip.h
2015-04-07 19:30:47 +02:00
Christina Quast
d3f1638f1b
Deleted folder minimal
2015-04-07 18:24:36 +02:00
Christina Quast
5a67c0fef3
Renamed main folder to firmware
2015-04-07 18:24:06 +02:00
Christina Quast
f5cd7efede
Remove mains/ and sub-files
2015-04-07 18:21:14 +02:00
Christina Quast
58c1ae31ee
Makefile: local openocd config folder
2015-04-07 18:19:13 +02:00
Christina Quast
767fdeb0ca
iso7816.c:Solve compiler sign compare warn with pragma
2015-04-07 13:50:23 +02:00
Christina Quast
73c2b6498b
iso7816_4.c: GetChar returns status
2015-04-07 13:49:26 +02:00
Christina Quast
b2d5aeb850
ccid.c: Remove test code
2015-04-07 12:51:11 +02:00
Christina Quast
fe25784411
simtrace_iso7816.c: removed unused fct get_buf_start
2015-04-06 23:30:47 +02:00
Christina Quast
b06fc38939
usb.c: fix compiler warning USBConfigurationDescriptor
2015-04-06 23:30:21 +02:00
Christina Quast
46f5ccabb1
cciddriver.c: comment out unused USBDCallbacks_RequestReceived
2015-04-06 23:29:42 +02:00
Christina Quast
4b1e98d058
cciddriver.c: Directly access configurationDescriptorsArr
2015-04-06 23:28:41 +02:00
Christina Quast
3debfd6595
Bugfix: ccid.c: Remove dead code
2015-04-06 23:26:38 +02:00
Christina Quast
ca005698dd
Bugfix: Compiler warning RST pin type
2015-04-06 23:26:14 +02:00
Christina Quast
c063cfe887
phone.c: Removed redundant definition of PR
2015-04-06 21:34:43 +02:00
Christina Quast
2f27c7c3d2
phone.c: Fixed incompatible pointer type comparison
2015-04-06 20:46:40 +02:00
Christina Quast
e76a3ee499
phone.c: Removed dead code (rst_cnt)
2015-04-06 20:43:11 +02:00
Christina Quast
a4d1d1619b
phone.c: Remove double define of waittime
2015-04-06 20:41:50 +02:00
Christina Quast
443e55017d
phone.c: remove dot printout
2015-04-06 20:38:51 +02:00
Christina Quast
fab4ce958f
Bug fix: board.h: corrected definition of phone clk
2015-04-06 20:22:59 +02:00
Christina Quast
076396fdd3
Makefile: disable format warnings
2015-04-06 19:57:53 +02:00
Christina Quast
c1cc1b7b3e
Remove any Baselibc remains from Makefile
2015-04-06 19:52:42 +02:00
Christina Quast
5958587fd1
Impl of _write for usage by newlib printf
2015-04-06 19:47:22 +02:00
Christina Quast
1e15cb6616
Uart_console: remove custom printf
2015-04-06 19:26:50 +02:00
Christina Quast
ca39e16797
tc_etu.c: newline in printout inserted
2015-04-06 19:19:16 +02:00
Christina Quast
82ba0ac6d8
Phone.c: remove unused ep finder function
2015-04-06 19:08:37 +02:00
Christina Quast
6f664a3cc2
mitm.py: read atr on startup, do not reset card to retrieve atr
2015-04-06 19:08:04 +02:00
Christina Quast
7741f7159c
ccid_raw.py: Reset smartcard method
2015-04-06 19:06:05 +02:00
Christina Quast
bdaa95484c
Bug fix: Fix endless loop when ATR is not received
...
Without this fix, if the host software does not send an ATR, simtrace
waits for this answer in an endless loop of unsuccessfull USB
endpoint write attempts.
2015-04-06 00:52:08 +02:00
Christina Quast
5163624c24
ccid_raw.py: ATR function
2015-04-06 00:44:50 +02:00
Christina Quast
14fbf9c8ad
phone.c: more debug info in send_ATR
2015-04-06 00:36:12 +02:00
Christina Quast
88c7fa1bad
mitm.py: using new ccid_raw.py functions
2015-04-06 00:35:03 +02:00
Christina Quast
5149cd6e78
simcard communication python class
2015-04-06 00:33:52 +02:00
Christina Quast
267afe37ec
Constants: simcard command definition
2015-04-06 00:27:33 +02:00
Christina Quast
2a3dd553e1
Requirements.txt
2015-04-05 16:37:14 +02:00
Christina Quast
21eddea4bb
Symlink to pySim module
2015-04-05 16:35:28 +02:00
Christina Quast
a1d49e74d0
Ignore python venv folder
2015-04-05 16:26:09 +02:00
Christina Quast
7821b1fc1b
Installed pysim as submodule
...
Could not install it using pip.
Setup.py missing
2015-04-05 16:24:17 +02:00
Christina Quast
097b21849f
ccid_raw.py: main function with test functions
2015-04-05 10:21:11 +02:00
Christina Quast
3041854872
phone.c: Changed bus switch from sniffer to phone mode
...
In order to record the communication between simtrace and the
mobile phone with a logic analyzer I had to configure the
pins in sniffer mode in order to attach the sniffer clips
to the SIM card slot. I did not manage to connect them to
the connector to the phone flex cable.
2015-04-05 10:08:06 +02:00
Christina Quast
80050a5c98
simtrace.py: Added mitm option
2015-04-04 20:00:15 +02:00
Christina Quast
95270b1903
mitm.py: import modules, added exceptions
2015-04-04 19:59:03 +02:00
Christina Quast
3252a317d5
ccid_raw.py: removed test functions calls
2015-04-04 19:57:16 +02:00
Christina Quast
e01fb9a146
usb.c: mitm config with ccid interface
2015-04-04 19:56:23 +02:00
Christina Quast
394084615d
mitm.c: second CCID and Phone init and run functions
2015-04-04 19:54:22 +02:00
Christina Quast
8ed72bd55e
Makefile: Compile mitm.c
2015-04-04 19:36:47 +02:00
Christina Quast
3ca88d8a5a
USBDDriver: Corrected config array off by one
2015-04-04 17:50:36 +02:00
Christina Quast
0becc0c51c
Fixed compiler warn: USB descriptor array elements
...
The compiler warning:
simtrace/usb.c:553:5: warning: initialization from incompatible pointer type [enabled by default]
&configurationDescriptorSniffer,
^
simtrace/usb.c:553:5: warning: (near initialization for 'configurationDescriptorsArr[0]') [enabled by default]
simtrace/usb.c:554:5: warning: initialization from incompatible pointer type [enabled by default]
&configurationDescriptorCCID,
^
simtrace/usb.c:554:5: warning: (near initialization for 'configurationDescriptorsArr[1]') [enabled by default]
simtrace/usb.c:555:5: warning: initialization from incompatible pointer type [enabled by default]
&configurationDescriptorPhone,
^
simtrace/usb.c:555:5: warning: (near initialization for 'configurationDescriptorsArr[2]') [enabled by default]
simtrace/usb.c:556:5: warning: initialization from incompatible pointer type [enabled by default]
&configurationDescriptorMITM,
^
simtrace/usb.c:556:5: warning: (near initialization for 'configurationDescriptorsArr[3]') [enabled by default]
simtrace/usb.c: In function 'getConfigDesc':
simtrace/usb.c:560:5: warning: return discards 'const' qualifier from pointer target type [enabled by default]
return configurationDescriptorsArr[idx];
^
simtrace/usb.c: At top level:
2015-04-04 13:04:06 +02:00
Christina Quast
b65b881de1
Phone uses USB endpoints 4 to 6 instead of 1 to 3 now
2015-04-04 10:51:37 +02:00
Christina Quast
6355ecedf7
Phone: Write err msg if writing to USB PHONE_INT endpoint failed
2015-04-04 10:15:38 +02:00
Christina Quast
35c9e861a9
USBDDriver.c: Fixed set configuration bug
...
On setConfiguration the first entry in the configuration entry
was always taken.
Now it takes cfgNum as index number.
2015-04-04 09:53:49 +02:00
Christina Quast
6d9dcfc41d
usb.c: updated phone descriptor length
2015-04-03 22:26:43 +02:00
Christina Quast
99d80ffb87
usb.c: Updated comment to be generic
2015-04-03 22:26:07 +02:00
Christina Quast
452aee337c
simtrace config 4 enabled
2015-04-03 13:22:18 +02:00
Christina Quast
97922ba1d0
phone.py: do not change state to WAIT_RST after responding to file select command
2015-04-03 11:46:34 +02:00
Christina Quast
cce4b0959c
return commands read from card
2015-04-03 11:43:09 +02:00
Christina Quast
1dd996a0c3
Define for phone interface numbers in phone.py
2015-04-03 11:42:29 +02:00
Christina Quast
69d1f90c12
MITM python program first draft
2015-04-03 11:41:23 +02:00
Christina Quast
e90decef3d
redefinition of PHONE_* in phone.c
2015-04-03 11:40:38 +02:00
Christina Quast
1d80ef23a0
defined PR to easily switch between INFO/DEBUG prints
2015-04-03 11:39:38 +02:00
Christina Quast
d3630cc86d
phone ISR with mask (does not function yet)
2015-04-03 11:38:24 +02:00
Christina Quast
8e5381ca10
phone RST define taken from simtrace.h
2015-04-03 11:37:17 +02:00
Christina Quast
7123425841
redifined phone usb interface
2015-04-03 11:35:59 +02:00
Christina Quast
254acae448
raw ccid communication with variable commands
2015-04-01 19:36:34 +02:00
Christina Quast
a3496f4921
Phone RST: only trigger on rising edge
2015-03-27 18:54:50 +01:00
Christina Quast
4bcc023be7
Phone hack: endless loop
...
Motorola seems to be in an endless loop?
In any case, it only shows the motorola logo and does not react to
pressing the power button.
2015-03-24 21:59:32 +01:00
Christina Quast
5134fb6f53
phone.py:Bug fixes, first part of communication works
2015-03-22 19:09:02 +01:00
Christina Quast
2889fc2d38
Bug fixed, timeout frequ increased
2015-03-22 19:06:51 +01:00
Christina Quast
a1dd0ef4bc
Double size buf, a lot of debug
2015-03-22 19:06:12 +01:00
Christina Quast
0ca8390a8d
first few communication steps work
2015-03-22 19:05:23 +01:00
Christina Quast
e5342b3c25
Added more cmds to phone.py smartcard emulator
2015-03-19 19:29:49 +01:00
Christina Quast
531d10b403
Timer counter functions, Makefile adjusted
2015-03-19 19:28:18 +01:00
Christina Quast
4e4682c785
Bug fix: state returned by each handle* func now
...
The variable state is not a global function.
So its value needs to be returned from each function
which might alter the state.
For now only two states exist: WAIT_RST, WAIT_CMD
FIXME: Probably there is a more elegant way to do that
2015-03-18 18:48:57 +01:00
Christina Quast
5a691a36d1
Sniffed and parsed communication in a comment
2015-03-18 18:45:14 +01:00
Christina Quast
ce296b9def
Attempt to implement working simcard emulator
...
The BUFLEN is fixed 5 bytes now, which has to be increased.
A timeout has to be implemented, which is smaller than max_waittime.
If the timeout is triggered, the data received in the buffer so far
should be sent to the host computer which is responsible for generating
a response. Without the timeout the max_waittime of the phone would
expire and it would repeat sending the command, so that we do not
have atomary messages anymore.
2015-03-18 18:41:19 +01:00
Christina Quast
69734e9ad9
phone.py: too many usb function calls
2015-03-15 16:09:55 +01:00
Christina Quast
381d0fcde9
simtrace.py: cmdline arg for simcard emulation
2015-03-15 15:13:38 +01:00
Christina Quast
1185ae7184
phone.py: send ATR on rst
2015-03-15 15:12:50 +01:00
Christina Quast
578daaaeff
first try of sim card emulator
2015-03-13 23:46:01 +01:00
Christina Quast
74876d2079
SIM card still absent
2015-03-13 23:45:33 +01:00
Christina Quast
cc2186642e
Made trace.h a symbolic link
2015-03-13 14:42:30 +01:00
Christina Quast
ce8fa7e646
Add optional TRACE_*_WP switch
2015-03-13 13:09:51 +01:00
Christina Quast
23bb831cfb
Added prob useful gdb information
2015-03-13 13:06:03 +01:00
Christina Quast
1c3a7994b8
Basic Assembler defines
2015-03-13 12:57:59 +01:00
Christina Quast
f07ec9fa4b
Header file with includes
2015-03-13 12:55:41 +01:00
Christina Quast
0a0ca9fa81
Add resources for gdb and gcc
2015-03-13 12:35:12 +01:00
Christina Quast
2a823a4ad0
Unignore unused files
2015-03-13 12:31:06 +01:00
Christina Quast
391dc2eb43
Undefine possibility for USB trace info
...
Define USB_NO_DEBUG to undefine TRACE_DEBUG_WP and TRACE_INFO_WP
2015-03-13 12:02:31 +01:00
Christina Quast
b4d1b9d937
gemalto USB card reader dump
2015-03-10 23:36:23 +01:00
Christina Quast
ecfad8f75c
changed select command to one supported by simcard
2015-03-10 23:35:11 +01:00
Christina Quast
c63df595e5
Atmel lib bug fixed: param position off by one
...
Furthermore the debug output level is INFO instead of DEBUG now.
2015-03-10 23:32:45 +01:00
Christina Quast
dba7b16b98
ccid.py should not stop when an error occurs
2015-03-10 17:58:54 +01:00