giovedì 9 febbraio 2012

iPhone 4 - How to pass AT Commands (and make a voice call)

My goal is to send a call via iPhone shell using AT commands.

I installed minicom from Cydia (but I think you could use other programs to "speak" with the serial interface of the phone).
I refer to this page
for more infos.
I found problems on serial port setup, i tryed these interfaces with no luck :

/dev/debug
/dev/dlci.spi-baseband.extra_13

I had a look in /dev folder and I found these interfaces:

iPhone4:/dev root# ls /dev
aes_0 io8logmt tty.highland-park
bpf0 klog tty.iap
bpf1 mux.spi-baseband tty.umts
bpf2 null ttyp0
bpf3 pf ttyp1
btreset ptmx ttyp2
btwake ptyp0 ttyp3
console ptyp1 ttyp4
cu.bluetooth ptyp2 ttyp5
cu.debug ptyp3 ttyp6
cu.gas-gauge ptyp4 ttyp7
cu.gps ptyp5 ttyp8
cu.highland-park ptyp6 ttyp9
cu.iap ptyp7 ttypa
cu.umts ptyp8 ttypb
disk0 ptyp9 ttypc
disk0s1 ptypa ttypd
disk0s2 ptypb ttype
disk0s2s1 ptypc ttypf
dlci.spi-baseband.call ptypd ttys000
dlci.spi-baseband.chatty ptype uart.bluetooth
dlci.spi-baseband.cl1 ptypf uart.debug
dlci.spi-baseband.extra_0 random uart.gas-gauge
dlci.spi-baseband.iq rdisk0 uart.gps
dlci.spi-baseband.low rdisk0s1 uart.highland-park
dlci.spi-baseband.pdp_0 rdisk0s2 uart.iap
dlci.spi-baseband.pdp_1 rdisk0s2s1 uart.umts
dlci.spi-baseband.pdp_2 sha1_0 urandom
dlci.spi-baseband.pdp_3 tty vn0
dlci.spi-baseband.pdp_ctl tty.bluetooth vn1
dlci.spi-baseband.reg tty.debug zero
dlci.spi-baseband.sms tty.gas-gauge
io8log tty.gps


I found /dev/dlci.spi-baseband.extra_0 working fine but honestly I cannot ensure it work for you too.

You have to setup minicom to work properly,

iPhone4:/dev root# minicom -s

then chose "Serial port setup" and press A and edit the line of the serial device (for me was that):

A - Serial Device : /dev/dlci.spi-baseband.extra_0

Type esc and "Save setup as dfl", then exit and type

iPhone4:/dev root# minicom -w

to connect to the phone.
Then type AT, if you receive an "OK" answer all is fine otherwise check "serial port setup" setting.
To make a call to the 3931111111 number simply type:

atd3931111111;

and to hang call

ath

To get iccid number (sim serial number)
type:

at+ccid

To get imei number.

at+cgsn


That's all.

Nessun commento:

Posta un commento