All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH -v3 7/7] gsmdial: add option for Bluetooth DUN dialing
Date: Tue, 08 Feb 2011 21:25:05 -0600	[thread overview]
Message-ID: <4D520911.8090809@gmail.com> (raw)
In-Reply-To: <1297202464-19155-7-git-send-email-padovan@profusion.mobi>

[-- Attachment #1: Type: text/plain, Size: 2059 bytes --]

Hi Gustavo,

On 02/08/2011 04:01 PM, Gustavo F. Padovan wrote:
> ---
>  gatchat/gsmdial.c |   17 ++++++++++++++---
>  1 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/gatchat/gsmdial.c b/gatchat/gsmdial.c
> index 1be80e3..d54a26e 100644
> --- a/gatchat/gsmdial.c
> +++ b/gatchat/gsmdial.c
> @@ -56,6 +56,7 @@ static gboolean option_legacy = FALSE;
>  static gchar *option_username = NULL;
>  static gchar *option_password = NULL;
>  static gchar *option_pppdump = NULL;
> +static gboolean option_bluetooth = 0;
>  
>  static GAtPPP *ppp;
>  static GAtChat *control;
> @@ -266,6 +267,9 @@ static void no_carrier_notify(GAtResult *result, gpointer user_data)
>  {
>  	char buf[64];
>  
> +	if (option_bluetooth)
> +		return;
> +

Should the return be quit_eventloop by any chance?

>  	sprintf(buf, "AT+CFUN=%u", option_offmode);
>  	g_at_chat_send(control, buf, none_prefix, power_down, NULL, NULL);
>  }
> @@ -612,6 +616,8 @@ static GOptionEntry options[] = {
>  				"Specify CFUN offmode" },
>  	{ "legacy", 'l', 0, G_OPTION_ARG_NONE, &option_legacy,
>  				"Use ATD*99***<cid>#" },
> +	{ "bluetooth", 'b', 0, G_OPTION_ARG_NONE, &option_bluetooth,
> +				"Use only ATD*99" },
>  	{ "username", 'u', 0, G_OPTION_ARG_STRING, &option_username,
>  				"Specify PPP username" },
>  	{ "password", 'w', 0, G_OPTION_ARG_STRING, &option_password,
> @@ -700,9 +706,14 @@ int main(int argc, char **argv)
>  
>  	event_loop = g_main_loop_new(NULL, FALSE);
>  
> -	g_at_chat_send(control, "ATE0Q0V1", NULL, NULL, NULL, NULL);
> -	g_at_chat_send(control, "AT+CFUN?", cfun_prefix,
> -						check_mode, NULL, NULL);
> +	if (option_bluetooth) {
> +		g_at_chat_send(control, "ATD*99", none_prefix, connect_cb,
> +				NULL, NULL);
> +	} else {
> +		g_at_chat_send(control, "ATE0Q0V1", NULL, NULL, NULL, NULL);
> +		g_at_chat_send(control, "AT+CFUN?", cfun_prefix,
> +							check_mode, NULL, NULL);
> +	}
>  
>  	g_main_loop_run(event_loop);
>  	g_source_remove(signal_source);

Regards,
-Denis

  reply	other threads:[~2011-02-09  3:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08 22:00 [PATCH -v3 1/7] bluetooth: Add bluetooth server support Gustavo F. Padovan
2011-02-08 22:00 ` [PATCH -v3 2/7] bluetooth: Add Bluetooth service authorization support Gustavo F. Padovan
2011-02-08 22:01   ` [PATCH -v3 3/7] include: add public headed to emulator atom Gustavo F. Padovan
2011-02-08 22:01     ` [PATCH -v3 4/7] emulator: Add emulator atom in oFono Gustavo F. Padovan
2011-02-08 22:01       ` [PATCH -v3 5/7] dun_gw: Add DUN server plugin for oFono Gustavo F. Padovan
2011-02-08 22:01         ` [PATCH -v3 6/7] emulator: Implement dialing up for DUN Gustavo F. Padovan
2011-02-08 22:01           ` [PATCH -v3 7/7] gsmdial: add option for Bluetooth DUN dialing Gustavo F. Padovan
2011-02-09  3:25             ` Denis Kenzior [this message]
2011-02-09 10:43         ` [PATCH -v3 5/7] dun_gw: Add DUN server plugin for oFono Guillaume Zajac
2011-02-09  3:20   ` [PATCH -v3 2/7] bluetooth: Add Bluetooth service authorization support Denis Kenzior
2011-02-09  3:20 ` [PATCH -v3 1/7] bluetooth: Add bluetooth server support Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D520911.8090809@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.