linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Gatt server with random address does not work (everything is ok with public address)
@ 2019-04-16 19:32 Pavel Machek
  2019-04-17 18:42 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2019-04-16 19:32 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]

Hi!

I adapted example-gatt-server for a project... and it works ok
(thanks), as long as public address is used. I could not configure
random address in main.conf, so I'm doing it with btmgmt:

#!/bin/bash
(
    echo power off
    sleep .1
    echo le on
    sleep .1
    echo bredr off
    sleep .1
    echo static-addr c2:34:56:78:90:ab
    #echo public-addr 00:1A:7D:DA:71:11
    #echo static-addr c2:34:56:78:90:ab
    sleep .1
    echo connectable on
    sleep .1
    echo pairable on
    sleep .1
#    echo discov on
    sleep .1
#    echo advertising on
    sleep .1
    sleep .1
    echo power on
) | sudo ../bluez/tools/btmgmt
sleep 2

With random address, it does not work: lescan from other machine
detects right address, and I can connect, but that's it, services
can't be listed.

I'm using 4.19 kernel on one side and current -next on the other side,
with bluez e4cf43fc62b4e4dbabc72d4e44e095d7a9087992, Fri Sep 7
16:25:44 2018.

And it seems I'm not the only one having this problem:
https://stackoverflow.com/questions/50707914/setup-bluez-gatt-server-with-random-address

Any ideas how to debug that? Does configuration with random address
work for you? Is there chance update to latest versions helps?

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

end of thread, other threads:[~2019-04-18 19:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-16 19:32 Gatt server with random address does not work (everything is ok with public address) Pavel Machek
2019-04-17 18:42 ` Luiz Augusto von Dentz
2019-04-17 20:37   ` Pavel Machek
2019-04-18 19:01     ` Pavel Machek

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).