I have been asked to look into whether an application we have written ro PocketPC will work on an XDA device. It currently uses the PC/SC API to access a SIM card in a Cardman PCMCIA carrier. I need to find out if we can either use the PC/SC API to run GSM SIM commands to the SIM/USIM in the built in reader, e.g. reading files, unlocking the PIN, getting status, running the GSM or AUTH algorithm and retrieving results.
Is the PC/SC API supported? Are there equivalent functions in the RIL API? Where is some good documentation on low-level SIM card access in this environment?
Thanks,
Erik Tkal
the only method to communicate with SIM card is through the GSM modem's AT commands.
GSM modem's AT commands
Maybe you've got a quick hint - how I can use AT commands to milk the SIM card for its GSM triplets?
Related
The SD card erasure issue is really bugging a lot of us and I just read that
someone is experiencing SD card erasures in the XDA II!
Here is the post ( there are some unique characteristics):
http://xda-developers.com/forum/viewtopic.php?p=18204#18204
I would like to have a reality check on my "feeling" that these erasures happen because of code in the RIL and how the device recognizes the SD card.
Since the RIL function in PPC 2002 and 2003 function resides in the " RILGSM.DLL inside DEVICE.EXE, which is a process which is always active on Windows CE, PPC 2003 and 2004. For the application part another DLL called RIL.DLL is present which translates RIL API calls to device IOControl messages.This DLL in turn is used by higher level APIs such as CELLTCP.DLL (TAPI Service Provider), CCOREDRV.DLL (the SIM: and SMS: device driver) etc. The RIL.DLL itself sits on top of the serial port to the GSM Device (COM2.
It is possible that the RIL on our the new RSUs are creating a new ID for the SD aspects our XDAs. So has anyone compared the RSU, RLI from PPC 2002 and WM 2003?
I have been using tstril to monitor how the RIL can be of use, but I need some help 'cause I may be focusing on the wrong areas.
If we resolve this all our ROMs will be much more stable and we may even help the providers to release their ROMs officially! :roll:
Possible solution.
Ok, Sorry for the non techies here, but:
I hope someone at TMO or AT&T with RIL and RSU access can validate, test and correct this issue and save a lot of its customers the aggravation of lost data.
Since there are no SD card issues with non phone WM2003 editions. I figured the issue had to be related to the RIL and RSU. I used 6 devices with different ROMs and ran the same tests coming up with similar results with "erasures" happening when the RIL was updating itself.
Since I do not have access to the code and the API and do not want to reverse engineer the code and breach your IP. I am posting it here.
You can monitor RIL functions and calls by using a modified tstril found in this site.
The problem with SD erasure is caused when WM2003 RSU files are trying to share the same memory address, handles and I/O MRUs list calls the SD cards are using.
According to the patent on the RIL. The native RIL device will always superceed a PnP device(SD card, GPS and others), renaming it and causing the erasure of file allocation tables with certain cards. Albeit the files are still there the card seems erased and data is not accessible by current software.
This problem is compounded by of your native code that does the same thing within SMS and Bateery Monitor.
I tested this in PPC2002, WM2003 all versions to date. I have attached the the registry settings for PPC V3.0.12039 ( build 11178) with ROM v3.14.40 ENG, RSU 6.18, Protocol 324e4. In which no SD card erasures are occurring. Monitor how the RIL interfaces with the RSU on this and the issue should be resolved.
[HKEY_CURRENT_USER\Software\Microsoft\File Explorer]
"LastLocation"=dword:00000000
"LocalPath"="\\My Documents\\Templates"
"StorageCardPath"="\\Storage Card"
[HKEY_CURRENT_USER\Software\Microsoft\File Explorer\MenuMRU]
"MRUList"="bdac"
"b"="\\My Documents"
"c"="\\Windows\\Start Menu\\Programs"
"d"="\\Storage Card"
"a"="\\"
[HKEY_LOCAL_MACHINE\Drivers]
[HKEY_LOCAL_MACHINE\Drivers\Active]
[HKEY_LOCAL_MACHINE\Drivers\Active\29]
"Hnd"=dword:00097820
"Name"="DSK1:"
"ClientInfo"=dword:00000000
"Sckt"=dword:00000000
"PnpId"="UNKNOWN_MANUFACTURER-"
"Key"="Drivers\\PCMCIA\\SDCard"
[HKEY_LOCAL_MACHINE\Drivers\Active\08]
"Hnd"=dword:00078480
"Name"="RIL1:"
"ClientInfo"=dword:00000000
"Key"="Drivers\\BuiltIn\\RIL"
Hello!
As I understand it is possible to send commands to SIM with RIL_SendSimCmd (for example SAT commands)
Does anybody know, with what function I can read the SIM answer?
Hi,
please, i'm programming a tool in c# and i need to accede at the sim card to obtain the imei number. i have encountered a code to accede to the imei (in this forum), but is a c++ code.
http://forum.xda-developers.com/viewtopic.php?t=13455
is possible to accede to the sim imei number using c#? what?
regards
Hi,
I used this example and converted to C++ to read a hard drive serial. I think you could use this example (maybe) but change it so you read from the SIM and not the hard drive. I think the principles are the same, just go tot make sure you read from the SIM....
Cheers..
http://www.codeproject.com/csharp/hard_disk_serialno.asp
you have attached a harddisk at your pocket? :shock:
Hi, I'm using RIL to send APDU commands to SIM. It worked fine for HTCs, versions:
HTC S310
radio 4.1.13.20_02.41.90
HTC QTEK
radio 02.07.10
while I'm not receiving response data when sending an APDU commands on
HTC S730
radio 25.62.30.03H_1.58.17.02. The callback response handler only receives the status word, not the data
I guess this has something to do with the OEM custom implementation of RIL. Is there any way to have back the SIM data from ril, is it possible to intercept this data, override the RIL data receiver, or whatelse?
thx a lot
Antonio
Can you let me know what software you use to send ADPU to the SIM. thanks!
If I have understood your question, I'm developing an application on Windows mobile for pocket pc 5.0, using visual c++,
Hi, Antonio.
Can you give an example of code where you have access to sim card using apdu commands?
Hello, Antonio73. Have you ever solve the problem? I was interested in this problem too. I want to know how to send APDU command to SIM Card, can you help me ?
I need the manual cdma programming code of my htc ozone. I already try ##000000 and ##778 its now working do you have any idea what is the code?
Thanks,
You may need to Application Unlock your phone first. You can use SDA_AplicationUnlock
Run from PC when phone connected