I've fixed the issue and simtrac2-sniff now also sends the ATR over GSMTAP. The patch is still getting reviewed.
There will be a difference to SIMtrace 1 though. SIMtrace 1 sent the ATR as if it would be an APDU (which it isn't). To make the difference between the ATR and APDU data I introduced GSMTAP SIM sub_types. See https://osmocom.org/projects/baseband/wiki/GSMTAP for the GSMTAP header format. Sub_type 0 will still be for APDU data (and is backwards compatible with SIMtrace 1 and the wireshark decoder). SIMtrace 2 will use sub-type 1 when sending the ATR. Until the change is merged you may already want to take this change into account.
Since this change is also in libosmocore, you will have to get the latest libosmocore version (through git or nightly packages) for the simtrace2-sniff to use this sub_type.
I will let you know once the change is merged and ready.
On Thu, Jul 26, 2018 at 09:50:20AM +0200, Kévin Redon wrote:
Hi Andrei,
SIMtrace 1 displays the ATR on the console output: Entering main loop ATR APDU: 3b 9f 96 80 1f c7 80 31 a0 73 be 21 13 67 43 20 07 18 00 00 01 a5
and sends it in as GSMTAP APDU data packet: 020404000000000000000000000000003b9f96801fc78031a073be21136743200718000001a5
SIMtrace 2 also displays the ATR on the console output: Entering main loop Card state change: reset release ATR: 3b 9f 96 80 1f c7 80 31 a0 73 be 21 13 67 43 20 07 18 00 00 01 a5
but does not sent it over GSMTAP, since this is not really an APDU.
Let me fix that quickly and I will let you know once the change is merged.
Kevin
On Thu, Jul 26, 2018 at 08:37:19AM +0300, Andrei Mikhailov wrote:
Hi Harald,
Thank you for clarification. It works now.
But I can not find ATR contents in data received from SIMTrace 2. Please see the part of log file with data received from SIMTrace below: 0300000000000C0008000000 0302000000000E00000000000000 0303000000001200000000000400FF10947B 0303000000001200000000000400FF10947B 030100000000090094 0304000000001700000000000900A0A40000027F209F17 0304000000002C00000000001E00A0C0000017000008007F200200000000000A9300250700838A838A009000
Could you please clarify how to obtain ATR contents?
/С уважением / Best regards, Андрей Михайлов / Andrei Mikhailov Руководитель проектов / Project Manager ООО "Исткомпис Рус" / Eastcompeace (Rus) Co., Ltd. phone +7(499)7361431 mobile +7(916)6220848/ 25.07.2018 18:10, Harald Welte пишет:
Hi Andrei,
On Wed, Jul 25, 2018 at 11:56:58AM +0300, Andrei Mikhailov wrote:
I have received SIMTrace 2 just now and I tried to connect it to PC with the same parameter as for previous version of SIMTrace.
Please read the documentation/wiki. SIMtrace 2 has different firmware and host software than SIMtrace1.
But I found that USB VENDOR ID and USB PRODUCT ID were changed. For the previous version they were 0x16c0 and 0x0762 correspondingly. All host sources at git://git.osmocom.org/simtrace.git repository use this parameters.
please look at simtrace2.git and - even more so http://osmocom.org/projects/simtrace2/wiki