0
\$\begingroup\$

I need to store data in a sim card using one device, then another device needs to access that data. They do not ever need to use it at the same time. A question was asked about this a few years ago but it was misunderstood and closed without a full answer. One person said it was complicated, but that was it. I was thinking to just break the lines from the SIM card and stick in some kind of MUX/switch that will select whether it gets connected to one or the other. But I'm worried there might be more to consider that I'm not anticipating. Has anyone done this?

\$\endgroup\$
4
  • \$\begingroup\$ what kind of information are you storing and reading from the SIM card? How much control do you have over what each device does with the card? In general, no, it doesn't work like you want it to, but maybe there's ways around that. \$\endgroup\$ Commented Dec 15, 2020 at 17:30
  • 3
    \$\begingroup\$ what is preventing the devices from communicating directly? .... is it really a SIM card that you want to share? \$\endgroup\$
    – jsotola
    Commented Dec 15, 2020 at 17:31
  • 4
    \$\begingroup\$ Exactly, let the two devices talk and one can "own" the sim with the data and, on request, pass that data to the non-sim-card-owner. Sounds like an XY problem - state the requirements and not the solution you think might work. \$\endgroup\$
    – Andy aka
    Commented Dec 15, 2020 at 17:37
  • \$\begingroup\$ There are a lot of "if you are doing this or that" type comments and answers, and rightfully so. I think you and other readers are better served if you could clarify what the goal is. If you are testing a device using a SIM it's one thing, if you are exchanging data it's another, and if you intend to connect to the network it could be problematic but not necessarily so. Lot's of people here can help, but we need more info, lest this question also get closed for lack of scope. \$\endgroup\$
    – P2000
    Commented Dec 15, 2020 at 18:40

1 Answer 1

1
\$\begingroup\$

There is no technical reason you can't implement this. The sim card is a basic eeprom like device. Placing each of the data and reset lines on a mux and sharing the ground on the devices would be enough. You may also need to set the card insert detection pin on a mux as well.

The problem is when you dont have control of the two devices. If you can't control how the device reacts to random disconnections of the card between or during a write/read, or how it reacts to delayed communication, then it is not a feasible system.

Man in the middle sim card devices exist which do exactly what you want to do, like sim cloners and phone unlockers. The concept is simple but the implementation is where the hard part lies.

\$\endgroup\$
5
  • \$\begingroup\$ If you are designing both devices then there is better methods of passing data between them than a sim card. \$\endgroup\$
    – Passerby
    Commented Dec 15, 2020 at 18:36
  • \$\begingroup\$ A SIM card is not an "EEPROM-like device", at all. It's a full microcontroller, often even running a JVM, and the host device and the SIM application running on that microcontroller talk a lengthily specified, complex protocol. Talking to a SIM card is more like ssh'ing into a remote host to do things on a shell than accessing memory. \$\endgroup\$ Commented Dec 15, 2020 at 22:20
  • \$\begingroup\$ I really recommend spending 45 min watching through this talk of Harald Welte, where he explains what a SIM card does, how it interfaces to the rest of the world. You can't simply clone SIMs! \$\endgroup\$ Commented Dec 15, 2020 at 22:24
  • \$\begingroup\$ @marcus someone should correct the IEEE ieeexplore.ieee.org/document/1004360 ieeexplore.ieee.org/document/8428876 ieeexplore.ieee.org/document/6693458 \$\endgroup\$
    – Passerby
    Commented Dec 16, 2020 at 1:42
  • \$\begingroup\$ That's an attack; that's not just reading out an "eeprom-like device" and copying its content to another one. And SIM card attacks aren't new ("new" as in "2013", more like 1992); you have to convince the micrcocontroller to give out the cryptographic secret that it's not supposed to give out, but only to use internally (on the SIM card itself!) to prove that it has that secret. You really never read out any content of the SIM card, you ask the SIM card software to give you some datum, or cryptographically sign/decrypt/encrypt something/derive a key. Where it takes that data is up to the SIM \$\endgroup\$ Commented Dec 16, 2020 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.