Coder Social home page Coder Social logo

Comments (19)

bdraco avatar bdraco commented on August 28, 2024

WebBluetoothCG/web-bluetooth#513

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

the service uuid is there, but its not being enumerated by bluez

[bluetooth]# info FA:8F:A4:3F:A3:2B
Device FA:8F:A4:3F:A3:2B (random)
	Name: SYLVANIA Flex SA C-3225
	Alias: SYLVANIA Flex SA C-3225
	Paired: no
	Trusted: no
	Blocked: no
	Connected: no
	LegacyPairing: no
	UUID: Vendor specific           (0000003e-0000-1000-8000-0026bb765291)
	UUID: Vendor specific           (00000043-0000-1000-8000-0026bb765291)
	UUID: Vendor specific           (00000055-0000-1000-8000-0026bb765291)
	UUID: Vendor specific           (000000a2-0000-1000-8000-0026bb765291)
	UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
	UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
	UUID: Vendor specific           (1b7e8251-2877-41c3-b46e-cf057c562023)
	UUID: Vendor specific           (ae5d1e47-5c13-43a0-8635-82ad38a1381f)
	UUID: Vendor specific           (b0733e83-8434-4c00-a344-25d1c982a0ef)
	ManufacturerData Key: 0x004c
	ManufacturerData Value:

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024
[bluetooth]# list-attributes FA:8F:A4:3F:A3:2B
Primary Service (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff3a
	1b7e8251-2877-41c3-b46e-cf057c562023
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff3a/charff3e
	8ac32d3f-5cb9-4d44-bec2-ee689169f626
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff3a/charff3e/descff40
	00002902-0000-1000-8000-00805f9b34fb
	Client Characteristic Configuration
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff3a/charff3b
	5e9bf2a8-f93f-4481-a67e-3b2f4a07891a
	Vendor specific
Primary Service (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff11
	b0733e83-8434-4c00-a344-25d1c982a0ef
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff11/charff1e
	b31259a5-9acc-45c2-838a-956f57825196
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff11/charff1e/descff20
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff11/charff1b
	b2fd7f2d-ead3-4f17-b16c-202ec758c697
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff11/charff1b/descff1d
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff11/charff17
	b176bd7f-4148-47bd-a6c6-9d0796e96183
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff11/charff17/descff1a
	00002902-0000-1000-8000-00805f9b34fb
	Client Characteristic Configuration
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff11/charff17/descff19
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff11/charff14
	000000a5-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff11/charff14/descff16
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff11/charff12
	e604e95d-a759-4817-87d3-aa005083a0d1
	Vendor specific
Primary Service (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff00
	ae5d1e47-5c13-43a0-8635-82ad38a1381f
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff00/charff06
	a47f7608-2e2d-47eb-913b-75d4edc4de4b
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff00/charff04
	a2e86c7a-d961-4091-b74f-2409e72efe26
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff00/charff01
	a3dd50bf-f7a7-4e99-838e-570a086c661b
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/serviceff00/charff01/descff03
	00002902-0000-1000-8000-00805f9b34fb
	Client Characteristic Configuration
Primary Service (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service00f0
	00000055-0000-1000-8000-0026bb765291
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service00f0/char00fc
	00000050-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service00f0/char00fc/desc00fe
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service00f0/char00f9
	0000004f-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service00f0/char00f9/desc00fb
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service00f0/char00f6
	0000004e-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service00f0/char00f6/desc00f8
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service00f0/char00f3
	0000004c-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service00f0/char00f3/desc00f5
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service00f0/char00f1
	e604e95d-a759-4817-87d3-aa005083a0d1
	Vendor specific
Primary Service (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0040
	000000a2-0000-1000-8000-0026bb765291
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0040/char0046
	00000037-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0040/char0046/desc0048
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0040/char0043
	000000a5-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0040/char0043/desc0045
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0040/char0041
	e604e95d-a759-4817-87d3-aa005083a0d1
	Vendor specific
Primary Service (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028
	0000003e-0000-1000-8000-0026bb765291
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char003d
	00000220-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char003d/desc003f
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char003a
	00000052-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char003a/desc003c
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char0037
	00000030-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char0037/desc0039
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char0034
	00000023-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char0034/desc0036
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char0031
	00000021-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char0031/desc0033
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char002e
	00000020-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char002e/desc0030
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char002b
	00000014-0000-1000-8000-0026bb765291
	Vendor specific
Descriptor (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char002b/desc002d
	dc46f0fe-81d2-4616-b5d9-6abdd796939a
	Vendor specific
Characteristic (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0028/char0029
	e604e95d-a759-4817-87d3-aa005083a0d1
	Vendor specific
Primary Service (Handle 0x0000)
	/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0001
	00001801-0000-1000-8000-00805f9b34fb
	Generic Attribute Profile

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

2022-08-08 14:10:35.618 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.ObjectManager.InterfacesAdded (/): ['/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0050/char0080', {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.GattCharacteristic1': {'UUID': <dbus_next.signature.Variant ('s', 00000025-0000-1000-8000-0026bb765291)>, 'Service': <dbus_next.signature.Variant ('o', /org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0050)>, 'Value': <dbus_next.signature.Variant ('ay', bytearray(b''))>, 'Notifying': <dbus_next.signature.Variant ('b', False)>, 'Flags': <dbus_next.signature.Variant ('as', ['read', 'write', 'indicate'])>, 'MTU': <dbus_next.signature.Variant ('q', 515)>}, 'org.freedesktop.DBus.Properties': {}}]

But it does like it is coming over but we never end up with it the char table

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

So the char is there, but the desc is missing
2022-08-08 14:10:35.618 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.ObjectManager.InterfacesAdded (/): ['/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0050/char0080', {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.GattCharacteristic1': {'UUID': <dbus_next.signature.Variant ('s', 00000025-0000-1000-8000-0026bb765291)>, 'Service': <dbus_next.signature.Variant ('o', /org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B/service0050)>, 'Value': <dbus_next.signature.Variant ('ay', bytearray(b''))>, 'Notifying': <dbus_next.signature.Variant ('b', False)>, 'Flags': <dbus_next.signature.Variant ('as', ['read', 'write', 'indicate'])>, 'MTU': <dbus_next.signature.Variant ('q', 515)>}, 'org.freedesktop.DBus.Properties': {}}]

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024
2022-08-09 10:58:51.035 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry SYLVANIA Flex S for homekit_controller
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/__init__.py", line 42, in async_setup_entry
    await conn.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/connection.py", line 204, in async_setup
    await self.pairing.async_populate_accessories_state(force_update=True)
  File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py", line 550, in async_populate_accessories_state
    await self._async_populate_accessories_state(force_update)
  File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py", line 100, in _async_wrap
    return await func(self, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/client.py", line 62, in _async_wrap
    return await func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py", line 560, in _async_populate_accessories_state
    await self._populate_accessories_and_characteristics(force_update)
  File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py", line 597, in _populate_accessories_and_characteristics
    await self._populate_char_values(config_changed)
  File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py", line 529, in _populate_char_values
    results = await self._get_characteristics_while_connected(chars)
  File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py", line 718, in _get_characteristics_while_connected
    data = await self._async_request_under_lock(OpCode.CHAR_READ, char)
  File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py", line 270, in _async_request_under_lock
    endpoint = self.client.get_characteristic(char.service.type, char.type)
  File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/bleak.py", line 31, in get_characteristic
    char = self.services.get_service(service_type).get_characteristic(
AttributeError: 'NoneType' object has no attribute 'get_characteristic'

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

We get this back from dbus 2022-08-09 11:11:02.209 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FA_8F_A4_3F_A3_2B): ['org.bluez.Device1', {'UUIDs': <dbus_next.signature.Variant ('as', ['0000003e-0000-1000-8000-0026bb765291', '00000043-0000-1000-8000-0026bb765291', '00000055-0000-1000-8000-0026bb765291', '000000a2-0000-1000-8000-0026bb765291', '00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '1b7e8251-2877-41c3-b46e-cf057c562023', 'ae5d1e47-5c13-43a0-8635-82ad38a1381f', 'b0733e83-8434-4c00-a344-25d1c982a0ef'])>, 'ServicesResolved': <dbus_next.signature.Variant ('b', True)>}, []]

But 00000043-0000-1000-8000-0026bb765291 never gets an InterfaceAdded callback

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

bluez/bluez#30

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

Could be related to bluez/bluez#316 but I don't think so

from aiohomekit.

dlech avatar dlech commented on August 28, 2024

Did you log Bluetooth packets with Wireshark to see if this device isn't following the Bluetooth spec which could cause BlueZ to skip the characteristic?

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

I did but its sitting on a computer 4000 miles away that I can't get to at the moment.

Let me see if I have one of them here.

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

Found a device that has the issue. Any specific capture flags that would be helpful?

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

syl.pcap.zip

Here it the pairing attempt with the missing chars

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024
[Destination: eb:4a:1b:6e:b7:83 (eb:4a:1b:6e:b7:83)]

from aiohomekit.

dlech avatar dlech commented on August 28, 2024

Based on the linked BlueZ issues, I would look at the "Read By Group Type Response" packets.

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024
Nov 06 19:14:58 homeassistant bluetoothd[401]: src/device.c:store_chrc() Error storing characteristic - can't get data
Nov 06 19:14:58 homeassistant bluetoothd[401]: src/device.c:store_chrc() Error storing characteristic - can't get data

This appears in the log for the chars that it can't process

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

I was hoping the patches in home-assistant/operating-system#2285 would fix this issue but it looks like its a different problem with BlueZ

Dec 24 00:31:37 homeassistant bluetoothd[406]: src/device.c:store_chrc() Error storing characteristic - can't get data
Dec 24 00:31:37 homeassistant bluetoothd[406]: src/device.c:store_chrc() Error storing characteristic - can't get data

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

It might be fixed in newer bluez actually since Error storing characteristic no longer appears in the bluez source

from aiohomekit.

bdraco avatar bdraco commented on August 28, 2024

might be solved by bluez/bluez@7604a57

from aiohomekit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.