gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: howto change gnokii driver on the run


From: Pawel Kot
Subject: Re: howto change gnokii driver on the run
Date: Sat, 7 Jul 2007 18:44:08 +0200

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.

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.

take care,
pkot
--
Pawel Kot




reply via email to

[Prev in Thread] Current Thread [Next in Thread]