Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: David Frey <dpfrey@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: Call to GattManager1.RegisterApplication times out
Date: Fri, 1 Feb 2019 16:02:23 -0800
Message-ID: <e7acd19d-f953-0156-bfa3-4d5ab98730ac@gmail.com> (raw)

Hi,

I am trying to write a battery service
(https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.battery_service.xml)
that runs in BlueZ to expose the battery level of a device over BLE.

The application that I have written is available here:
https://github.com/dpfrey/bluez_battery_service

I'm new to GLib/GIO/GObject, so trying to get this working has been
pretty overwhelming due to the complexity of that stack.

I have a USB Bluetooth adapter which is recognized by BlueZ 5.50 that's
running on my computer.  When I run my program, this is the output I get:

$ ./fake_bs
Starting fake battery service!
BusAcquired
NameAcquired
Found object: /org/bluez/hci0 which implements org.bluez.GattManager1
Error registering BS application: Timeout was reached

If you have any ideas why the method call would be timing out, please
let me know.  Also if there is any additional information that would be
helpful in understanding where the failure is occurring, let me know and
I will reply with more information.

Are there any good examples of Bluetooth services implemented in C using
GDBus?  In the BlueZ source tree I found "test/example-gatt-server"
which is written in Python and "tools/gatt-service.c" which is written
in C, but it uses dbus-glib rather than GDBus.  My understanding is that
dbus-glib is deprecated.

Thanks,
David

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically 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=e7acd19d-f953-0156-bfa3-4d5ab98730ac@gmail.com \
    --to=dpfrey@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox