gsmd is the GSM daemon running in background of the GTA01 phone, managing the actual 'phone' part of the phone :)

+

{{delete}}

−

=== Usage ===

+

{{warning|This page describes obsolete software. You most likely want to use the [[OpenmokoFramework]] these days!}}

−

gsmd is usually started as a daemon in background, but can be run in foreground mode for debugging.

+

[[gsmd]] is the [[GSM]] daemon running in background of an Openmoko phone, managing the traditional 'phone' parts (voice/sms/gprs communication links) of the phone.

−

The options can be queried like:

+

Further technical details and API documentation in progress, is available [[Gsmd/document |here]].

+

+

Note that this does not hold for phones running [[Om_2008.8]] - then gsmd has been replaced with [[Qtopia / Qt Extended on FreeRunner|Qtopia]]'s mobile stack. Installing gsmd and related tools will conflict with qpe and things may not work.

+

+

== Usage ==

+

+

=== On the phone ===

+

gsmd is usually started as a background daemon when booting by the /etc/init.d/gsmd script, in this case gsmd outputs debug messages to the file "/tmp/gsm.log" (stdout and stderr is redirected there).

+

+

For debugging purposes gsmd can be run in foreground mode, options can be queried like:

<pre>

<pre>

−

> src/gsmd/gsmd --help

+

> gsmd --help

gsmd - (C) 2006 by Harald Welte <laforge@gnumonks.org>

gsmd - (C) 2006 by Harald Welte <laforge@gnumonks.org>

This program is FREE SOFTWARE under the terms of GNU GPL

This program is FREE SOFTWARE under the terms of GNU GPL

Line 19:

Line 28:

-p dev --device dev Specify serial device to be used

-p dev --device dev Specify serial device to be used

-s spd --speed spd Specify speed in bps (9600,38400,115200,...)

-s spd --speed spd Specify speed in bps (9600,38400,115200,...)

+

-F --hwflow Hardware Flow Control (RTS/CTS)

+

-L --leak-report Leak Report of talloc memory allocator

-l file --logfile file Specify a logfile to log to

-l file --logfile file Specify a logfile to log to

</pre>

</pre>

−

If your GSM modem is attached to ttyUSB3, you can e.g. use:

+

−

gsmd -p /dev/ttyUSB3 -s 115200

+

+

If your GSM modem is attached to ttySAC0 (like in the [[:Category:Neo1973 Hardware | Neo1973]]), invoke it as e.g.:

+

> gsmd -p /dev/ttySAC0 -s 115200 -F

+

(baud rate seems to be autodetected by the modem)

+

+

In order to kill the actual gsmd process and then run gsmd with a separate logfile and in background, but not as daemon:

With recent [[uboot]] (svn > r2885), the gsm modem can be powered on and connected to uboot's serial console from uboot itself. Thus allowing the host PC to interact directly with the modem. Some notes about getting gsmd running in this manner is [[User:Miki/hosted_gsmd|here]].

== libgsmd ==

== libgsmd ==

Line 31:

Line 53:

== libgsmd-tool ==

== libgsmd-tool ==

−

libgsmd-tool is a small demo applicaiton that can be used to demonstrate the usage of the libgsmd API.

+

libgsmd-tool is a small demo application that can be used to demonstrate the usage of the libgsmd API.

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 is a passthrough-mode. Passthrough means that it accepts [[GSM 07.07]] commands, passes them through the daemon to the phone, and returns you the response. this is very useful for debugging.

The atcmd mode can be started using

The atcmd mode can be started using

Line 104:

Line 188:

</pre>

</pre>

+

== Network related functions ==

+

Operator selection functions were implemented and merged into SVN head[http://lists.openmoko.org/pipermail/gsmd-devel/2007-September/000216.html]:

Emulating/mocking the firmware, gsmd and libgsmd can be tested for functionality; on any machine.

+

See [[User:Kero|Kero's page]] or go directly to [http://chmeee.dyndns.org/om/testing_gsmd.html the (lib)gsmd testing page].

+

+

== State tracking ==

+

+

gsmd needs to do apropriate state tracking of the underlying GSM hardware. For many of the state transition we only get events from the GSM Modem, but don't have apropriate query commands. Thus, assuming gsmd runs all the time, applications can come and go, but still have an idea about the current state of the modem, even if they missed the initial state transitions.

+

+

Also, gsmd state tracking allows us to allow for safer interoperability of multiple applications. If i.e. one applications has just started an outgoing call, gsmd can detect another application who intends to interfere with that and deny access

With recent uboot (svn > r2885), the gsm modem can be powered on and connected to uboot's serial console from uboot itself. Thus allowing the host PC to interact directly with the modem. Some notes about getting gsmd running in this manner is here.

The atcmd mode is a passthrough-mode. Passthrough means that it accepts GSM 07.07 commands, passes them through the daemon to the phone, and returns you the response. this is very useful for debugging.

gsmd needs to do apropriate state tracking of the underlying GSM hardware. For many of the state transition we only get events from the GSM Modem, but don't have apropriate query commands. Thus, assuming gsmd runs all the time, applications can come and go, but still have an idea about the current state of the modem, even if they missed the initial state transitions.

Also, gsmd state tracking allows us to allow for safer interoperability of multiple applications. If i.e. one applications has just started an outgoing call, gsmd can detect another application who intends to interfere with that and deny access

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.