PDP Context Activation
by Yuvaraj Ragupathi
Hi All,
Now i have taken version 0.45. Modem enabled successfully.
When i am trying activate pdp context., It is failing with unknown errors.
*Please refer log messages below*
nod[8803]: src/network.c:__ofono_netreg_add_status_watch() 0xa0295c0
ofonod[8803]: src/network.c:__ofono_netreg_add_status_watch() 0xa0295c0
ofonod[8803]: src/message-waiting.c:mw_cphs_mwis_read_cb() No CPHS MWIS on
SIM
ofonod[8803]: src/network.c:current_operator_callback() 0xa0295c0, (nil)
ofonod[8803]: src/gprs.c:netreg_status_changed() 4
ofonod[8803]: src/simfs.c:sim_fs_op_read_block() bufoff: 0, seekoff: 38,
toread: 17
ofonod[8803]: src/network.c:current_operator_callback() 0xa0295c0, (nil)
ofonod[8803]: src/gprs.c:netreg_status_changed() 4
ofonod[8803]: src/gprs.c:ofono_gprs_status_notify() /ste0 status 0
ofonod[8803]: src/gprs.c:netreg_status_changed() 1
ofonod[8803]: drivers/atmodem/network-registration.c:cops_numeric_cb() Cops
numeric got mcc: 405, mnc: 034
ofonod[8803]: src/gprs.c:gprs_attach_callback() /ste0 error = 0
ofonod[8803]: src/gprs.c:ofono_gprs_status_notify() /ste0 status 1
ofonod[8803]: drivers/atmodem/network-registration.c:cops_cb() cops_cb: ,
405 034 0
ofonod[8803]: src/network.c:current_operator_callback() 0xa0295c0, (nil)
ofonod[8803]: src/gprs.c:netreg_status_changed() 1
ofonod[8803]: src/gprs.c:registration_status_cb() /ste0 error 0 status 1
ofonod[8803]: src/gprs.c:ofono_gprs_status_notify() /ste0 status 1
Control @ ste_gprs_activate_primary
Command is AT+CGDCONT=1,"IP",""
Control @ ste_cgdcont_cb
Control 1 @ ste_cgdcont_cb
ofonod[8803]: src/gprs.c:pri_activate_callback() 0xa02f868 (null)
ofonod[8803]: src/gprs.c:pri_activate_callback() Activating context failed
with error: Unknown error type
I am trying with ste modem
Note: tried to active through active_context script file at test folder
Thanks
Yuvaraj R
9 years, 9 months
[help] ofono + connman
by Christian Gagneraud
Hi there,
I'm trying to use ofono with connman on an embedded system.
I'm using the latest connman and ofono releases.
So far I'm able to bring up ppp0 with ofono, but not with connman:
$ connmand --version
0.75
$ ofonod --version
0.50
$ killall ofonod
$ killall connmand
[unplug modem]
$ rm -Rf /var/lib/ofono/* # Avoid data persistence
$ rm -Rf /var/lib/connman/* # Avoid data persistence
$ ofonod -d -n &
[plug modem, wait a bit]
$ of-tests-enable-modem /huawei0
$ of-tests-online-modem
$ of-tests-set-roaming-allowed
$ of-tests-enable-gprs
Connecting modem /huawei0...
$ of-tests-create-internet-context internet web web
Found context /huawei0/context1
Setting APN to internet
Setting username to web
Setting password to web
$ of-tests-activate-context 0
$ of-tests-process-context-settings
Configuring /huawei0/context1
Interface is ppp0
IP address is <ip-addr>
Gateway is 0.0.0.0
Nameserver is 10.203.129.68
Nameserver is 10.203.129.70
$ # ping kernel.org
$ ping -c3 -I ppp0 149.20.4.69
PING 149.20.4.69 (149.20.4.69): 56 data bytes
64 bytes from 149.20.4.69: seq=1 ttl=57 time=1702.332 ms
64 bytes from 149.20.4.69: seq=2 ttl=57 time=693.658 ms
64 bytes from 149.20.4.69: seq=0 ttl=57 time=2717.784 ms
--- 149.20.4.69 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 693.658/1704.591/2717.784 ms
$ ifconfig ppp0
ppp0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:<addr> P-t-P:<same-addr> Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:840 (840.0 B) TX bytes:840 (840.0 B)
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
10.203.129.68 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
10.203.129.70 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Note:
- all the of-tests-XXX are the python scripts from ofono/tests directory
Now, here are my questions:
1) Is it the right sequence to bring up ppp0 with ofono?
2) To which extend, ofono is suppose to manage the routing table? I was
expecting to see a default route. As well, something strange to me is
that my ppp0 inet address is the same as the P-t-P one's and that the
gateway is 0.0.0.0!
What I'm used to with ppp is to have to do something this:
route add -host <ptp-addr> ppp0
route add default gw <ptp-addr>
But it seems to work as I can ping through ppp0...
3) Now, If I want to use connman to set up ppp0, which of these above
steps do I need to do? I was expecting to be able to set the APN, user &
password via connmand, but it seems that this feature has benn removed,
so I have to tell ofono about these settings.
My problem is that I cannot have a proper PPP network configuration with
connmand.
Any help would be greatly appreciated.
Chris
9 years, 9 months
Looking for help with ofono Cell Broadcast SMS code
by Jonathan Wilson
I am currently working on getting Cell Broadcast SMS working on the Nokia
N900 using the stock telephony stack (yes I know ofono supports the N900
but since I dont want to have to replace the dialer, messaging app and who
knows what else, sticking with the stock telephony stack is the only option)
I have already gotten the low level telephony stack parts working and have
a test app that's wired up to a signal sent by the telephony stack.
This signal gives me the following bits of information for the Cell
Broadcast SMS message:
data
data length
serial number
message ID
data coding scheme
page
With my test dumper I was able to dump the one Cell Broadcast SMS message I
can get the local cell tower to send me (a single page message containing
the "name" of the cell tower and a message identifier of 50). I was then
able to hack away at one of the ofono test programs to get this cell
broadcast SMS message to decode so I could verify that I was getting the
correct data.
What I am looking for is:
1.Some information and/or help in figuring out the right way to use the all
the various ofono Cell Broadcast decode functions to decode Cell Broadcast
messages (single and multiple page) and get not just the content of the
message but also information on the type of message and other relavent items.
2.Some information on just which bits of ofono I need to link into my Cell
Broadcast SMS widget (which will be GPL) in order to be able to use the
Cell Broadcast decode functions without pulling in the rest of ofono.
and 3.Any and all example Cell Broadcast SMS messages I can get my hands on
to allow me to verify the parsing and display code once its written (i.e.
the stuff that takes the message, decodes it with the ofono Cell Broadcast
functions and does something useful with the result)
Anything people can point me at regarding this stuff will be much
appreciated (if anyone has userspace code that handles Cell Broadcast SMS
messages which could provide guidance as to how UI for CBSMS should work,
that would help too)
9 years, 9 months
[PATCH 0/2] ACFC and PFC options implementation
by Guillaume Zajac
Hi,
Those 2 patches, are implementing:
- Address and Control Field Compression option
- Protocol Field Compression option
It has been tested with gsmdial that do not negotiate any options and Win7
that negotiate both option.
An improvement of gsmdial and some ppp_lcp APIs could be done to test options
separately e.g. only PFC negotiated and only ACFC negotiated
Guillaume Zajac (2):
GAtPPP: Add ACFC option support
GAtPPP: Add PFC option support
gatchat/gatppp.c | 169 ++++++++++++++++++++++++++++++++++++++++++++++-------
gatchat/ppp.h | 10 +++
gatchat/ppp_lcp.c | 49 ++++++++++++++-
3 files changed, 203 insertions(+), 25 deletions(-)
9 years, 9 months
[HELP] HFP Outgoing Call Method (Dial) Not Responding
by milan.satpathy@accenture.com
Hi,
Recently I was testing a small hands free use case using Ofono(version 0.48).
Scenario:
1. Make an incoming call to the remote AG phone number.
2. Accept the incoming call using Ofono D-BUS call.
3. Once the incoming call is active, create an outgoing call ( "Dial" ) using Ofono D-BUS call.
Problem Faced:
The "Dial" method does not reply in this case. Hence, the outgoing call establishment also does not happen.
Request For Assistance:
I would like to know if Ofono supports a multiple call feature like this.
If anybody could succeed in making an outgoing call in the above explained scenario,
please let me know the make of the handset you could test with.
Thanks in advance!
Best Regards,
Milan
________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
9 years, 9 months
[PATCH] emulator: fix CCWA for PTS
by Frédéric Danis
During test TP/TCA/BV-05-I [Terminate Ongoing Call – While Call Waiting]
PTS fails if multiple +CCWA are sent (waiting for 1st phone number when
waiting one becomes incoming, intead of 2nd phone number).
So, send only 1 +CCWA.
Update RING timer management to be started as soon as an incoming call
exists, and retrieve +CLIP info for incoming or waiting call (in case
of waiting call becoming incoming call, call indicator changes before
internal call status is updated)
---
src/emulator.c | 74 ++++++++++++++++++++++++++++++-------------------------
1 files changed, 40 insertions(+), 34 deletions(-)
diff --git a/src/emulator.c b/src/emulator.c
index 906404d..eea69f0 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -352,7 +352,8 @@ static void notify_ccwa(struct ofono_emulator *em)
*/
char str[OFONO_MAX_PHONE_NUMBER_LENGTH + 14 + 1];
- if (!em->ccwa)
+ if ((em->type == OFONO_EMULATOR_TYPE_HFP && em->slc == FALSE) ||
+ !em->ccwa)
return;
c = find_call_with_status(em, CALL_STATUS_WAITING);
@@ -366,8 +367,9 @@ static void notify_ccwa(struct ofono_emulator *em)
g_at_server_send_unsolicited(em->server, "+CCWA: \"\",128");
}
-static void notify_ring(struct ofono_emulator *em)
+static gboolean notify_ring(void *user_data)
{
+ struct ofono_emulator *em = user_data;
struct ofono_call *c;
const char *phone;
/*
@@ -376,15 +378,25 @@ static void notify_ring(struct ofono_emulator *em)
*/
char str[OFONO_MAX_PHONE_NUMBER_LENGTH + 14 + 1];
+ if (em->type == OFONO_EMULATOR_TYPE_HFP && em->slc == FALSE)
+ return TRUE;
+
g_at_server_send_unsolicited(em->server, "RING");
if (!em->clip)
- return;
+ return TRUE;
c = find_call_with_status(em, CALL_STATUS_INCOMING);
+ /*
+ * In case of waiting call becoming an incoming call, call status
+ * change may not have been done yet, so try to find waiting call too
+ */
if (c == NULL)
- return;
+ c = find_call_with_status(em, CALL_STATUS_WAITING);
+
+ if (c == NULL)
+ return TRUE;
switch (c->clip_validity) {
case CLIP_VALIDITY_VALID:
@@ -397,22 +409,6 @@ static void notify_ring(struct ofono_emulator *em)
g_at_server_send_unsolicited(em->server, "+CLIP: \"\",128");
break;
}
-}
-
-static gboolean send_callsetup_notification(gpointer user_data)
-{
- struct ofono_emulator *em = user_data;
- struct indicator *call_ind;
-
- if (em->type == OFONO_EMULATOR_TYPE_HFP && em->slc == FALSE)
- return TRUE;
-
- call_ind = find_indicator(em, OFONO_EMULATOR_IND_CALL, NULL);
-
- if (call_ind->value == OFONO_EMULATOR_CALL_INACTIVE)
- notify_ring(em);
- else
- notify_ccwa(em);
return TRUE;
}
@@ -1078,7 +1074,10 @@ void ofono_emulator_set_indicator(struct ofono_emulator *em,
char buf[20];
struct indicator *ind;
struct indicator *call_ind;
+ struct indicator *cs_ind;
+ gboolean call;
gboolean callsetup;
+ gboolean waiting;
ind = find_indicator(em, name, &i);
@@ -1089,16 +1088,20 @@ void ofono_emulator_set_indicator(struct ofono_emulator *em,
ind->value = value;
call_ind = find_indicator(em, OFONO_EMULATOR_IND_CALL, NULL);
+ cs_ind = find_indicator(em, OFONO_EMULATOR_IND_CALLSETUP, NULL);
- callsetup = g_str_equal(name, OFONO_EMULATOR_IND_CALLSETUP);
+ call = (ind == call_ind);
+ callsetup = (ind == cs_ind);
/*
* When callsetup indicator goes to Incoming and there is an active
* call a +CCWA should be sent before +CIEV
*/
- if (callsetup && value == OFONO_EMULATOR_CALLSETUP_INCOMING &&
- call_ind->value == OFONO_EMULATOR_CALL_ACTIVE)
- send_callsetup_notification(em);
+ waiting = (callsetup && value == OFONO_EMULATOR_CALLSETUP_INCOMING &&
+ call_ind->value == OFONO_EMULATOR_CALL_ACTIVE);
+
+ if (waiting)
+ notify_ccwa(em);
if (em->events_mode == 3 && em->events_ind && em->slc) {
sprintf(buf, "+CIEV: %d,%d", i, ind->value);
@@ -1106,21 +1109,24 @@ void ofono_emulator_set_indicator(struct ofono_emulator *em,
}
/*
- * Ring timer should be started when callsetup indicator is set to
- * Incoming. If there is no active call, a first RING should be
- * sent just after the +CIEV and should be stopped for all other
- * values of callsetup
+ * Ring timer should be started when:
+ * - callsetup indicator is set to Incoming and there is no active call
+ * (not a waiting call)
+ * - or call indicator is set to inactive while callsetup is already
+ * set to Incoming.
+ * In those cases, a first RING should be sent just after the +CIEV
+ * Ring timer should be stopped for all other values of callsetup
*/
- if (!callsetup)
+ if (!((callsetup && !waiting) ||
+ (call && value == OFONO_EMULATOR_CALL_INACTIVE &&
+ cs_ind->value == OFONO_EMULATOR_CALLSETUP_INCOMING)))
return;
- switch (value) {
+ switch (cs_ind->value) {
case OFONO_EMULATOR_CALLSETUP_INCOMING:
- if (call_ind->value == OFONO_EMULATOR_CALL_INACTIVE)
- send_callsetup_notification(em);
-
+ notify_ring(em);
em->callsetup_source = g_timeout_add_seconds(RING_TIMEOUT,
- send_callsetup_notification, em);
+ notify_ring, em);
break;
default:
if (em->callsetup_source > 0) {
--
1.7.1
9 years, 9 months
[PATCH] call-forward: Call forwarding state handling
by Nicolas Bertrand
When CFU is active be cautious with conditional
call-forward activation/deactivation
---
src/call-forwarding.c | 46 ++++++++++++++++++++++++++++++++++++++++------
1 files changed, 40 insertions(+), 6 deletions(-)
diff --git a/src/call-forwarding.c b/src/call-forwarding.c
index 73ce433..eff5e9d 100644
--- a/src/call-forwarding.c
+++ b/src/call-forwarding.c
@@ -504,6 +504,7 @@ static DBusMessage *cf_get_properties_reply(DBusMessage *msg,
DBusMessageIter dict;
int i;
dbus_bool_t status;
+ GSList *hidden = NULL;
reply = dbus_message_new_method_return(msg);
if (reply == NULL)
@@ -515,17 +516,33 @@ static DBusMessage *cf_get_properties_reply(DBusMessage *msg,
OFONO_PROPERTIES_ARRAY_SIGNATURE,
&dict);
- for (i = 0; i < 4; i++)
- property_append_cf_conditions(&dict, cf->cf_conditions[i],
- BEARER_CLASS_VOICE,
- cf_type_lut[i]);
-
if ((cf->flags & CALL_FORWARDING_FLAG_CPHS_CFF) ||
cf->cfis_record_id > 0)
status = is_cfu_enabled(cf, NULL);
else
status = FALSE;
+ /*
+ * If unconditional call-forwarding is enabled,
+ * hide conditionnal status
+ */
+ if (status == TRUE) {
+ struct ofono_call_forwarding_condition cd = {0, 0, {"", 0}, 0};
+
+ for (i = 0; i < 4; i++)
+ hidden = g_slist_prepend(hidden, &cd);
+ }
+
+ for (i = 0; i < 4; i++)
+ property_append_cf_conditions(&dict, (status &&
+ i != CALL_FORWARDING_TYPE_UNCONDITIONAL) ?
+ hidden : cf->cf_conditions[i],
+ BEARER_CLASS_VOICE,
+ cf_type_lut[i]);
+
+ if (status == TRUE)
+ g_slist_free(hidden);
+
ofono_dbus_dict_append(&dict, "ForwardingFlagOnSim", DBUS_TYPE_BOOLEAN,
&status);
@@ -552,6 +569,13 @@ static void get_query_cf_callback(const struct ofono_error *error, int total,
cf->flags |= CALL_FORWARDING_FLAG_CACHED;
}
+ if (cf->query_next == CALL_FORWARDING_TYPE_UNCONDITIONAL &&
+ is_cfu_enabled(cf, NULL) == TRUE) {
+ DBusMessage *reply = cf_get_properties_reply(cf->pending, cf);
+ __ofono_dbus_pending_reply(&cf->pending, reply);
+ return;
+ }
+
if (cf->query_next == CALL_FORWARDING_TYPE_NOT_REACHABLE) {
DBusMessage *reply = cf_get_properties_reply(cf->pending, cf);
__ofono_dbus_pending_reply(&cf->pending, reply);
@@ -575,7 +599,8 @@ static DBusMessage *cf_get_properties(DBusConnection *conn, DBusMessage *msg,
struct ofono_modem *modem = __ofono_atom_get_modem(cf->atom);
if ((cf->flags & CALL_FORWARDING_FLAG_CACHED) ||
- ofono_modem_get_online(modem) == FALSE)
+ ofono_modem_get_online(modem) == FALSE ||
+ is_cfu_enabled(cf, NULL) == TRUE)
return cf_get_properties_reply(msg, cf);
if (cf->driver->query == NULL)
@@ -698,6 +723,15 @@ static void set_property_callback(const struct ofono_error *error, void *data)
return;
}
+ if (cf->query_next != CALL_FORWARDING_TYPE_UNCONDITIONAL &&
+ is_cfu_enabled(cf, NULL) == TRUE) {
+ DBusMessage *reply;
+ cf->flags &= ~CALL_FORWARDING_FLAG_CACHED;
+ reply = dbus_message_new_method_return(cf->pending);
+ __ofono_dbus_pending_reply(&cf->pending, reply);
+ return;
+ }
+
/* Successfully set, query the entire set just in case */
set_query_next_cf_cond(cf);
}
--
1.7.1
9 years, 9 months
[PATCH] doc: Add dial-number/username/password Property
by Caiwen Zhang
Some network's dial-number isn't #777 and user name and password
are required when setup data connection.
---
doc/cdma-connman-api.txt | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/doc/cdma-connman-api.txt b/doc/cdma-connman-api.txt
index e486c09..f76a2c5 100644
--- a/doc/cdma-connman-api.txt
+++ b/doc/cdma-connman-api.txt
@@ -35,6 +35,20 @@ Properties boolean Powered [readwrite]
Contains whether the connection is dormant. Will
always be false if the connection is not powered.
+ string DialNumber [readwrite]
+
+ Holds the dialed number.
+
+ string Username [readwrite]
+
+ Holds the username to be used for authentication
+ purposes.
+
+ string Password [readwrite]
+
+ Holds the password to be used for authentication
+ purposes.
+
dict Settings [readonly, optional]
Holds all the IP network settings
--
1.7.5
9 years, 10 months
[PATCH v2 0/2] Add ATD>1; support for HFP emulator
by Frédéric Danis
Only ATD>1; will be managed through HFP AG, and it will call the
voicemail number retrieved from the message-waiting atom.
Frédéric Danis (2):
message-waiting: API to retrieve voicemail number
voicecall: add ATD> support for HFP emulator
src/message-waiting.c | 7 +++++++
src/ofono.h | 4 ++++
src/voicecall.c | 30 +++++++++++++++++++++++++++---
3 files changed, 38 insertions(+), 3 deletions(-)
9 years, 10 months
[PATCH v2 1/4] include: add HFP features types for HF and AG
by Frédéric Danis
---
include/types.h | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/include/types.h b/include/types.h
index d25f409..536dac7 100644
--- a/include/types.h
+++ b/include/types.h
@@ -115,6 +115,30 @@ struct ofono_uuid {
unsigned char uuid[OFONO_SHA1_UUID_LEN];
};
+/* HFP AG supported features bitmap. Bluetooth HFP 1.5 spec page 77 */
+enum hfp_ag_feature {
+ HFP_AG_FEATURE_3WAY = 0x1,
+ HFP_AG_FEATURE_ECNR = 0x2,
+ HFP_AG_FEATURE_VOICE_RECOG = 0x4,
+ HFP_AG_FEATURE_IN_BAND_RING_TONE = 0x8,
+ HFP_AG_FEATURE_ATTACH_VOICE_TAG = 0x10,
+ HFP_AG_FEATURE_REJECT_CALL = 0x20,
+ HFP_AG_FEATURE_ENHANCED_CALL_STATUS = 0x40,
+ HFP_AG_FEATURE_ENHANCED_CALL_CONTROL = 0x80,
+ HFP_AG_FEATURE_EXTENDED_RES_CODE = 0x100
+};
+
+/* HFP HF supported features bitmap. Bluetooth HFP 1.5 spec page 77 */
+enum hfp_hf_feature {
+ HFP_HF_FEATURE_ECNR = 0x1,
+ HFP_HF_FEATURE_3WAY = 0x2,
+ HFP_HF_FEATURE_CLIP = 0x4,
+ HFP_HF_FEATURE_VOICE_RECOGNITION = 0x8,
+ HFP_HF_FEATURE_REMOTE_VOLUME_CONTROL = 0x10,
+ HFP_HF_FEATURE_ENHANCED_CALL_STATUS = 0x20,
+ HFP_HF_FEATURE_ENHANCED_CALL_CONTROL = 0x40
+};
+
const char *ofono_uuid_to_str(const struct ofono_uuid *uuid);
void ofono_call_init(struct ofono_call *call);
--
1.7.1
9 years, 10 months