kevincar / bless

Cross-platform Bluetooth Low Energy Server Python Library
MIT License
78 stars 26 forks source link

Valid local names are not always valid dbus object paths #126

Closed markmcclain closed 4 months ago

markmcclain commented 4 months ago

The problem The character set for local name (utf-8) and dbus paths (limited ascii ) are different.

Reproduction On linux, create a server with a name of test-dash-name Python Exception is raised when started the server: dbus_next.errors.InvalidObjectPathError: invalid object path: /org/bluez/test-dashed-name/service0001 Expected behavior Server will start and advertise test-dash-name with dbus backend.

Screenshots N/A

Desktop (please complete the following information):

Additional context Dbus object path requirements: https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path