Open Source Telephony
 help / color / mirror / Atom feed
From: Rafael Ignacio Zurita <rafael.zurita@profusion.mobi>
To: ofono@ofono.org
Subject: Re: [PATCH 6/8] plugins: add gps atom to mbm
Date: Mon, 27 Dec 2010 07:17:09 -0300	[thread overview]
Message-ID: <20101227101709.GA2781@nodo3> (raw)
In-Reply-To: <4D12749D.3090103@gmail.com>

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

Hi Denis,

On Wed, Dec 22, 2010 at 03:58:53PM -0600, Denis Kenzior wrote:
> Hi Rafael,
> 
> >  
> > -	if (modem_dev == NULL || data_dev == NULL)
> > +	if (modem_dev == NULL || data_dev == NULL || gps_dev == NULL)
> >  		return -EINVAL;
> 
> I don't think that failing because the gps device isn't set is such a
> good idea.  There might be mbm cards without a gps node.  Let udev
> autodetection handle this part.

Okey.

> >  
> >  	data->modem_port = create_port(modem_dev);
> > @@ -383,6 +389,20 @@ static int mbm_enable(struct ofono_modem *modem)
> >  	if (getenv("OFONO_AT_DEBUG"))
> >  		g_at_chat_set_debug(data->data_port, mbm_debug, "Data: ");
> >  
> > +	data->gps_port = create_port(gps_dev);
> > +	if (data->gps_port == NULL) {
> > +		g_at_chat_unref(data->data_port);
> > +		data->data_port = NULL;
> > +
> > +		g_at_chat_unref(data->modem_port);
> > +		data->modem_port = NULL;
> > +
> > +		return -EIO;
> > +	}
> 
> So from what I understand we have to send AT*E2GPSNPD to the GPS port in
> order to turn it from a regular AT command port into a GPS port.  At
> this point this port is no longer usable for AT commands.  Right?

Yes, you are right. From what I read the only way for freeing this port would
be reseting the whole module.

> > +
> > +	if (getenv("OFONO_AT_DEBUG"))
> > +		g_at_chat_set_debug(data->gps_port, mbm_debug, "GPS: ");
> > +
> >  	g_at_chat_set_disconnect_function(data->data_port,
> >  						mbm_disconnect, modem);
> >  
> > @@ -415,6 +435,9 @@ static void cfun_disable(gboolean ok, GAtResult *result, gpointer user_data)
> >  	g_at_chat_unref(data->data_port);
> >  	data->data_port = NULL;
> >  
> > +	g_at_chat_unref(data->gps_port);
> > +	data->gps_port = NULL;
> > +
> >  	if (ok)
> >  		ofono_modem_set_powered(modem, FALSE);
> >  }
> > @@ -541,6 +564,9 @@ static void mbm_post_online(struct ofono_modem *modem)
> >  					OFONO_GPRS_CONTEXT_TYPE_MMS);
> >  		ofono_gprs_add_context(data->gprs, data->gc);
> >  	}
> > +
> > +	data->gps = ofono_gps_create(modem, 0,
> > +					"mbmmodem", data->gps_port);
> 
> If my previous comment is correct, then the gps driver should be running
> on the dev port, not on the gps port.

I will fix this. 

I am working on a new version of this gps task based on your comments and
suggestions. Thanks a lot for the review. 

Rafael

  reply	other threads:[~2010-12-27 10:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16 20:30 [PATCH 0/8] Add GPS atom Rafael Ignacio Zurita
2010-12-16 20:30 ` [PATCH 1/8] gps: define new dbus interface Rafael Ignacio Zurita
2010-12-22 21:45   ` Denis Kenzior
2010-12-16 20:30 ` [PATCH 2/8] gps: add new interface to feature map Rafael Ignacio Zurita
2010-12-16 20:30 ` [PATCH 3/8] gps: add public header Rafael Ignacio Zurita
2010-12-22 21:53   ` Denis Kenzior
2010-12-16 20:30 ` [PATCH 4/8] gps: implement interface/atom Rafael Ignacio Zurita
2010-12-16 20:30 ` [PATCH 5/8] mbmmodem: add gps atom Rafael Ignacio Zurita
2010-12-16 20:30 ` [PATCH 6/8] plugins: add gps atom to mbm Rafael Ignacio Zurita
2010-12-22 21:58   ` Denis Kenzior
2010-12-27 10:17     ` Rafael Ignacio Zurita [this message]
2010-12-16 20:30 ` [PATCH 7/8] plugins/udev.c: add gps comparison for add_mbm registered modem Rafael Ignacio Zurita
2010-12-16 20:30 ` [PATCH 8/8] gps: add documentation Rafael Ignacio Zurita
2010-12-22 22:02   ` 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=20101227101709.GA2781@nodo3 \
    --to=rafael.zurita@profusion.mobi \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox