Gsmd
From Openmoko
HaraldWelte (Talk | contribs) (→Usage of shell mode) |
HaraldWelte (Talk | contribs) (→Usage) |
||
Line 16: | Line 16: | ||
==== Usage of shell mode ==== | ==== Usage of shell mode ==== | ||
+ | |||
+ | Shell mode provides a simple text-based command interface for making voice calls. | ||
The shell mode can be started using | The shell mode can be started using | ||
Line 55: | Line 57: | ||
# Hangup | # Hangup | ||
RSTR=`OK' | RSTR=`OK' | ||
+ | </pre> | ||
+ | |||
+ | ==== Usage of atcmd mode ==== | ||
+ | |||
+ | The atcmd mode is a passthrough-mode. Passthrough means that it accepts [[GSM 07.07]] commands, passes them throough the daemon to the phone, and returns you the response. this is very useful for debugging. | ||
+ | |||
+ | The atcmd mode can be started using | ||
+ | |||
+ | libgsmd-tool -m atcmd | ||
+ | |||
+ | Usage is like in the following example: | ||
+ | |||
+ | <pre> | ||
+ | > src/util/libgsmd-tool -m atcmd | ||
+ | libgsm-tool - (C) 2006 by Harald Welte | ||
+ | This program is Free Software and has ABSOLUTELY NO WARRANTY | ||
+ | |||
+ | AT+CPAS | ||
+ | STR=`AT+CPAS' | ||
+ | RSTR=`+CPAS: 0' | ||
+ | AT+COPS=? | ||
+ | STR=`AT+COPS=?' | ||
+ | RSTR=`+COPS: (2,"E-Plus","E-Plus","26203"),(3,"o2 - de","o2 - de","26207"),(3,"Vodafone.de","Vodafone","26202"),(3,"T-Mobile D","TMO D","26201")' | ||
</pre> | </pre> |
Revision as of 23:53, 23 October 2006
Contents |
gsmd
gsmd is the GSM daemon running in background of the GTA01 phone, managing the actual 'phone' part of the phone :)
libgsmd
libgsmd is a library with C language API for application programs. Programs using this library can use the phone, e.g. make phone calls, receive incoming calls, register to the network, etc.
libgsmd-tool
libgsmd-tool is a small demo applicaiton that can be used to demonstrate the usage of the libgsmd API.
Usage
libgsmd-tool has multiple modes.
Usage of shell mode
Shell mode provides a simple text-based command interface for making voice calls.
The shell mode can be started using
libgsmd-tool -m shell
It can be used like in the following example:
> src/util/libgsmd-tool -m shell libgsm-tool - (C) 2006 by Harald Welte This program is Free Software and has ABSOLUTELY NO WARRANTY ? # A Answer incoming call D Dial outgoing number H Hangup call O Power On o Power Off R Register Netowrk O # EVENT: PIN request (type=1) Please enter PIN: 6582 R # EVENT: Netreg searching for network EVENT: Netreg registered (home network) D03024033902 # Dial 03024033902 H # Hangup RSTR=`OK' EVENT: Incoming call type=2! EVENT: Incoming call clip=`"03024033902"' EVENT: Incoming call type=2! A # Answer RSTR=`OK' H # Hangup RSTR=`OK'
Usage of atcmd mode
The atcmd mode is a passthrough-mode. Passthrough means that it accepts GSM 07.07 commands, passes them throough the daemon to the phone, and returns you the response. this is very useful for debugging.
The atcmd mode can be started using
libgsmd-tool -m atcmd
Usage is like in the following example:
> src/util/libgsmd-tool -m atcmd libgsm-tool - (C) 2006 by Harald Welte This program is Free Software and has ABSOLUTELY NO WARRANTY AT+CPAS STR=`AT+CPAS' RSTR=`+CPAS: 0' AT+COPS=? STR=`AT+COPS=?' RSTR=`+COPS: (2,"E-Plus","E-Plus","26203"),(3,"o2 - de","o2 - de","26207"),(3,"Vodafone.de","Vodafone","26202"),(3,"T-Mobile D","TMO D","26201")'