PmgRiPhone of elite team has released a tool (sendmodem) to send command directly to iPhone modem. This is convenient. The tool uses /dev/tty.debug to communicate with modem, so you don’t have to turn off the communication center during the operations.
The command syntax is quite straight forward:
sendmodem “AT command”
Here are some examples:
Querying the baseband version:
sendmodem “AT+XGENDATA”Querying the lock state:
sendmodem “AT+XSIMSTATE=1″Querying the battery capacity:
sendmodem “AT+CBC”Querying the signal quality:
sendmodem “AT+CSQ”
If you wanna use double quote in an AT command, you have to escape it like in C language (\”), eg.:
sendmodem “AT+CLCK=\”PN\”,2″
For available AT commands, refer to ETS 300 642 documentation.
UPDATE: to check the bootloader version of your iPhone, enter the following command (equivalent to ‘bbupdater -v’):
sendmodem “AT+XGENDATA”
Example output:
Sending command to modem: AT
-.+
AT
OK
Sending command to modem: AT+XGENDATA
-..+
AT+XGENDATA
+XGENDATA: ”
“,
“DEV_ICE_MODEM_04.01.13_G”,
“EEP_VERSION:207″,
“EEP_REVISION:8″,
“BOOTLOADER_VERSION:3.9_M3S2″,1,0OK
The source code of sendmodem is here:
#include#include #include #include #include #include #include #include
UPDATE: Another proggie (igsm from Marcio’s iPhone Apps) has the similar functions (thanks Ais’ comment) or maybe more powerful, however, the igsm uses /dev/tty.baseband which means you have to turn off the communication center before using it, fortunately, igsm has options to do these jobs so you don’t have to enter the long ‘launchctl …’ lines manually.
The syntax:
usage: igsm [-p pin] [-c command ... -c command] [-l] [-L] [-u] [-d] [-v] [-r]
-p pin SIM pin (if needed)
-d dump IMEI IMSI …
-c cmd command to be executed (more than 1 is supported)
-l load commcenter
-L list all jobs loaded into launchd
-u unload commcenter
-r reset baseband
-m string modem init string
-M num max lines on any command
-v verbose mode
-vv verbose mode and hex dump
-h this help
-hh extended help
An example:
# igsm -c AT+CPBS?
Opened: /dev/tty.baseband
> ATE0 - set echo OFF
< OK> AT
< OK> AT+CPIN? - SIM requires PIN ?
< +CPIN: READY
< OK> AT+CPBS?
< +CPBS: “SM”,34,150
< OK
Done
Marcio’s site also has a native utility iToggle, which can be useful if you frequently switch on/off some of your services. The following is a screenshot of the application’s startup screen:

