Again, with my client-server remsim setup.
The client starts correctly:
DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 192.168.1.111:9999 DLINP NOTICE input/ipa.c:141 192.168.1.111:9999 connection done DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(bankd){REESTABLISH}: RSPRO link to 192.168.1.111:9999 UP DLINP NOTICE simtrace2_api.c:172 [0] <= osmo_st2_cardem_request_card_insert(inserted=1) DLINP NOTICE simtrace2_api.c:321 [0] <= _modem_sim_select(remote_sim=1) DLINP NOTICE simtrace2_api.c:254 [0] <= osmo_st2_cardem_request_set_atr(3b 00 ) DLINP NOTICE simtrace2_api.c:288 [0] <= _modem_reset(asserted=2, pulse_ms=300) DLINP NOTICE simtrace2_api.c:254 [0] <= osmo_st2_cardem_request_set_atr(3b 9f 96 80 1f c7 80 31 e0 73 fe 21 13 67 98 07 02 10 01 01 01 54 )
The bankd sees the card correctly:
Jul 12 14:54:43 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:955 [000 ACCEPTING] Accepted connection from 192.168.1.9:45513 Jul 12 14:54:43 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:442 [000 ACCEPTING] Changing state to CONN_WAIT_ID Jul 12 14:54:43 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:655 [000 CONN_WAIT_ID] Rx RSPRO connectClientReq(T=0, N='rpi-cardem-2', SW='remsim-client', VER='1.0.0') Jul 12 14:54:43 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:442 [000 CONN_WAIT_ID] Changing state to CONN_CLIENT Jul 12 14:54:43 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:625 [000 CONN_CLIENT] slotmap found: C(1:1) -> B(1:1) Jul 12 14:54:43 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:450 [000 CONN_CLIENT] Changing state to CONN_CLIENT_MAPPED (timeout=10) Jul 12 14:54:43 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:261 [000 CONN_CLIENT_MAPPED] Attempting to open PC/SC context Jul 12 14:54:44 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:264 [000 CONN_CLIENT_MAPPED] SCardEstablishContext: OK Jul 12 14:54:44 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:215 [000 CONN_CLIENT_MAPPED] Attempting to find card/slot using regex 'SCM Microsystems Inc. SCR 3310' Jul 12 14:54:44 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:234 [000 CONN_CLIENT_MAPPED] Attempting to open card/slot 'SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00' Jul 12 14:54:44 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:198 [000 CONN_CLIENT_MAPPED] SCardStatus: OK Jul 12 14:54:44 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:200 [000 CONN_CLIENT_MAPPED] Card ATR: 3b9f96801fc78031e073fe2113679807021001010154 Jul 12 14:54:44 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:442 [000 CONN_CLIENT_MAPPED] Changing state to CONN_CLIENT_MAPPED_CARD Jul 12 14:54:44 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:780 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO setAtrRes
Once the phone powers on, the client starts showing such messages:
DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x12, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 00 00 00 00 00 00 01 01 0a 80 25 00 00 DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x0, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 01 00 00 00 00 00 01 01 0a 80 25 00 00 DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x1, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 03 00 00 00 00 00 01 01 0a 80 25 00 00 DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x3, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 13 00 00 00 00 00 01 01 0a 80 25 00 00 DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x13, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 03 00 00 00 00 00 01 01 0a 80 25 00 00 DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x3, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 13 00 00 00 00 00 01 01 0a 80 25 00 00 DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x13, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 12 00 00 00 00 00 01 01 0a 80 25 00 00
But the phone never completes the boot (shows just the splash screen).
The bankd daemon shows in an infinite loop: Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:288 [000 CONN_CLIENT_MAPPED_CARD] SCardReconnect: OK Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:198 [000 CONN_CLIENT_MAPPED_CARD] SCardStatus: OK Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:200 [000 CONN_CLIENT_MAPPED_CARD] Card ATR: 3b9f96801fc78031e073fe2113679807021001010154 Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:749 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=PRESENT, CLK=INACTIVE) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:749 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=PRESENT, CLK=ACTIVE) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:749 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=ABSENT, CLK=ACTIVE) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:284 [000 CONN_CLIENT_MAPPED_CARD] Resetting card in 'SCM Microsystems Inc. SCR 3310' (cold reset) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:288 [000 CONN_CLIENT_MAPPED_CARD] SCardReconnect: OK Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:198 [000 CONN_CLIENT_MAPPED_CARD] SCardStatus: OK Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:200 [000 CONN_CLIENT_MAPPED_CARD] Card ATR: 3b9f96801fc78031e073fe2113679807021001010154 Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:749 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=ABSENT, CLK=INACTIVE) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:284 [000 CONN_CLIENT_MAPPED_CARD] Resetting card in 'SCM Microsystems Inc. SCR 3310' (cold reset) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:288 [000 CONN_CLIENT_MAPPED_CARD] SCardReconnect: OK Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:198 [000 CONN_CLIENT_MAPPED_CARD] SCardStatus: OK Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:200 [000 CONN_CLIENT_MAPPED_CARD] Card ATR: 3b9f96801fc78031e073fe2113679807021001010154 Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:749 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=PRESENT, CLK=INACTIVE) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:749 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=PRESENT, CLK=ACTIVE) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:749 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=ABSENT, CLK=ACTIVE) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:284 [000 CONN_CLIENT_MAPPED_CARD] Resetting card in 'SCM Microsystems Inc. SCR 3310' (cold reset) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:288 [000 CONN_CLIENT_MAPPED_CARD] SCardReconnect: OK Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:198 [000 CONN_CLIENT_MAPPED_CARD] SCardStatus: OK Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:200 [000 CONN_CLIENT_MAPPED_CARD] Card ATR: 3b9f96801fc78031e073fe2113679807021001010154 Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:749 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=ABSENT, CLK=INACTIVE) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:284 [000 CONN_CLIENT_MAPPED_CARD] Resetting card in 'SCM Microsystems Inc. SCR 3310' (cold reset) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:288 [000 CONN_CLIENT_MAPPED_CARD] SCardReconnect: OK Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:198 [000 CONN_CLIENT_MAPPED_CARD] SCardStatus: OK Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:200 [000 CONN_CLIENT_MAPPED_CARD] Card ATR: 3b9f96801fc78031e073fe2113679807021001010154 Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:749 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=PRESENT, CLK=INACTIVE) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:749 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=PRESENT, CLK=ACTIVE) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_main.c:749 [000 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=ABSENT, CLK=ACTIVE) Jul 12 15:38:29 rpi-cardem-1 osmo-remsim-bankd[19847]: 19848 DBANKDW INFO bankd_pcsc.c:284 [000 CONN_CLIENT_MAPPED_CARD] Resetting card in 'SCM Microsystems Inc. SCR 3310' (cold reset)
So, something seems to cause the card reader to reset and it looks like the phone is waiting for the sim card to initialize. How should I try to troubleshoot further? Does it look like a card reader problem? A misplaced/poor contact SIM FPC cable? A problem with the SIM in the reader?
Should I try with a different phone (hard to get phones with fullsized SIM), or a different reader? How should I proceed further? Perhaps try a trace (but that doesn't use an external reader)?
Thanks for any suggestions. Cheers!
DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(bankd){REESTABLISH}: RSPRO link to 192.168.2.131:9999 UP DRSPRO ERROR ../rspro_client_fsm.c:297 RSPRO_CLIENT(bankd){REESTABLISH}: Event SRVC_E_KA_TERMINATED not permitted DRSPRO INFO ../rspro_client_fsm.c:302 RSPRO_CLIENT(bankd){REESTABLISH}: Destroying existing connection to server DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 192.168.2.131:9999 DLINP NOTICE input/ipa.c:141 192.168.2.131:9999 connection done
I think our problems are similar. My initial suspicion is that there is a problem with our soft connection. Or there is a problem with the settings.
Ok, I did some more tests, in order to rule out a bad FPC connection. I flashed the trace dfu and used the simtrace board + the same FPC connection, the same phone + a sim card in the board reader and ran simtrace2-sniff to read traffic between phone and SIM, and it worked ok:
root@rpi-cardem-2:~# simtrace2-sniff simtrace2-sniff - Phone-SIM card communication sniffer (C) 2010-2017 by Harald Welte laforge@gnumonks.org (C) 2018 by Kevin Redon kredon@sysmocom.de
Using USB device 1d50:60e3 Addr=6, Path=1-1.3, Cfg=1, Intf=0, Alt=0: 255/1/0 (SIMtrace Sniffer) Entering main loop Card state change: reset de-asserted ATR: 3b 9f 96 80 1f c7 80 31 e0 73 fe 21 13 67 98 07 02 10 01 01 01 54 PPS: ff 10 95 7a PPS: ff 10 95 7a Fi/Di switched to 512/16 TPDU: 00 a4 08 04 02 2f 00 61 24 TPDU: 00 c0 00 00 24 62 22 82 05 42 21 00 24 05 83 02 2f 00 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 05 80 02 00 b4 88 01 f0 90 00 TPDU: 00 b2 01 04 24 61 18 4f 10 a0 00 00 00 87 10 02 ff 49 ff 01 89 00 00 01 00 50 04 55 53 49 4d ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 02 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 03 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 04 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 05 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 a4 00 04 02 3f 00 61 29 TPDU: 00 c0 00 00 29 62 27 82 02 78 21 83 02 3f 00 a5 07 80 01 71 83 02 98 5c 8a 01 05 8b 03 2f 06 02 c6 0c 90 01 60 83 01 01 83 01 0a 83 01 81 90 00 TPDU: 00 a4 08 04 02 2f 05 61 21 TPDU: 00 c0 00 00 21 62 1f 82 02 41 21 83 02 2f 05 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 07 80 02 00 08 88 01 28 90 00 TPDU: 00 b0 00 00 08 65 6e 65 73 66 72 ff ff 90 00 TPDU: 80 10 00 00 17 ff ff ff ff 7f 0f 00 df ff 00 00 1f 42 03 10 46 03 00 00 00 00 00 40 90 00 ...
So, this rules out a bad FPC connection/cable.
I will try getting a different reader. When trying to read the card, the reader behaves the same way - its led keeps flashing, bankd spams lots of reset messages (both cold reset and warm reset). I wonder if there are additional debug messages I can look for to see why it can't read the card. Again, here is the card output from pcsc_scan - I don't see anything wrong with it, though I'm not used to reading SIM cards...
root@rpi-cardem-1:~# pcsc_scan Using reader plug'n play mechanism Scanning present readers... 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00
Mon Jul 17 09:20:29 2023 Reader 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00 Event number: 0 Card state: Card inserted, ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54
ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54 + TS = 3B --> Direct Convention + T0 = 9F, Y(1): 1001, K: 15 (historical bytes) TA(1) = 96 --> Fi=512, Di=32, 16 cycles/ETU 250000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 312500 bits/s TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0 ----- TD(2) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global interface bytes following ----- TA(3) = C7 --> Clock stop: no preference - Class accepted by the card: (3G) A 5V B 3V C 1.8V + Historical bytes: 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 Category indicator byte: 80 (compact TLV data object) Tag: 3, len: 1 (card service data byte) Card service data byte: E0 - Application selection: by full DF name - Application selection: by partial DF name - BER-TLV data objects available in EF.DIR - EF.DIR and EF.ATR access services: by GET RECORD(s) command - Card with MF Tag: 7, len: 3 (card capabilities) Selection methods: FE - DF selection by full DF name - DF selection by partial DF name - DF selection by path - DF selection by file identifier - Implicit DF selection - Short EF identifier supported - Record number supported Data coding byte: 21 - Behaviour of write functions: proprietary - Value 'FF' for the first byte of BER-TLV tag fields: invalid - Data unit in quartets: 2 Command chaining, length fields and logical channels: 13 - Logical channel number assignment: by the card - Maximum number of logical channels: 4 Tag: 6, len: 7 (pre-issuing data) Data: 98 07 02 10 01 01 01 + TCK = 54 (correct checksum)
Possibly identified card (using /usr/share/pcsc/smartcard_list.txt): 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54 SIM Card (Carrier: BOB, Country: Austria) (Telecommunication) https://www.bob.at
Cheers!
On Sat, Jul 15, 2023 at 7:03 AM bianfang85@163.com wrote:
DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(bankd){REESTABLISH}: RSPRO link to 192.168.2.131:9999 UP DRSPRO ERROR ../rspro_client_fsm.c:297 RSPRO_CLIENT(bankd){REESTABLISH}: Event SRVC_E_KA_TERMINATED not permitted DRSPRO INFO ../rspro_client_fsm.c:302 RSPRO_CLIENT(bankd){REESTABLISH}: Destroying existing connection to server DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 192.168.2.131:9999 DLINP NOTICE input/ipa.c:141 192.168.2.131:9999 connection done
I think our problems are similar. My initial suspicion is that there is a problem with our soft connection. Or there is a problem with the settings.
Why you can read the card operator? And I can't read the operator? At 2023-07-17 15:23:05, "Adrian Popa" adrian.popa.gh@gmail.com wrote:
Ok, I did some more tests, in order to rule out a bad FPC connection. I flashed the trace dfu and used the simtrace board + the same FPC connection, the same phone + a sim card in the board reader and ran simtrace2-sniff to read traffic between phone and SIM, and it worked ok:
root@rpi-cardem-2:~# simtrace2-sniff simtrace2-sniff - Phone-SIM card communication sniffer (C) 2010-2017 by Harald Welte laforge@gnumonks.org (C) 2018 by Kevin Redon kredon@sysmocom.de
Using USB device 1d50:60e3 Addr=6, Path=1-1.3, Cfg=1, Intf=0, Alt=0: 255/1/0 (SIMtrace Sniffer) Entering main loop Card state change: reset de-asserted ATR: 3b 9f 96 80 1f c7 80 31 e0 73 fe 21 13 67 98 07 02 10 01 01 01 54 PPS: ff 10 95 7a PPS: ff 10 95 7a Fi/Di switched to 512/16 TPDU: 00 a4 08 04 02 2f 00 61 24 TPDU: 00 c0 00 00 24 62 22 82 05 42 21 00 24 05 83 02 2f 00 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 05 80 02 00 b4 88 01 f0 90 00 TPDU: 00 b2 01 04 24 61 18 4f 10 a0 00 00 00 87 10 02 ff 49 ff 01 89 00 00 01 00 50 04 55 53 49 4d ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 02 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 03 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 04 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 05 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 a4 00 04 02 3f 00 61 29 TPDU: 00 c0 00 00 29 62 27 82 02 78 21 83 02 3f 00 a5 07 80 01 71 83 02 98 5c 8a 01 05 8b 03 2f 06 02 c6 0c 90 01 60 83 01 01 83 01 0a 83 01 81 90 00 TPDU: 00 a4 08 04 02 2f 05 61 21 TPDU: 00 c0 00 00 21 62 1f 82 02 41 21 83 02 2f 05 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 07 80 02 00 08 88 01 28 90 00 TPDU: 00 b0 00 00 08 65 6e 65 73 66 72 ff ff 90 00 TPDU: 80 10 00 00 17 ff ff ff ff 7f 0f 00 df ff 00 00 1f 42 03 10 46 03 00 00 00 00 00 40 90 00 ...
So, this rules out a bad FPC connection/cable.
I will try getting a different reader. When trying to read the card, the reader behaves the same way - its led keeps flashing, bankd spams lots of reset messages (both cold reset and warm reset). I wonder if there are additional debug messages I can look for to see why it can't read the card. Again, here is the card output from pcsc_scan - I don't see anything wrong with it, though I'm not used to reading SIM cards...
root@rpi-cardem-1:~# pcsc_scan Using reader plug'n play mechanism Scanning present readers... 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00
Mon Jul 17 09:20:29 2023 Reader 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00 Event number: 0 Card state: Card inserted, ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54
ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54
- TS = 3B --> Direct Convention
- T0 = 9F, Y(1): 1001, K: 15 (historical bytes)
TA(1) = 96 --> Fi=512, Di=32, 16 cycles/ETU 250000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 312500 bits/s TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
TD(2) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global interface bytes following
TA(3) = C7 --> Clock stop: no preference - Class accepted by the card: (3G) A 5V B 3V C 1.8V
- Historical bytes: 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01
Category indicator byte: 80 (compact TLV data object) Tag: 3, len: 1 (card service data byte) Card service data byte: E0 - Application selection: by full DF name - Application selection: by partial DF name - BER-TLV data objects available in EF.DIR - EF.DIR and EF.ATR access services: by GET RECORD(s) command - Card with MF Tag: 7, len: 3 (card capabilities) Selection methods: FE - DF selection by full DF name - DF selection by partial DF name - DF selection by path - DF selection by file identifier - Implicit DF selection - Short EF identifier supported - Record number supported Data coding byte: 21 - Behaviour of write functions: proprietary - Value 'FF' for the first byte of BER-TLV tag fields: invalid - Data unit in quartets: 2 Command chaining, length fields and logical channels: 13 - Logical channel number assignment: by the card - Maximum number of logical channels: 4 Tag: 6, len: 7 (pre-issuing data) Data: 98 07 02 10 01 01 01
- TCK = 54 (correct checksum)
Possibly identified card (using /usr/share/pcsc/smartcard_list.txt): 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54 SIM Card (Carrier: BOB, Country: Austria) (Telecommunication) https://www.bob.at
Cheers!
On Sat, Jul 15, 2023 at 7:03 AM bianfang85@163.com wrote:
DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(bankd){REESTABLISH}: RSPRO link to 192.168.2.131:9999 UP DRSPRO ERROR ../rspro_client_fsm.c:297 RSPRO_CLIENT(bankd){REESTABLISH}: Event SRVC_E_KA_TERMINATED not permitted DRSPRO INFO ../rspro_client_fsm.c:302 RSPRO_CLIENT(bankd){REESTABLISH}: Destroying existing connection to server DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 192.168.2.131:9999 DLINP NOTICE input/ipa.c:141 192.168.2.131:9999 connection done
I think our problems are similar. My initial suspicion is that there is a problem with our soft connection. Or there is a problem with the settings.
@sss: if you mean this: Possibly identified card (using /usr/share/pcsc/smartcard_list.txt): 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54 SIM Card (Carrier: BOB, Country: Austria) (Telecommunication) https://www.bob.at
That's not the correct operator for this SIM card. Nor country... But I assumed an old database.
On Mon, Jul 17, 2023 at 1:00 PM sss bianfang85@163.com wrote:
Why you can read the card operator? And I can't read the operator? At 2023-07-17 15:23:05, "Adrian Popa" adrian.popa.gh@gmail.com wrote:
Ok, I did some more tests, in order to rule out a bad FPC connection. I flashed the trace dfu and used the simtrace board + the same FPC connection, the same phone + a sim card in the board reader and ran simtrace2-sniff to read traffic between phone and SIM, and it worked ok:
root@rpi-cardem-2:~# simtrace2-sniff simtrace2-sniff - Phone-SIM card communication sniffer (C) 2010-2017 by Harald Welte laforge@gnumonks.org (C) 2018 by Kevin Redon kredon@sysmocom.de
Using USB device 1d50:60e3 Addr=6, Path=1-1.3, Cfg=1, Intf=0, Alt=0: 255/1/0 (SIMtrace Sniffer) Entering main loop Card state change: reset de-asserted ATR: 3b 9f 96 80 1f c7 80 31 e0 73 fe 21 13 67 98 07 02 10 01 01 01 54 PPS: ff 10 95 7a PPS: ff 10 95 7a Fi/Di switched to 512/16 TPDU: 00 a4 08 04 02 2f 00 61 24 TPDU: 00 c0 00 00 24 62 22 82 05 42 21 00 24 05 83 02 2f 00 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 05 80 02 00 b4 88 01 f0 90 00 TPDU: 00 b2 01 04 24 61 18 4f 10 a0 00 00 00 87 10 02 ff 49 ff 01 89 00 00 01 00 50 04 55 53 49 4d ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 02 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 03 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 04 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 05 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 a4 00 04 02 3f 00 61 29 TPDU: 00 c0 00 00 29 62 27 82 02 78 21 83 02 3f 00 a5 07 80 01 71 83 02 98 5c 8a 01 05 8b 03 2f 06 02 c6 0c 90 01 60 83 01 01 83 01 0a 83 01 81 90 00 TPDU: 00 a4 08 04 02 2f 05 61 21 TPDU: 00 c0 00 00 21 62 1f 82 02 41 21 83 02 2f 05 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 07 80 02 00 08 88 01 28 90 00 TPDU: 00 b0 00 00 08 65 6e 65 73 66 72 ff ff 90 00 TPDU: 80 10 00 00 17 ff ff ff ff 7f 0f 00 df ff 00 00 1f 42 03 10 46 03 00 00 00 00 00 40 90 00 ...
So, this rules out a bad FPC connection/cable.
I will try getting a different reader. When trying to read the card, the reader behaves the same way - its led keeps flashing, bankd spams lots of reset messages (both cold reset and warm reset). I wonder if there are additional debug messages I can look for to see why it can't read the card. Again, here is the card output from pcsc_scan - I don't see anything wrong with it, though I'm not used to reading SIM cards...
root@rpi-cardem-1:~# pcsc_scan Using reader plug'n play mechanism Scanning present readers... 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00
Mon Jul 17 09:20:29 2023 Reader 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00 Event number: 0 Card state: Card inserted, ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54
ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54
- TS = 3B --> Direct Convention
- T0 = 9F, Y(1): 1001, K: 15 (historical bytes)
TA(1) = 96 --> Fi=512, Di=32, 16 cycles/ETU 250000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 312500 bits/s TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
TD(2) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global interface bytes following
TA(3) = C7 --> Clock stop: no preference - Class accepted by the card: (3G) A 5V B 3V C 1.8V
- Historical bytes: 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01
Category indicator byte: 80 (compact TLV data object) Tag: 3, len: 1 (card service data byte) Card service data byte: E0 - Application selection: by full DF name - Application selection: by partial DF name - BER-TLV data objects available in EF.DIR - EF.DIR and EF.ATR access services: by GET RECORD(s) command - Card with MF Tag: 7, len: 3 (card capabilities) Selection methods: FE - DF selection by full DF name - DF selection by partial DF name - DF selection by path - DF selection by file identifier - Implicit DF selection - Short EF identifier supported - Record number supported Data coding byte: 21 - Behaviour of write functions: proprietary - Value 'FF' for the first byte of BER-TLV tag fields: invalid - Data unit in quartets: 2 Command chaining, length fields and logical channels: 13 - Logical channel number assignment: by the card - Maximum number of logical channels: 4 Tag: 6, len: 7 (pre-issuing data) Data: 98 07 02 10 01 01 01
- TCK = 54 (correct checksum)
Possibly identified card (using /usr/share/pcsc/smartcard_list.txt): 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54 SIM Card (Carrier: BOB, Country: Austria) (Telecommunication) https://www.bob.at
Cheers!
On Sat, Jul 15, 2023 at 7:03 AM bianfang85@163.com wrote:
DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(bankd){REESTABLISH}: RSPRO link to 192.168.2.131:9999 UP DRSPRO ERROR ../rspro_client_fsm.c:297 RSPRO_CLIENT(bankd){REESTABLISH}: Event SRVC_E_KA_TERMINATED not permitted DRSPRO INFO ../rspro_client_fsm.c:302 RSPRO_CLIENT(bankd){REESTABLISH}: Destroying existing connection to server DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 192.168.2.131:9999 DLINP NOTICE input/ipa.c:141 192.168.2.131:9999 connection done
I think our problems are similar. My initial suspicion is that there is a problem with our soft connection. Or there is a problem with the settings.
I saw your csv file, and I read the manual says it starts with 1 0, why yours is 1 1."1","0","HID Global OMNIKEY 6121 Smart Card Reader [OMNIKEY 6121 Smart Card Reader ] 00 00" At 2023-07-17 18:06:20, "Adrian Popa" adrian.popa.gh@gmail.com wrote:
@sss: if you mean this: Possibly identified card (using /usr/share/pcsc/smartcard_list.txt): 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54 SIM Card (Carrier: BOB, Country: Austria) (Telecommunication) https://www.bob.at
That's not the correct operator for this SIM card. Nor country... But I assumed an old database.
On Mon, Jul 17, 2023 at 1:00 PM sss bianfang85@163.com wrote:
Why you can read the card operator? And I can't read the operator? At 2023-07-17 15:23:05, "Adrian Popa" adrian.popa.gh@gmail.com wrote:
Ok, I did some more tests, in order to rule out a bad FPC connection. I flashed the trace dfu and used the simtrace board + the same FPC connection, the same phone + a sim card in the board reader and ran simtrace2-sniff to read traffic between phone and SIM, and it worked ok:
root@rpi-cardem-2:~# simtrace2-sniff simtrace2-sniff - Phone-SIM card communication sniffer (C) 2010-2017 by Harald Welte laforge@gnumonks.org (C) 2018 by Kevin Redon kredon@sysmocom.de
Using USB device 1d50:60e3 Addr=6, Path=1-1.3, Cfg=1, Intf=0, Alt=0: 255/1/0 (SIMtrace Sniffer) Entering main loop Card state change: reset de-asserted ATR: 3b 9f 96 80 1f c7 80 31 e0 73 fe 21 13 67 98 07 02 10 01 01 01 54 PPS: ff 10 95 7a PPS: ff 10 95 7a Fi/Di switched to 512/16 TPDU: 00 a4 08 04 02 2f 00 61 24 TPDU: 00 c0 00 00 24 62 22 82 05 42 21 00 24 05 83 02 2f 00 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 05 80 02 00 b4 88 01 f0 90 00 TPDU: 00 b2 01 04 24 61 18 4f 10 a0 00 00 00 87 10 02 ff 49 ff 01 89 00 00 01 00 50 04 55 53 49 4d ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 02 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 03 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 04 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 05 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 a4 00 04 02 3f 00 61 29 TPDU: 00 c0 00 00 29 62 27 82 02 78 21 83 02 3f 00 a5 07 80 01 71 83 02 98 5c 8a 01 05 8b 03 2f 06 02 c6 0c 90 01 60 83 01 01 83 01 0a 83 01 81 90 00 TPDU: 00 a4 08 04 02 2f 05 61 21 TPDU: 00 c0 00 00 21 62 1f 82 02 41 21 83 02 2f 05 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 07 80 02 00 08 88 01 28 90 00 TPDU: 00 b0 00 00 08 65 6e 65 73 66 72 ff ff 90 00 TPDU: 80 10 00 00 17 ff ff ff ff 7f 0f 00 df ff 00 00 1f 42 03 10 46 03 00 00 00 00 00 40 90 00 ...
So, this rules out a bad FPC connection/cable.
I will try getting a different reader. When trying to read the card, the reader behaves the same way - its led keeps flashing, bankd spams lots of reset messages (both cold reset and warm reset). I wonder if there are additional debug messages I can look for to see why it can't read the card. Again, here is the card output from pcsc_scan - I don't see anything wrong with it, though I'm not used to reading SIM cards...
root@rpi-cardem-1:~# pcsc_scan Using reader plug'n play mechanism Scanning present readers... 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00
Mon Jul 17 09:20:29 2023 Reader 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00 Event number: 0 Card state: Card inserted, ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54
ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54
- TS = 3B --> Direct Convention
- T0 = 9F, Y(1): 1001, K: 15 (historical bytes)
TA(1) = 96 --> Fi=512, Di=32, 16 cycles/ETU 250000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 312500 bits/s TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
TD(2) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global interface bytes following
TA(3) = C7 --> Clock stop: no preference - Class accepted by the card: (3G) A 5V B 3V C 1.8V
- Historical bytes: 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01
Category indicator byte: 80 (compact TLV data object) Tag: 3, len: 1 (card service data byte) Card service data byte: E0 - Application selection: by full DF name - Application selection: by partial DF name - BER-TLV data objects available in EF.DIR - EF.DIR and EF.ATR access services: by GET RECORD(s) command - Card with MF Tag: 7, len: 3 (card capabilities) Selection methods: FE - DF selection by full DF name - DF selection by partial DF name - DF selection by path - DF selection by file identifier - Implicit DF selection - Short EF identifier supported - Record number supported Data coding byte: 21 - Behaviour of write functions: proprietary - Value 'FF' for the first byte of BER-TLV tag fields: invalid - Data unit in quartets: 2 Command chaining, length fields and logical channels: 13 - Logical channel number assignment: by the card - Maximum number of logical channels: 4 Tag: 6, len: 7 (pre-issuing data) Data: 98 07 02 10 01 01 01
- TCK = 54 (correct checksum)
Possibly identified card (using /usr/share/pcsc/smartcard_list.txt): 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54 SIM Card (Carrier: BOB, Country: Austria) (Telecommunication) https://www.bob.at
Cheers!
On Sat, Jul 15, 2023 at 7:03 AM bianfang85@163.com wrote:
DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(bankd){REESTABLISH}: RSPRO link to 192.168.2.131:9999 UP DRSPRO ERROR ../rspro_client_fsm.c:297 RSPRO_CLIENT(bankd){REESTABLISH}: Event SRVC_E_KA_TERMINATED not permitted DRSPRO INFO ../rspro_client_fsm.c:302 RSPRO_CLIENT(bankd){REESTABLISH}: Destroying existing connection to server DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 192.168.2.131:9999 DLINP NOTICE input/ipa.c:141 192.168.2.131:9999 connection done
I think our problems are similar. My initial suspicion is that there is a problem with our soft connection. Or there is a problem with the settings.
On the bank side you're free to use any available slots. In my case I only have one reader, but I can define the IDs as I please (I think). The bankd daemon loads all readers and knows their mappings. In my case I use reader 1 with card 1.
Hmm, maybe that's the problem? I'll give it a try, thanks!
On Mon, Jul 17, 2023 at 1:18 PM gmaillee gmaillee@126.com wrote:
I saw your csv file, and I read the manual says it starts with 1 0, why yours is 1 1."1","0","HID Global OMNIKEY 6121 Smart Card Reader [OMNIKEY 6121 Smart Card Reader ] 00 00" At 2023-07-17 18:06:20, "Adrian Popa" adrian.popa.gh@gmail.com wrote:
@sss: if you mean this: Possibly identified card (using /usr/share/pcsc/smartcard_list.txt): 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54 SIM Card (Carrier: BOB, Country: Austria) (Telecommunication) https://www.bob.at
That's not the correct operator for this SIM card. Nor country... But I assumed an old database.
On Mon, Jul 17, 2023 at 1:00 PM sss bianfang85@163.com wrote:
Why you can read the card operator? And I can't read the operator? At 2023-07-17 15:23:05, "Adrian Popa" adrian.popa.gh@gmail.com wrote:
Ok, I did some more tests, in order to rule out a bad FPC connection. I flashed the trace dfu and used the simtrace board + the same FPC connection, the same phone + a sim card in the board reader and ran simtrace2-sniff to read traffic between phone and SIM, and it worked ok:
root@rpi-cardem-2:~# simtrace2-sniff simtrace2-sniff - Phone-SIM card communication sniffer (C) 2010-2017 by Harald Welte laforge@gnumonks.org (C) 2018 by Kevin Redon kredon@sysmocom.de
Using USB device 1d50:60e3 Addr=6, Path=1-1.3, Cfg=1, Intf=0, Alt=0: 255/1/0 (SIMtrace Sniffer) Entering main loop Card state change: reset de-asserted ATR: 3b 9f 96 80 1f c7 80 31 e0 73 fe 21 13 67 98 07 02 10 01 01 01 54 PPS: ff 10 95 7a PPS: ff 10 95 7a Fi/Di switched to 512/16 TPDU: 00 a4 08 04 02 2f 00 61 24 TPDU: 00 c0 00 00 24 62 22 82 05 42 21 00 24 05 83 02 2f 00 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 05 80 02 00 b4 88 01 f0 90 00 TPDU: 00 b2 01 04 24 61 18 4f 10 a0 00 00 00 87 10 02 ff 49 ff 01 89 00 00 01 00 50 04 55 53 49 4d ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 02 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 03 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 04 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 05 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 a4 00 04 02 3f 00 61 29 TPDU: 00 c0 00 00 29 62 27 82 02 78 21 83 02 3f 00 a5 07 80 01 71 83 02 98 5c 8a 01 05 8b 03 2f 06 02 c6 0c 90 01 60 83 01 01 83 01 0a 83 01 81 90 00 TPDU: 00 a4 08 04 02 2f 05 61 21 TPDU: 00 c0 00 00 21 62 1f 82 02 41 21 83 02 2f 05 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 07 80 02 00 08 88 01 28 90 00 TPDU: 00 b0 00 00 08 65 6e 65 73 66 72 ff ff 90 00 TPDU: 80 10 00 00 17 ff ff ff ff 7f 0f 00 df ff 00 00 1f 42 03 10 46 03 00 00 00 00 00 40 90 00 ...
So, this rules out a bad FPC connection/cable.
I will try getting a different reader. When trying to read the card, the reader behaves the same way - its led keeps flashing, bankd spams lots of reset messages (both cold reset and warm reset). I wonder if there are additional debug messages I can look for to see why it can't read the card. Again, here is the card output from pcsc_scan - I don't see anything wrong with it, though I'm not used to reading SIM cards...
root@rpi-cardem-1:~# pcsc_scan Using reader plug'n play mechanism Scanning present readers... 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00
Mon Jul 17 09:20:29 2023 Reader 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00 Event number: 0 Card state: Card inserted, ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54
ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54
- TS = 3B --> Direct Convention
- T0 = 9F, Y(1): 1001, K: 15 (historical bytes)
TA(1) = 96 --> Fi=512, Di=32, 16 cycles/ETU 250000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 312500 bits/s TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
TD(2) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global interface bytes following
TA(3) = C7 --> Clock stop: no preference - Class accepted by the card: (3G) A 5V B 3V C 1.8V
- Historical bytes: 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01
Category indicator byte: 80 (compact TLV data object) Tag: 3, len: 1 (card service data byte) Card service data byte: E0 - Application selection: by full DF name - Application selection: by partial DF name - BER-TLV data objects available in EF.DIR - EF.DIR and EF.ATR access services: by GET RECORD(s) command - Card with MF Tag: 7, len: 3 (card capabilities) Selection methods: FE - DF selection by full DF name - DF selection by partial DF name - DF selection by path - DF selection by file identifier - Implicit DF selection - Short EF identifier supported - Record number supported Data coding byte: 21 - Behaviour of write functions: proprietary - Value 'FF' for the first byte of BER-TLV tag fields: invalid - Data unit in quartets: 2 Command chaining, length fields and logical channels: 13 - Logical channel number assignment: by the card - Maximum number of logical channels: 4 Tag: 6, len: 7 (pre-issuing data) Data: 98 07 02 10 01 01 01
- TCK = 54 (correct checksum)
Possibly identified card (using /usr/share/pcsc/smartcard_list.txt): 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54 SIM Card (Carrier: BOB, Country: Austria) (Telecommunication) https://www.bob.at
Cheers!
On Sat, Jul 15, 2023 at 7:03 AM bianfang85@163.com wrote:
DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(bankd){REESTABLISH}: RSPRO link to 192.168.2.131:9999 UP DRSPRO ERROR ../rspro_client_fsm.c:297 RSPRO_CLIENT(bankd){REESTABLISH}: Event SRVC_E_KA_TERMINATED not permitted DRSPRO INFO ../rspro_client_fsm.c:302 RSPRO_CLIENT(bankd){REESTABLISH}: Destroying existing connection to server DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 192.168.2.131:9999 DLINP NOTICE input/ipa.c:141 192.168.2.131:9999 connection done
I think our problems are similar. My initial suspicion is that there is a problem with our soft connection. Or there is a problem with the settings.
Update: I've changed the banks csv configuration to list: root@rpi-cardem-1:~# cat /etc/osmocom/bankd_pcsc_slots.csv "1","0","SCM Microsystems Inc. SCR 3310"
Redid the server mapping to: root@rpi-cardem-1:~# python3 /etc/osmocom/osmo-remsim-apitool -a /clients: {'clients': []} /banks: {'banks': [{'peer': 'B1', 'state': 'CONNECTED_BANKD', 'component_id': {'type_': 'remsimBankd', 'name': 'fixme-name', 'software': 'remsim-bankd', 'swVersion': '1.0.0'}, 'bankId': 1, 'numberOfSlots': 5}]} /slotmaps: {'slotmaps': [{'bank': {'bankId': 1, 'slotNr': 0}, 'client': {'clientId': 1, 'slotNr': 1}, 'state': 'ACTIVE'}]}
But when the client tries to connect, the same thing happens (phone locks, the card reader is reset in a loop). But it was worth a shot.
Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:955 [001 ACCEPTING] Accepted connection from 192.168.1.9:35811 Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:442 [001 ACCEPTING] Changing state to CONN_WAIT_ID Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:655 [001 CONN_WAIT_ID] Rx RSPRO connectClientReq(T=0, N='rpi-cardem-2', SW='remsim-client', VER='1.0.0') Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:442 [001 CONN_WAIT_ID] Changing state to CONN_CLIENT Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:625 [001 CONN_CLIENT] slotmap found: C(1:1) -> B(1:0) Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:450 [001 CONN_CLIENT] Changing state to CONN_CLIENT_MAPPED (timeout=10) Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:261 [001 CONN_CLIENT_MAPPED] Attempting to open PC/SC context Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:264 [001 CONN_CLIENT_MAPPED] SCardEstablishContext: OK Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:215 [001 CONN_CLIENT_MAPPED] Attempting to find card/slot using regex 'SCM Microsystems Inc. SCR 3310' Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:234 [001 CONN_CLIENT_MAPPED] Attempting to open card/slot 'SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00' Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:198 [001 CONN_CLIENT_MAPPED] SCardStatus: OK Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:200 [001 CONN_CLIENT_MAPPED] Card ATR: 3b9f96801fc78031e073fe2113679807021001010154 Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:442 [001 CONN_CLIENT_MAPPED] Changing state to CONN_CLIENT_MAPPED_CARD Jul 17 13:01:37 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:780 [001 CONN_CLIENT_MAPPED_CARD] Rx RSPRO setAtrRes
// phone powers on
Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:749 [001 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=ACTIVE, VCC=PRESENT, CLK=INACTIVE) Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:284 [001 CONN_CLIENT_MAPPED_CARD] Resetting card in 'SCM Microsystems Inc. SCR 3310' (warm reset) Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:288 [001 CONN_CLIENT_MAPPED_CARD] SCardReconnect: OK Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:198 [001 CONN_CLIENT_MAPPED_CARD] SCardStatus: OK Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:200 [001 CONN_CLIENT_MAPPED_CARD] Card ATR: 3b9f96801fc78031e073fe2113679807021001010154 Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:749 [001 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=ACTIVE, VCC=PRESENT, CLK=ACTIVE) Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:284 [001 CONN_CLIENT_MAPPED_CARD] Resetting card in 'SCM Microsystems Inc. SCR 3310' (warm reset) Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:288 [001 CONN_CLIENT_MAPPED_CARD] SCardReconnect: OK Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:198 [001 CONN_CLIENT_MAPPED_CARD] SCardStatus: OK Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:200 [001 CONN_CLIENT_MAPPED_CARD] Card ATR: 3b9f96801fc78031e073fe2113679807021001010154 Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:749 [001 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=PRESENT, CLK=ACTIVE) Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_main.c:749 [001 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=ABSENT, CLK=ACTIVE) Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:284 [001 CONN_CLIENT_MAPPED_CARD] Resetting card in 'SCM Microsystems Inc. SCR 3310' (cold reset) Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:288 [001 CONN_CLIENT_MAPPED_CARD] SCardReconnect: OK Jul 17 13:02:03 rpi-cardem-1 osmo-remsim-bankd[1692]: 1694 DBANKDW INFO bankd_pcsc.c:198 [001 CONN_CLIENT_MAPPED_CARD] SCardStatus: OK
I will try with a different reader in a week or so. Thanks for the advice! Cheers
On Mon, Jul 17, 2023 at 2:50 PM Adrian Popa adrian.popa.gh@gmail.com wrote:
On the bank side you're free to use any available slots. In my case I only have one reader, but I can define the IDs as I please (I think). The bankd daemon loads all readers and knows their mappings. In my case I use reader 1 with card 1.
Hmm, maybe that's the problem? I'll give it a try, thanks!
On Mon, Jul 17, 2023 at 1:18 PM gmaillee gmaillee@126.com wrote:
I saw your csv file, and I read the manual says it starts with 1 0, why yours is 1 1."1","0","HID Global OMNIKEY 6121 Smart Card Reader [OMNIKEY 6121 Smart Card Reader ] 00 00" At 2023-07-17 18:06:20, "Adrian Popa" adrian.popa.gh@gmail.com wrote:
@sss: if you mean this: Possibly identified card (using /usr/share/pcsc/smartcard_list.txt): 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54 SIM Card (Carrier: BOB, Country: Austria) (Telecommunication) https://www.bob.at
That's not the correct operator for this SIM card. Nor country... But I assumed an old database.
On Mon, Jul 17, 2023 at 1:00 PM sss bianfang85@163.com wrote:
Why you can read the card operator? And I can't read the operator? At 2023-07-17 15:23:05, "Adrian Popa" adrian.popa.gh@gmail.com wrote:
Ok, I did some more tests, in order to rule out a bad FPC connection. I flashed the trace dfu and used the simtrace board + the same FPC connection, the same phone + a sim card in the board reader and ran simtrace2-sniff to read traffic between phone and SIM, and it worked ok:
root@rpi-cardem-2:~# simtrace2-sniff simtrace2-sniff - Phone-SIM card communication sniffer (C) 2010-2017 by Harald Welte laforge@gnumonks.org (C) 2018 by Kevin Redon kredon@sysmocom.de
Using USB device 1d50:60e3 Addr=6, Path=1-1.3, Cfg=1, Intf=0, Alt=0: 255/1/0 (SIMtrace Sniffer) Entering main loop Card state change: reset de-asserted ATR: 3b 9f 96 80 1f c7 80 31 e0 73 fe 21 13 67 98 07 02 10 01 01 01 54 PPS: ff 10 95 7a PPS: ff 10 95 7a Fi/Di switched to 512/16 TPDU: 00 a4 08 04 02 2f 00 61 24 TPDU: 00 c0 00 00 24 62 22 82 05 42 21 00 24 05 83 02 2f 00 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 05 80 02 00 b4 88 01 f0 90 00 TPDU: 00 b2 01 04 24 61 18 4f 10 a0 00 00 00 87 10 02 ff 49 ff 01 89 00 00 01 00 50 04 55 53 49 4d ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 02 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 03 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 04 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 b2 05 04 24 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 90 00 TPDU: 00 a4 00 04 02 3f 00 61 29 TPDU: 00 c0 00 00 29 62 27 82 02 78 21 83 02 3f 00 a5 07 80 01 71 83 02 98 5c 8a 01 05 8b 03 2f 06 02 c6 0c 90 01 60 83 01 01 83 01 0a 83 01 81 90 00 TPDU: 00 a4 08 04 02 2f 05 61 21 TPDU: 00 c0 00 00 21 62 1f 82 02 41 21 83 02 2f 05 a5 06 c0 01 00 de 01 00 8a 01 05 8b 03 2f 06 07 80 02 00 08 88 01 28 90 00 TPDU: 00 b0 00 00 08 65 6e 65 73 66 72 ff ff 90 00 TPDU: 80 10 00 00 17 ff ff ff ff 7f 0f 00 df ff 00 00 1f 42 03 10 46 03 00 00 00 00 00 40 90 00 ...
So, this rules out a bad FPC connection/cable.
I will try getting a different reader. When trying to read the card, the reader behaves the same way - its led keeps flashing, bankd spams lots of reset messages (both cold reset and warm reset). I wonder if there are additional debug messages I can look for to see why it can't read the card. Again, here is the card output from pcsc_scan - I don't see anything wrong with it, though I'm not used to reading SIM cards...
root@rpi-cardem-1:~# pcsc_scan Using reader plug'n play mechanism Scanning present readers... 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00
Mon Jul 17 09:20:29 2023 Reader 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312144266274) 00 00 Event number: 0 Card state: Card inserted, ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54
ATR: 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54
- TS = 3B --> Direct Convention
- T0 = 9F, Y(1): 1001, K: 15 (historical bytes)
TA(1) = 96 --> Fi=512, Di=32, 16 cycles/ETU 250000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 312500 bits/s TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
TD(2) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global interface bytes following
TA(3) = C7 --> Clock stop: no preference - Class accepted by the card: (3G) A 5V B 3V C 1.8V
- Historical bytes: 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01
Category indicator byte: 80 (compact TLV data object) Tag: 3, len: 1 (card service data byte) Card service data byte: E0 - Application selection: by full DF name - Application selection: by partial DF name - BER-TLV data objects available in EF.DIR - EF.DIR and EF.ATR access services: by GET RECORD(s) command - Card with MF Tag: 7, len: 3 (card capabilities) Selection methods: FE - DF selection by full DF name - DF selection by partial DF name - DF selection by path - DF selection by file identifier - Implicit DF selection - Short EF identifier supported - Record number supported Data coding byte: 21 - Behaviour of write functions: proprietary - Value 'FF' for the first byte of BER-TLV tag fields: invalid - Data unit in quartets: 2 Command chaining, length fields and logical channels: 13 - Logical channel number assignment: by the card - Maximum number of logical channels: 4 Tag: 6, len: 7 (pre-issuing data) Data: 98 07 02 10 01 01 01
- TCK = 54 (correct checksum)
Possibly identified card (using /usr/share/pcsc/smartcard_list.txt): 3B 9F 96 80 1F C7 80 31 E0 73 FE 21 13 67 98 07 02 10 01 01 01 54 SIM Card (Carrier: BOB, Country: Austria) (Telecommunication) https://www.bob.at
Cheers!
On Sat, Jul 15, 2023 at 7:03 AM bianfang85@163.com wrote:
DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(bankd){REESTABLISH}: RSPRO link to 192.168.2.131:9999 UP DRSPRO ERROR ../rspro_client_fsm.c:297 RSPRO_CLIENT(bankd){REESTABLISH}: Event SRVC_E_KA_TERMINATED not permitted DRSPRO INFO ../rspro_client_fsm.c:302 RSPRO_CLIENT(bankd){REESTABLISH}: Destroying existing connection to server DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 192.168.2.131:9999 DLINP NOTICE input/ipa.c:141 192.168.2.131:9999 connection done
I think our problems are similar. My initial suspicion is that there is a problem with our soft connection. Or there is a problem with the settings.
are you here? I have another question to ask your thoughts, if we install through binary packages. Do we still need to install the osmo-remsim repository?
The osmo-remsim repository is the one that provides the binaries. Without installing it you would need to compile the code from its sources.
On Tue, Jul 18, 2023, 10:58 gmaillee@126.com wrote:
are you here? I have another question to ask your thoughts, if we install through binary packages. Do we still need to install the osmo-remsim repository?
I also need your help, I git osmo-remsim to my linux computer. but i don't know how to make can you give me some help root@debian:/home/debian/osmo-remsim# automake configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found. configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE, configure.ac: that aclocal.m4 is present in the top-level directory, configure.ac: and that aclocal.m4 was recently regenerated (using aclocal) configure.ac:25: error: required file './install-sh' not found configure.ac:25: 'automake --add-missing' can install 'install-sh' contrib/systemd/Makefile.am:3: error: HAVE_SYSTEMD does not appear in AM_CONDITIONAL doc/manuals/Makefile.am:6: error: BUILD_MANUALS does not appear in AM_CONDITIONAL src/Makefile.am:2: error: BUILD_BANKD does not appear in AM_CONDITIONAL src/Makefile.am:5: error: BUILD_SERVER does not appear in AM_CONDITIONAL src/Makefile.am:15: error: Libtool library used but 'LIBTOOL' is undefined src/Makefile.am:15: The usual way to define 'LIBTOOL' is to add 'LT_INIT' src/Makefile.am:15: to 'configure.ac' and run 'aclocal' and 'autoconf' again. src/Makefile.am:15: If 'LT_INIT' is in 'configure.ac', make sure src/Makefile.am:15: its definition is in aclocal's search path. src/Makefile.am: error: required file './depcomp' not found src/Makefile.am: 'automake --add-missing' can install 'depcomp' /usr/share/automake-1.16/am/depend2.am: error: am__fastdepCC does not appear in AM_CONDITIONAL /usr/share/automake-1.16/am/depend2.am: The usual way to define 'am__fastdepCC' is to add 'AC_PROG_CC' /usr/share/automake-1.16/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again /usr/share/automake-1.16/am/depend2.am: error: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.16/am/depend2.am: The usual way to define 'AMDEP' is to add one of the compiler tests /usr/share/automake-1.16/am/depend2.am: AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX, /usr/share/automake-1.16/am/depend2.am: AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC /usr/share/automake-1.16/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again src/bankd/Makefile.am:15: warning: source file '../slotmap.c' is in a subdirectory, src/bankd/Makefile.am:15: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. src/bankd/Makefile.am:15: warning: source file '../rspro_client_fsm.c' is in a subdirectory, src/bankd/Makefile.am:15: but option 'subdir-objects' is disabled src/bankd/Makefile.am:15: warning: source file '../debug.c' is in a subdirectory, src/bankd/Makefile.am:15: but option 'subdir-objects' is disabled src/client/Makefile.am:15: error: BUILD_CLIENT_IFDHANDLER does not appear in AM_CONDITIONAL src/client/Makefile.am:31: error: BUILD_CLIENT_ST2 does not appear in AM_CONDITIONAL src/client/Makefile.am:21: error: Libtool library used but 'LIBTOOL' is undefined src/client/Makefile.am:21: The usual way to define 'LIBTOOL' is to add 'LT_INIT' src/client/Makefile.am:21: to 'configure.ac' and run 'aclocal' and 'autoconf' again. src/client/Makefile.am:21: If 'LT_INIT' is in 'configure.ac', make sure src/client/Makefile.am:21: its definition is in aclocal's search path. src/client/Makefile.am:22: warning: source file '../rspro_client_fsm.c' is in a subdirectory, src/client/Makefile.am:22: but option 'subdir-objects' is disabled src/client/Makefile.am:22: warning: source file '../debug.c' is in a subdirectory, src/client/Makefile.am:22: but option 'subdir-objects' is disabled src/client/Makefile.am:9: warning: source file '../rspro_client_fsm.c' is in a subdirectory, src/client/Makefile.am:9: but option 'subdir-objects' is disabled src/client/Makefile.am:9: warning: source file '../debug.c' is in a subdirectory, src/client/Makefile.am:9: but option 'subdir-objects' is disabled src/client/Makefile.am:33: warning: source file '../rspro_client_fsm.c' is in a subdirectory, src/client/Makefile.am:33: but option 'subdir-objects' is disabled src/client/Makefile.am:33: warning: source file '../debug.c' is in a subdirectory, src/client/Makefile.am:33: but option 'subdir-objects' is disabled src/rspro/Makefile.am:150: error: Libtool library used but 'LIBTOOL' is undefined src/rspro/Makefile.am:150: The usual way to define 'LIBTOOL' is to add 'LT_INIT' src/rspro/Makefile.am:150: to 'configure.ac' and run 'aclocal' and 'autoconf' again. src/rspro/Makefile.am:150: If 'LT_INIT' is in 'configure.ac', make sure src/rspro/Makefile.am:150: its definition is in aclocal's search path. src/server/Makefile.am:11: warning: source file '../rspro_util.c' is in a subdirectory, src/server/Makefile.am:11: but option 'subdir-objects' is disabled src/server/Makefile.am:11: warning: source file '../slotmap.c' is in a subdirectory, src/server/Makefile.am:11: but option 'subdir-objects' is disabled src/server/Makefile.am:11: warning: source file '../debug.c' is in a subdirectory, src/server/Makefile.am:11: but option 'subdir-objects' is disabled root@debian:/home/debian/osmo-remsim# make root@debian:/home/debian/osmo-remsim# autoconf configure.ac:10: error: possibly undefined macro: AM_INIT_AUTOMAKE If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:48: error: possibly undefined macro: AM_CONDITIONAL
Back with my original problem - the client connects to remsim-server, the bankd mapping is fine, but when the phone starts up, the bankd logs that it keeps resetting the reader and the client can't read data.
So, this is what the client outputs (quite aggressively): DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x0, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 01 00 00 00 00 00 01 01 0a 80 25 00 00 DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x1, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 03 00 00 00 00 00 01 01 0a 80 25 00 00 DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x3, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 02 00 00 00 00 00 01 01 0a 80 25 00 00 DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x2, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 00 00 00 00 00 00 01 01 0a 80 25 00 00 DST2 INFO user_simtrace2.c:180 SIMtrace IRQ STATUS: flags=0x0, fi=1, di=1, wi=10 wtime=9600 DST2 INFO user_simtrace2.c:193 SIMtrace IRQ 01 04 00 00 00 00 15 00 01 00 00 00 00 00 01 01 0a 80 25 00 00
and bankd keeps resetting the card reader (I used a different one this time): 002 CONN_CLIENT_MAPPED_CARD] Resetting card in 'OMNIKEY' (cold reset) Aug 01 13:44:04 rpi-cardem-1 osmo-remsim-bankd[1138]: 1142 DBANKDW INFO bankd_pcsc.c:288 [003 CONN_CLIENT_MAPPED_CARD] SCardReconnect: OK Aug 01 13:44:04 rpi-cardem-1 osmo-remsim-bankd[1138]: 1142 DBANKDW INFO bankd_pcsc.c:198 [003 CONN_CLIENT_MAPPED_CARD] SCardStatus: OK Aug 01 13:44:04 rpi-cardem-1 osmo-remsim-bankd[1138]: 1142 DBANKDW INFO bankd_pcsc.c:200 [003 CONN_CLIENT_MAPPED_CARD] Card ATR: 3b9f96801fc78031e073fe2113679807021001010154 Aug 01 13:44:04 rpi-cardem-1 osmo-remsim-bankd[1138]: 1142 DBANKDW INFO bankd_main.c:749 [003 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=PRESENT, CLK=INACTIVE) Aug 01 13:44:04 rpi-cardem-1 osmo-remsim-bankd[1138]: 1142 DBANKDW INFO bankd_main.c:749 [003 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=PRESENT, CLK=ACTIVE) Aug 01 13:44:04 rpi-cardem-1 osmo-remsim-bankd[1138]: 1142 DBANKDW INFO bankd_main.c:749 [003 CONN_CLIENT_MAPPED_CARD] Rx RSPRO clientSlotStatusInd(RST=INACTIVE, VCC=ABSENT, CLK=ACTIVE) Aug 01 13:44:04 rpi-cardem-1 osmo-remsim-bankd[1138]: 1142 DBANKDW INFO bankd_pcsc.c:284 [003 CONN_CLIENT_MAPPED_CARD] Resetting card in 'OMNIKEY' (cold reset)
After a long wait, the phone seems to time out reading the SIM and starts displaying there is no SIM inserted.
Any clue what could be going on? pcsc_scan reports the reader as: HID Global OMNIKEY 3x21 Smart Card Reader [OMNIKEY 3x21 Smart Card Reader] Thanks
On Wed, Jul 19, 2023 at 5:52 AM gmaillee@126.com wrote:
I also need your help, I git osmo-remsim to my linux computer. but i don't know how to make can you give me some help root@debian:/home/debian/osmo-remsim# automake configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found. configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE, configure.ac: that aclocal.m4 is present in the top-level directory, configure.ac: and that aclocal.m4 was recently regenerated (using aclocal) configure.ac:25: error: required file './install-sh' not found configure.ac:25: 'automake --add-missing' can install 'install-sh' contrib/systemd/Makefile.am:3: error: HAVE_SYSTEMD does not appear in AM_CONDITIONAL doc/manuals/Makefile.am:6: error: BUILD_MANUALS does not appear in AM_CONDITIONAL src/Makefile.am:2: error: BUILD_BANKD does not appear in AM_CONDITIONAL src/Makefile.am:5: error: BUILD_SERVER does not appear in AM_CONDITIONAL src/Makefile.am:15: error: Libtool library used but 'LIBTOOL' is undefined src/Makefile.am:15: The usual way to define 'LIBTOOL' is to add 'LT_INIT' src/Makefile.am:15: to 'configure.ac' and run 'aclocal' and 'autoconf' again. src/Makefile.am:15: If 'LT_INIT' is in 'configure.ac', make sure src/Makefile.am:15: its definition is in aclocal's search path. src/Makefile.am: error: required file './depcomp' not found src/Makefile.am: 'automake --add-missing' can install 'depcomp' /usr/share/automake-1.16/am/depend2.am: error: am__fastdepCC does not appear in AM_CONDITIONAL /usr/share/automake-1.16/am/depend2.am: The usual way to define 'am__fastdepCC' is to add 'AC_PROG_CC' /usr/share/automake-1.16/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again /usr/share/automake-1.16/am/depend2.am: error: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.16/am/depend2.am: The usual way to define 'AMDEP' is to add one of the compiler tests /usr/share/automake-1.16/am/depend2.am: AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX, /usr/share/automake-1.16/am/depend2.am: AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC /usr/share/automake-1.16/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again src/bankd/Makefile.am:15: warning: source file '../slotmap.c' is in a subdirectory, src/bankd/Makefile.am:15: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. src/bankd/Makefile.am:15: warning: source file '../rspro_client_fsm.c' is in a subdirectory, src/bankd/Makefile.am:15: but option 'subdir-objects' is disabled src/bankd/Makefile.am:15: warning: source file '../debug.c' is in a subdirectory, src/bankd/Makefile.am:15: but option 'subdir-objects' is disabled src/client/Makefile.am:15: error: BUILD_CLIENT_IFDHANDLER does not appear in AM_CONDITIONAL src/client/Makefile.am:31: error: BUILD_CLIENT_ST2 does not appear in AM_CONDITIONAL src/client/Makefile.am:21: error: Libtool library used but 'LIBTOOL' is undefined src/client/Makefile.am:21: The usual way to define 'LIBTOOL' is to add 'LT_INIT' src/client/Makefile.am:21: to 'configure.ac' and run 'aclocal' and 'autoconf' again. src/client/Makefile.am:21: If 'LT_INIT' is in 'configure.ac', make sure src/client/Makefile.am:21: its definition is in aclocal's search path. src/client/Makefile.am:22: warning: source file '../rspro_client_fsm.c' is in a subdirectory, src/client/Makefile.am:22: but option 'subdir-objects' is disabled src/client/Makefile.am:22: warning: source file '../debug.c' is in a subdirectory, src/client/Makefile.am:22: but option 'subdir-objects' is disabled src/client/Makefile.am:9: warning: source file '../rspro_client_fsm.c' is in a subdirectory, src/client/Makefile.am:9: but option 'subdir-objects' is disabled src/client/Makefile.am:9: warning: source file '../debug.c' is in a subdirectory, src/client/Makefile.am:9: but option 'subdir-objects' is disabled src/client/Makefile.am:33: warning: source file '../rspro_client_fsm.c' is in a subdirectory, src/client/Makefile.am:33: but option 'subdir-objects' is disabled src/client/Makefile.am:33: warning: source file '../debug.c' is in a subdirectory, src/client/Makefile.am:33: but option 'subdir-objects' is disabled src/rspro/Makefile.am:150: error: Libtool library used but 'LIBTOOL' is undefined src/rspro/Makefile.am:150: The usual way to define 'LIBTOOL' is to add 'LT_INIT' src/rspro/Makefile.am:150: to 'configure.ac' and run 'aclocal' and 'autoconf' again. src/rspro/Makefile.am:150: If 'LT_INIT' is in 'configure.ac', make sure src/rspro/Makefile.am:150: its definition is in aclocal's search path. src/server/Makefile.am:11: warning: source file '../rspro_util.c' is in a subdirectory, src/server/Makefile.am:11: but option 'subdir-objects' is disabled src/server/Makefile.am:11: warning: source file '../slotmap.c' is in a subdirectory, src/server/Makefile.am:11: but option 'subdir-objects' is disabled src/server/Makefile.am:11: warning: source file '../debug.c' is in a subdirectory, src/server/Makefile.am:11: but option 'subdir-objects' is disabled root@debian:/home/debian/osmo-remsim# make root@debian:/home/debian/osmo-remsim# autoconf configure.ac:10: error: possibly undefined macro: AM_INIT_AUTOMAKE If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:48: error: possibly undefined macro: AM_CONDITIONAL
First of all, I don't think it's a problem with the card reader, because your previous card reader can read the sim card. That means there is nothing wrong with the card reader. Secondly, I think the problem may appear on the fpc, because the previous sim card is a large card, and the current sim card is a small card. Are their pins adjusted? I'm not sure about this, According to the pin definition on the schematic diagram, combined with the pin definition of the existing sim card, compared with the pcb of the fpc, there may be new discoveries. I keep feeling like my fpc and phone link pins are misaligned. This is my personal feeling, of course, the premise is that there is nothing wrong with my server configuration. I also tried to test it with a linux. Can you tell me how you tested it?