[PATCH] fix can't attach gprs issue
by caiwen.zhang@windriver.com
From: Caiwen Zhang <caiwen.zhang(a)windriver.com>
This patch is to fix the issue that can't attach GPRS after detach it.
Cause:
When start detaching GPRS, driver_attched value is set to FALSE, if
device registered to GPRS network during GPRS detaching, driver_attched is set to TURE.
After that, GPRS attaching will always be ignored because driver_attched is always TURE.
Scenario:
When device is unregistered(+CREG: 2), GPRS is detached. During GPRS detaching, device
registered to network again(+CREG: 1, xxx, xxx).
Log:
ofonod[619]: PCUI: < \r\n^SRVST:1\r\n\r\n+CREG: 2\r\n\r\n+CGREG: 2\r\n\r\n^SRVST:2\r\n\r\n+CREG: 1, A807, A72B71\r\n\r\n+CGREG: 0\r\n
ofonod[619]: src/network.c:current_operator_callback() 0xa046ea0, 0xa0476e8
ofonod[619]: src/gprs.c:netreg_status_changed() 2 //driver_attched = FALSE
ofonod[619]: src/cbs.c:cbs_location_changed() 2, -1, -1, -1, (null)(null)
ofonod[619]: src/cbs.c:cbs_location_changed() 1, 0, 0
ofonod[619]: src/gprs.c:netreg_status_changed() 2
ofonod[619]: src/cbs.c:cbs_location_changed() 2, -1, -1, -1, (null)(null)
ofonod[619]: src/gprs.c:ofono_gprs_status_notify() /huawei0 status 2
ofonod[619]: src/gprs.c:netreg_status_changed() 1
ofonod[619]: src/cbs.c:cbs_location_changed() 1, 43015, 10955633, -1, (null)(null)
ofonod[619]: src/gprs.c:ofono_gprs_status_notify() /huawei0 status 0
ofonod[619]: PCUI: > AT+CSCB=0,"0,25,38,50,100,136,256,4352-4356"\r
ofonod[619]: PCUI: < \r\nOK\r\n
ofonod[619]: PCUI: > AT+CRSM=192,28437,0,0,255\r
ofonod[619]: PCUI: < \r\n+CREG: 1, A807, A72B71\r\n\r\n+CGREG: 1, A807, A72B71\r\n
ofonod[619]: src/gprs.c:netreg_status_changed() 1
ofonod[619]: src/cbs.c:cbs_location_changed() 1, 43015, 10955633, -1, (null)(null)
ofonod[619]: src/gprs.c:ofono_gprs_status_notify() /huawei0 status 1 //driver_attched = TRUE
ofonod[619]: PCUI: < \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n
ofonod[619]: PCUI: > AT+CGATT=0\r
---
src/gprs.c | 19 +++++++------------
1 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/src/gprs.c b/src/gprs.c
index deffeb8..d80e7ab 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -1429,17 +1429,12 @@ void ofono_gprs_resume_notify(struct ofono_gprs *gprs)
update_suspended_property(gprs, FALSE);
}
-static void gprs_attached_update(struct ofono_gprs *gprs)
+static void gprs_attached_update(struct ofono_gprs *gprs, ofono_bool_t attached)
{
DBusConnection *conn = ofono_dbus_get_connection();
const char *path;
- ofono_bool_t attached;
dbus_bool_t value;
- attached = gprs->driver_attached &&
- (gprs->status == NETWORK_REGISTRATION_STATUS_REGISTERED ||
- gprs->status == NETWORK_REGISTRATION_STATUS_ROAMING);
-
if (attached == gprs->attached)
return;
@@ -1508,7 +1503,7 @@ static void gprs_attach_callback(const struct ofono_error *error, void *data)
return;
}
- gprs_attached_update(gprs);
+ gprs_attached_update(gprs, gprs->driver_attached);
if (gprs->flags & GPRS_FLAG_RECHECK) {
gprs->flags &= ~GPRS_FLAG_RECHECK;
@@ -1525,7 +1520,7 @@ static void gprs_netreg_removed(struct ofono_gprs *gprs)
gprs->netreg_status = NETWORK_REGISTRATION_STATUS_NOT_REGISTERED;
gprs->driver_attached = FALSE;
- gprs_attached_update(gprs);
+ gprs_attached_update(gprs, FALSE);
}
static void gprs_netreg_update(struct ofono_gprs *gprs)
@@ -2074,7 +2069,8 @@ void ofono_gprs_detached_notify(struct ofono_gprs *gprs)
DBG("%s", __ofono_atom_get_path(gprs->atom));
gprs->driver_attached = FALSE;
- gprs_attached_update(gprs);
+
+ gprs_attached_update(gprs, FALSE);
/*
* TODO: The network forced a detach, we should wait for some time
@@ -2091,7 +2087,7 @@ void ofono_gprs_status_notify(struct ofono_gprs *gprs, int status)
if (status != NETWORK_REGISTRATION_STATUS_REGISTERED &&
status != NETWORK_REGISTRATION_STATUS_ROAMING) {
- gprs_attached_update(gprs);
+ gprs_attached_update(gprs, FALSE);
return;
}
@@ -2103,8 +2099,7 @@ void ofono_gprs_status_notify(struct ofono_gprs *gprs, int status)
status == NETWORK_REGISTRATION_STATUS_ROAMING)
goto detach;
- gprs->driver_attached = TRUE;
- gprs_attached_update(gprs);
+ gprs_attached_update(gprs, TRUE);
return;
--
1.7.0.4
11 years
[PATCH] phonesim: Add title to the SETUP menu (this AID TLV object is mandatory)
by Philippe Nunes
---
src/conformancesimapplication.cpp | 3 ++-
src/simapplication.cpp | 1 +
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/conformancesimapplication.cpp b/src/conformancesimapplication.cpp
index 5eb9d07..baf3538 100644
--- a/src/conformancesimapplication.cpp
+++ b/src/conformancesimapplication.cpp
@@ -107,6 +107,7 @@ void ConformanceSimApplication::mainMenu()
QList<QSimMenuItem> items;
cmd.setType( QSimCommand::SetupMenu );
+ cmd.setTitle( "Conformance menu" );
item.setIdentifier( ConformanceMenu_DisplayText );
item.setLabel( "Display Text" );
@@ -1729,4 +1730,4 @@ void ConformanceSimApplication::GetInputIconMenu( const QSimTerminalResponse& re
endSession();
break;
}
-}
\ No newline at end of file
+}
diff --git a/src/simapplication.cpp b/src/simapplication.cpp
index 68ec1cd..119d7b2 100644
--- a/src/simapplication.cpp
+++ b/src/simapplication.cpp
@@ -382,6 +382,7 @@ void DemoSimApplication::mainMenu()
QList<QSimMenuItem> items;
cmd.setType( QSimCommand::SetupMenu );
+ cmd.setTitle( "Phonesim services" );
item.setIdentifier( MainMenu_News );
item.setLabel( "News" );
--
1.7.1
11 years
[PATCH] controlbase: Gather call elements on the same tab
by Nicolas Bertrand
Group CSSU/CSSI and incomming call UI together on the same "Call" tab
---
src/controlbase.ui | 267 ++++++++++++++++++++++++++--------------------------
1 files changed, 132 insertions(+), 135 deletions(-)
diff --git a/src/controlbase.ui b/src/controlbase.ui
index 41c6d12..dd60cda 100644
--- a/src/controlbase.ui
+++ b/src/controlbase.ui
@@ -113,144 +113,34 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="gbIncomingCall">
- <property name="title">
- <string>Incoming Call</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QCheckBox" name="cbCaller">
- <property name="text">
- <string>Caller Identity</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="leCaller"/>
- </item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="cbCallerName">
- <property name="text">
- <string>Caller Name</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="leCallerName">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="cbCalledLine">
- <property name="text">
- <string>Called Line</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="leCalledLine">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="3" column="0" colspan="2">
- <layout class="QHBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <item>
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>111</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pbIncomingCall">
- <property name="text">
- <string>&Call</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
<property name="sizeHint" stdset="0">
<size>
- <width>322</width>
+ <width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
- <item>
- <widget class="QGroupBox" name="gbCallSettings">
- <property name="title">
- <string>Call Settings</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="1">
- <widget class="QComboBox" name="cbCSSU"/>
- </item>
- <item row="1" column="1">
- <widget class="QComboBox" name="cbCSSI"/>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="lbCSSU">
- <property name="text">
- <string>CSSU</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="lbCSSI">
- <property name="text">
- <string>CSSI</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QPushButton" name="pbSendNotif">
- <property name="text">
- <string>Send Notification</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
</layout>
</item>
<item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
<widget class="QCheckBox" name="atCheckBox">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
@@ -1505,17 +1395,124 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QGroupBox" name="gbIncomingCall">
+ <property name="title">
+ <string>Incoming Call</string>
+ </property>
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="cbCaller">
+ <property name="text">
+ <string>Caller Identity</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="leCaller"/>
+ </item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="cbCallerName">
+ <property name="text">
+ <string>Caller Name</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="leCallerName">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="cbCalledLine">
+ <property name="text">
+ <string>Called Line</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="leCalledLine">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2">
+ <layout class="QHBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>111</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pbIncomingCall">
+ <property name="text">
+ <string>&Call</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="gbCallSettings">
+ <property name="title">
+ <string>Call Settings</string>
+ </property>
+ <layout class="QGridLayout">
+ <item row="0" column="1">
+ <widget class="QComboBox" name="cbCSSU"/>
+ </item>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="cbCSSI"/>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="lbCSSU">
+ <property name="text">
+ <string>CSSU</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="lbCSSI">
+ <property name="text">
+ <string>CSSI</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QPushButton" name="pbSendNotif">
+ <property name="text">
+ <string>Send Notification</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
</widget>
--
1.7.1
11 years
[PATCH] Fix a gcc 4.5.2 warning uninit var
by Bertrand Aygon
---
src/call-forwarding.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/call-forwarding.c b/src/call-forwarding.c
index 2068d6b..73ce433 100644
--- a/src/call-forwarding.c
+++ b/src/call-forwarding.c
@@ -36,6 +36,8 @@
#include "common.h"
#include "simutil.h"
+#define uninitialized_var(x) x = x
+
#define CALL_FORWARDING_FLAG_CACHED 0x1
#define CALL_FORWARDING_FLAG_CPHS_CFF 0x2
@@ -246,7 +248,7 @@ static gboolean is_cfu_enabled(struct ofono_call_forwarding *cf,
static void sim_set_cf_indicator(struct ofono_call_forwarding *cf)
{
gboolean cfu_voice;
- struct ofono_call_forwarding_condition *cond;
+ struct ofono_call_forwarding_condition *uninitialized_var(cond);
cfu_voice = is_cfu_enabled(cf, &cond);
--
1.7.4.1
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
11 years
ofono modem plug loop
by Alexander Khryukin
BUILD IMAGE: any image with ofono 0.36 - latest or git ofono
HARDWARE MODEL: HUAWEI E620, HUAWEI E1550
BUG DETAILED DESCRIPTIONS
===========================================================
When E1550 plugged ofono succefful work with udev rules and start modem.
But everytime ofono drops in remove_modem, add_modem loop
log herehttp://pastie.org/1867821
ofonod[5983]: plugins/udev.c:add_modem()
/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1:1.1/ttyUSB1/tty/ttyUSB1 (huawei)
ofonod[5983]: plugins/udev.c:add_huawei() modem 0x995c260
......
......
plugins/udev.c:remove_modem()
/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1:1.0/ttyUSB0/tty/ttyUSB0
Again and again
EXACT STEPS LEADING TO PROBLEM:
===========================================================
1.meego any build
2.any version of ofono
3./usr/sbin/ofono -n -d
4.plug modem
EXPECTED OUTCOME:
===================
Modem must not reconnect loop
ACTUAL OUTCOME:
===================
Modem in add\remove loop
11 years
[PATCH 0/4] Introduce new gprs APIs to setup STK PDP context
by Philippe Nunes
New APIs are introduced in the gprs atom in order to setup a PDP context directly from the stk atom.
In order to privatize the PDP context created from STK, a new PDP context type ('stk') is introduced.
By registering a callback, the STK atom is notified when the dedicated PDP context is activated and
the interface setup is extended to add also a host route for STK PDP context type.
Philippe Nunes (4):
gprs: Add 'stk' gprs context type
gprs: Add new external APIs to create, activate and remove a PDP
context
stk: Use gprs APIs to create, activate and remove a dedicated PDP
context
gprs: Add a host route for STK context type.
include/gprs-context.h | 1 +
include/gprs.h | 16 +++
src/gprs.c | 292 +++++++++++++++++++++++++++++++++++++++++++-----
src/stk.c | 132 +++++++++++++++++++---
4 files changed, 398 insertions(+), 43 deletions(-)
11 years
[PATCH_v3 0/3] Request private network to ConnMan
by Guillaume Zajac
Hi,
Changelog from v2 is:
- merge patch 3 and 4
- calls to ConnMan DBus methods are async
- setup_ppp() function is called from reply of
RequestPrivateNetwork() DBus method
- pending calls are stored into hash table and can be cancelled
- there is no more struct private_network_settings
Guillaume Zajac (3):
gatppp: Add new contructor to use external fd
emulator: add drivers to request/release private network from ConnMan
connman: add plugin in oFono to request request/release private
network
Makefile.am | 3 +
gatchat/gatppp.c | 48 +++++++++-
gatchat/gatppp.h | 1 +
gatchat/ppp.h | 2 +-
gatchat/ppp_net.c | 55 +++++++----
include/emulator.h | 18 ++++
plugins/connman.c | 255 ++++++++++++++++++++++++++++++++++++++++++++++++++++
src/emulator.c | 83 +++++++++++++----
8 files changed, 420 insertions(+), 45 deletions(-)
create mode 100644 plugins/connman.c
11 years
[PATCH 0/7] Add CHLD support to HFP profile
by Frédéric Dalleau
This patch adds CHLD support to HFP profile.
AT+CHLD=0 uses release_all_held and set_udub
AT+CHLD=1 uses release_all_active
AT+CHLD=2 uses hold_all_active
AT+CHLD=3 uses create_multiparty
AT+CHLD=4 uses transfer
AT+CHLD=1X uses release_specific
AT+CHLD=2X uses private_chat
Best regards!
Frédéric Dalleau (7):
voicecall: Fix variable initialization
voicecall: add +CHLD support for HFP emulator
voicecall: add +CHLD=0 support for HFP emulator
voicecall: add +CHLD=3 support for HFP emulator
voicecall: add +CHLD=4 support for HFP emulator
voicecall: add +CHLD=1X support for HFP emulator
voicecall: add +CHLD=2X support for HFP emulator
src/voicecall.c | 157 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 157 insertions(+), 0 deletions(-)
11 years
Dedug Log for Huawei EC168C
by rajeshkumar s.a
PFA, the debug log with AT commands
I am still getting a timeout on enable-modem operation
and list-modem gives following o/p
$ ./list-modems
[ /huawei0 ]
Features =
Emergency = 0
Powered = 0
Lockdown = 0
Interfaces =
Online = 0
Regards,
Rajesh
11 years
Debug log
by rajeshkumar s.a
PFA, the debug log
I am getting a timeout error when I do a ./enable-modem on Huawei datacard
(EC168C)
Regards,
Rajesh
11 years