Project

General

Profile

Issue #1909

Issue #1980: Meta bug for the SIM cards not being recognized

Old French SFR SIM with PIN code setup card not detected

Added by Denis 'GNUtoo' Carikli over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
SIM card not recognized
Target version:
Start date:
02/06/2019
Due date:
% Done:

0%

Estimated time:
Spent time:
Resolution:
fixed
Device:
Grant:
Type of work:

Description

I've found a SIM card that isn't detected by libsamsung-ipc:
  • On the Galaxy S 2 (i9100) with libsamsung-ril and libsamsung-ipc, the card "isn't detected"
  • On an HTC Dream, it asks for a PIN.

As I don't know if the issue is the same than the other ones, and that I can easily reproduce it, I started looking at it from scratch and gathered logs on the Galaxy S2 both with this sim and another SIM that is working and that was setup to ask for a PIN code.

I've also removed the STK Android application that is part of stock Replicant installation to look if it would work without, but it didn't. All the test mentioned below were carried out with the STK Android application removed.

I still need to look deeper in the relevant source code, but I found that the main differences between the working and the non-working SIM card were:
  • The non-working SIM card sends proactive Sim Toolkit commands, which were observed with simtrace and through libsamsung-ipc logging: libsamsung-ipc/samsung-ril receive a IPC_SAT_PROACTIVE_CMD command very early on and continue sending one or more of such commands.
  • With the non-working SIM card, the Android framework didn't manage to retrieve the SIM ID, whereas that sim ID can clearly be found in the logs gathered with simtrace. After trying to get the SIM ID, with the working SIM card, we have "insertedSimCount = 1" in the logs whereas with the nonworking we have: "insertedSimCount = 0"

Files

good-orange-sim-no-stk-app-with-simtrace_until-sim-pin.pcap.pcapng.gz (80.3 KB) good-orange-sim-no-stk-app-with-simtrace_until-sim-pin.pcap.pcapng.gz Denis 'GNUtoo' Carikli, 02/06/2019 08:00 PM
good-orange-sim-no-stk-app-with-simtrace_until-sim-pin.log (305 KB) good-orange-sim-no-stk-app-with-simtrace_until-sim-pin.log Denis 'GNUtoo' Carikli, 02/06/2019 08:01 PM
bad-sfr-sim-no-stk-app-with-simtrace.pcap.pcapng.gz (72.7 KB) bad-sfr-sim-no-stk-app-with-simtrace.pcap.pcapng.gz Denis 'GNUtoo' Carikli, 02/06/2019 08:01 PM
bad-sfr-sim-no-stk-app-with-simtrace.log (278 KB) bad-sfr-sim-no-stk-app-with-simtrace.log Denis 'GNUtoo' Carikli, 02/06/2019 08:02 PM
maguro-takju-imm76i.pcapng.gz (1.55 KB) maguro-takju-imm76i.pcapng.gz Denis 'GNUtoo' Carikli, 04/26/2019 03:04 PM
maguro-takju-imm76i.log (44 KB) maguro-takju-imm76i.log Denis 'GNUtoo' Carikli, 04/26/2019 03:04 PM
maguro-replicant.pcapng.gz (1.54 KB) maguro-replicant.pcapng.gz Denis 'GNUtoo' Carikli, 04/26/2019 03:05 PM
maguro-replicant.log (235 KB) maguro-replicant.log Denis 'GNUtoo' Carikli, 04/26/2019 03:05 PM
maguro-takju-imm76i.pcapng.gz (1.49 KB) maguro-takju-imm76i.pcapng.gz Denis 'GNUtoo' Carikli, 04/26/2019 03:34 PM
maguro-takju-imm76i.log (41.8 KB) maguro-takju-imm76i.log Denis 'GNUtoo' Carikli, 04/26/2019 03:34 PM
maguro-replicant-4.2.log (101 KB) maguro-replicant-4.2.log Denis 'GNUtoo' Carikli, 07/31/2019 12:24 PM
radio_maguro_master_23_sept_2019.log (129 KB) radio_maguro_master_23_sept_2019.log Denis 'GNUtoo' Carikli, 09/23/2019 03:29 PM

Also available in: Atom PDF