[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
[PATCH 0/3] icon support
by Kristen Carlson Accardi
Changes from last version:
* changed caching algorithm for EFiidf files - now store all 256 byte
blocks in a single file
* made ofono_sim_read_bytes a public function
* various bug fixes
Kristen Carlson Accardi (3):
sim: read EFiidf
sim: Implement GetIcon
test: add get-icon script
include/sim.h | 4 +
src/sim.c | 525 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
test/get-icon | 25 +++
3 files changed, 542 insertions(+), 12 deletions(-)
create mode 100755 test/get-icon
--
1.7.2.1
10 years, 5 months
How to get the SMS stored in SIM card
by Huang, Ye
Hi
The SMS we receive is class 1, right? Where to find the SMS we receive which store in SIM through ofono API? Thanks.
Best regards,
Ye
10 years, 5 months
[sim-reset-pin-v2 0/3] pass reset password type to driver
by Pekka.Pessi@nokia.com
Hi all,
Here is a less controversial version of the SIM API change.
The reset password type is passed down to the driver.
The generic atmodem sim driver caches the pin type from last CPIN?, and if
it is not PUK, returns an error.
A quirk is added for mbm so it will try to trigger the +CPIN: SIM PUK/PUK2
response.
--Pekka
10 years, 5 months
[RFC] Add agent API to message atom
by Aki Niemi
---
doc/message-api.txt | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 97 insertions(+), 0 deletions(-)
diff --git a/doc/message-api.txt b/doc/message-api.txt
index 693a111..ce96315 100644
--- a/doc/message-api.txt
+++ b/doc/message-api.txt
@@ -26,6 +26,66 @@ Methods dict GetProperties()
Send the message in text to the number in to.
+ void RegisterTextAgent(object path, string match)
+
+ Registers an agent to receive messages.
+
+ The object path defines the path of the agent that
+ will be called when a message is ready to be
+ dispatched. The match parameter takes an optional
+ matching rule in a restricted subset of regular
+ expression syntax.
+
+ TODO: accepted regexp syntax. Perhaps only allow
+ simple match rules for the beginning and end of a
+ message, as well as a free text token match for the
+ entire message.
+
+ Possible Errors: [service].Error.InvalidArguments
+ [service].Error.InvalidFormat
+ [service].Error.InUse
+
+ void RegisterPushAgent(object path, string id)
+
+ Registers an agent to receive push messages.
+
+ The object path defines the path of the agent that
+ will be called when a push message is ready to be
+ dispatched. The id parameter takes an optional
+ WAP application ID that is used to match incoming
+ push messages.
+
+ Possible Errors: [service].Error.InvalidArguments
+ [service].Error.InvalidFormat
+ [service].Error.InUse
+
+ void RegisterApplicationAgent(object path, uint dest, uint src)
+
+ Registers an agent to receive application messages.
+
+ The object path defines the path of the agent that
+ will be called when an application message is ready
+ to be dispatched.
+
+ The dest parameter is the destination application
+ port number, and the src parameter is the optional
+ source application port number.
+
+ Possible Errors: [service].Error.InvalidArguments
+ [service].Error.InvalidFormat
+ [service].Error.InUse
+
+ void UnregisterAgent(object path)
+
+ Unregisters an agent. If no agent is registered
+ that matches the type of an arriving message, it is
+ silently dropped.
+
+ Possible Errors: [service].Error.InvalidArguments
+ [service].Error.InvalidFormat
+ [service].Error.NotFound
+ [service].Error.NotAuthorized
+
Signals PropertyChanged(string name, variant value)
This signal indicates a changed value of the given
@@ -64,3 +124,40 @@ Properties string ServiceCenterAddress
"ps-preferred" - Use CS if PS is unavailable
By default oFono uses "cs-preferred" setting.
+
+
+MessageAgent Hierarchy [experimental]
+===============
+
+Service unique name
+Interface org.ofono.MessageAgent
+Object path freely definable
+
+Methods void ImmediateMessage(string message, dict info)
+
+ New immediate (class 0) SMS received. Info has Sender,
+ LocalSentTime, and SentTime information. Sender
+ address is given in string format. LocalSentTime and
+ SentTime are given in string form using ISO8601 format.
+
+ void IncomingMessage(string message, dict info)
+
+ New incoming text SMS received. Info has Sender,
+ LocalSentTime, and SentTime information.
+
+ void IncomingPush(array{byte} message, dict info)
+
+ New incoming push message received. Info has Sender,
+ LocalSentTime, SentTime, and ApplicationId information.
+
+ void IncomingApplication(array{byte} message, dict info)
+
+ New incoming application message received. Info has
+ Sender, LocalSentTime, SentTime, DestinationPort, and
+ SourcePort information.
+
+ void Release()
+
+ Agent is being released, possibly because of oFono
+ terminating, the MessageManager interface being torn
+ down or modem powering down.
--
1.7.0.4
10 years, 5 months
[g_isi_send RFC 0/3] g_isi_send()
by Pekka.Pessi@nokia.com
Hi all,
I've added the function g_isi_send() to the gisi client API. It has been
modeled after g_at_chat_send(), in other words, it includes a GDestroyNotify
function.
The GDestroyNotify gets called after the sent request is complete (the
result cb returns TRUE or the request is canceled).
The latter two patches just show how to to use g_isi_send().
Now, to the evil parts:
In order to simplify the client code, the destroy notify is also called if
the request could not be sent successfully. In the same vein, if the opaque
data is NULL but destroy notify is non-NULL, the g_isi_send() just returns
NULL but does not set errno.
So, we can do something like
if (!g_isi_send(clnt, msg, len, resp_cb, isi_cb_data_new(cb, data), g_free))
CALLBACK_WITH_FAILURE(cb, data);
else
return;
--Pekka
10 years, 5 months
Clarification on USSD support in ofono
by Jeevaka.Badrappan@elektrobit.com
Hi,
Currently, oFono expects the USSD string in UTF-8. ofono(Atom driver -
AT or ISI) converts the UTF-8 string to GSM 7-bit default alphabet and
sends it to the network. In this way, we will always send the data
coding scheme as GSM 7-bit default alphabet or whatever the character
set modem is configured. Why are we not sending the USSD string with
DCS(Data coding scheme) as is to the network? There are USIM conformance
test cases which expects the DCS(Data coding scheme) and USSD string
sent as it is to the network. Also, as per the 3GPP TS 24.090, DCS and
USSD string are sent as part of UnstructuredSS-Request to the network
and MT is not expected to interpret the string. But ,here oFono doesn't
have the interface to accept DCS(Data coding scheme) and also it expects
the USSD string to be in UTF-8.
Thanks and Regards,
jeevaka
----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.
----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.
10 years, 5 months
[PATCH 1/2] Add --disable-n900modem to the configure script
by Pekka.Pessi@nokia.com
From: Pekka Pessi <Pekka.Pessi(a)nokia.com>
---
configure.ac | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index e834077..6c303f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,6 +140,13 @@ AC_ARG_ENABLE(isimodem, AC_HELP_STRING([--disable-isimodem],
[enable_isimodem=${enableval}])
AM_CONDITIONAL(ISIMODEM, test "${enable_isimodem}" != "no")
+AC_ARG_ENABLE(n900modem, AC_HELP_STRING([--disable-n900modem],
+ [disable native Nokia N900 modem support]),
+ [enable_n900modem=${enableval}])
+AC_DEFINE([HAVE_N900MODEM], 1,
+ [Define to 1 if you have native N900 modem support.])
+AM_CONDITIONAL(N900MODEM, test "${enable_n900modem}" != "no")
+
AC_ARG_ENABLE(atmodem, AC_HELP_STRING([--disable-atmodem],
[disable ETSI AT modem support]),
[enable_atmodem=${enableval}])
--
1.7.0.4
10 years, 5 months
[PATCH v3 1/1] sim: Read EFsst
by Yang Gu
---
src/sim.c | 40 +++++++++++++++++++++++++++++++++--
src/simutil.c | 18 ++++++++++++++++
src/simutil.h | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 118 insertions(+), 3 deletions(-)
diff --git a/src/sim.c b/src/sim.c
index fd9b412..ff559a9 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -101,6 +101,8 @@ struct ofono_sim {
unsigned char efust_length;
unsigned char *efest;
unsigned char efest_length;
+ unsigned char *efsst;
+ unsigned char efsst_length;
};
struct msisdn_set_request {
@@ -1072,6 +1074,27 @@ static void sim_retrieve_imsi(struct ofono_sim *sim)
sim->driver->read_imsi(sim, sim_imsi_cb, sim);
}
+static void sim_efsst_read_cb(int ok, int length, int record,
+ const unsigned char *data,
+ int record_length, void *userdata)
+{
+ struct ofono_sim *sim = userdata;
+
+ if (!ok)
+ goto out;
+
+ if (length < 2) {
+ ofono_error("EFsst shall contain at least two bytes");
+ goto out;
+ }
+
+ sim->efsst = g_memdup(data, length);
+ sim->efsst_length = length;
+
+out:
+ sim_retrieve_imsi(sim);
+}
+
static void sim_efest_read_cb(int ok, int length, int record,
const unsigned char *data,
int record_length, void *userdata)
@@ -1192,9 +1215,14 @@ static void sim_initialize_after_pin(struct ofono_sim *sim)
sim_cphs_information_read_cb, sim);
/* Also retrieve the GSM service table */
- ofono_sim_read(sim, SIM_EFUST_FILEID,
- OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
- sim_efust_read_cb, sim);
+ if (sim->phase >= OFONO_SIM_PHASE_3G)
+ ofono_sim_read(sim, SIM_EFUST_FILEID,
+ OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
+ sim_efust_read_cb, sim);
+ else
+ ofono_sim_read(sim, SIM_EFSST_FILEID,
+ OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
+ sim_efsst_read_cb, sim);
}
static void sim_pin_query_cb(const struct ofono_error *error,
@@ -2046,6 +2074,12 @@ static void sim_free_state(struct ofono_sim *sim)
sim->efest_length = 0;
}
+ if (sim->efsst) {
+ g_free(sim->efsst);
+ sim->efsst = NULL;
+ sim->efsst_length = 0;
+ }
+
sim->mnc_length = 0;
if (sim->efimg) {
diff --git a/src/simutil.c b/src/simutil.c
index ac054ae..4af6810 100644
--- a/src/simutil.c
+++ b/src/simutil.c
@@ -1434,3 +1434,21 @@ gboolean sim_est_is_active(unsigned char *efest, unsigned char len,
return (efest[index / 8] >> (index % 8)) & 1;
}
+
+gboolean sim_sst_is_available(unsigned char *efsst, unsigned char len,
+ enum sim_sst_service index)
+{
+ if (index >= len * 4u)
+ return FALSE;
+
+ return (efsst[index / 4] >> ((index % 4) * 2)) & 1;
+}
+
+gboolean sim_sst_is_active(unsigned char *efsst, unsigned char len,
+ enum sim_sst_service index)
+{
+ if (index >= len * 4u)
+ return FALSE;
+
+ return (efsst[index / 4] >> (((index % 4) * 2) + 1)) & 1;
+}
diff --git a/src/simutil.h b/src/simutil.h
index 65e651a..0a94c67 100644
--- a/src/simutil.h
+++ b/src/simutil.h
@@ -28,6 +28,7 @@ enum sim_fileid {
SIM_EF_CPHS_INFORMATION_FILEID = 0x6f16,
SIM_EF_CPHS_MBDN_FILEID = 0x6f17,
SIM_EFUST_FILEID = 0x6f38,
+ SIM_EFSST_FILEID = 0x6f38, /* same as EFust */
SIM_EFMSISDN_FILEID = 0x6f40,
SIM_EFSPN_FILEID = 0x6f46,
SIM_EFSDN_FILEID = 0x6f49,
@@ -154,6 +155,64 @@ enum sim_est_service {
SIM_EST_SERVICE_ACL = 2
};
+/* 51.011 Section 10.3.7 */
+enum sim_sst_service {
+ SIM_SST_SERVICE_CHV1_DISABLE = 0,
+ SIM_SST_SERVICE_ADN = 1,
+ SIM_SST_SERVICE_FDN = 2,
+ SIM_SST_SERVICE_SMS = 3,
+ SIM_SST_SERVICE_AOC = 4,
+ SIM_SST_SERVICE_CCP = 5,
+ SIM_SST_SERVICE_PLMN_SELECTOR = 6,
+ SIM_SST_SERVICE_MSISDN = 8,
+ SIM_SST_SERVICE_EXT_1 = 9,
+ SIM_SST_SERVICE_EXT_2 = 10,
+ SIM_SST_SERVICE_SMSP = 11,
+ SIM_SST_SERVICE_LND = 12,
+ SIM_SST_SERVICE_CBS_ID = 13,
+ SIM_SST_SERVICE_GROUP_ID_LEVEL_1 = 14,
+ SIM_SST_SERVICE_GROUP_ID_LEVEL_2 = 15,
+ SIM_SST_SERVICE_PROVIDER_NAME = 16,
+ SIM_SST_SERVICE_SDN = 17,
+ SIM_SST_SERVICE_EXT_3 = 18,
+ SIM_SST_SERVICE_EFVGCS_EFVGCSS = 20,
+ SIM_SST_SERVICE_EFVBS_EFVBSS = 21,
+ SIM_SST_SERVICE_PRECEDENCE_PREEMPTION = 22,
+ SIM_SST_SERVICE_EMLPP = 23,
+ SIM_SST_SERVICE_DATA_DOWNLOAD_SMS_CB = 24,
+ SIM_SST_SERVICE_DATA_DOWNLOAD_SMS_PP = 25,
+ SIM_SST_SERVICE_MENU_SELECTION = 26,
+ SIM_SST_SERVICE_CALL_CONTROL = 27,
+ SIM_SST_SERVICE_PROACTIVE_SIM = 28,
+ SIM_SST_SERVICE_CBS_ID_RANGE = 29,
+ SIM_SST_SERVICE_BDN = 30,
+ SIM_SST_SERVICE_EXT_4 = 31,
+ SIM_SST_SERVICE_DEPERSONALISATION_CTRL_KEY = 32,
+ SIM_SST_SERVICE_NETWORK_LIST = 33,
+ SIM_SST_SERVICE_SMSR = 34,
+ SIM_SST_SERVICE_NIA = 35,
+ SIM_SST_SERVICE_MO_SMS_SIM = 36,
+ SIM_SST_SERVICE_GPRS = 37,
+ SIM_SST_SERVICE_IMG = 38,
+ SIM_SST_SERVICE_SOLSA = 39,
+ SIM_SST_SERVICE_USSD_CALL_CONTROL = 40,
+ SIM_SST_SERVICE_RUN_AT_COMMAND = 41,
+ SIM_SST_SERVICE_USER_PLMN = 42,
+ SIM_SST_SERVICE_OPERATOR_PLMN = 43,
+ SIM_SST_SERVICE_HPLMN = 44,
+ SIM_SST_SERVICE_CPBCCH = 45,
+ SIM_SST_SERVICE_INVESTIGATION_SCAN = 46,
+ SIM_SST_SERVICE_EXT_CCP = 47,
+ SIM_SST_SERVICE_MEXE = 48,
+ SIM_SST_SERVICE_RPLMN = 49,
+ SIM_SST_SERVICE_PLMN_NETWORK_NAME = 50,
+ SIM_SST_SERVICE_OPERATOR_PLMN_LIST = 51,
+ SIM_SST_SERVICE_MAILBOX_DIALLING_NUMBERS = 52,
+ SIM_SST_SERVICE_MWIS = 53,
+ SIM_SST_SERVICE_CFIS = 54,
+ SIM_SST_SERVICE_PROVIDER_DISPLAY_INFO = 55
+};
+
#define SIM_EFSPN_DC_HOME_PLMN_BIT 0x1
#define SIM_EFSPN_DC_ROAMING_SPN_BIT 0x2
@@ -372,3 +431,7 @@ gboolean sim_ust_is_available(unsigned char *service_ust, unsigned char len,
enum sim_ust_service index);
gboolean sim_est_is_active(unsigned char *service_est, unsigned char len,
enum sim_est_service index);
+gboolean sim_sst_is_available(unsigned char *service_sst, unsigned char len,
+ enum sim_sst_service index);
+gboolean sim_sst_is_active(unsigned char *service_sst, unsigned char len,
+ enum sim_sst_service index);
--
1.7.0.4
10 years, 5 months