linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Connecting to Bluetooth Low Energy devices
@ 2012-09-13 15:34 Philipp Claves
  2012-09-13 16:54 ` Anderson Lizardo
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Claves @ 2012-09-13 15:34 UTC (permalink / raw)
  To: linux-bluetooth

Hello

Trying  to get started with Bluetooth Low Energy devices, i used hcitool and 
gatttool to enumerate device attributes, but did not get far:

# hcitool lescan
LE Scan ...
<MAC-Device1> Battery V1.0
<MAC-Device1> (unknown)
<MAC-Device2> Battery V1.0
<MAC-Device2> (unknown)
^C

# gatttool -b <MAC-Device1> -I
[   ][<MAC-Device1>][LE]> connect
Connecting... connect error: connect error: Connection refused (111)
[   ][<MAC-Device1>][LE]>

This is all i get.

The devices are Nordic Semiconductor nRF8001 based and currently run a simple 
BTLE demo application by Nordic Semiconductor. It does not use bind/paring but 
simple connect. Unfornately that doesn't seem to work.

The host uses an of-the-shelf USB Bluetooth 4.0 Stick with a Broadcom 
BCM20702A0 Chip inside.

Am i doing something obviously wrong?
Any tips where to get more information about the error (dmesg shows nothing)?

Regards
Philipp Claves

-- 
Budelmann Elektronik GmbH
Von-Renesse-Weg 60
48163 Münster
Germany

Tel.  +49 (0)2501 9208440
Fax   +49 (0)2501 5887024
claves@budelmann-elektronik.com
www.budelmann-elektronik.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Connecting to Bluetooth Low Energy devices
  2012-09-13 15:34 Connecting to Bluetooth Low Energy devices Philipp Claves
@ 2012-09-13 16:54 ` Anderson Lizardo
  2012-09-14  8:55   ` Philipp Claves
  0 siblings, 1 reply; 4+ messages in thread
From: Anderson Lizardo @ 2012-09-13 16:54 UTC (permalink / raw)
  To: Philipp Claves; +Cc: linux-bluetooth

Hi Philipp,

On Thu, Sep 13, 2012 at 11:34 AM, Philipp Claves
<claves@budelmann-elektronik.com> wrote:
> Hello
>
> Trying  to get started with Bluetooth Low Energy devices, i used hcitool and
> gatttool to enumerate device attributes, but did not get far:
>
> # hcitool lescan
> LE Scan ...
> <MAC-Device1> Battery V1.0
> <MAC-Device1> (unknown)
> <MAC-Device2> Battery V1.0
> <MAC-Device2> (unknown)
> ^C
>
> # gatttool -b <MAC-Device1> -I
> [   ][<MAC-Device1>][LE]> connect
> Connecting... connect error: connect error: Connection refused (111)
> [   ][<MAC-Device1>][LE]>
>
> This is all i get.

Which kernel version are you running?

> Am i doing something obviously wrong?
> Any tips where to get more information about the error (dmesg shows nothing)?

run "hcidump -X" and check the logs while you run "hcitool lescan".
Then check the type of advertising those devices are sending. They
should be connectable advertisings to be able to connect to them. Also
check the address type, if it is "Random" you need to pass "-t random"
to gatttool.

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Connecting to Bluetooth Low Energy devices
  2012-09-13 16:54 ` Anderson Lizardo
@ 2012-09-14  8:55   ` Philipp Claves
  2012-09-17  0:44     ` Anderson Lizardo
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Claves @ 2012-09-14  8:55 UTC (permalink / raw)
  To: Anderson Lizardo; +Cc: linux-bluetooth

Hi Anderson

On Thu, Sep 13, 2012 at 12:54:26, Anderson Lizardo wrote:
> Hi Philipp,
> 
> On Thu, Sep 13, 2012 at 11:34 AM, Philipp Claves
> 
> <claves@budelmann-elektronik.com> wrote:
> > Hello
> > 
> > Trying  to get started with Bluetooth Low Energy devices, i used hcitool
> > and gatttool to enumerate device attributes, but did not get far:
> > 
> > # hcitool lescan
> > LE Scan ...
> > <MAC-Device1> Battery V1.0
> > <MAC-Device1> (unknown)
> > <MAC-Device2> Battery V1.0
> > <MAC-Device2> (unknown)
> > ^C
> > 
> > # gatttool -b <MAC-Device1> -I
> > [   ][<MAC-Device1>][LE]> connect
> > Connecting... connect error: connect error: Connection refused (111)
> > [   ][<MAC-Device1>][LE]>
> > 
> > This is all i get.
> 
> Which kernel version are you running?
Linux 3.5.3
Which is the minimum version required?

> 
> > Am i doing something obviously wrong?
> > Any tips where to get more information about the error (dmesg shows
> > nothing)?
> run "hcidump -X" and check the logs while you run "hcitool lescan".
> Then check the type of advertising those devices are sending. They
> should be connectable advertisings to be able to connect to them. Also
> check the address type, if it is "Random" you need to pass "-t random"
> to gatttool.

Thanks, -t random did the trick.
But it's still strange, the device addresses never changed even once while 
working with them. The bluetooth SIG talk about LE adresses mentioned random 
adresses to change every 15 minutes or so....
I need to investigate this more.

Thanks for your help!


Philipp Claves
-- 
Budelmann Elektronik GmbH
Von-Renesse-Weg 60
48163 Münster
Germany

Tel.  +49 (0)2501 9208440
Fax   +49 (0)2501 5887024
claves@budelmann-elektronik.com
www.budelmann-elektronik.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Connecting to Bluetooth Low Energy devices
  2012-09-14  8:55   ` Philipp Claves
@ 2012-09-17  0:44     ` Anderson Lizardo
  0 siblings, 0 replies; 4+ messages in thread
From: Anderson Lizardo @ 2012-09-17  0:44 UTC (permalink / raw)
  To: Philipp Claves; +Cc: linux-bluetooth

Hi,

On Fri, Sep 14, 2012 at 4:55 AM, Philipp Claves
<claves@budelmann-elektronik.com> wrote:
>> Which kernel version are you running?
> Linux 3.5.3
> Which is the minimum version required?

If you run a too old kernel with a recent bluez, bluez will complain
(due to mgmt channel change), so I think this version is fine.

> Thanks, -t random did the trick.
> But it's still strange, the device addresses never changed even once while
> working with them. The bluetooth SIG talk about LE adresses mentioned random
> adresses to change every 15 minutes or so....
> I need to investigate this more.

This behavior depends on which random address type is used.

static random addresses are not required to change. Some (all?)
devices change their static random address when battery is removed.

private random addresses need to change periodically to avoid tracking.

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-17  0:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 15:34 Connecting to Bluetooth Low Energy devices Philipp Claves
2012-09-13 16:54 ` Anderson Lizardo
2012-09-14  8:55   ` Philipp Claves
2012-09-17  0:44     ` Anderson Lizardo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).