[PATCH] gprs: avoid remove context when context operation is in progress

2016-10-31 Thread caiwen . zhang
From: Caiwen Zhang If remove the context before context activation / deactivation is completed, it may cause crash. --- src/gprs.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gprs.c b/src/gprs.c index 3a4a819..4aa00f9 100644 --- a/src/gprs.c +++ b/src/gprs.c

[PATCH] gprs: avoid remove context when context operation is in progress

2016-10-31 Thread caiwen . zhang
From: Caiwen Zhang If remove the context before context activation / deactivation is completed, it may cause crash. --- src/gprs.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gprs.c b/src/gprs.c index 3a4a819..4aa00f9 100644 --- a/src/gprs.c +++ b/src/gprs.c

[PATCH] rilmodem: add cell broadcast message support

2016-05-18 Thread caiwen . zhang
From: Caiwen Zhang --- Makefile.am | 1 + drivers/rilmodem/cbs.c | 213 drivers/rilmodem/rilmodem.c | 2 + drivers/rilmodem/rilmodem.h | 3 + 4 files changed, 219 insertions(+) create mode 100644 drivers/rilmodem/cbs.c

[PATCH] plugins/ril: enable cbs

2016-05-17 Thread caiwen . zhang
From: Caiwen Zhang --- plugins/ril.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/ril.c b/plugins/ril.c index 2ea3fb5..a98646c 100644 --- a/plugins/ril.c +++ b/plugins/ril.c @@ -239,6 +239,7 @@ void ril_post_online(struct ofono_modem *modem) struct ofono_gprs *gprs

[PATCH] rilmodem: add cell broadcast message support

2016-05-17 Thread caiwen . zhang
From: Caiwen Zhang --- Makefile.am | 1 + drivers/rilmodem/cbs.c | 222 drivers/rilmodem/rilmodem.c | 2 + drivers/rilmodem/rilmodem.h | 3 + 4 files changed, 228 insertions(+) create mode 100644 drivers/rilmodem/cbs.c

[PATCH] gril: avoid glib runtime warning

2016-05-16 Thread caiwen . zhang
From: Caiwen Zhang gril may be destroyed in the request callback (e.g in the callback of set modem power off request). 'out_queue' and 'command_queue' is NULL. there will be glib runtime warning if use them. --- gril/gril.c | 6 ++ 1 file changed, 6 insertions(+) diff -

[PATCH] avoid glib runtime warning

2016-05-15 Thread caiwen . zhang
From: Caiwen Zhang When set modem power off, in the callback of the request gril is cleaned up, 'out_queue' and 'command_queue' is NULL. If don't check before use them, there will be glib runtime warning. --- gril/gril.c | 11 --- 1 file changed, 8 insertions

[PATCH] plugins/ril: complete modem power off process

2016-05-11 Thread caiwen . zhang
From: caiwen Zhang --- plugins/ril.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/plugins/ril.c b/plugins/ril.c index 2298bb6..2ea3fb5 100644 --- a/plugins/ril.c +++ b/plugins/ril.c @@ -409,15 +409,30 @@ int ril_enable(struct ofono_modem *modem

[PATCH 2/2] plugins/ril: enable STK

2016-05-02 Thread caiwen . zhang
From: Caiwen Zhang --- plugins/ril.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ril.c b/plugins/ril.c index b4a..2298bb6 100644 --- a/plugins/ril.c +++ b/plugins/ril.c @@ -229,7 +229,7 @@ void ril_post_sim(struct ofono_modem *modem

[PATCH 1/2] rilmodem/stk: add STK support for rilmodem

2016-05-02 Thread caiwen . zhang
From: Caiwen Zhang --- Makefile.am | 1 + drivers/rilmodem/rilmodem.c | 2 + drivers/rilmodem/rilmodem.h | 3 + drivers/rilmodem/stk.c | 238 4 files changed, 244 insertions(+) create mode 100644 drivers/rilmodem/stk.c

[PATCH] rilmodem/stk: add STK support for rilmodem

2016-04-28 Thread caiwen . zhang
From: Caiwen Zhang --- Makefile.am | 1 + drivers/rilmodem/rilmodem.c | 2 + drivers/rilmodem/rilmodem.h | 3 + drivers/rilmodem/stk.c | 237 plugins/ril.c | 1 + 5 files changed, 244 insertions(+) create

[PATCH] doc/connman: fix doc error

2016-04-27 Thread caiwen . zhang
From: Caiwen Zhang --- doc/connman-api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/connman-api.txt b/doc/connman-api.txt index 1ce1d61..9220d0d 100644 --- a/doc/connman-api.txt +++ b/doc/connman-api.txt @@ -106,7 +106,7 @@ Properties boolean Attached [readonly

[PATCH] plugins/ril: Move GPRS atom creating to 'post_online' state

2016-04-21 Thread caiwen . zhang
From: Caiwen Zhang At gprs atom 'probe' state, max cid query may fail due to rild status isn't RADIO_STATUS_ON. It causes gprs atom is removed, gprs feature is inavailable. Move gprs atom creating to 'post_online' state to make sure rild status is RADIO_STATUS_ON when qu

[PATCH] Fix crash when PUK is required

2016-04-20 Thread caiwen . zhang
From: Caiwen Zhang After input PIN wrong 3 times, sim main state (include spn_watches) is freed. but the watch id still be kept by other atoms (network and gprs), when remove the atom, it will try to remove the watch from spn_watches, ofono daemon will crash. --- src/sim.c | 9 +++-- 1 file

[PATCH] rilmodem: Fix GPRS feature inavailable issue

2016-01-11 Thread caiwen . zhang
From: Caiwen Zhang When query max cid if rild radio status isn't RADIO_STATUS_ON, it may fail, gprs atom will be removed, gprs feature will always be inavailable. --- drivers/rilmodem/gprs.c | 43 ++- 1 file changed, 42 insertions(+), 1 deletion(-)

[PATCH] plugins/ril.c: avoid create a gril each time enable ril modem

2016-01-11 Thread caiwen . zhang
From: Caiwen Zhang --- plugins/ril.c | 4 1 file changed, 4 insertions(+) diff --git a/plugins/ril.c b/plugins/ril.c index ea50d76..688a5bf 100644 --- a/plugins/ril.c +++ b/plugins/ril.c @@ -400,9 +400,13 @@ static gboolean connect_rild(gpointer user_data) int ril_enable(struct

[PATCH] Query locked pins after reset pin

2013-09-11 Thread caiwen . zhang
From: Caiwen Zhang --- src/sim.c | 77 - 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/src/sim.c b/src/sim.c index edae5eb..ef55b1c 100644 --- a/src/sim.c +++ b/src/sim.c @@ -123,6 +123,11 @@ struct msisdn_set_request

[PATCH] avoid stk atom is removed when sim pin is blocked

2013-09-10 Thread caiwen . zhang
From: Caiwen Zhang When sim pin is blocked after input wrong pin code three times, modem will change to pre-sim status, at this time, STK function should be available. stk atoms shouldn't be removed. --- src/modem.c |7 ++- src/stk.c |4 2 files changed, 10 insertions(

[PATCH] Fix modem doesn't auto register to network issue

2013-09-10 Thread caiwen . zhang
From: Caiwen Zhang Some modem may return registration status whitch is out of the range (0-5). it will cause the modem don't auto register to network when network atom initializes. --- src/network.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network.c

[PATCH] fix ofonod crash when pin is blocked

2013-09-10 Thread caiwen . zhang
From: Caiwen Zhang When is blocked, gprs/network atom is removed, it will remove the SIM SPN watch which is added when it is created. If at that time, SIM atom has been removed ofonod will crash due to "sim->spn_watches" is NULL. There is the same issue about network registration

[PATCH] Add SMS initialize retry

2012-08-21 Thread caiwen . zhang
From: Caiwen Zhang Before SMS fuction is useable, it will do some initialization. Following AT command will be sent: AT+CSMS=? AT+CSMS=xx AT+CSMS? AT+CMGF=? AT+CPMS=? * AT+CMGF=xx * AT+CPMS=xx AT+CNMI=? AT+CNMI=xx It is possible that the modem will return error. Currently, only

[PATCH] try to re-attach GPRS after auto detached

2011-08-19 Thread Caiwen Zhang
After receive "NW DETACH"/"ME DETACH" unsolicited message, try to re-attach according current registration status. If it is not allowed, re-attach action will be triggered when registration status changed. --- src/gprs.c |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git

[PATCH] Add air interface flash validation in CDMA voice call

2011-08-16 Thread Caiwen Zhang
Check whether air interface flash is valid: 1. Air interface flash should be sent during a call 2. flash string may include feature code, digits (0-9) and end marks(*, #), along with any additional PIN information, called party number, etc. Generally, should be characters can be input in di

[PATCH v2 2/2] Add cdma voice call status notify

2011-08-14 Thread Caiwen Zhang
--- include/cdma-voicecall.h |3 ++ src/cdma-voicecall.c | 55 ++ 2 files changed, 58 insertions(+), 0 deletions(-) diff --git a/include/cdma-voicecall.h b/include/cdma-voicecall.h index f12e0b6..badc5eb 100644 --- a/include/cdma-voicecall.h +

[PATCH 2/2] Add cdma voice call status notify

2011-08-12 Thread Caiwen Zhang
--- include/cdma-voicecall.h |3 ++ src/cdma-voicecall.c | 55 ++ 2 files changed, 58 insertions(+), 0 deletions(-) diff --git a/include/cdma-voicecall.h b/include/cdma-voicecall.h index f12e0b6..badc5eb 100644 --- a/include/cdma-voicecall.h +

[PATCH 1/2] Add call waiting support in CDMA voice call

2011-08-12 Thread Caiwen Zhang
--- src/cdma-voicecall.c | 35 --- 1 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/cdma-voicecall.c b/src/cdma-voicecall.c index bbf805f..47d416c 100644 --- a/src/cdma-voicecall.c +++ b/src/cdma-voicecall.c @@ -40,6 +40,7 @@ static GSList *g_dr

[PATCH] Add CDMA voice call sending DTMF tone support

2011-08-12 Thread Caiwen Zhang
--- include/cdma-voicecall.h |3 ++ src/cdma-voicecall.c | 54 ++ 2 files changed, 57 insertions(+), 0 deletions(-) diff --git a/include/cdma-voicecall.h b/include/cdma-voicecall.h index b170e39..f12e0b6 100644 --- a/include/cdma-voicecall.h +

[PATCH] Add CDMA voice call sending air interface flash support

2011-08-12 Thread Caiwen Zhang
--- include/cdma-voicecall.h |3 +++ src/cdma-voicecall.c | 25 + 2 files changed, 28 insertions(+), 0 deletions(-) diff --git a/include/cdma-voicecall.h b/include/cdma-voicecall.h index 6f77462..b170e39 100644 --- a/include/cdma-voicecall.h +++ b/include/cdma-vo

[PATCH] Add CDMA voice call answering support

2011-08-12 Thread Caiwen Zhang
--- include/cdma-voicecall.h |3 +++ src/cdma-voicecall.c | 23 +++ 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/include/cdma-voicecall.h b/include/cdma-voicecall.h index 9e741da..6f77462 100644 --- a/include/cdma-voicecall.h +++ b/include/cdma-voic

[PATCH] add anwser/send flash/send tones support for cdma voice call

2011-07-24 Thread Caiwen Zhang
diff --git a/include/cdma-voicecall.h b/include/cdma-voicecall.h index 9e741da..520934b 100644 --- a/include/cdma-voicecall.h +++ b/include/cdma-voicecall.h @@ -55,8 +55,20 @@ struct ofono_cdma_voicecall_driver { /* Hangs up active, dialing, alerting or incoming calls */ void (*hang

[PATCH]doc: update cdma voice call manager api

2011-06-27 Thread Caiwen Zhang
(1) Add "Calls" property to monitor the current present calls. (2) Remove original "State" property, add it as a parameter of "Calls" property. and add possible value: "held" and "waiting" (3) Remove original "CallWaiting" and "CallWaitingNumber" property(Can get these information from "Cal

[PATCH] doc: Add dial-number/username/password Property

2011-06-21 Thread 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

[PATCH] skip modem port checking when create NDIS gprs context

2011-06-03 Thread Caiwen Zhang
When create NDIS gprs context, It doesn't depend on modem port, don't need to check modem port. --- plugins/huawei.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/huawei.c b/plugins/huawei.c index 639ae0d..6a71305 100644 --- a/plugins/huawei.c +++ b/plugin

[PATCH v4] reopen once if open device failed

2011-06-03 Thread Caiwen Zhang
Sometimes when open the data device, it may fail. If open the data device failed, retry once one second later. --- plugins/huawei.c | 36 +++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git a/plugins/huawei.c b/plugins/huawei.c index e791718..639a

[PATCH v3] reopen once if open device failed

2011-06-02 Thread Caiwen Zhang
Sometimes when open the data device, it may fail. If open the data device failed, retry once one second later. --- plugins/huawei.c | 43 ++- 1 files changed, 38 insertions(+), 5 deletions(-) diff --git a/plugins/huawei.c b/plugins/huawei.c index e79171

[PATCH] add udev rule for Option GTM661W modem

2011-05-25 Thread Caiwen Zhang
--- plugins/ofono.rules |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/plugins/ofono.rules b/plugins/ofono.rules index 5a36380..268b327 100644 --- a/plugins/ofono.rules +++ b/plugins/ofono.rules @@ -391,6 +391,7 @@ ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7401", ENV{O

[PATCH v2] reopen once if open device failed

2011-05-20 Thread Caiwen Zhang
(1) Sometimes when open the data device, it may fail. If open the data device failed, retry once one second later. (2) Fix Huawei NDIS modem gprs doesn't work issue --- plugins/huawei.c | 43 ++- 1 files changed, 38 insertions(+), 5 deletions(-) diff -

[PATCH] add name field when process chap authentication

2011-05-11 Thread Caiwen Zhang
Some systems require name field, otherwise chap authentication will fail. --- gatchat/ppp_auth.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/gatchat/ppp_auth.c b/gatchat/ppp_auth.c index b73f320..f2b8c31 100644 --- a/gatchat/ppp_auth.c +++ b/gatchat/ppp_auth.c @

[PATCH] fix ppp protocol-reject constructing error

2011-05-11 Thread Caiwen Zhang
In PPP Protocol-Reject package the 'rejected data field' should be a copy of the rejected package, the copy starts from the data field. besides, Protocol-Reject package include a 'rejected protocol field', it is the same as the protocol field of the rejected package. Protocol-Reject package struc

[PATCH] reopen data device once if open data device failed

2011-05-10 Thread Caiwen Zhang
Sometimes when open the data device, it may fail. If open the data device failed, retry once one second later. --- plugins/huawei.c | 54 ++ 1 files changed, 50 insertions(+), 4 deletions(-) diff --git a/plugins/huawei.c b/plugins/huawei.c in

[PATCH] fix miss dbus reply issue

2011-05-10 Thread Caiwen Zhang
When set modem offline or power off, if there is some other operation in progress, the dbus reply may lost. Always check the pending dbus message to make sure don't miss any reply. This should be a common issue, this patch only fix the GPRS relatived. --- src/gprs.c | 17 ++-

[PATCH v2] fix can't attach GPRS issue

2011-05-09 Thread Caiwen Zhang
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 dr

[PATCH v2] Add CDMA extension tasks

2010-08-24 Thread Caiwen Zhang
--- TODO | 76 ++ 1 files changed, 76 insertions(+), 0 deletions(-) diff --git a/TODO b/TODO index a97f076..b159c07 100644 --- a/TODO +++ b/TODO @@ -614,3 +614,79 @@ Miscellaneous Priority: Low Complexity: C4 + + +CDMA/EVDO

[PATCH v3] Add CDMA specs

2010-08-24 Thread Caiwen Zhang
--- doc/standards.txt | 85 + 1 files changed, 85 insertions(+), 0 deletions(-) diff --git a/doc/standards.txt b/doc/standards.txt index a7eaa5e..d3e4603 100644 --- a/doc/standards.txt +++ b/doc/standards.txt @@ -81,3 +81,88 @@ technology spec

[PATCH v2] Add CDMA specs

2010-08-23 Thread Caiwen Zhang
--- doc/standards.txt | 85 + 1 files changed, 85 insertions(+), 0 deletions(-) diff --git a/doc/standards.txt b/doc/standards.txt index a7eaa5e..5d386f0 100644 --- a/doc/standards.txt +++ b/doc/standards.txt @@ -81,3 +81,88 @@ technology spec