linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bluetoothctl "advertise on" fails
@ 2019-05-28 20:54 David Frey
  0 siblings, 0 replies; only message in thread
From: David Frey @ 2019-05-28 20:54 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

I have an embedded system running Yocto Linux and a desktop using Arch
Linux.  Bluez is 5.50 in both cases. I'm using the same Cypress CYW20719
Bluetooth chipset connected via a UART.  On the embedded system, running
"advertise on" in bluetoothctl fails with the error message:

"Failed to register advertisement: org.bluez.Error.NotPermitted"

I dug into the source code a bit and I suspect that the error is being
produced in register_advertisement() from advertising.c:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/advertising.c?h=5.50#n1135

On my Linux PC, running "advertise on" is successful.

The error message in the code is "Maximum advertisements reached", so I
decided to pursue that.  I ran the command "dbus-send --system
--print-reply --type=method_call --dest=org.bluez /
org.freedesktop.DBus.ObjectManager.GetManagedObjects" on both the
embedded system and the PC.

This is the snippet from the embedded system that I think is pertinent:
dict entry(
   string "org.bluez.LEAdvertisingManager1"
   array [
      dict entry(
         string "ActiveInstances"
         variant                         byte 0
      )
      dict entry(
         string "SupportedInstances"
         variant                         byte 0
      )
      dict entry(
         string "SupportedIncludes"
         variant                         array [
               string "local-name"
            ]
      )
   ]
)

And the corresponding snippet from the PC:
dict entry(
   string "org.bluez.LEAdvertisingManager1"
   array [
      dict entry(
         string "ActiveInstances"
         variant                         byte 0
      )
      dict entry(
         string "SupportedInstances"
         variant                         byte 5
      )
      dict entry(
         string "SupportedIncludes"
         variant                         array [
               string "tx-power"
               string "appearance"
               string "local-name"
            ]
      )
   ]
)

I'm not sure what "SupportedIncludes" really means, but I immediately
noticed that the value for "SupportedInstances" on the embedded system
is 0 while the on the PC it's 5.

Why are these values different?  Please let me know if there is any
other information that would be useful.

Thanks,
David

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-28 20:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28 20:54 bluetoothctl "advertise on" fails David Frey

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