Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 22.04 Error AddService - Failed to create characteristic entry in database #265

Open
Martim-Sensefinity opened this issue Apr 17, 2024 · 5 comments

Comments

@Martim-Sensefinity
Copy link

Bluetooth version:
bluetoothctl: 5.75

Version: 0.9.0

Ubuntu version:
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy

Logs

Apr 17 20:13:15 martim-sensefinity bluetoothd[25936]: src/gatt-database.c:database_add_chrc() Failed to create characteristic entry in database
Apr 17 20:13:15 martim-sensefinity bluetoothd[25936]: src/gatt-database.c:database_add_service() Failed to add characteristic
Apr 17 20:13:15 martim-sensefinity bluetoothd[25936]: src/gatt-database.c:database_add_app() Failed to add service
Apr 17 20:13:15 martim-sensefinity bluetoothd[25936]: src/gatt-database.c:client_ready_cb() Failed to create GATT service entry in local database

Code (same as example Nordic server)

must("add service", adapter.AddService(&bluetooth.Service{
		UUID: serviceUUID,
		Characteristics: []bluetooth.CharacteristicConfig{
			{
				Handle: &rxChar,
				UUID:   rxUUID,
				Flags:  bluetooth.CharacteristicWritePermission | bluetooth.CharacteristicWriteWithoutResponsePermission,
				WriteEvent: func(client bluetooth.Connection, offset int, value []byte) {
					txChar.Write(value)
					for _, c := range value {
						rawterm.Putchar(c)
					}
				},
			},
			{
				Handle: &txChar,
				UUID:   txUUID,
				Flags:  bluetooth.CharacteristicNotifyPermission | bluetooth.CharacteristicReadPermission,
			},
		},
	}))

I tested the version 0.8.0 same error
I also tested using bluetoothctl with -experimental flag

@Martim-Sensefinity
Copy link
Author

Issue 46 looks similar error

@Martim-Sensefinity
Copy link
Author

I downgraded bluetoothctl to 5.66 and works.

The version number is suggested in: bluez.org/download
I followed the following tutorial: askubuntu.com

Reboot was required.

@webcaptcha
Copy link

I'm also experiencing the same error on Arch Linux.

Looks like it's similar issue reported on other repo.
bluez/bluez#821

@aykevl
Copy link
Member

aykevl commented Apr 27, 2024

I can confirm this is an issue with BlueZ 5.75 on Fedora 39. It appears to be an upstream bug, so I'll wait until they've investigated the issue.
Thanks @webcaptcha for pointing to the upstream bug report!

@aykevl
Copy link
Member

aykevl commented May 3, 2024

Looks like the bug has been found and a fix submitted, so hopefully this will be fixed in the next BlueZ version.
(In the meantime I hope we can find a workaround for this bug!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants