From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <4f9823290809212308h7ba27f0cr7d4e88c67d38b097@mail.gmail.com> Date: Mon, 22 Sep 2008 08:08:34 +0200 From: "Reto Bachmann" To: "BlueZ development" In-Reply-To: <89b6ba3a0809190118h1b85dcd7y9fc7dcf89fab09ee@mail.gmail.com> MIME-Version: 1.0 References: <4f9823290809180242j56115a6es3a77ffa21eabbf0a@mail.gmail.com> <1221757910.6782.17.camel@californication> <4f9823290809182356x2ad1386bn3de0ebb6ada66789@mail.gmail.com> <89b6ba3a0809190118h1b85dcd7y9fc7dcf89fab09ee@mail.gmail.com> Subject: Re: [Bluez-devel] What happens with bluetooth when connection is interrupted Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1272402424056023227==" Errors-To: bluez-devel-bounces@lists.sourceforge.net --===============1272402424056023227== Content-Type: multipart/alternative; boundary="----=_Part_9764_21083190.1222063714357" ------=_Part_9764_21083190.1222063714357 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Patryk, i see the problems and I will change it. I now made some tests and i found out that the library waits for a specific time until it sends the signal. I suppose that in this time it tries to repair the connection. Is it possible to manage this time period with compiling flags or something? Thanks, Reto 2008/9/19 Patryk Zawadzki > On Fri, Sep 19, 2008 at 8:56 AM, Reto Bachmann > wrote: > > So I need to connect the D-Bus signal RemoteDeviceDisconnected to find > out > > that I am not connected anymore? > > > > Why shouldn't I poll for a status? Is it just because a signal is sent > > either way or is the status i ask for not the true status? > > Because polling is the worst strategy both CPU- and power-wise. It > causes frequent wakeups that waste power and prevent CPUs from > entering a deep idle state. They also generate unnecessary traffic for > the IPC mechanism so if every program decided to poll for something > once a second, services like DBus would likely get hosed. > > -- > Patryk Zawadzki > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Bluez-devel mailing list > Bluez-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-devel > ------=_Part_9764_21083190.1222063714357 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi Patryk,

i see the problems and I will change it. I now made some tests and i found out that the library waits for a specific time until it sends the signal. I suppose that in this time it tries to repair the connection.

Is it possible to manage this time period with compiling flags or something?

Thanks,
Reto

2008/9/19 Patryk Zawadzki <patrys@pld-linux.org>
On Fri, Sep 19, 2008 at 8:56 AM, Reto Bachmann <reto.bachmann@gmail.com> wrote:
> So I need to connect the D-Bus signal RemoteDeviceDisconnected to find out
> that I am not connected anymore?
>
> Why shouldn't I poll for a status? Is it just because a signal is sent
> either way or is the status i ask for not the true status?

Because polling is the worst strategy both CPU- and power-wise. It
causes frequent wakeups that waste power and prevent CPUs from
entering a deep idle state. They also generate unnecessary traffic for
the IPC mechanism so if every program decided to poll for something
once a second, services like DBus would likely get hosed.

--
Patryk Zawadzki

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

------=_Part_9764_21083190.1222063714357-- --===============1272402424056023227== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ --===============1272402424056023227== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel --===============1272402424056023227==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <89b6ba3a0809190118h1b85dcd7y9fc7dcf89fab09ee@mail.gmail.com> Date: Fri, 19 Sep 2008 10:18:55 +0200 From: "Patryk Zawadzki" To: "BlueZ development" In-Reply-To: <4f9823290809182356x2ad1386bn3de0ebb6ada66789@mail.gmail.com> MIME-Version: 1.0 References: <4f9823290809180242j56115a6es3a77ffa21eabbf0a@mail.gmail.com> <1221757910.6782.17.camel@californication> <4f9823290809182356x2ad1386bn3de0ebb6ada66789@mail.gmail.com> Subject: Re: [Bluez-devel] What happens with bluetooth when connection is interrupted Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Sender: bluez-devel-bounces@lists.sourceforge.net Errors-To: bluez-devel-bounces@lists.sourceforge.net On Fri, Sep 19, 2008 at 8:56 AM, Reto Bachmann wrote: > So I need to connect the D-Bus signal RemoteDeviceDisconnected to find out > that I am not connected anymore? > > Why shouldn't I poll for a status? Is it just because a signal is sent > either way or is the status i ask for not the true status? Because polling is the worst strategy both CPU- and power-wise. It causes frequent wakeups that waste power and prevent CPUs from entering a deep idle state. They also generate unnecessary traffic for the IPC mechanism so if every program decided to poll for something once a second, services like DBus would likely get hosed. -- Patryk Zawadzki ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <4f9823290809182356x2ad1386bn3de0ebb6ada66789@mail.gmail.com> Date: Fri, 19 Sep 2008 08:56:05 +0200 From: "Reto Bachmann" To: "BlueZ development" In-Reply-To: <1221757910.6782.17.camel@californication> MIME-Version: 1.0 References: <4f9823290809180242j56115a6es3a77ffa21eabbf0a@mail.gmail.com> <1221757910.6782.17.camel@californication> Subject: Re: [Bluez-devel] What happens with bluetooth when connection is interrupted Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1725842046==" Sender: bluez-devel-bounces@lists.sourceforge.net Errors-To: bluez-devel-bounces@lists.sourceforge.net --===============1725842046== Content-Type: multipart/alternative; boundary="----=_Part_14452_13239505.1221807365904" ------=_Part_14452_13239505.1221807365904 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Marcel, whatever you do don't poll for a status. You will get a D-Bus signal if > you are connected or paired etc. Check how bluez-gnome is doing it. So I need to connect the D-Bus signal RemoteDeviceDisconnected to find out that I am not connected anymore? Why shouldn't I poll for a status? Is it just because a signal is sent either way or is the status i ask for not the true status? Regards, Reto > > > Regards > > Marcel > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Bluez-devel mailing list > Bluez-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-devel > ------=_Part_14452_13239505.1221807365904 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi Marcel,


whatever you do don't poll for a status. You will get a D-Bus signal if
you are connected or paired etc. Check how bluez-gnome is doing it.

So I need to connect the D-Bus signal RemoteDeviceDisconnected to find out that I am not connected anymore?

Why shouldn't I poll for a status? Is it just because a signal is sent either way or is the status i ask for not the true status?

Regards,

Reto
 


Regards

Marcel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

------=_Part_14452_13239505.1221807365904-- --===============1725842046== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ --===============1725842046== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel --===============1725842046==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marcel Holtmann To: BlueZ development In-Reply-To: <4f9823290809180242j56115a6es3a77ffa21eabbf0a@mail.gmail.com> References: <4f9823290809180242j56115a6es3a77ffa21eabbf0a@mail.gmail.com> Date: Thu, 18 Sep 2008 19:11:50 +0200 Message-Id: <1221757910.6782.17.camel@californication> Mime-Version: 1.0 Subject: Re: [Bluez-devel] What happens with bluetooth when connection is interrupted Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Sender: bluez-devel-bounces@lists.sourceforge.net Errors-To: bluez-devel-bounces@lists.sourceforge.net Hi Reto, > I have a little question. I have to develop an Application where it > can happen that the connection interrupts. I poll the adapter every > second to see if I am still connected to the specific device. Now I > have to know if there is a possibility that the bluez-function > "isConnected(string address)" (D-Bus-Function) returns false but the > connection itself is recovered by the BT-Stack so the connection would > still exist. whatever you do don't poll for a status. You will get a D-Bus signal if you are connected or paired etc. Check how bluez-gnome is doing it. Regards Marcel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <223378410809180508r81687as3d67bdd66d8b754@mail.gmail.com> Date: Thu, 18 Sep 2008 17:38:37 +0530 From: "rakesh agarwal" To: "BlueZ development" In-Reply-To: <4f9823290809180242j56115a6es3a77ffa21eabbf0a@mail.gmail.com> MIME-Version: 1.0 References: <4f9823290809180242j56115a6es3a77ffa21eabbf0a@mail.gmail.com> Subject: Re: [Bluez-devel] What happens with bluetooth when connection is interrupted Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1124646352==" Sender: bluez-devel-bounces@lists.sourceforge.net Errors-To: bluez-devel-bounces@lists.sourceforge.net --===============1124646352== Content-Type: multipart/alternative; boundary="----=_Part_20031_14528572.1221739717686" ------=_Part_20031_14528572.1221739717686 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi to all, Can anyone post a sample program for bonding with bluetooth device in C language. Regards, Rakesh On Thu, Sep 18, 2008 at 3:12 PM, Reto Bachmann wrote: > Hi to all, > > I have a little question. I have to develop an Application where it can > happen that the connection interrupts. I poll the adapter every second to > see if I am still connected to the specific device. Now I have to know if > there is a possibility that the bluez-function "isConnected(string address)" > (D-Bus-Function) returns false but the connection itself is recovered by the > BT-Stack so the connection would still exist. > > Kind regards, > Reto > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Bluez-devel mailing list > Bluez-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-devel > > ------=_Part_20031_14528572.1221739717686 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi to all,

Can anyone post a sample program for bonding with bluetooth device in C language.

Regards,
Rakesh


On Thu, Sep 18, 2008 at 3:12 PM, Reto Bachmann <reto.bachmann@gmail.com> wrote:
Hi to all,

I have a little question. I have to develop an Application where it can happen that the connection interrupts. I poll the adapter every second to see if I am still connected to the specific device. Now I have to know if there is a possibility that the bluez-function "isConnected(string address)" (D-Bus-Function) returns false but the connection itself is recovered by the BT-Stack so the connection would still exist.

Kind regards,
Reto

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel


------=_Part_20031_14528572.1221739717686-- --===============1124646352== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ --===============1124646352== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel --===============1124646352==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <4f9823290809180242j56115a6es3a77ffa21eabbf0a@mail.gmail.com> Date: Thu, 18 Sep 2008 11:42:19 +0200 From: "Reto Bachmann" To: bluez-devel@lists.sourceforge.net MIME-Version: 1.0 Subject: [Bluez-devel] What happens with bluetooth when connection is interrupted Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0937047296==" Sender: bluez-devel-bounces@lists.sourceforge.net Errors-To: bluez-devel-bounces@lists.sourceforge.net --===============0937047296== Content-Type: multipart/alternative; boundary="----=_Part_2224_22547388.1221730939968" ------=_Part_2224_22547388.1221730939968 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi to all, I have a little question. I have to develop an Application where it can happen that the connection interrupts. I poll the adapter every second to see if I am still connected to the specific device. Now I have to know if there is a possibility that the bluez-function "isConnected(string address)" (D-Bus-Function) returns false but the connection itself is recovered by the BT-Stack so the connection would still exist. Kind regards, Reto ------=_Part_2224_22547388.1221730939968 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi to all,

I have a little question. I have to develop an Application where it can happen that the connection interrupts. I poll the adapter every second to see if I am still connected to the specific device. Now I have to know if there is a possibility that the bluez-function "isConnected(string address)" (D-Bus-Function) returns false but the connection itself is recovered by the BT-Stack so the connection would still exist.

Kind regards,
Reto
------=_Part_2224_22547388.1221730939968-- --===============0937047296== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ --===============0937047296== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel --===============0937047296==--