muka / go-bluetooth

Golang bluetooth client based on bluez DBus interfaces
Apache License 2.0
653 stars 123 forks source link

Error: Properties.GetAll org.bluez.GattManager1: No such interface 'org.bluez.GattManager1' #176

Closed siguadao closed 1 year ago

siguadao commented 1 year ago

Hello, my developement environement is: ARCH: riscv64 OS: openwrt

I ran "~/_example/main.go" code in device like this: _example service service, it doesn't work. Here is the log:

root@TinaLinux:/mnt/sdcard# ./_examples service service TRAC[0000] Exec: btmgmt [--index hci0 power off] TRAC[0000] Exec: btmgmt [--index hci0 le on] TRAC[0000] Exec: btmgmt [--index hci0 bredr off] TRAC[0000] Exec: btmgmt [--index hci0 power on] INFO[0000] HW address 24:B7:2A:1B:80:4D TRAC[0000] Expose /hci0/apps/0/service12342233 (org.bluez.GattService1) TRAC[0000] Expose Properties interface (/hci0/apps/0/service12342233) TRAC[0000] ObjectManager.AddObject: /hci0/apps/0/service12342233 TRAC[0000] ObjectManager.GetManagedObjects map[/hci0/apps/0/service12342233:map[org.bluez.GattService1:map[Characteristics:@ao [] Handle:@q 0 Primary:true UUID:"12342233-0000-1000-8000-00805F9B34FB"]]] TRAC[0000] Added GATT Service UUID=12342233-0000-1000-8000-00805F9B34FB /hci0/apps/0/service12342233 TRAC[0000] Expose /hci0/apps/0/service12342233/char0 (org.bluez.GattCharacteristic1) TRAC[0000] Expose Properties interface (/hci0/apps/0/service12342233/char0) TRAC[0000] ObjectManager.AddObject: /hci0/apps/0/service12342233/char0 TRAC[0000] ObjectManager.GetManagedObjects map[/hci0/apps/0/service12342233:map[org.bluez.GattService1:map[Characteristics:@ao [] Handle:@q 0 Primary:true UUID:"12342233-0000-1000-8000-00805F9B34FB"]] /hci0/apps/0/service12342233/char0:map[org.bluez.GattCharacteristic1:map[Descriptors:@ao [] Flags:["read", "write"] Handle:@q 0 Notifying:false Service:@o "/hci0/apps/0/service12342233" UUID:"12343344-0000-1000-8000-00805F9B34FB" Value:@ay []]]] TRAC[0000] ObjectManager.AddObject: /hci0/apps/0/service12342233 TRAC[0000] ObjectManager.GetManagedObjects map[/hci0/apps/0/service12342233:map[org.bluez.GattService1:map[Characteristics:@ao ["/hci0/apps/0/service12342233/char0"] Handle:@q 0 Primary:true UUID:"12342233-0000-1000-8000-00805F9B34FB"]] /hci0/apps/0/service12342233/char0:map[org.bluez.GattCharacteristic1:map[Descriptors:@ao [] Flags:["read", "write"] Handle:@q 0 Notifying:false Service:@o "/hci0/apps/0/service12342233" UUID:"12343344-0000-1000-8000-00805F9B34FB" Value:@ay []]]] TRAC[0000] Added GATT Characteristic UUID=12343344-0000-1000-8000-00805F9B34FB /hci0/apps/0/service12342233/char0 TRAC[0000] Expose /hci0/apps/0/service12342233/char0/descriptor0 (org.bluez.GattDescriptor1) TRAC[0000] Expose Properties interface (/hci0/apps/0/service12342233/char0/descriptor0) TRAC[0000] ObjectManager.AddObject: /hci0/apps/0/service12342233/char0/descriptor0 TRAC[0000] ObjectManager.GetManagedObjects map[/hci0/apps/0/service12342233:map[org.bluez.GattService1:map[Characteristics:@ao ["/hci0/apps/0/service12342233/char0"] Handle:@q 0 Primary:true UUID:"12342233-0000-1000-8000-00805F9B34FB"]] /hci0/apps/0/service12342233/char0:map[org.bluez.GattCharacteristic1:map[Descriptors:@ao [] Flags:["read", "write"] Handle:@q 0 Notifying:false Service:@o "/hci0/apps/0/service12342233" UUID:"12343344-0000-1000-8000-00805F9B34FB" Value:@ay []]] /hci0/apps/0/service12342233/char0/descriptor0:map[org.bluez.GattDescriptor1:map[Characteristic:@o "/hci0/apps/0/service12342233/char0" Flags:["read", "write"] Handle:@q 0 UUID:"12344455-0000-1000-8000-00805F9B34FB" Value:@ay []]]] TRAC[0000] ObjectManager.AddObject: /hci0/apps/0/service12342233/char0 TRAC[0000] ObjectManager.GetManagedObjects map[/hci0/apps/0/service12342233:map[org.bluez.GattService1:map[Characteristics:@ao ["/hci0/apps/0/service12342233/char0"] Handle:@q 0 Primary:true UUID:"12342233-0000-1000-8000-00805F9B34FB"]] /hci0/apps/0/service12342233/char0:map[org.bluez.GattCharacteristic1:map[Descriptors:@ao ["/hci0/apps/0/service12342233/char0/descriptor0"] Flags:["read", "write"] Handle:@q 0 Notifying:false Service:@o "/hci0/apps/0/service12342233" UUID:"12343344-0000-1000-8000-00805F9B34FB" Value:@ay []]] /hci0/apps/0/service12342233/char0/descriptor0:map[org.bluez.GattDescriptor1:map[Characteristic:@o "/hci0/apps/0/service12342233/char0" Flags:["read", "write"] Handle:@q 0 UUID:"12344455-0000-1000-8000-00805F9B34FB" Value:@ay []]]] TRAC[0000] Added GATT Descriptor UUID=12344455-0000-1000-8000-00805F9B34FB /hci0/apps/0/service12342233/char0/descriptor0 TRAC[0000] Expose /hci0/apps/0 (org.freedesktop.DBus.ObjectManager) TRAC[0000] Exposing Agent1 at /agent/simple0 ERRO[0000] Error: Properties.GetAll org.bluez.GattManager1: No such interface 'org.bluez.GattManager1'

Does anyone know what the reason is, and is there a way to fix the error?

Thanks.

muka commented 1 year ago

It may be related to your bluez/bluetoothd version ?