RE: Using ofono HFP

2010-09-28 Thread Zhang, Zhenhua
Hi Silva, Moises Silva wrote: On Mon, Sep 27, 2010 at 9:26 PM, Zhang, Zhenhua zhenhua.zh...@intel.com wrote: Right. See bluez/audio/unix.c for BlueZ part SCO code that cooperate with pulseaudio. BlueZ sends SCO fd to pulseaudio via UNIX type socks. This put me in the right direction

RE: Using ofono HFP

2010-09-27 Thread Zhang, Zhenhua
Hi Moises, Denis Kenzior wrote: Hi Moises, 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

RE: Using ofono HFP

2010-09-27 Thread Zhang, Zhenhua
Hi Silva, From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of Moises Silva Sent: Tuesday, September 28, 2010 10:45 AM To: ofono@ofono.org Subject: Re: Using ofono HFP On Mon, Sep 27, 2010 at 9:26 PM, Zhang

RE: [PATCH 0/1] Patch Description

2010-09-24 Thread Zhang, Zhenhua
Hi, Yang Gu wrote: Phonesim is most of time a convenient way to test oFono. For example, it can be used to test MO call, as well as MT call. And talking about test area, test automation is quite important regarding to both efficiency and effectiveness. In the test of MO call, scripts can be

RE: [PATCH 1/1] Add support to enable/disable specific plugin

2010-09-11 Thread Zhang, Zhenhua
Hi Holtmann, Marcel Holtmann wrote: Hi Zhenhua, Support to load or not load specific plugin when ofono is started. E.g., use 'ofonod -P hfp' to disable hfp plugin. --- src/main.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) patch has been applied. I did all

RE: [PATCH 1/1] hfp: Add faked sim driver to support SIM ready

2010-08-30 Thread Zhang, Zhenhua
Hi, Denis, Denis Kenzior wrote: Hi Zhenhua, On 08/30/2010 04:50 AM, Zhenhua Zhang wrote: HFP modem doesn't have IMSI at all. In order to notify SIM ready to the core, we create a special sim driver with a faked IMSI number. Can you try after commit

RE: About ppp_receive()

2010-08-24 Thread Zhang, Zhenhua
Hi Steven, Steven wrote: Hi, In function ppp_receive, we first check the protocol type of this frame like: guint16 protocol = ppp_proto(buf); and here we assumed the length of the protocol field is 16 bits, but in RFC 1661, the protocol field should be one or two octets. The

RE: About ppp_receive()

2010-08-24 Thread Zhang, Zhenhua
Hi Steven, Steven wrote: Hi Zhenhua Zhang, Zhenhua wrote: Hi Steven, Steven wrote: Hi, In function ppp_receive, we first check the protocol type of this frame like: guint16 protocol = ppp_proto(buf); and here we assumed the length of the protocol field is 16 bits, but in RFC

RE: About Connection between PPP and linux Sockets

2010-08-19 Thread Zhang, Zhenhua
Hi Marcel, Marcel Holtmann wrote: Hi Steven, I have a little question just as the title said? In Ofono how to connect PPP to Linux socket, when we receive packet from network, how the packet go through the kernel to application? modem --PPP--? -- linux kernel(network part)-- socket --

RE: About Connection between PPP and linux Sockets

2010-08-19 Thread Zhang, Zhenhua
Hi Steven, Steven wrote: Hi Zhang Zhang, Zhenhua wrote: Hi Marcel, Marcel Holtmann wrote: Hi Steven, I have a little question just as the title said? In Ofono how to connect PPP to Linux socket, when we receive packet from network, how the packet go through the kernel to application

RE: About Connection between PPP and linux Sockets

2010-08-19 Thread Zhang, Zhenhua
Hi Steven, Steven wrote: Hi Zhang, Zhang, Zhenhua wrote: Hi Steven, Steven wrote: Hi Zhang Zhang, Zhenhua wrote: Hi Marcel, Marcel Holtmann wrote: Hi Steven, I have a little question just as the title said? In Ofono how to connect PPP to Linux socket, when we receive packet

RE: [PATCH 0/10] Unregister AT notifiers when removing drivers

2010-08-12 Thread Zhang, Zhenhua
Hi Marcel, Marcel Holtmann wrote: Hi Zhenhua, This series unregister AT notifiers in removing various AT modem drivers when modem goes to offline mode. Please review them. just a heads up here that Denis and I talked about this. And we are going to fix this inside GAtChat in the

RE: [PATCH 10/16] gprs: Add ofono_gprs_create_context method

2010-08-12 Thread Zhang, Zhenhua
Hi Marcel, Marcel Holtmann wrote: Hi Zhenhua, DUN server may create one primary context if none of contexts existing on the GPRS atom. so Denis and I had a chat about this. And we agreed that oFono core should just create one Internet context if none exists. If the plugin driver

RE: Terminating emergency calls

2010-08-12 Thread Zhang, Zhenhua
Hi Sjur, Sjur Br?ndeland wrote: Denis Kenzior denk...@gmail.com wrote: I thought of one more issue with voice calls. I don't think it is safe to to terminate emergency calls using release_specific, AT+CHLD=1X. At least this don't work for STE modems. I suggest calls in state active

RE: Crash in network-registration.c/creg_notify() when receiving unsolicited +CREG: 0

2010-08-10 Thread Zhang, Zhenhua
Hi Emmanuel, Berthier, Emmanuel wrote: Hi, I use ofono 0.25 and encounter a segmentation fault when trying to put the modem OffLine (flight mode). The AT command sent to modem is: AT+CFUN=4 The modem replies with: OK +CREG=0 Then, in creg_notify(),

RE: [PATCH 2/3] Add dun_enable() function

2010-08-02 Thread Zhang, Zhenhua
Hi Padovan, Gustavo F. Padovan wrote: dun_enable() is called by setting the Powered property to true. It creates a rfcomm link throught the BlueZ Serial API. --- drivers/dunmodem/dunmodem.h |1 + plugins/bluetooth.h |1 + plugins/dun.c | 61

RE: [PATCH 1/3] Bluetooth DUN modem prototype

2010-08-02 Thread Zhang, Zhenhua
Hi Padovan, Gustavo F. Padovan wrote: Add a still dummy DUN code, now it can only creates and removes modems. The DUN plugin follows the HFP one a lot, the is basics a copy of some HFP plugin's parts. --- Makefile.am |6 ++ drivers/dunmodem/dunmodem.c | 51

RE: [PATCH] Fix busylooped in ppp_disconnect for huawei modem

2010-07-26 Thread Zhang, Zhenhua
Hi Kalle, Zhenhua Zhang wrote: Huawei modem closes the modem port after PPP disconnect. So the channel of gatchat is NULL in ppp_disconnect. In such case, we should not resume the chat and call disconnect function when removing the context. Secondly, before removing the gprs context, we

RE: [PATCH] Fix busylooped in ppp_disconnect for huawei modem

2010-07-26 Thread Zhang, Zhenhua
Hi Denis, Denis Kenzior wrote: Hi Zhenhua, On 07/26/2010 09:39 PM, Zhenhua Zhang wrote: Huawei modem closes the modem port after PPP disconnect. So the channel of gatchat is NULL in ppp_disconnect. In such case, we should not resume the chat and call disconnect function when removing

RE: Howto about Qt QML and Ofono

2010-07-23 Thread Zhang, Zhenhua
Hi Matthias, Matthias Günther wrote: Hi Yang, http://matgnt.wordpress.com/2010/07/19/qt-ofono-d-bus-and-qml-part-1/ http://matgnt.wordpress.com/2010/07/19/qt-ofono-d-bus-and-qml-part-2/ http://matgnt.wordpress.com/2010/07/19/qt-ofono-d-bus-and-qml-part-3/ I hope this helps people out

RE: Ofono in Maemo scratchbox--compilation failed.

2010-07-11 Thread Zhang, Zhenhua
Hi Arun, Marcel Holtmann wrote: Hi Arun, I am trying to compile Ofono in Maemo Scratchbox SDK enviornment. Here is the bootstrap-configure output: --- ---

RE: Modem emulator and DUN server side for oFono and BlueZ

2010-07-06 Thread Zhang, Zhenhua
Hi Suraj, suraj wrote: Hi Zhenhua, On Wed, 2010-05-05 at 06:27 +0530, Zhang, Zhenhua wrote: Hi Padovan, Gustavo F. Padovan wrote: Hi Zhenhua, * Zhang, Zhenhua zhenhua.zh...@intel.com [2010-04-27 15:53:54 +0800]: Hi, I am now working on modem emulator and one usage is for DUN

RE: [PATCH] test-server: Use cfmakeraw to set TTY raw mode

2010-07-06 Thread Zhang, Zhenhua
Hi Marcel, Marcel Holtmann wrote: Hi Zhenhua, Use cfmakeraw to disable echoing and special characters processing. If we don't turn off ICRNL, TTY layer translates \r\n to \n\n. --- gatchat/test-server.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git

RE: Crash in at_gprs_context_remove()

2010-07-01 Thread Zhang, Zhenhua
Hi, Zhang, Zhenhua wrote: Hi Kalle, Kalle Valo wrote: Hi, (gdb) bt #0 0x7790b642 in IA__g_atomic_int_exchange_and_add (atomic=0x0, val=-1) at /build/buildd/glib2.0-2.25.8/glib/gatomic-gcc.c:30 #1 0x004325a3 in g_at_ppp_unref (ppp=0x0) at gatchat/gatppp.c:448 #2

RE: [PATCH 2/3] huawei: Add Huawei EM770 modem support

2010-07-01 Thread Zhang, Zhenhua
Hi Marcel, Marcel Holtmann wrote: Hi Zhenhua Zhang, Huawei EM770W is a 3G WCDMA modem that supports HSPA/UMTS/EDGE/GPRS/GSM data service and WCDMA/GSM short message services. It also has voice call capability that supports both 2G and 3G network. --- plugins/huawei.c| 31

RE: [PATCH 3/5] test-server: Add PPP server support

2010-06-30 Thread Zhang, Zhenhua
Hi Denis, Zhenhua Zhang wrote: So that gsmdial and wvdial could talk to test-server and establish PPP connection. --- gatchat/test-server.c | 131 ++--- 1 files changed, 123 insertions(+), 8 deletions(-) diff --git a/gatchat/test-server.c

RE: [PATCH 2/6] gatppp: Add PPP server extension

2010-06-24 Thread Zhang, Zhenhua
Hi Denis, Denis Kenzior wrote: Hi Zhenhua, 1. Add interface to set PPP server info by g_at_ppp_set_server_info. 2. Pass local and peer address through IPCP handshaking. Ok getting pretty close now :) +static void ipcp_reset_server_config_options(struct ipcp_data *ipcp) +{ +

RE: [PATCH 2/6] gatppp: Add PPP server extension

2010-06-24 Thread Zhang, Zhenhua
Hi Denis, Zhang, Zhenhua wrote: Hi Denis, As mentioned above, if Primary / Secondary NBNS server is sent by the client, we need to Conf-Rej just those options to the client. Any other unrecognized options should also be Conf-Rejected. The order is important here, read the spec

RE: [PATCH 1/5] gatppp: Add PPP server extension

2010-06-22 Thread Zhang, Zhenhua
Hi Denis, Denis Kenzior wrote: Hi Zhenhua, static enum rcr_result ipcp_rcr(struct pppcp_data *pppcp, const struct pppcp_packet *packet, guint8 **new_options, guint16 *new_len) { struct ppp_option_iter iter;

RE: [PATCH 03/11] gatppp: Add PPP server extension

2010-06-22 Thread Zhang, Zhenhua
Hi Denis, Denis Kenzior wrote: Hi Zhenhua, +void ipcp_set_server_info(struct pppcp_data *pppcp, guint32 local_addr, + guint32 peer_addr, + guint32 dns1, guint32 dns2, + guint32 nbns1, guint32 nbns2) +{ +

RE: [PATCH 03/11] gatppp: Add PPP server extension

2010-06-20 Thread Zhang, Zhenhua
Hi Denis, Denis Kenzior wrote: Hi Zhenhua, 1. Add interface to set PPP server info by g_at_ppp_set_server_info. 2. Pass local and peer address through IPCP handshaking. --- Its great that you're working on the PPP Server extensions. Can I get you to submit a patch taking ownership of

RE: [PATCH v2] atmodem: fix crash during context deactivation

2010-05-26 Thread Zhang, Zhenhua
Hi Valo, Kalle Valo wrote: --- drivers/atmodem/gprs-context.c | 56 +--- 1 files changed, 18 insertions(+), 38 deletions(-) diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c index ba5f0c0..794db8a 100644 ---

RE: [PATCH 5/9] Move bluetooth utils from hfp.c to bluetooth.c

2010-05-25 Thread Zhang, Zhenhua
Hi Padovan, Gustavo F. Padovan wrote: --- plugins/bluetooth.c | 482 +++ plugins/hfp.c | 458 2 files changed, 518 insertions(+), 422 deletions(-) diff --git a/plugins/bluetooth.c

RE: commit Fix Use hashtable to record udev path breaks huawei

2010-05-19 Thread Zhang, Zhenhua
Hi Kalle, Kalle Valo wrote: Kalle Valo kalle.v...@canonical.com writes: while working on third version of my huawei gprs patches I noticed that this commit breaks huawei: commit af976f7e524746b1b55645967e11ab8250f593a8 Author: Zhenhua Zhang zhenhua.zh...@intel.com Date: Tue May 11

RE: How to start ofono-phonesim in ubuntu-10.04 -reg

2010-05-10 Thread Zhang, Zhenhua
Hi Krishna, From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of krishna k Sent: Monday, May 10, 2010 2:43 PM To: ofono@ofono.org Subject: How to start ofono-phonesim in ubuntu-10.04 -reg Hi Zhenhua,

RE: How to start ofono-phonesim in ubuntu-10.04 -reg

2010-05-10 Thread Zhang, Zhenhua
Hi Krishna, From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of krishna k Sent: Monday, May 10, 2010 4:13 PM To: ofono@ofono.org Subject: How to start ofono-phonesim in ubuntu-10.04 -reg Hi Yoon,

RE: How to start ofono-phonesim in ubuntu-10.04 -reg

2010-05-09 Thread Zhang, Zhenhua
Hi Krishna, From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of krishna k Sent: Monday, May 10, 2010 1:24 PM To: ofono@ofono.org Subject: How to start ofono-phonesim in ubuntu-10.04 -reg Hi Yoon,

RE: [PATCH 1/2] Fix Use hashtable to record udev path

2010-05-06 Thread Zhang, Zhenhua
Hi, Zhang, Zhenhua wrote: Sometimes, Udev device 'remove' event could not report correct parent node of current udev_device. Current code replies on the devpath attached on the parent node to find modem and then remove it. This fix is to change the way to store the devpath info

RE: [PATCH 2/2] Fix check data device before register the modem

2010-05-06 Thread Zhang, Zhenhua
Hi, Zhang, Zhenhua wrote: To avoid the race condition that modem is registered before we retrieve the data device property. --- The second patch is for MBM modem only. We should retrieve data device property before register the modem. Please review it. Thanks. Regards, Zhenhua

RE: Modem emulator and DUN server side for oFono and BlueZ

2010-05-04 Thread Zhang, Zhenhua
Hi Padovan, Gustavo F. Padovan wrote: Hi Zhenhua, * Zhang, Zhenhua zhenhua.zh...@intel.com [2010-04-27 15:53:54 +0800]: Hi, I am now working on modem emulator and one usage is for DUN server role. Since Padovan is working on client role, it's good to share my rough thinking

Modem emulator and DUN server side for oFono and BlueZ

2010-04-27 Thread Zhang, Zhenhua
Hi, I am now working on modem emulator and one usage is for DUN server role. Since Padovan is working on client role, it's good to share my rough thinking for server side implementation. Here are the simple steps I have: 1. Create an oFono emulator atom in oFono. It's the emulator manager that

RE: DUN client for oFono and BlueZ

2010-04-26 Thread Zhang, Zhenhua
Hi Padovan, Gustavo F. Padovan wrote: Hi all, I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

RE: DUN client for oFono and BlueZ

2010-04-26 Thread Zhang, Zhenhua
Hi Padovan, Gustavo F. Padovan wrote: Hi Zhenhua, * Zhang, Zhenhua zhenhua.zh...@intel.com [2010-04-27 10:14:38 +0800]: Hi Padovan, Gustavo F. Padovan wrote: Hi all, I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile

RE: [PATCH 1/5] Refactor the command parsing framework

2010-03-25 Thread Zhang, Zhenhua
Hi Denis, Denis Kenzior wrote: Hi Zhenhua, --- gatchat/gatserver.c | 182 +++--- gatchat/gatserver.h | 7 ++- 2 files changed, 133 insertions(+), 56 deletions(-) -at_command_notify(server, buf, prefix, type); +notify =

RE: [PATCH 1/4] Add gatutil.c to share common APIs with GAtServer

2010-01-14 Thread Zhang, Zhenhua
Hi Denis, Denis Kenzior wrote: Hi Zhenhua, +gboolean g_at_util_set_io(GIOChannel *io) Rename this g_at_util_setup_io +typedef void (*GAtDisconnectFunc)(gpointer user_data); typedef void +(*GAtDebugFunc)(const char *str, gpointer user_data); These don't belong here, create a new file

RE: Merry Christmas to everyone

2009-12-24 Thread Zhang, Zhenhua
Xu, Martin wrote: -Original Message- From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of Marcel Holtmann Sent: Friday, December 25, 2009 12:22 AM To: ofono@ofono.org Subject: Merry Christmas to everyone Hello everyone, and Santa is coming to town and

RE: [PATCH 1/2] Fix remove all atoms in ofono_modem_set_powered

2009-12-08 Thread Zhang, Zhenhua
Hi, Zhang, Zhenhua wrote: We should remove all atoms when we disable the modem. In function set_powered, we remove all atoms if modem is powered down by dbus call. --- src/modem.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) Let me explain more about this fix. In atmodem

RE: [PATCH 1/4] Add hfp_release_specific to release specific call

2009-12-08 Thread Zhang, Zhenhua
Hi, Zhang, Zhenhua wrote: Use AT+CHLD=1x to release a specific call if AG supports that. --- drivers/hfpmodem/voicecall.c | 51 +- 1 files changed, 50 insertions(+), 1 deletions(-) Update the patch to initlize 'struct release_id_req *req' as NULL

RE: [PATCH 4/4] Fix schedule clcc poll in the ring notify

2009-12-08 Thread Zhang, Zhenhua
Hi, Zhang, Zhenhua wrote: Similar to atmodem, We need schedule CLCC poll in the ring notify in case AG doesn't send CLIP notification to us. If CLIP comes right after RING, we cancel the CLCC poll. --- drivers/hfpmodem/voicecall.c | 15 +++ 1 files changed, 15 insertions(+), 0

RE: [PATCH 1/3] Add hfp_list_calls to get current call list

2009-12-06 Thread Zhang, Zhenhua
Hi Denis, Denis Kenzior wrote: Hi Zhenhua, Use AT+CLCC to get current call list. So I did things 'slightly' differently. The new setup should be much simpler for both the plugin and the core. I've tested it on phonesim, but not on HFP. Can you let me know if there are any issues? It

RE: [PATCH] Fix: Poll CLCC to replace the code in call_held=1

2009-11-19 Thread Zhang, Zhenhua
Hi Marcel, Marcel Holtmann wrote: Hi Zhenhua, When using CHLD=2x in multiparty call, call_held is 1 and we should not swap all active-held. So we cannot save this pull in private chat. --- drivers/hfpmodem/voicecall.c | 50 + 1 files changed, 6

RE: [PATCH 4/4] Fix: Fill in the phone number info for outgoing call

2009-11-12 Thread Zhang, Zhenhua
Hi Denis, Denis Kenzior wrote: Hi Zhenhua, +ofono_voicecall_notify(vc, call); + As I mentioned above, you do not need to do this. oFono will synthesize the outgoing call properly. Worst case we will send a PropertyChanged signal after CLCC is polled and the new number is

RE: [PATCH 4/4] Fix: Fill in the phone number info for outgoing call

2009-11-11 Thread Zhang, Zhenhua
Hi Denis, Denis Kenzior wrote: Hi Zhenhua, There're two cases of outgoing call: dial from HF or dial from phone. In the first case, some phones may not support enhanced call status (AT+CLCC) to query outgoing number. So we need to pass struct atd_cb_data to fill in the number and type.

RE: [PATCH 1/3] Add multi calls support for HFP voicecall driver

2009-11-11 Thread Zhang, Zhenhua
Hi Denis, Denis Kenzior wrote: Hi Zhenhua, +static void reset_to_single_call(struct voicecall_data *vd) { + struct ofono_call *oc = vd-calls-data; + + vd-call = oc; + vd-cind_val[HFP_INDICATOR_CALL] = 1; + + if (oc-direction == 1) +

[PATCH] Add voicecall driver for Handsfree profile

2009-10-23 Thread Zhang, Zhenhua
Hi, The first patch is to handle right bracket in at command parser. It's identical with the previous patch I sent in the list. The second patch depends on the first one so I resend it again. It implements voicecall driver for handsfree profile and use AT+CIEV indicator to notify call status

[PATCH] Replace Glib type with standard C type

2009-10-23 Thread Zhang, Zhenhua
Hi, Below patch is to replace Glib type with standard C type in hfpmodem.h, like guint, guint8, etc. Please review it. Regards, Zhenhua --- drivers/hfpmodem/hfpmodem.h |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hfpmodem/hfpmodem.h

[PATCH] Handle right bracket in g_at_result_iter_next_unquoted_string

2009-10-21 Thread Zhang, Zhenhua
Allow g_at_result_iter_next_unquoted_string to handle the bracket when parsing string like chld (1, 2). Original, it returns '1' and '2)'. Now it returns '1' and '2'. g_at_result_iter_close_list handles the right bracket later. --- gatchat/gatresult.c |4 ++-- 1 files changed, 2

[PATCH] Handsfree profile plugins update

2009-10-19 Thread Zhang, Zhenhua
Hi, Attached is update patch for handsfree profile plugin. I move most stuff in drivers/hfpmodem/hfp.c into plugins/hfp.c and simplify them. GSList *indies is replaced as two indexable arrays (cind_names and cind_values), to improve efficiency when we need access name and value by index. The

RE: [PATCH] Add call-volume interface to allow user adjust speaker and mic volume

2009-09-27 Thread Zhang, Zhenhua
Hi Marcel, Marcel Holtmann wrote: Hi Zhenhua, +#define CALL_VOLUME_INTERFACE org.ofono.CallVolume we have to stop doing this. Start using this: #define FOO_INTERFACE OFONO_SERVICE .FooInterface +static void call_volume_unregister(struct ofono_atom *atom); That forward declaration

[PATCH] Add call-volume interface to allow user adjust speaker and mic volume

2009-09-25 Thread Zhang, Zhenhua
Hi, Attached is the patch to add call-volume interface for Ofono. It exposes two properties: 'SpeakerVolume' and 'MicrophoneVolume' to allow user could control phone volume through lower level driver. The ofono_call_volume_notify() is used to report call volume property change notification to the