User:Jebba/Ofono

(:P)
(Thanks)
 
(4 intermediate revisions not shown)
Line 1: Line 1:
 +
=Using oFono on N900=
 +
The ofono package is now in extras-devel, so just install it via that.
 +
 +
==Starting for first time==
 +
To start the first time, reboot, or run:
 +
 +
sudo gainroot
 +
 +
/etc/init.d/ofono start
 +
 +
==Start on boot (or not)==
 +
It appears oFono will start on boot. If you *don't* want this, run:
 +
 +
sudo gainroot
 +
 +
update-rc.d -f ofono remove
 +
 +
==Test==
 +
To see if you can communicate with the device (*not* as root):
 +
 +
dbus-send --system --print-reply --dest=org.ofono /isimodem0  org.ofono.Modem.GetProperties
 +
 +
==f1rst call==
 +
To make a call, run this as root:
 +
 +
dbus-send --print-reply --system --dest=org.ofono /isimodem0 org.ofono.VoiceCallManager.Dial string:"5551212" string:""
 +
 +
==More to come==
 +
An early first taste, have fun!
 +
 +
==See also==
 +
* [http://talk.maemo.org/showthread.php?t=39400 oFono thread on talk]
 +
 +
* [http://lists.maemo.org/pipermail/maemo-developers/2010-January/023450.html thread on maemo-devel]
 +
 +
=Using oFono in Pass thru mode=
 +
You probably don't want to use this mode if you just want to use oFono on N900 to make calls.
 +
 +
In this mode, you use a laptop that connect to your N900 via USB. This is kind of pointless "now" that oFono is working directly on the device, but perhaps there is a thing or two that can be done this way that can't be done directly (such as SMS ???).
 +
* Quick and dirty.
* Quick and dirty.
* [http://ofono.org/ oFono] website.
* [http://ofono.org/ oFono] website.
-
=Build ofono=
+
==Build ofono==
On laptop.
On laptop.
Line 17: Line 57:
-
=modem.conf=
+
==modem.conf==
On laptop.
On laptop.
Line 27: Line 67:
  Baud=115200
  Baud=115200
-
=dbus=
+
==dbus==
On laptop.
On laptop.
Line 39: Line 79:
-
=Connect N900=
+
==Connect N900==
Plug in fone to laptop via USB. Select "PC Suite" mode.
Plug in fone to laptop via USB. Select "PC Suite" mode.
-
=ofonod=
+
==ofonod==
On laptop.
On laptop.
Line 56: Line 96:
-
=enable modem=
+
==enable modem==
On laptop, in different xterm as the ofonod is happily running in other xterm.
On laptop, in different xterm as the ofonod is happily running in other xterm.
Line 67: Line 107:
You can watch the fun go by in the other terminal.
You can watch the fun go by in the other terminal.
-
=Make f1rst fone call=
+
==Make f1rst fone call==
On laptop.
On laptop.
Line 74: Line 114:
  ./test/test-voicecall 5551212
  ./test/test-voicecall 5551212
-
=Chill=
+
==Chill==
Ok, so that works. Now you can try some other scripts in test/
Ok, so that works. Now you can try some other scripts in test/
-
=dbus-send=
+
==dbus-send==
Here's a few dbus sends, I've only tested one so far.
Here's a few dbus sends, I've only tested one so far.
Line 112: Line 152:
=Thanks=
=Thanks=
-
Much thanks to zhenhua1 in #ofono for his help :)
+
Much thanks to zhenhua in #ofono for his help and to Aki Niemi for N900 packages and hints.

Latest revision as of 01:56, 9 January 2010

Contents

[edit] Using oFono on N900

The ofono package is now in extras-devel, so just install it via that.

[edit] Starting for first time

To start the first time, reboot, or run:

sudo gainroot

/etc/init.d/ofono start

[edit] Start on boot (or not)

It appears oFono will start on boot. If you *don't* want this, run:

sudo gainroot

update-rc.d -f ofono remove

[edit] Test

To see if you can communicate with the device (*not* as root):

dbus-send --system --print-reply --dest=org.ofono /isimodem0  org.ofono.Modem.GetProperties

[edit] f1rst call

To make a call, run this as root:

dbus-send --print-reply --system --dest=org.ofono /isimodem0 org.ofono.VoiceCallManager.Dial string:"5551212" string:""

[edit] More to come

An early first taste, have fun!

[edit] See also

[edit] Using oFono in Pass thru mode

You probably don't want to use this mode if you just want to use oFono on N900 to make calls.

In this mode, you use a laptop that connect to your N900 via USB. This is kind of pointless "now" that oFono is working directly on the device, but perhaps there is a thing or two that can be done this way that can't be done directly (such as SMS ???).

  • Quick and dirty.

[edit] Build ofono

On laptop.

Check build deps, and make sure your ./bootstrap-configure finds them all.

git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git

cd ofono

./bootstrap-configure

make


[edit] modem.conf

On laptop.

You need a modem.conf file like this. I put it in /etc/ofono/modem.conf and /usr/local/etc/ofono/modem.conf... (havent confirmed which it's using, depends if you make install or not i think).

[atgen]
Driver=atgen
Device=/dev/ttyACM0
Baud=115200

[edit] dbus

On laptop.

If not doing make install, you'll need to copy this file over:

cd ofono

cp -p ./src/ofono.conf /etc/dbus-1/system.d/ofono.conf
  • You then need to reload dbus. Reboot is a lame way to restart it. Heh. Or reload messagebus or whatever.


[edit] Connect N900

Plug in fone to laptop via USB. Select "PC Suite" mode.

[edit] ofonod

On laptop.

Run this as root:

cd ofono

export OFONO_AT_DEBUG=1

./src/ofonod -nd

Now ofonod daemon is running, so you can watch wtf is going on in that xterm.


[edit] enable modem

On laptop, in different xterm as the ofonod is happily running in other xterm.

DO *NOT* run this as root. Run as regular user:

cd ofono

./test/enable-modem

You can watch the fun go by in the other terminal.

[edit] Make f1rst fone call

On laptop.

DO *NOT* run this as root. Run as regular user, substituing 5551212 for who you want to call:

./test/test-voicecall 5551212

[edit] Chill

Ok, so that works. Now you can try some other scripts in test/

[edit] dbus-send

Here's a few dbus sends, I've only tested one so far.

ofono-dial

#!/bin/sh

sudo dbus-send --print-reply --system --dest=org.ofono /atgen0 org.ofono.VoiceCallManager.Dial string:"48990591" string:""

ofono-get-properties

#/bin/sh

sudo dbus-send --system --print-reply --dest=org.ofono /atgen0 org.ofono.Modem.GetProperties


ofono-get-properties-sms

#!/bin/sh

sudo dbus-send --system --print-reply --dest=org.ofono /atgen0 org.ofono.SmsManager.GetProperties

ofono-power-on

#!/bin/sh

 sudo dbus-send --system --type=method_call --print-reply \
 --dest=org.ofono  /atgen0 org.ofono.Modem.SetProperty string:"Powered" \
 variant:boolean:true


ofono-register

#!/bin/sh

sudo dbus-send --system --print-reply --type=method_call --dest=org.ofono /atgen0 org.ofono.NetworkRegistration.Register

[edit] Thanks

Much thanks to zhenhua in #ofono for his help and to Aki Niemi for N900 packages and hints.