I have extracted the introspection xml a while ago and I would like to share it. I have several files. @igo95862 can you please create a repository. Then I am able to generate pull request with the files.
I extracted the XML introspection information of my bluetooth adapter (RaspberryPi CM4) and my GATT peripheral devices, you can find them below. I also used your tool to auto-generate the corresponding python interfaces (see the pastebin here) and wrote some of the required error definitions (see the pastebin here).
Repository now exists. I've put the template files that I use for all binds.
Pull Requests now should be available.
I saw in one of your comments that you were on a tight deadline and probably don't have time. I will come back on weekend to the XML you managed to extract and start working on implementing classes.
I did not post it yet but there is a certain code style that I would like to adhere to:
Format code with autopep8 (default options)
Format imports with isort -m VERTICAL_HANGING_INDENT --trailing-comma
Activity
satirebird commented on Apr 13, 2022
I have extracted the introspection xml a while ago and I would like to share it. I have several files. @igo95862 can you please create a repository. Then I am able to generate pull request with the files.
IB1387 commented on Apr 13, 2022
I extracted the XML introspection information of my bluetooth adapter (RaspberryPi CM4) and my GATT peripheral devices, you can find them below. I also used your tool to auto-generate the corresponding python interfaces (see the pastebin here) and wrote some of the required error definitions (see the pastebin here).
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/> </method></interface><interface name="org.bluez.Adapter1"><method name="StartDiscovery"></method><method name="SetDiscoveryFilter"><arg name="properties" type="a{sv}" direction="in"/> </method><method name="StopDiscovery"></method><method name="RemoveDevice"><arg name="device" type="o" direction="in"/> </method><method name="GetDiscoveryFilters"><arg name="filters" type="as" direction="out"/> </method><property name="Address" type="s" access="read"></property><property name="AddressType" type="s" access="read"></property><property name="Name" type="s" access="read"></property><property name="Alias" type="s" access="readwrite"></property><property name="Class" type="u" access="read"></property><property name="Powered" type="b" access="readwrite"></property><property name="Discoverable" type="b" access="readwrite"></property><property name="DiscoverableTimeout" type="u" access="readwrite"></property><property name="Pairable" type="b" access="readwrite"></property><property name="PairableTimeout" type="u" access="readwrite"></property><property name="Discovering" type="b" access="read"></property><property name="UUIDs" type="as" access="read"></property><property name="Modalias" type="s" access="read"></property><property name="Roles" type="as" access="read"></property></interface><interface name="org.freedesktop.DBus.Properties"><method name="Get"><arg name="interface" type="s" direction="in"/> <arg name="name" type="s" direction="in"/> <arg name="value" type="v" direction="out"/> </method><method name="Set"><arg name="interface" type="s" direction="in"/> <arg name="name" type="s" direction="in"/> <arg name="value" type="v" direction="in"/> </method><method name="GetAll"><arg name="interface" type="s" direction="in"/> <arg name="properties" type="a{sv}" direction="out"/> </method><signal name="PropertiesChanged"><arg name="interface" type="s"/> <arg name="changed_properties" type="a{sv}"/> <arg name="invalidated_properties" type="as"/> </signal> </interface><interface name="org.bluez.GattManager1"><method name="RegisterApplication"><arg name="application" type="o" direction="in"/> <arg name="options" type="a{sv}" direction="in"/> </method><method name="UnregisterApplication"><arg name="application" type="o" direction="in"/> </method></interface><interface name="org.bluez.LEAdvertisingManager1"><method name="RegisterAdvertisement"><arg name="advertisement" type="o" direction="in"/> <arg name="options" type="a{sv}" direction="in"/> </method><method name="UnregisterAdvertisement"><arg name="service" type="o" direction="in"/> </method><property name="ActiveInstances" type="y" access="read"></property><property name="SupportedInstances" type="y" access="read"></property><property name="SupportedIncludes" type="as" access="read"></property><property name="SupportedSecondaryChannels" type="as" access="read"></property></interface><interface name="org.bluez.Media1"><method name="RegisterEndpoint"><arg name="endpoint" type="o" direction="in"/> <arg name="properties" type="a{sv}" direction="in"/> </method><method name="UnregisterEndpoint"><arg name="endpoint" type="o" direction="in"/> </method><method name="RegisterPlayer"><arg name="player" type="o" direction="in"/> <arg name="properties" type="a{sv}" direction="in"/> </method><method name="UnregisterPlayer"><arg name="player" type="o" direction="in"/> </method><method name="RegisterApplication"><arg name="application" type="o" direction="in"/> <arg name="options" type="a{sv}" direction="in"/> </method><method name="UnregisterApplication"><arg name="application" type="o" direction="in"/> </method></interface><interface name="org.bluez.NetworkServer1"><method name="Register"><arg name="uuid" type="s" direction="in"/> <arg name="bridge" type="s" direction="in"/> </method><method name="Unregister"><arg name="uuid" type="s" direction="in"/> </method></interface></node><!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/> </method></interface><interface name="org.bluez.Device1"><method name="Disconnect"></method><method name="Connect"></method><method name="ConnectProfile"><arg name="UUID" type="s" direction="in"/> </method><method name="DisconnectProfile"><arg name="UUID" type="s" direction="in"/> </method><method name="Pair"></method><method name="CancelPairing"></method><property name="Address" type="s" access="read"></property><property name="AddressType" type="s" access="read"></property><property name="Name" type="s" access="read"></property><property name="Alias" type="s" access="readwrite"></property><property name="Class" type="u" access="read"></property><property name="Appearance" type="q" access="read"></property><property name="Icon" type="s" access="read"></property><property name="Paired" type="b" access="read"></property><property name="Trusted" type="b" access="readwrite"></property><property name="Blocked" type="b" access="readwrite"></property><property name="LegacyPairing" type="b" access="read"></property><property name="RSSI" type="n" access="read"></property><property name="Connected" type="b" access="read"></property><property name="UUIDs" type="as" access="read"></property><property name="Modalias" type="s" access="read"></property><property name="Adapter" type="o" access="read"></property><property name="ManufacturerData" type="a{qv}" access="read"></property><property name="ServiceData" type="a{sv}" access="read"></property><property name="TxPower" type="n" access="read"></property><property name="ServicesResolved" type="b" access="read"></property><property name="WakeAllowed" type="b" access="readwrite"></property></interface><interface name="org.freedesktop.DBus.Properties"><method name="Get"><arg name="interface" type="s" direction="in"/> <arg name="name" type="s" direction="in"/> <arg name="value" type="v" direction="out"/> </method><method name="Set"><arg name="interface" type="s" direction="in"/> <arg name="name" type="s" direction="in"/> <arg name="value" type="v" direction="in"/> </method><method name="GetAll"><arg name="interface" type="s" direction="in"/> <arg name="properties" type="a{sv}" direction="out"/> </method><signal name="PropertiesChanged"><arg name="interface" type="s"/> <arg name="changed_properties" type="a{sv}"/> <arg name="invalidated_properties" type="as"/> </signal> </interface></node><!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/> </method></interface><interface name="org.bluez.GattService1"><property name="UUID" type="s" access="read"></property><property name="Device" type="o" access="read"></property><property name="Primary" type="b" access="read"></property><property name="Includes" type="ao" access="read"></property></interface><interface name="org.freedesktop.DBus.Properties"><method name="Get"><arg name="interface" type="s" direction="in"/> <arg name="name" type="s" direction="in"/> <arg name="value" type="v" direction="out"/> </method><method name="Set"><arg name="interface" type="s" direction="in"/> <arg name="name" type="s" direction="in"/> <arg name="value" type="v" direction="in"/> </method><method name="GetAll"><arg name="interface" type="s" direction="in"/> <arg name="properties" type="a{sv}" direction="out"/> </method><signal name="PropertiesChanged"><arg name="interface" type="s"/> <arg name="changed_properties" type="a{sv}"/> <arg name="invalidated_properties" type="as"/> </signal> </interface><node name="char0002"/><node name="char0004"/></node><!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/> </method></interface><interface name="org.bluez.GattCharacteristic1"><method name="ReadValue"><arg name="options" type="a{sv}" direction="in"/> <arg name="value" type="ay" direction="out"/> </method><method name="WriteValue"><arg name="value" type="ay" direction="in"/> <arg name="options" type="a{sv}" direction="in"/> </method><method name="AcquireWrite"><arg name="options" type="a{sv}" direction="in"/> <arg name="fd" type="h" direction="out"/> <arg name="mtu" type="q" direction="out"/> </method><method name="AcquireNotify"><arg name="options" type="a{sv}" direction="in"/> <arg name="fd" type="h" direction="out"/> <arg name="mtu" type="q" direction="out"/> </method><method name="StartNotify"></method><method name="StopNotify"></method><property name="UUID" type="s" access="read"></property><property name="Service" type="o" access="read"></property><property name="Value" type="ay" access="read"></property><property name="Notifying" type="b" access="read"></property><property name="Flags" type="as" access="read"></property><property name="WriteAcquired" type="b" access="read"></property><property name="NotifyAcquired" type="b" access="read"></property></interface><interface name="org.freedesktop.DBus.Properties"><method name="Get"><arg name="interface" type="s" direction="in"/> <arg name="name" type="s" direction="in"/> <arg name="value" type="v" direction="out"/> </method><method name="Set"><arg name="interface" type="s" direction="in"/> <arg name="name" type="s" direction="in"/> <arg name="value" type="v" direction="in"/> </method><method name="GetAll"><arg name="interface" type="s" direction="in"/> <arg name="properties" type="a{sv}" direction="out"/> </method><signal name="PropertiesChanged"><arg name="interface" type="s"/> <arg name="changed_properties" type="a{sv}"/> <arg name="invalidated_properties" type="as"/> </signal> </interface></node><!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/> </method></interface><interface name="org.bluez.GattDescriptor1"><method name="ReadValue"><arg name="options" type="a{sv}" direction="in"/> <arg name="value" type="ay" direction="out"/> </method><method name="WriteValue"><arg name="value" type="ay" direction="in"/> <arg name="options" type="a{sv}" direction="in"/> </method><property name="UUID" type="s" access="read"></property><property name="Characteristic" type="o" access="read"></property><property name="Value" type="ay" access="read"></property></interface><interface name="org.freedesktop.DBus.Properties"><method name="Get"><arg name="interface" type="s" direction="in"/> <arg name="name" type="s" direction="in"/> <arg name="value" type="v" direction="out"/> </method><method name="Set"><arg name="interface" type="s" direction="in"/> <arg name="name" type="s" direction="in"/> <arg name="value" type="v" direction="in"/> </method><method name="GetAll"><arg name="interface" type="s" direction="in"/> <arg name="properties" type="a{sv}" direction="out"/> </method><signal name="PropertiesChanged"><arg name="interface" type="s"/> <arg name="changed_properties" type="a{sv}"/> <arg name="invalidated_properties" type="as"/> </signal> </interface></node>igo95862 commented on Apr 13, 2022
Repository now exists. I've put the template files that I use for all binds.
Pull Requests now should be available.
I saw in one of your comments that you were on a tight deadline and probably don't have time. I will come back on weekend to the XML you managed to extract and start working on implementing classes.
I did not post it yet but there is a certain code style that I would like to adhere to:
Thank you.