From: Pavel Machek <pavel@ucw.cz>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: Gatt server with random address does not work (everything is ok with public address)
Date: Wed, 17 Apr 2019 22:37:30 +0200 [thread overview]
Message-ID: <20190417203730.GA25856@amd> (raw)
In-Reply-To: <CABBYNZK92AH7fnQJ7ikz=nvroVN9AKQDNZ07es2V52kRP0RL=g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2143 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:
>
> Have you tried setting Privacy = device?
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/main.conf#n71
I tried playing with privacy, but could not get it to work. But that
was some time ago, and I could have messed it up.
> > #!/bin/bash
> > (
...
> > echo static-addr c2:34:56:78:90:ab
...
> > 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.
>
> bluetoothd don't really know that you have set a static address like
> that, anyway I don't know what exactly is not working so it very hard
> to give any instruction with such vague description of the problem.
Ok, if bluetoothd does not know I've done this, that would kind of
explain the problem.
I'm trying to run gatt-server, so I'll need to get static address to
work somehow. What is the correct way to set static address, so that
bluetoothd has chance to know about it? Do I need to patch sources for
that?
> > 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?
>
> Look at privacy, if that doesn't work then collect the journal logs
> and btmon traces, etc.
Privacy does not do exactly what I need, but I'll try.
Thanks a lot for help,
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 --]
next prev parent reply other threads:[~2019-04-17 20:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2019-04-18 19:01 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190417203730.GA25856@amd \
--to=pavel@ucw.cz \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).