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:
Querying the lock state:
Querying the battery capacity:
Querying the signal quality:
If you wanna use double quote in an AT command, you have to escape it like in C language (\”), eg.:
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’):
Sending command to modem: AT
Sending command to modem: AT+XGENDATA
The source code of sendmodem is here:
#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.
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
# igsm -c AT+CPBS?
> ATE0 – set echo OFF
> AT+CPIN? – SIM requires PIN ?
< +CPIN: READY
< +CPBS: “SM”,34,150
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: