Age | Commit message (Collapse) | Author | Files | Lines |
|
the PPS procedure with baud rate change has not been tested.
by keeping the default ATR instead of applying the ATR sent by
the host software, no other baud rate choice is offered.
Change-Id: Ibf7c6b83d2cf68172c7aa25116d838e24a95d5fe
|
|
this change allows to initialize the TPDU state while in
ISO_S_WAIT_TPDU, before actually entering ISO_S_TPDU
Change-Id: I505d3add32a43de31499b800bc53442f99f65931
|
|
this change is mainly relevant for the SIMtrace board, but also
affects the others.
First we ensure VCC_PHONE is not forwarded to VCC_SIM because the
card could affect the signal (card could draw too much current or
feed back current in).
next we disable VCC_SIM. the card slot does not need to be
powered, and the FPF2019 leaks current back to VCC_PHONE, even
with forwarding disabled (the reverse current protection only
kicks in when VCC_PHONE is briefly shorted to ground, but still
leaks 0.6V).
enable the ADC channels normally used to measure VCC, even if
not used. the dedicated ADC pins leak current when left
unconfigured. enabling them puts them in high impedance.
Change-Id: If1487c1c191838aaa08b654e49cd31c7180ffc19
|
|
the reset/ATR handling has been heavily updated/fixed.
instead of using the timer counter peripheral to handle
the waiting time and corresponding timeout, the USART peripheral
internal timeout mechanism is used.
this is particularly important for the SIMtrace board since the
clock signal is not connected to the timer counter.
thus this change adds card emulation support for SIMtrace boards.
Fi and Di have been properly rename to F and D since the "i"
stands only for an "indicated" value, not the actual value.
this does not change the USB protocol (the variable have just been
renamed).
additional variables store more information about the card
capabilities
NOTE: it has only be tested for the SIMtrace board
Change-Id: Ibcb2c8cace9137695adf5fb3de43566f7cfb93b5
|
|
since simtrace supports multiple application, but currently not
at the same time, the feature support is not app specific
Change-Id: I98ff92450cc2a247b294d2e15df171f3fe7c5156
|
|
the SIMtrace board does not support the current card emulation
application because this uses a timer counter to handle the
timeouts, but on the SIMtrace board this is not connected to the
CLK signal
Change-Id: Idd09ea534179f0ede705573e1373dbd045c9828a
|
|
this is the shortest and simplest ATR possible according to the
ISO 7816-3 spec.
it does not offer any non-default parameters (F, D, WI, ...)
Change-Id: I4ff41b5120bcadca652296f9d3691f7606be2bd2
|
|
Change-Id: I18fc3179f8b7f3f1272d26853007876156fc1e03
|
|
the simtrace board uses a bus switch not used on qmod and owhw to
switch the SIM between physical and virtual
Change-Id: Ieaf2ed4761fc3e04f33f9aac5c04a768c9a6f71e
|
|
this is just to better understand the flow
Change-Id: I045286836176da729cc8c863866d6f6aa3836592
|
|
this matches the naming scheme used for USIM2
Change-Id: I486b14260faec897e8c8698c4b7987bf36492497
|
|
monitoring the state changes of the VCC and nRST lines is required
to correctly detect warm and cold reset
Change-Id: I72099956332724f84226e1495fdc5a5b1a034695
|
|
Change-Id: I99f3fecbc00d2379c3a6dc457b047c6fee41c292
|
|
this will become part of libosmocore since it it common to smart
card related projects (such as osmo-ccid-firmware)
Change-Id: I3d4c65d137fc4555fcb256443feadd1c695de73d
|
|
Change-Id: Ie310143fe713a51fa1adf8bf7599374282341f2e
|
|
Change-Id: Ibfc22b95c0be3ac78bd50a40e31cc7d8546d81d9
|
|
this ATR does not encode any data and uses all defaults.
the lower default speed is also better handled by the hardware.
handling faster speeds is upcoming.
Change-Id: I5a4f2f94bea1a15aedbef5a6f2f49344387dc11d
|
|
else it's too nosy while debugging other components, not often
used, and break the flow since it does not and a line.
Change-Id: I8920ff7c33b4c9fb174bb31a29334a63fcbede43
|
|
the longer output is to fast and often incomplete.
the shorter version is enough to view the progress when not
debugging.
Change-Id: I97bb84da68d1f3bc14fb7c05400edf1748f55460
|
|
Change-Id: I5608c3312b648c0d59f79338ef1f97b6fe08f5b9
|
|
Change-Id: I9254b1ddf6436b5a4964b9124a36ae17bfc22886
|
|
Change-Id: I2f3127c7b276c9726fd0242e3e29be22f9d6255c
|
|
this just adds the name of the TPDU state on top of the state number.
the ISO state is cleaned up accordingly
Change-Id: Id5104a2c3579dedb092c179748e9ed525673841c
|
|
the TDPU response data size can be up to 256.
this length cannot be stored in a uint8_t, which would cause the
length to become 0, no data being send, and the reader reset the
card because of misbehaviour of the card (i.e. no/malformed
response leading to the timeout of the waiting time).
Change-Id: Iae7671085aaa3115a02d82530dd7a0e7e2d4155e
|
|
Change-Id: Ibcf093877ee53f8446c97bfa50c8370ceda24c53
|
|
Change-Id: I03de93ebb92b1d1b5004cbe865cdf1fa0b2b23ac
|
|
RPM post-build-checks found some issue and marks these as error:
[ 61s] I: Program returns random data in a function
[ 61s] E: simtrace2 no-return-in-nonvoid-function simtrace2_usb.c:88
Change-Id: Id16fb7fc4f13176b2b6443af02a5848d8fcfb069
|
|
What we're doing is actually legal: We copy the full size of the
destination array, and then overwrite the last byte with NUL. However,
gcc isn't smart enough to see that:
libusb_util.c:162:5: warning: ‘strncpy’ specified bound 20 equals destination size [-Wstringop-truncation]
strncpy(out[out_idx].path, path, sizeof(out[out_idx].path));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Let's copy one byte less to make it happy.
Change-Id: I30ddacdc73e5245c7c38b92d1e94e39b13fae7d3
|
|
The host utilities use libpcsclite, and the missing build dependency
causes build failures in our nightly OBS builds since commit
faf1e88e48c216456bdea6060a623b7c31f07c70 was merged:
[ 131s] cc -o simtrace2-remsim simtrace2-remsim.o apdu_dispatch.o simtrace2-discovery.o libusb_util.o -Wl,-z,relro `pkg-config --libs libusb-1.0 libosmocore` -pthread `pkg-config --libs libosmosim libpcsclite`
[ 131s] Package libpcsclite was not found in the pkg-config search path.
[ 131s] Perhaps you should add the directory containing `libpcsclite.pc'
[ 131s] to the PKG_CONFIG_PATH environment variable
[ 131s] No package 'libpcsclite' found
Change-Id: I29adfc629e5e4ffd0bf8b9035ef9138fe7693d96
|
|
Change-Id: I0b54c2eb98b3fad1e2afaf9b81fbe4518b01fbda
|
|
remsim also needs libpcsclite
`pkg-config --libs libosmocore` and -losmocore are duplicates
`pkg-config --libs libosmosim` is equivalent to -losmosim
pthread it needed (by most applications) for static compilation
LDFLAGS+= allows static compilation when running
LDFLAGS="-static" make
Change-Id: Ic7bd6f2be074d6f652d4f84f4996c8588ea5f851
|
|
the board_main_top function was not defined, causing a hard fault
when initializing the board
Change-Id: Ib92003416648822c4115472992850c592bc4047a
|
|
the board_exec_dbg_cmd function was not defined, causing a hard
fault on user input
Change-Id: I3ecc1f7bdb2484f5a67c36163d33ebc065e4e709
|
|
Change-Id: Iafcd029be9b3f8cf2e90f08d5e9802912d6a59b1
|
|
Change-Id: I3edb50abe93bc8574c9c1f25b34f75dab2e8f0ce
|
|
these checks prevent out of bounds access and running
unset function pointers.
Change-Id: Ida889d40b898fc1ab8b885800431833570fdaafe
|
|
this is used during board testing
Change-Id: I4ccd787f6e307f523821725de158e3c6f1508ee2
|
|
Change-Id: I86434a46a75f2acc30e20c33edab6dd3f87e052b
|
|
the EEPROM byte output was causing data loss on the serial output,
resulting is automatic tests failing.
instead an end text will be output to detect the end of the procedure.
Change-Id: Ib8d3cbd01d0e34432d424355f4fafb24bc5273a1
|
|
Change-Id: I8c422d8a709f8311c40d37e1f1f01dcd3a199b6f
|
|
the error code returned by vsnprintf was ignored,
resulting in printing the string from a previous print.
Change-Id: I8506b05d56da55d1357a1234917adf341b46e1db
|
|
Wformat requires uint32_t to be used in format string with the 'l'
qualifier (l = long = at least 32 bits).
this qualifier was not handled before.
since on ARM 32-bit int == long we can simply ignore it (stdio
already does not support 64-bit data).
Change-Id: Ib506a66f68712c6b3eeb5129a39abf47ec86a2a7
|
|
the higher baud rate allows for more debugging (without dropping
data) and is well supported by USB for UART adapters (this
standard baud rate is 8 x 115200).
the closest matching integer value is calculated for UART CR.
no floating point calculation can be used since this would
increase the size of the resulting binary by ~ 2kB (for the
softfp). this is not possible for the DFU since it already is
close to the maximum size of 16 kB.
Change-Id: I82b74f697342d580ccb79ada4715f35f4e8cca86
|
|
UART baud rate is main clock (MCK) divided by CR*16.
The MCK values are chosen >= 48 MHz and <= 64 MHz to have a near
integer value CR for a baud rate of 921600 bps.
The end MCK frequency between simtrace and qmod differ slightly
but are close to 58 MHz.
Change-Id: Iaa4a97fc68494c93b9d128503515d88049de506c
|
|
Change-Id: Id6559b1019353815eea9f6653b6560e9a8aab23a
|
|
There's still no released libosmocore defining the GSMTAP_TYPE_SIM
sub-types (Change-Id: I5bd0dff5a4a90cfe96d9c4f3dec6657e1d85bf7a
dated Jul 26, 2018).
Let's make sure users don't need an unreleased version of the library
if it's only about a few #defines that we can just copy here for
backwards compatibility.
Change-Id: I2fd9e14873711d60f194bb404420bbfbb0a00f48
|
|
This reverts commit 77ff745ccad6b0dd58e4476c1b82de70f034f7af.
libosmocore 0.12.1 is not recent enough, I misread the 'gitk' output.
Change-Id: I87a8e5bbb4aea0c991abe5372f840d76f17378eb
|
|
Only this version includes the GSMTAP_SIM_ATR and GSMTAP_SIM_APDU
definitions.
Change-Id: I988cad56aed755af416fc7f23822dcf0229dbb7d
|
|
Change-Id: Iaf56c03f966a5dfc8b750d926f0429223aeec54e
|
|
Change-Id: Iece115e4dde87bff5dc36286668f50de0abdcb9e
|