You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example works for me. The "Failed to create entry in database" is a BlueZ error. The only condition I know of that causes that error is if you try to register a UUID for a service that is already in use or reserved. Did you modify the example Did you run more than one instance of it concurrently?
The ReadOnlyCharacteristic is a convenience wrapper to make a read-only characteristic, and is quite useful for e.g. the characteristics in the Device Information Service.
For a read-write characteristic, you have to create a sublass of GenericCharacteristic, and implement WriteValue(). In the example, in SerialCharacteristic.h, a read/write characteristic class is derived from GenericCharacteristic:
class SerialCharacteristic :
public GattCharacteristicBuilder<GenericCharacteristic>
bluez-dbus-cpp/build$ ./bin/example
Found adapter '/org/bluez/hci0'
Name: XXX
Address: C8:E2:65:07:72:8F type: public
Powered: 1
Discoverable: 1
Pairable: 1
LEAdvertisingManager1
ActiveInstances:
SupportedInstances:
SupportedIncludes: "tx-power","appearance","local-name",
Loading complete.
commands:
q quit
$> DirectedValue()
Error registering application org.bluez.Error.Failed with message Failed to create entry in database
Advertisement registered.
The text was updated successfully, but these errors were encountered: