This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Kévin Redon gerrit-no-reply at lists.osmocom.orgKévin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/9841 Change subject: enable (empty) sniffer support for SIMtrace board ...................................................................... enable (empty) sniffer support for SIMtrace board Change-Id: I51619135fd6f5423542f261e7d76bab1a5713e2b --- M firmware/libboard/simtrace/include/board.h M firmware/libcommon/source/sniffer.c 2 files changed, 15 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/41/9841/1 diff --git a/firmware/libboard/simtrace/include/board.h b/firmware/libboard/simtrace/include/board.h index 742ce7c..3b8296b 100644 --- a/firmware/libboard/simtrace/include/board.h +++ b/firmware/libboard/simtrace/include/board.h @@ -11,7 +11,7 @@ /** Phone (SIM card emulator)/CCID Reader/MITM configuration **/ /* Normally the communication lines between phone and SIM card are disconnected */ // Disconnect SIM card I/O, VPP line from the phone lines -// FIXME: Per default pins are input, therefore high-impedance, therefore they don not activate the bus switch, right? +// FIXME: Per default pins are input, therefore high-impedance, therefore the bus switch is in an unknown state by default for hardware version <= 1.4. It should be pulled high by an external resistor to set the bus switch to high-impedance (e.g. off). #define PIN_SC_SW_DEFAULT {PIO_PA20, PIOA, ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT} // Disconnect SIM card RST, CLK line from the phone lines #define PIN_IO_SW_DEFAULT {PIO_PA19, PIOA, ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT} @@ -82,7 +82,7 @@ #define BOARD_DFU_USB_PRODUCT_ID USB_PRODUCT_SIMTRACE2_DFU #define BOARD_USB_RELEASE 0x000 -//#define HAVE_SNIFFER +#define HAVE_SNIFFER #define HAVE_CCID #define HAVE_CARDEM //#define HAVE_MITM diff --git a/firmware/libcommon/source/sniffer.c b/firmware/libcommon/source/sniffer.c index 67c11a2..06edb22 100644 --- a/firmware/libcommon/source/sniffer.c +++ b/firmware/libcommon/source/sniffer.c @@ -27,14 +27,15 @@ * ---------------------------------------------------------------------------- */ +#include "board.h" +#include "simtrace.h" + #ifdef HAVE_SNIFFER /*------------------------------------------------------------------------------ * Headers *------------------------------------------------------------------------------*/ -#include "board.h" - #include <string.h> /*------------------------------------------------------------------------------ @@ -67,6 +68,12 @@ .state = USART_RCV, }; + +int check_data_from_phone(void) +{ + TRACE_INFO("check data from phone\n\r"); +} + /*----------------------------------------------------------------------------- * Initialization routine *-----------------------------------------------------------------------------*/ @@ -74,22 +81,22 @@ /* Called during USB enumeration after device is enumerated by host */ void Sniffer_configure(void) { - TRACE_INFO("Sniffer config\n"); + TRACE_INFO("Sniffer config\n\r"); } /* called when *different* configuration is set by host */ void Sniffer_exit(void) { - TRACE_INFO("Sniffer exit\n"); + TRACE_INFO("Sniffer exit\n\r"); USART_DisableIt(USART_PHONE, US_IER_RXRDY); NVIC_DisableIRQ(USART1_IRQn); USART_SetReceiverEnabled(USART_PHONE, 0); } -/* called when *CCID* configuration is set by host */ +/* called when *Sniffer* configuration is set by host */ void Sniffer_init(void) { - TRACE_INFO("Sniffer Init\n"); + TRACE_INFO("Sniffer Init\n\r"); /* Configure ISO7816 driver */ PIO_Configure(pinsISO7816_sniff, PIO_LISTSIZE(pinsISO7816_sniff)); PIO_Configure(pins_bus, PIO_LISTSIZE(pins_bus)); -- To view, visit https://gerrit.osmocom.org/9841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I51619135fd6f5423542f261e7d76bab1a5713e2b Gerrit-Change-Number: 9841 Gerrit-PatchSet: 1 Gerrit-Owner: Kévin Redon <kredon at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180703/3640c4f7/attachment.htm>