mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-17 13:48:32 +03:00
Compare commits
3 Commits
master
...
lynxis/pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c79b582000 | ||
|
|
504c0fab50 | ||
|
|
2fd8d3c18c |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -25,5 +25,4 @@ host/tests
|
||||
usb_strings_generated.h
|
||||
firmware/usbstring/usbstring
|
||||
firmware/apps/*/usb_strings.txt.patched
|
||||
firmware/misc/crctool
|
||||
host/include/osmocom/simtrace2/version.h
|
||||
firmware/misc/crctool
|
||||
11
README.md
11
README.md
@@ -41,14 +41,3 @@ The host software includes
|
||||
* simtrace2-list - list any USB-attached devices running simtrace2 firmware
|
||||
* simtrace2-sniff - interface the 'trace' firmware to obtain card protocol traces
|
||||
* simtrace2-cardem-pcsc - interface the 'cardem' fimrware to use a SIM in a PC/SC reader
|
||||
|
||||
|
||||
Do not expect SIMtrace2 to work in VMs
|
||||
--------------------------------------
|
||||
|
||||
We only support running SIMtrace2 together with a Linux system running
|
||||
"bare iron" on actual hardware (x86, x86_64, arm, ...). **using VMs
|
||||
with USB pass-through for things with critical timing like SIMtrace2 is
|
||||
calling for trouble** and we will not accept related bug reports or
|
||||
support you if you do. If you still want to use VMs: Feel free to do
|
||||
so, but understand that it's unsupported and you are on your own.
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
# In short: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
|
||||
# LIBVERSION=c:r:a
|
||||
# If the library source code has changed at all since the last update, then increment revision: c:r + 1:a.
|
||||
# If any interfaces have been added, removed, or changed since the last update: c + 1:0:a.
|
||||
# If any interfaces have been added, removed, or changed since the last update: c + 1:0:0.
|
||||
# If any interfaces have been added since the last public release: c:r:a + 1.
|
||||
# If any interfaces have been removed or changed since the last public release: c:r:0.
|
||||
#library what description / commit summary line
|
||||
simtrace2 API/ABI change osmo_st2_transport new member
|
||||
simtrace2 API/ABI change cardemu_usb_msg_config new member
|
||||
simtrace2 API/ABI change add function osmo_st2_cardem_request_config2()
|
||||
|
||||
@@ -220,13 +220,13 @@ function dissect_cemu_config(payload_data, pinfo, tree)
|
||||
|
||||
subtree:add(hf_cemu_cfg_features, payload_data(0,4));
|
||||
if payload_data:len() >= 4 then
|
||||
subtree:add(hf_cemu_cfg_slot_mux_nr, payload_data(4,1));
|
||||
subtree:add(hf_cemu_cfg_slot_mux_nr, payload_data(4,1));
|
||||
end
|
||||
if payload_data:len() >= 5 then
|
||||
local pres = payload_data(5,1):le_uint();
|
||||
local pres = payload_data(5,1):le_uint();
|
||||
subtree:add(hf_cemu_cfg_presence_polarity, payload_data(5,1));
|
||||
headerSubtree:add(CEMU_CONFIG_PRES_POL_PRES_H, pres)
|
||||
headerSubtree:add(CEMU_CONFIG_PRES_POL_VALID, pres)
|
||||
headerSubtree:add(CEMU_CONFIG_PRES_POL_PRES_H, pres)
|
||||
headerSubtree:add(CEMU_CONFIG_PRES_POL_VALID, pres)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
96
debian/changelog
vendored
96
debian/changelog
vendored
@@ -1,99 +1,3 @@
|
||||
simtrace2 (0.9.0) unstable; urgency=medium
|
||||
|
||||
[ Oliver Smith ]
|
||||
* host/contrib/simtrace2.spec.in: update
|
||||
* treewide: remove FSF address
|
||||
* contrib/jenkins.sh: set USE_CLANG=1
|
||||
* Cosmetic: fix CI errors
|
||||
* debian/rules: remove override_dh_autoreconf
|
||||
* debian: set compat level to 10
|
||||
* contrib/jenkins: tweak shell logic
|
||||
* firmware/Makefile: don't use distribution's CFLAGS
|
||||
* contrib: remove rpm spec file
|
||||
|
||||
[ Eric Wild ]
|
||||
* firmware: add crc stub to all dfu apps to ensure reliable loading
|
||||
* wireshark lua dissector: dissect more
|
||||
* lua dissector: adjust usage instructions
|
||||
* conrtrib/upload : upload elf files
|
||||
* contrib/jenkins.sh : build and publish combined targets
|
||||
* fw: only build the bl with clang
|
||||
|
||||
[ James Tavares ]
|
||||
* simtrace2-tool: add "modem sim-card (insert|remove)" command
|
||||
* firmware: add definition for main osc bypass when using external osc
|
||||
* gitignore: add missing entries binaries
|
||||
* firmware: bugfix: disable cardemu comms in local SIM mode
|
||||
* main: rotor: erase immediately after send
|
||||
* Fix missing generation of waiting-time-extension in some situations
|
||||
|
||||
[ Harald Welte ]
|
||||
* host: Print strerror(errno) in case of problems opening the USB device
|
||||
* cosmetic: Fix indent of printf() statement
|
||||
* host: properly zero-initialize interface match structures
|
||||
* contrib/simtrace.lua: Add VID/PID of all currentl simtrace2 devices
|
||||
* cosmetic: contrib/simtrace.lua: more consistent formatting
|
||||
* contrib/simtrace.lua: Add header with author/description/usage
|
||||
* contrib/simtrace.lua: print length + slot-number in decimal only
|
||||
* contrib/simtrace.lua: Don't print SIMTRACE_MSGT_ in every COL_INFO
|
||||
* contrib/simtrace.lua: Dissect some more cardem related message types
|
||||
* contrib/simtrace.lua: Register for "decode as..."
|
||||
* cardem: Report the VCC voltage (if supported)
|
||||
* card_emu_uart_interrupt: ASSERT if we get called with wrong uart_chan
|
||||
* cardem: set more reasonable interrupt priorities
|
||||
* host: Always initialize libosmocore logging before using it
|
||||
* simtrace2-cardem-pcsc: rename 'flags' to 'status_flags'
|
||||
* simtrace2-cardem-pcsc: Move all logging into libosmocore
|
||||
* simtrace2-cardem-pcsc: Detect card power-up without RESET
|
||||
* host: Don't pass -1 (converted to 255) as address
|
||||
* simtrace2-cardem-pcsc: Fix copy+paste error in log message
|
||||
* simtrace2-cardem-pcsc: continue in case of LIBUSB_TRANSFER_ERROR
|
||||
* contrib/simtrace.lua: Add Flag bits + Data to COL_INFO
|
||||
* Reduce bInterval of interrupt endpoints to avoid interrupt misses
|
||||
* simtrace2-cardem-pcsc.c: Send APDUs via GSMTAP
|
||||
* update git URLs (git -> https; gitea)
|
||||
* cardem: reset the uC in case of USB disconnect
|
||||
* cosmetic: Fix compile-time #error message string typo
|
||||
* firmware/sniffer: Fix copy+paste when logging invalid INS bytes
|
||||
* firmware/sniffer: Log parity errors, just like overruns and framing errors
|
||||
* firmware/sniffer: refactor setting TPDU state
|
||||
* firmware/sniffer: Log old and new state in ISO7816-3 state changes
|
||||
* firmware/sniffer: Avoid extra call for rbuf_is_full
|
||||
* firmware/sniffer: Fix programming error in PPS
|
||||
* firmware/sniffer: Make all global variables 'static'
|
||||
* firmware/sniffer: Group global variables in structs
|
||||
* firmware/sniffer: Log cause of WT change
|
||||
* firmware/sniffer: Rename global variable 'wt' to 'g_wt'
|
||||
* firmware/sniffer: Disable TIMEOUT interrupts in USART IER on exit
|
||||
* firmware/sniffer: Add + use 16bit ringbuffer
|
||||
* firmware/sniffer: Pass PARITY/OVERRUN/FRAMING error via ringbuffer
|
||||
* firmware/sniffer: Handle WT timeouts via ring-buffer
|
||||
* firmware/sniffer: introduce #define for interrupt enable flags
|
||||
* firmware/sniffer: Enable interrupts for overrun/parity/frame errors
|
||||
* Fix unchecked return value of osmo_libusb_init()
|
||||
* Add funding link to github mirror
|
||||
* README.md: Fix mark-down nested bullet syntax
|
||||
* README.md: Fix mark-down nested bullet syntax
|
||||
* README.md: add links to SIMtrace2 and QMOD
|
||||
* README.md: Add links to where hardware can be bought
|
||||
* README.md: Add section on ngff_carem
|
||||
* README.md: Add note to avoid using a VM
|
||||
|
||||
[ Alexander Couzens ]
|
||||
* firmware: usb: call USBD_HAL_DISCONNECT while usb init to recover from resets
|
||||
* ngff_cardem: cosmetic: fix superflous space
|
||||
* dissector: add support for sim polarity
|
||||
* firmware: allow to change the sim presence pin polarity
|
||||
* simtrace2-cardem-pcsc: allow to set sim presence polarity
|
||||
|
||||
[ Vadim Yanitskiy ]
|
||||
* host/cardem: fix integer overflow in process_do_rx_da()
|
||||
|
||||
[ Philipp Maier ]
|
||||
* simtrace2-cardem-pcsc: mark reset events in GSMTAP trace
|
||||
|
||||
-- Oliver Smith <osmith@sysmocom.de> Wed, 12 Feb 2025 16:07:53 +0100
|
||||
|
||||
simtrace2 (0.8.1) unstable; urgency=medium
|
||||
|
||||
* host/contrib/simtrace2.spec.in: fix soname
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 10),
|
||||
pkg-config,
|
||||
git,
|
||||
dh-autoreconf,
|
||||
libosmocore-dev (>= 1.11.0),
|
||||
libosmocore-dev (>= 1.4.0),
|
||||
libpcsclite-dev,
|
||||
libnewlib-arm-none-eabi,
|
||||
libusb-1.0-0-dev,
|
||||
|
||||
@@ -125,7 +125,7 @@ void Timer_Init( void );
|
||||
void TC0_Counter_Reset( void );
|
||||
|
||||
/* Sim presence pins */
|
||||
bool mode_cardemu_get_presence_pol(uint8_t instance);
|
||||
void mode_cardemu_set_presence_pol(uint8_t instance, bool high);
|
||||
bool mode_cardemu_get_prensence_pol(uint8_t instance);
|
||||
void mode_cardemu_set_prensence_pol(uint8_t instance, bool high);
|
||||
|
||||
#endif /* SIMTRACE_H */
|
||||
|
||||
@@ -271,7 +271,7 @@ struct cardemu_usb_msg_config {
|
||||
uint32_t features;
|
||||
/* the selected slot number (if an external mux is present) */
|
||||
uint8_t slot_mux_nr;
|
||||
/* Sim presence pin polarity. Bit 1 is a validity bit. Bit 0 gpio value when sim present.
|
||||
/* Sim presence pin polarity. Bit 1 is valid bit. Bit 0 gpio value when sim present.
|
||||
* When sim is present, set sim_present gpio to high -> 0x03
|
||||
* When sim is present, set sim_present gpio to low -> 0x02
|
||||
*/
|
||||
|
||||
@@ -1097,7 +1097,7 @@ static void card_emu_report_config(struct card_handle *ch)
|
||||
#else
|
||||
cfg->slot_mux_nr = 0;
|
||||
#endif
|
||||
cfg->pres_pol = mode_cardemu_get_presence_pol(ch->num) | CEMU_CONFIG_PRES_POL_VALID;
|
||||
cfg->pres_pol = mode_cardemu_get_prensence_pol(ch->num) | CEMU_CONFIG_PRES_POL_VALID;
|
||||
|
||||
usb_buf_upd_len_and_submit(msg);
|
||||
}
|
||||
@@ -1273,7 +1273,7 @@ int card_emu_set_config(struct card_handle *ch, const struct cardemu_usb_msg_con
|
||||
|
||||
if (scfg_len >= sizeof(uint32_t)+sizeof(uint8_t)+sizeof(uint8_t)) {
|
||||
if (scfg->pres_pol & CEMU_CONFIG_PRES_POL_VALID)
|
||||
mode_cardemu_set_presence_pol(ch->num, scfg->pres_pol & CEMU_CONFIG_PRES_POL_PRES_H);
|
||||
mode_cardemu_set_prensence_pol(ch->num, scfg->pres_pol & CEMU_CONFIG_PRES_POL_PRES_H);
|
||||
}
|
||||
|
||||
/* send back a report of our current configuration */
|
||||
|
||||
@@ -972,7 +972,7 @@ void mode_cardemu_run(void)
|
||||
}
|
||||
}
|
||||
|
||||
void mode_cardemu_set_presence_pol(uint8_t instance, bool high)
|
||||
void mode_cardemu_set_prensence_pol(uint8_t instance, bool high)
|
||||
{
|
||||
struct cardem_inst *ci;
|
||||
|
||||
@@ -983,7 +983,7 @@ void mode_cardemu_set_presence_pol(uint8_t instance, bool high)
|
||||
ci->pin_insert_inverted = !high;
|
||||
}
|
||||
|
||||
bool mode_cardemu_get_presence_pol(uint8_t instance)
|
||||
bool mode_cardemu_get_prensence_pol(uint8_t instance)
|
||||
{
|
||||
struct cardem_inst *ci;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ CFLAGS=-g -Wall $(LIBOSMOCORE_CFLAGS) \
|
||||
-I../atmel_softpack_libraries/libchip_sam3s/cmsis \
|
||||
-I../atmel_softpack_libraries/libchip_sam3s/include \
|
||||
-I../atmel_softpack_libraries/usb/include \
|
||||
-I../atmel_softpack_libraries/ \
|
||||
-I../libcommon/include \
|
||||
-I../libboard/common/include \
|
||||
-I../libboard/simtrace/include \
|
||||
|
||||
@@ -93,14 +93,7 @@ void card_emu_uart_reset_wt(uint8_t uart_chan)
|
||||
printf("%s(uart_chan=%u\n", __func__, uart_chan);
|
||||
}
|
||||
|
||||
void mode_cardemu_set_presence_pol(uint8_t instance, bool high)
|
||||
{
|
||||
}
|
||||
|
||||
bool mode_cardemu_get_presence_pol(uint8_t instance)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* test helper functions
|
||||
|
||||
@@ -56,9 +56,9 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
AC_SUBST(SYMBOL_VISIBILITY)
|
||||
|
||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.11.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOSIM, libosmosim >= 1.11.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOUSB, libosmousb >= 1.11.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.4.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOSIM, libosmosim >= 1.4.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOUSB, libosmousb >= 1.4.0)
|
||||
PKG_CHECK_MODULES(LIBUSB, libusb-1.0)
|
||||
|
||||
AC_ARG_ENABLE(sanitize,
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
osmocom/simtrace2/version.h: osmocom/simtrace2/version.h.tpl
|
||||
$(AM_V_GEN)$(MKDIR_P) $(dir $@)
|
||||
$(AM_V_GEN)sed \
|
||||
-e "s/{{VERSION}}/$$(echo '@VERSION@' | cut -d. -f1-3)/g" \
|
||||
-e "s/{{VERSION_MAJOR}}/$$(echo '@VERSION@' | cut -d. -f1)/g" \
|
||||
-e "s/{{VERSION_MINOR}}/$$(echo '@VERSION@' | cut -d. -f2)/g" \
|
||||
-e "s/{{VERSION_PATCH}}/$$(echo '@VERSION@' | cut -d. -f3)/g" \
|
||||
$< > $@
|
||||
|
||||
nobase_include_HEADERS = \
|
||||
osmocom/simtrace2/apdu_dispatch.h \
|
||||
osmocom/simtrace2/simtrace2_api.h \
|
||||
@@ -14,5 +5,4 @@ nobase_include_HEADERS = \
|
||||
osmocom/simtrace2/simtrace_prot.h \
|
||||
osmocom/simtrace2/usb_util.h \
|
||||
osmocom/simtrace2/gsmtap.h \
|
||||
osmocom/simtrace2/version.h \
|
||||
$(NULL)
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#define LIBOSMO_SIMTRACE2_VERSION {{VERSION}}
|
||||
#define LIBOSMO_SIMTRACE2_VERSION_STR "{{VERSION}}"
|
||||
|
||||
#define LIBOSMO_SIMTRACE2_VERSION_MAJOR {{VERSION_MAJOR}}
|
||||
#define LIBOSMO_SIMTRACE2_VERSION_MINOR {{VERSION_MINOR}}
|
||||
#define LIBOSMO_SIMTRACE2_VERSION_PATCH {{VERSION_PATCH}}
|
||||
|
||||
#define LIBOSMO_SIMTRACE2_VERSION_GREATER_EQUAL(major, minor, patch) \
|
||||
(LIBOSMO_SIMTRACE2_VERSION_MAJOR > (major) || \
|
||||
(LIBOSMO_SIMTRACE2_VERSION_MAJOR == (major) && \
|
||||
LIBOSMO_SIMTRACE2_VERSION_MINOR > (minor)) || \
|
||||
(LIBOSMO_SIMTRACE2_VERSION_MAJOR == (major) && \
|
||||
LIBOSMO_SIMTRACE2_VERSION_MINOR == (minor) && \
|
||||
LIBOSMO_SIMTRACE2_VERSION_PATCH >= (patch)))
|
||||
@@ -1,7 +1,7 @@
|
||||
# This is _NOT_ the library release version, it's an API version.
|
||||
# Please read chapter "Library interface versions" of the libtool documentation
|
||||
# before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html
|
||||
ST2_LIBVERSION=2:0:1
|
||||
ST2_LIBVERSION=1:0:0
|
||||
|
||||
AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
|
||||
AM_CFLAGS= -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOSIM_CFLAGS) $(LIBUSB_CFLAGS) $(COVERAGE_CFLAGS)
|
||||
|
||||
@@ -66,7 +66,7 @@ int osmo_st2_gsmtap_send_apdu(uint8_t sub_type, const uint8_t *apdu, unsigned in
|
||||
|
||||
memcpy(buf + sizeof(*gh), apdu, len);
|
||||
|
||||
rc = write(gsmtap_inst_fd2(g_gti), buf, gross_len);
|
||||
rc = write(gsmtap_inst_fd(g_gti), buf, gross_len);
|
||||
if (rc < 0) {
|
||||
perror("write gsmtap");
|
||||
free(buf);
|
||||
|
||||
Reference in New Issue
Block a user