[RFC] HFP support into oFono and BlueZ
by Gustavo F. Padovan
Hi,
These patches implement the new API for the Audio Gateway in BlueZ. It
follows the last version of the HandsfreeGateway and HandsfreeAgent
Intefaces API.
The first two patches is for BlueZ and the other for oFono. You can
test it with using enable-modem and test-voicecall scripts into the
test dir of oFono.
Feel free to test it and send me your comments. We have some bugs yet.
The audio part is not working yet. We are going to work on pulseaudio
this week to get this done soon.
Regards,
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
8 years, 6 months
Enabling/disabling the GPS part of a Huawei EM770W
by Florian Mayer (Mayer Electronics)
Hello folks,
is it possible to enable / disable the GPS part of a Huawei EM770W 3G
modem through a DBUS command? It is done with the command AT^WPDGP and
AT^WPEND on the modem (tested it on PCUI port). Or is it possible to
send generic AT commands through DBUS?
Regards
Florian Mayer
9 years, 10 months
Using ofono HFP
by Moises Silva
Hi there,
Bluetooth newbie here, try to be gentle :-)
I am trying to use ofono HFP. But I am not having success so far.
I have Fedora release 13 in vmware fusion virtual machine (the host is a mac
book pro). When I connect my usb bluetooth adapter and bridge it to the vm,
bluez detects it just fine and I can see it with hciconfig.
hci0: Type: BR/EDR Bus: USB
BD Address: 00:15:83:15:A3:10 ACL MTU: 672:3 SCO MTU: 128:2
UP RUNNING PSCAN
RX bytes:4726 acl:46 sco:0 events:140 errors:0
TX bytes:1555 acl:74 sco:0 commands:39 errors:0
I can see my cell phone using "hcitool scan" and the HF Voice Gateway
service using "sdtool browse", the service is at channel 4.
The information retrieved from my cell is:
root@fedora test # hcitool info 00:1D:28:4B:9A:A8
Requesting information ...
BD Address: 00:1D:28:4B:9A:A8
Device Name: Moycell
LMP Version: 1.2 (0x2) LMP Subversion: 0x41c
Manufacturer: Philips Semiconductors (37)
Features: 0xff 0xed 0x8d 0xf8 0x1a 0x08 0x00 0x00
<3-slot packets> <5-slot packets> <encryption> <slot
offset>
<timing accuracy> <role switch> <hold mode> <sniff mode>
<park state> <channel quality> <SCO link> <HV3 packets>
<u-law log> <A-law log> <CVSD> <power control>
<transparent SCO> <broadcast encrypt> <enhanced iscan>
<interlaced iscan> <interlaced pscan> <inquiry with RSSI>
<extended SCO> <EV5 packets> <AFH cap. slave>
<AFH class. slave> <AFH cap. master>
I paired my cell phone using blueman utilities. I was able to transfer a
file from linux to the cell phone. The cell phone sees the hands free
service from linux, but, when I try to connect from my cell phone to Linux,
I get this in /var/log/messages:
Sep 26 08:29:56 fedora bluetoothd[19854]: link_key_request
(sba=00:15:83:15:A3:10, dba=00:1D:28:4B:9A:A8)
And I get a prompt from blueman asking me to allow the cell phone to
connect, I accept and after a few seconds the cell phone reports the
bluetooth connection as failed. Nothing in /var/log/messages.
ofono version is 0.28
Output of rpm -qa | grep bluez is:
bluez-compat-4.64-1.fc13.i686
bluez-libs-devel-4.64-1.fc13.i686
bluez-alsa-4.64-1.fc13.i686
bluez-libs-4.64-1.fc13.i686
pybluez-0.16-2.fc13.i686
bluez-4.64-1.fc13.i686
bluez-hcidump-1.42-4.fc12.i686
dbus version is dbus-1.2.24-1.fc13.i686
I decided both bluez and ofono from latest git sources (latest as of 2 days
ago), and the only difference is I get an additional error after the
link_key_request:
bluetoothd[14120]: audio/headset.c:rfcomm_io_cb() ERR or HUP on RFCOMM
socket
I was advised by padovan on IRC that I should try dbus >= 1.3 ... I am going
to try that today, I was putting that off cuz this seemed like a lower level
issue and upgrading dbus seemed like non-trivial since many things depend on
dbus and fedora 13 does not seem to include rpm for dbus >= 1.3
Can I somehow to try ofono connect to my cell and not the other way around?
A few days ago I tried the project "nohands" (
http://nohands.sourceforge.net/), which connect to the cell phone just fine
and I am able to place and receive calls, but since the project looks like
kind of dead I decided to give ofono a try because looks more active.
The final goal here is NOT use this with pulseaudio, but rather have access
to the SCO socket so I can manipulate the audio.
Any advice will be certainly welcomed,
--
Moises Silva
10 years, 4 months
Please comment on callhistory API
by rajyalakshmi bommaraju
Hello,
Attached Callhistory API , please send me your feedback on it, I will
extend this include SmsHistory once callhistory API looks good.
Thanks
Raji
Callhistory Adapter-Agent
CallHistoryAdapter is a built in plugin for ofono. It uses CallHistoryAgent api exposed by dialer or client daemon to push voice call history information to client. CallHistoryAgent api is an service interface exposed by client over dbus. Plugin exposes CallHistoryAdapter interface that CallHistoryAgent registers and unregisters with. if the CallHistoryAgent registers with Adapter then plugin pushes the history information to dialer as soon as it receives from ofono, otherwise it caches the data in a disk file until agent registers, once agent registers plugin will read the data from the disk file and pushes all the records to it.
Adapter:
it is going to register and unregister the agent. Calls the methods on the agent for delivering history information whent the agent is up and running. If the record cant be delivered that means agent method returns an error then it will be written to the disk file. If the agent is down it will persist history record in disk file.
CallHistoryAdapter hierarchy
============================
Service : org.ofono
Interface : org.ofono.CallHistoryAdapter
Object path : freely definable
Methods void RegisterAgent (objectpath)
RegisterAgent method registers the agent object path. Methods on this agent will be called if history needs to push data.
Possible Errors: [service].Error.InvalidArguments
[service].Error.InvalidFormat
[service].Error.InUse
void UnregisterAgent (objectpath)
UnregisterAgent method unregister the already registered agent object path.
Possible Errors: [service].Error.InvalidArguments
[service].Error.InvalidFormat
[service].Error.InUse
CallHistoryAgent hierarchy
==========================
Service Name : Unique Name
Interface : org.ofono.CallHistoryAgent
Objectpath : Freely definable
Methods void SendHistory(array {struct {uint32,uint32,uint8,uint32,uint32} })
This method gets called by ofono to deliver one record of voice call history.
Possible Errors: [service].Error.Unsuccessful
void SendCachedHistory(array {struct {uint32,uint32,uint8,uint32,uint32} })
This method gets called by the ofono when CallHistoryAgent starts running.
It delivers all the history records as an array of structures.
Possible Errors: [service].Error.Unsuccessful
void Release()
Cleans up agent, assumes that agent is already unregistered, so not needed to unregister.
CallHistory Record
================
CallHistoryRecord {
uint32 uid;
uint8 voicecalltype;
char lineid[20];
uint32 starttime;
uint32 endtime;
}
voicecalltype {
outgoing = 0,
incoming = 1,
missed = 2
}
10 years, 4 months
[PATCH 0/5] Patch Description
by Yang Gu
This series of patches are to handle send ss proactive command by splitting the path of D-Bus and stk request. In this version, only call-forwarding is handled, but others (call-barring, call-settings) would be quite similar.
Comments are welcome!
------
Yang Gu (5):
Add macro for general result and additional info
stk: Support send ss response
ss: Use function to judge if it's busy
ss: Use errno for ssc handling functions
cf: Handle send ss proactive command
src/call-barring.c | 71 ++++-------
src/call-forwarding.c | 327 ++++++++++++++++++++++++++++++++++++++++---------
src/call-settings.c | 44 +++----
src/ofono.h | 28 ++++
src/stk.c | 130 +++++++++++++++++++
src/stkutil.c | 2 +
src/stkutil.h | 23 ++++
src/ussd.c | 201 +++++++++++++++++++++++++++---
8 files changed, 673 insertions(+), 153 deletions(-)
--
1.7.2.3
10 years, 4 months
[PATCH v2 0/3] Patch Description
by Yang Gu
This series of patches fix the compilation problem, as well as some memory leak. But the main focus is to enable Qt script so that phonesim GUI can be controlled using JavaScript. In the meantime, D-Bus support is added for the sake of test automation.
Here are several examples:
1. call.js (stands for incoming call and copy it to /tmp/call/)
tabRegistration.gbIncomingCall.leCaller.text = "12345";
tabRegistration.gbIncomingCall.pbIncomingCall.click();
Then we set the path of script and run the script with its name
dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.SetPath string:/tmp/call
dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.Run string:call.js
Now we have simulated an incoming call.
2. sms.js (stands for incoming sms and copy it to /tmp/sms/)
tabSMS.gbMessage1.leMessageSender.text = "Yang";
tabSMS.gbMessage1.leSMSClass.text = "1";
tabSMS.gbMessage1.teSMSText.setPlainText("This message is sent automatically from phonesim");
tabSMS.gbMessage1.pbSendSMSMessage.click();
Then we do the similar things as first example:
dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.SetPath string:/tmp/sms
dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.Run string:sms.js
Now we have simulated an incoming sms.
3. Get the current path for script
dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.GetPath
4. Make script return some string
The string can be any string, number, bool, date, etc in JavaScript, but it couldn't be a object because of some side effect. Refer "QScriptValue Class Reference" for details.
For example, if you want to know the current incoming number, you may write a script as below:
// number.js
tabRegistration.gbIncomingCall.leCaller.text
After running the script the similar way as above, you may get the number.
By the way, you may need below file (/etc/dbus-1/system.d/phonesim.conf) so that phonesim can register its service in system bus:
<!-- This configuration file specifies the required security policies
for oFono core daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="root">
<allow own="org.phonesim"/>
<allow send_destination="org.phonesim"/>
</policy>
<policy at_console="true">
<allow send_destination="org.phonesim"/>
</policy>
<policy context="default">
<deny send_destination="org.phonesim"/>
</policy>
</busconfig>
Comments are welcome!
------------
Yang Gu (3):
Move def of class ControlWidget to header file
Some instances in ControlWidget need to be deleted
Enable Qt Script
Makefile.am | 5 +-
configure.ac | 2 +-
src/control.cpp | 165 ++++++++++++++++++++++++++++++++-----------------------
src/control.h | 106 +++++++++++++++++++++++++++++++++++-
4 files changed, 203 insertions(+), 75 deletions(-)
10 years, 4 months
[PATCH] Support -p and -P options with list of plugins
by Pekka.Pessi@nokia.com
From: Pekka Pessi <Pekka.Pessi(a)nokia.com>
---
src/main.c | 4 ++--
src/plugin.c | 38 +++++++++++++++++++++++++++-----------
2 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/src/main.c b/src/main.c
index 20bf0d7..9869ac8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -114,9 +114,9 @@ static GOptionEntry options[] = {
G_OPTION_ARG_CALLBACK, parse_debug,
"Specify debug options to enable", "DEBUG" },
{ "plugin", 'p', 0, G_OPTION_ARG_STRING, &option_plugin,
- "Specify plugins to load", "NAME" },
+ "Specify plugins to load", "NAME,..," },
{ "noplugin", 'P', 0, G_OPTION_ARG_STRING, &option_noplugin,
- "Specify plugins not to load", "NAME" },
+ "Specify plugins not to load", "NAME,..." },
{ "nodetach", 'n', G_OPTION_FLAG_REVERSE,
G_OPTION_ARG_NONE, &option_detach,
"Don't run as daemon in background" },
diff --git a/src/plugin.c b/src/plugin.c
index 159014b..68fe318 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -72,18 +72,26 @@ static gboolean add_plugin(void *handle, struct ofono_plugin_desc *desc)
}
static gboolean check_plugin(struct ofono_plugin_desc *desc,
- const char *pattern, const char *exclude)
+ char **patterns, char **excludes)
{
- if (exclude != NULL &&
- g_pattern_match_simple(exclude, desc->name) == TRUE) {
- ofono_info("Excluding %s", desc->description);
- return FALSE;
+ if (excludes) {
+ for (; *excludes; excludes++)
+ if (g_pattern_match_simple(*excludes, desc->name))
+ break;
+ if (*excludes) {
+ ofono_info("Excluding %s", desc->description);
+ return FALSE;
+ }
}
- if (pattern != NULL &&
- g_pattern_match_simple(pattern, desc->name) == FALSE) {
- ofono_info("Ignoring %s", desc->description);
- return FALSE;
+ if (patterns) {
+ for (; *patterns; patterns++)
+ if (g_pattern_match_simple(*patterns, desc->name))
+ break;
+ if (!*patterns) {
+ ofono_info("Ignoring %s", desc->description);
+ return FALSE;
+ }
}
return TRUE;
@@ -93,6 +101,8 @@ static gboolean check_plugin(struct ofono_plugin_desc *desc,
int __ofono_plugin_init(const char *pattern, const char *exclude)
{
+ gchar **patterns = NULL;
+ gchar **excludes = NULL;
GSList *list;
GDir *dir;
const gchar *file;
@@ -101,9 +111,15 @@ int __ofono_plugin_init(const char *pattern, const char *exclude)
DBG("");
+ if (pattern)
+ patterns = g_strsplit_set(pattern, ", ", -1);
+
+ if (exclude)
+ excludes = g_strsplit_set(exclude, ", ", -1);
+
for (i = 0; __ofono_builtin[i]; i++) {
if (check_plugin(__ofono_builtin[i],
- pattern, exclude) == FALSE)
+ patterns, excludes) == FALSE)
continue;
add_plugin(NULL, __ofono_builtin[i]);
@@ -139,7 +155,7 @@ int __ofono_plugin_init(const char *pattern, const char *exclude)
continue;
}
- if (check_plugin(desc, pattern, exclude) == FALSE) {
+ if (check_plugin(desc, patterns, excludes) == FALSE) {
dlclose(handle);
continue;
}
--
1.7.0.4
10 years, 4 months
[PATCH] smart_messaging: Remove interface on atom removal
by Aki Niemi
---
plugins/smart_messaging.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/plugins/smart_messaging.c b/plugins/smart_messaging.c
index fb44cc1..27f88e7 100644
--- a/plugins/smart_messaging.c
+++ b/plugins/smart_messaging.c
@@ -99,6 +99,9 @@ static void sms_watch(struct ofono_atom *atom,
g_dbus_unregister_interface(conn,
ofono_modem_get_path(sm->modem),
SMART_MESSAGING_INTERFACE);
+
+ ofono_modem_remove_interface(sm->modem,
+ SMART_MESSAGING_INTERFACE);
return;
}
--
1.7.0.4
10 years, 4 months
Additional info for failed SAT-Send USSD case
by Jeevaka Badrappan
Hi,
Following patch handles the SAT initiated Send USSD failure case.
As per the 3GPP 31.111 specification section 6.4.12, when a SAT initiated
Send USSD fails, error code from the network should be sent as
additional information(part of Result data). If no additional information
can be sent, then 0( No specific cause can be given) should be sent.
Due to the current limitations, this patch sends "No Specific cause can be
givent" to the SAT.
Regards,
jeevaka
10 years, 4 months
SMS agent interface
by Aki Niemi
Hi all,
This following set of patches introduces an agent interface for
receiving text messages as well as vCard and vCal objects. It grows a
pair of methods on the org.ofono.MessageManager interface for
registering and unregistering such agents.
I've included the patches introducing datagram support to history that
I sent out separately earlier today. I think these should be evaluated
as a bunch, plus, they introduced some refactoring to the sms atom's
dispatch logic that I didn't feel like redoing. ;)
Basically, all text(ish) messages can now be received via the agent
interface on the sms atom, and then further support for dispatching
handlers based on other dst/src port numbers would happen via the
history API.
An example of such a plugin would be a WAP push handler that would
handle the WAP push datagrams exposing an appropriate D-Bus interface
for applications to process them further.
What is still missing is sending support for vCard and vCalendar,
which for consistency should probably be implemented as a pair of
methods on the org.ofono.MessageManager interface.
Cheers,
Aki
--
Makefile.am | 2 +-
doc/message-api.txt | 51 ++++++++
include/dbus.h | 1 +
include/history.h | 5 +
src/history.c | 47 +++++++-
src/ofono.h | 8 ++
src/sms.c | 187 +++++++++++++++++++++++++---
src/smsagent.c | 344 +++++++++++++++++++++++++++++++++++++++++++++++++++
src/smsagent.h | 56 +++++++++
test/sms-agent | 59 +++++++++
10 files changed, 741 insertions(+), 19 deletions(-)
10 years, 4 months