[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: howto change gnokii driver on the run
From: |
Bastien Nocera |
Subject: |
Re: howto change gnokii driver on the run |
Date: |
Sat, 07 Jul 2007 18:01:28 +0100 |
On Sat, 2007-07-07 at 18:44 +0200, Pawel Kot wrote:
> Hi,
>
> On 7/7/07, Bastien Nocera <address@hidden> wrote:
> > On Sat, 2007-07-07 at 17:05 +0200, Pawel Kot wrote:
> > > On 7/7/07, Bastien Nocera <address@hidden> wrote:
> > > > Nothing seems to use cfg_set (it's a gnokii-internal.h unused function),
> > >
> > > Indeed. But it is possible to use it. I don't recommend this method as
> > > function name will change defnitely when we would like to put it in
> > > documented gnokii API.
> >
> > I didn't manage to use it in gnome-phone-manager, even after declaring
> > it as extern. The symbol seems to be private and/or not exported.
>
> Strange. Shared libraries have by default exported symbols. You may
> add GNOKII_API to declaration and definition. That may help.
>
> > > > and the first parameter is a gn_cfg_header, not a gn_cfg_info. How do I
> > > > get that out of the state?
> > >
> > > gn_cfg_info is a global variable in libgnokii (please don't comment
> > > that, it's on the list to be changed) of gn_cfg_header (see top of
> > > common/cfgreader.c). Just declare it extern in your app and use
> > > directly.
> > > Unfortunately it makes harder to use few connections at the same time.
> >
> > I set my phone to ask for confirmation for each connection. And using
> > the attached patch still connects twice to the phone.
>
> Hm. That's true unfortunately. Current design makes the driver to
> close the link. The solution would be to add the additional
> operations:
> GN_OP_UnloadDriver
> GN_OP_CloseLink
> Then for what you want, you'd call not GN_OP_Terminate (as
> gn_lib_phone_close() does) but GN_OP_CloseLink.
OK. So my current solution in gnome-phone-manager to completely
tear-down the link and create a new one is just as good.
> > I had to add a sleep, otherwise gn_lib_phone_open() fails with a busy
> > device.
>
> Over bluetooth? Serial? Irda? That may have something to do either
> with the driver or with the device itself.
Bluetooth, BlueZ stack, Nokia 6230i. Might be the device not getting
ready fast enough indeed, I added some sleeps in the phone-manager code
some time ago already.
/me goes back to +CNMI support
--
Bastien Nocera <address@hidden>