Re: low energy: does gatt client/server work in current version? How to test?

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

 



Hi!

> > > Using hciconfig while bluetoothd is running sounds kind-of
> > > dangerous. Stackoverflow (2) suggests using btmgmt (3) instead, and
> > > things got slightly different, but did not start to work for me. Is
> > > there documentation how to get this to work somewhere?
> 
> Have a look at bluetoothctl first, all the necessary commands are
> there to enable to act as peripheral:

First, thanks a lot. With bluetoothctl, it indeed works.

> > > (3)
> > > sudo tools/btmgmt -i hci0 power off
> > > sudo tools/btmgmt -i hci0 le on
> > > sudo tools/btmgmt -i hci0 connectable on
> > > sudo tools/btmgmt -i hci0 name "some friendly name"
> > > sudo tools/btmgmt -i hci0 advertising on
> > > sudo tools/btmgmt -i hci0 power on
> > > tools/btgatt-server -i hci0 -s low -t public -r -v
> 
> No need to use btmgmt, applications should use the D-Bus API which has
> pretty much everything you are doing with btmgmt.

Pretty much, yes.

There's one piece I'm missing. I need to use "random address", because
that's what other side of link wants to talk to. "privacy on" from
btmgmt does randomize address (and sets the right bit). I have not
found equivalent in bluetoothctl.

Plus... I'd really like to use "random, but fixed for given machine"
address, as this is device other side is expected to pair with.

Ideas woudl be welcome.

> > >     def up(m):
> > >         print("Starting up BLEE")
> > >         os.system("sudo ../bluez/src/bluetoothd -d -n &")
> > >         time.sleep(2)
> > >         os.system("sudo ./gatt-server &")
> 
> bluetoothd is already acting as a GATT server.

I may have misnamed the component, but something needs to tell which
attributes to implement to bluetoothd.

Thanks,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux