SIMtrace MITM/emulator

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/simtrace@lists.osmocom.org/.

Tom Schouten tom at zwizwa.be
Tue Jul 16 15:33:26 UTC 2013


On 07/15/2013 03:32 PM, Tom Schouten wrote:
> On 07/15/2013 12:07 PM, Tom Schouten wrote:
>>
>> Hi Harald,
>>
>> On 07/10/2013 05:52 PM, Harald Welte wrote:
>>>
>>> On Wed, Jul 10, 2013 at 05:12:23PM -0400, Tom Schouten wrote:
>>>>>> git://git.gnumonks.org/at91work.git
>>>> Great. I'll check it out.  Is there anything essential that is 
>>>> missing?
>>> for CCID (card reader operation) not, it is basically the Atmel
>>> reference code merged with my DFU loader work and configured for the
>>> SIMtrace hardware.
>>
>> Did you need to make any modifications to pcscd & libccid?  ( apart 
>> from additing the USB id to libccid_Info.plist )
>> What versions did you use?
>>
>
> I tried with latest release pcscd & libccid.  I removed the  
> BOARD_USB_DFU to avoid error messages related to the DFU USB 
> interfaces.  This is what I got from pcscd.  Does the error remind you 
> of anything you ran into?
>
> Jul 15 15:28:50 zoo pcscd: ccid_usb.c:1065:ControlUSB() control failed 
> (3/87): -7 Success
> Jul 15 15:28:50 zoo pcscd: ifdwrapper.c:348:IFDStatusICC() Card not 
> transacted: 612
> Jul 15 15:28:50 zoo pcscd: eventhandler.c:202:EHSpawnEventHandler() 
> Initial Check Failed on Sysmocom SIMtrace (0123456789AF) 00 00
> Jul 15 15:28:50 zoo pcscd: readerfactory.c:338:RFAddReader() Sysmocom 
> SIMtrace (0123456789AF) init failed.
> Jul 15 15:28:50 zoo pcscd: hotplug_libudev.c:384:HPAddDevice() Failed 
> adding USB device: Sysmocom SIMtrace
> Jul 15 15:28:51 zoo kernel: [188104.680951] usb 3-2.4.1: new 
> full-speed USB device number 87 using ehci_hcd
> Jul 15 15:28:51 zoo kernel: [188104.960743] usb 3-2.4.1: New USB 
> device found, idVendor=03eb, idProduct=6129
> Jul 15 15:28:51 zoo kernel: [188104.960756] usb 3-2.4.1: New USB 
> device strings: Mfr=1, Product=2, SerialNumber=3
> Jul 15 15:28:51 zoo kernel: [188104.960766] usb 3-2.4.1: Product: 
> ATMEL AT91 CCID DRIVER
> Jul 15 15:28:51 zoo kernel: [188104.960773] usb 3-2.4.1: Manufacturer: 
> ATMEL
> Jul 15 15:28:51 zoo kernel: [188104.960779] usb 3-2.4.1: SerialNumber: 
> 0123456789AF
>
>

Seems there is a discrepancy between libccid and at91lib driver about 
the meaning of the slot status bits.

(at91lib) cciddriver.c:

// 6.3.1 RDR_to_PC_NotifySlotChange
#define ICC_NOT_PRESENT                       0x00
#define ICC_PRESENT                           0x01
#define ICC_CHANGE                            0x02
#define ICC_INSERTED_EVENT                    ICC_PRESENT+ICC_CHANGE

(libccid) ccid.h:
/* See CCID specs ch. 4.2.1 */
#define CCID_ICC_PRESENT_ACTIVE        0x00    /* 00 0000 00 */
#define CCID_ICC_PRESENT_INACTIVE    0x01    /* 00 0000 01 */
#define CCID_ICC_ABSENT                0x02    /* 00 0000 10 */
#define CCID_ICC_STATUS_MASK        0x03    /* 00 0000 11 */

There is no 0x03 case in libccid, which is what causes the obscure 
communication error 612.
SIMtrace firmware returns 0x03 on startup, regardless of SIM insertion 
state.

I can probably fix this, though I wonder why the problem wasn't there 
before..

Cheers
Tom







More information about the simtrace mailing list