mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-17 05:38:33 +03:00
qmod: Use different Interface Strings for Modem1+2 / Modem 3+4
This makes it obvious in 'lsusb' and to other software on the USB host which interface is for which of the modems.
This commit is contained in:
@@ -95,7 +95,7 @@ C_OSMOCORE = $(notdir $(wildcard libosmocore/source/*.c))
|
||||
C_LIBCHIP = $(notdir $(wildcard $(AT91LIB)/libchip_sam3s/source/*.c) $(wildcard $(AT91LIB)/libchip_sam3s/cmsis/*.c))
|
||||
|
||||
C_LIBUSB = USBDescriptors.c USBRequests.c USBD.c USBDCallbacks.c USBDDriver.c USBDDriverCallbacks.c
|
||||
C_LIBUSB_RT = dfu.c dfu_desc.c dfu_runtime.c
|
||||
C_LIBUSB_RT = dfu.c dfu_runtime.c
|
||||
C_LIBUSB_DFU = dfu.c dfu_desc.c dfu_driver.c
|
||||
C_LIBCOMMON = string.c stdio.c fputs.c req_ctx.c ringbuffer.c
|
||||
|
||||
|
||||
@@ -4,5 +4,7 @@ SIMtrace Sniffer
|
||||
SIMtrace CCID
|
||||
SIMtrace Phone
|
||||
SIMtrace MITM
|
||||
CardEmulator USIM1
|
||||
CardEmulator USIM2
|
||||
CardEmulator Modem 1
|
||||
CardEmulator Modem 2
|
||||
CardEmulator Modem 3
|
||||
CardEmulator Modem 4
|
||||
|
||||
@@ -19,6 +19,9 @@ static const Pin pin_peer_erase = {PIO_PA11, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DE
|
||||
static const Pin pin_conn_usim1 = {PIO_PA20, PIOA, ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT};
|
||||
static const Pin pin_conn_usim2 = {PIO_PA28, PIOA, ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT};
|
||||
|
||||
/* array of generated USB Strings */
|
||||
extern unsigned char *usb_strings[];
|
||||
|
||||
static void qmod_use_physical_sim(unsigned int nr, int physical)
|
||||
{
|
||||
const Pin *pin;
|
||||
@@ -230,6 +233,11 @@ void board_main_top(void)
|
||||
TRACE_INFO("Detected Quad-Modem ST12\n\r");
|
||||
} else {
|
||||
TRACE_INFO("Detected Quad-Modem ST34\n\r");
|
||||
/* make sure we use the second set of USB Strings
|
||||
* calling the interfaces "Modem 3" and "Modem 4" rather
|
||||
* than 1+2 */
|
||||
usb_strings[7] = usb_strings[9];
|
||||
usb_strings[8] = usb_strings[10];
|
||||
}
|
||||
|
||||
/* Obtain the circuit board version (currently just prints voltage */
|
||||
|
||||
Reference in New Issue
Block a user