User:Jebba/Ofono

(Using oFono in Pass thru mode)
(Using oFono on N900: threads)
Line 28: Line 28:
==More to come==
==More to come==
An early first taste, have fun!
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=
=Using oFono in Pass thru mode=

Revision as of 23:09, 8 January 2010

Contents

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

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.

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


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

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.


Connect N900

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

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.


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.

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

Chill

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

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

Thanks

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

)