I would like to programmatically access an STK (SIM Application Toolkit) application without using my handset. GSM modem and/or handset is attached to my PC via USB and/or RS232 connection. I'm looking to automate interaction with the STK application. To this end, I have no idea whatsoever regarding ways of accomplishing this operation. Any assistance will be highly appreciated.
Thanks.
The STK as in Sim-Tool-Kit, is actually available in the source code for AOSP. It can be found under packages/apps/Stk , so it would be a matter of taking the source from that and modify to suit your needs. You can modify it all you want, but you'll never get it to run on a standard non-rooted consumer device.
The SIM Toolkit (STK) is a set of commands or applications that define how a SIM card interacts with the outside world. The toolkit, which is usually programmed into the SIM card, enables the card to: Drive mobile equipment interface. Build up interaction between the network application and end user.
SIM Application Toolkit (STK) is a standard of the GSM system which enables the subscriber identity module (SIM card) to initiate actions which can be used for various value-added services.
This can be done by using AT commands like AT+STGI & AT+STGR. AT+STGI is used to open the SIM menu & AT+STGR to select the menu. This can also be done prorammatically using Serial Port Interface to GSM Modem.
Please note, different manufacturers have different AT commands to access the STK functions. And, not all of the devices are supporting the running of STK applications. So far i've managed to get ZTE MF100 working: After opening, the following commands come handy:
AT+ZSTM // select STK app (initialize, lists the available options in return)
AT+ZSELM=1 // select the first main menuentry (you will get the submenu options as return)
AT+ZSELI=1 // select the first submenu entry (you will get some response as well)
AT+ZINPR=2,1234567890 // this is a response, in my case i had to send a phone number. the first parameter means "numeric only", setting this to 0 will allow any characters (from the standard SMS charset)
AT+ZINPR=1,1 // this is a confirmation response (first parameter=1 means yes/no answer, second is the parameter, yes in this case)
AT+ZBK=0 // return to the main menu
You should open the /dev/ttyUSBx non-blocking, and poll the input for data, as the modem is not only answering your requests, but also sends status updates to your client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With