All of lore.kernel.org
 help / color / mirror / Atom feed
* gatt server and reset of hci device
@ 2016-05-11 12:51 Arthur LAMBERT
  2016-05-12  8:39 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 10+ messages in thread
From: Arthur LAMBERT @ 2016-05-11 12:51 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

I am working with bluez 5.39. I have a custom gatt server which used c api from
btgatt-server from bluez source. Eveything is working great exept when I reset
hci device. I need to disable bluetooth for few hours for specific use case.

If I run hci down/up and try again to connect to gatt server, the client is able
to connect but services are not available. Moreover my server does not see the
client connexion.

Do I need to make a specific stuff to be able to make it work this use case ?

Output from btgatt-client :

[arthur ] ./btgatt-client -d 00:AE:FA:BC:77:69
Connecting to device... Done
[GATT client]# services
GATT client not initialized

Output from server :

[arthur ] ./mygatt_server
Started listening on ATT channel. Waiting for connections

Thanks,
Arthur.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: gatt server and reset of hci device
@ 2016-06-29 12:33 Arthur LAMBERT
  2016-06-29 13:22 ` Tobias Svehagen
  0 siblings, 1 reply; 10+ messages in thread
From: Arthur LAMBERT @ 2016-06-29 12:33 UTC (permalink / raw)
  To: Tobias Svehagen; +Cc: linux-bluetooth

> What version of bluez are you using?

5.37 & 5.39 & 5.40. Same result for all these versions.

> Yes you can also look at tools/gatt-service.c for a C example of using
> the GATT dbus API.

Ok thanks. I will check that.

> Can you run 'bluetoothd -nE -d src/gatt-database.c'. Do you see
> something like 'GATT Manager registered for adapter: /org/bluez/hci0'?

[arthur ] sudo ./bluetoothd -nE -d src/gatt-database.
[sudo] password for arthur: 
bluetoothd[9754]: Bluetooth daemon 5.39
bluetoothd[9754]: Unknown key PageTimeout in main.conf
bluetoothd[9754]: Unknown key InitiallyPowered in main.conf
bluetoothd[9754]: Unknown key RememberPowered in main.conf
bluetoothd[9754]: Unknown key EnableGatt in main.conf
bluetoothd[9754]: Starting SDP server
bluetoothd[9754]: Bluetooth management interface 1.4 initialized
bluetoothd[9754]: Failed to obtain handles for "Service Changed" characteristic
bluetoothd[9754]: Failed to read advertising features: Unknown Command (0x01)
bluetoothd[9754]: hci0 Load Connection Parameters failed: Unknown Command (0x01)

I replace the main.conf from source in /etc and retry the test :

[arthur ] sudo ./bluetoothd -nE -d src/gatt-database.
bluetoothd[11131]: Bluetooth daemon 5.39
bluetoothd[11131]: Starting SDP server
bluetoothd[11131]: Bluetooth management interface 1.4 initialized
bluetoothd[11131]: Failed to obtain handles for "Service Changed" characteristic
bluetoothd[11131]: Failed to read advertising features: Unknown Command (0x01)
bluetoothd[11131]: hci0 Load Connection Parameters failed: Unknown Command (0x01)

This test is running on ubuntu 14.04. We stop bluetooth service before starting bluetoothd.
We also run the test on arm target but without trouble this time.

Arthur.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: gatt server and reset of hci device
@ 2016-06-29 13:31 Arthur LAMBERT
  2016-06-29 13:39 ` Tobias Svehagen
  0 siblings, 1 reply; 10+ messages in thread
From: Arthur LAMBERT @ 2016-06-29 13:31 UTC (permalink / raw)
  To: Tobias Svehagen; +Cc: linux-bluetooth

> Okay, the 'Unknown Command' lines don't look so good, what kernel are
> you running?

[arthur * dev] uname -a
Linux arthur-bzh 3.13.0-88-generic #135-Ubuntu SMP Wed Jun 8 21:10:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: gatt server and reset of hci device
@ 2016-07-07 14:55 Arthur LAMBERT
  0 siblings, 0 replies; 10+ messages in thread
From: Arthur LAMBERT @ 2016-07-07 14:55 UTC (permalink / raw)
  To: Tobias Svehagen; +Cc: linux-bluetooth

Sorry for the delay of my answer.

> You should update your kernel. Ubuntu 14.04.4 uses kernel 4.2.

Ok I tried to update my kernel with linux-image-4.2.0-41-generic + headers with
apt-get. After rebooting my device all my peripherals are not working (wifi/bt/usb).
Due to that I will work directly on my ARM target. I will try to fix the problem
on x86 later.

Thanks for your help.

Arthur.

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

end of thread, other threads:[~2016-07-07 14:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11 12:51 gatt server and reset of hci device Arthur LAMBERT
2016-05-12  8:39 ` Luiz Augusto von Dentz
2016-05-12  9:56   ` Arthur LAMBERT
2016-06-27 15:54   ` Arthur LAMBERT
2016-06-29  7:20     ` Tobias Svehagen
2016-06-29 12:33 Arthur LAMBERT
2016-06-29 13:22 ` Tobias Svehagen
2016-06-29 13:31 Arthur LAMBERT
2016-06-29 13:39 ` Tobias Svehagen
2016-07-07 14:55 Arthur LAMBERT

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.