Open wencyxie opened 5 months ago
Could you also capture Bluetooth packets ad described in the troubleshooting page of the docs and share that?
I tried to scan and log the advertisement data while running the test script, but I am not sure if the new log shared below is what you asked from me. Please help to confirm, thanks a lot!
2024-06-04 10:36:25,988 logger INFO start scanning...
2024-06-04 10:36:26,035 logger INFO C6:AA:CC:93:56:AA: ProSmart 96F0:AdvertisementData(local_name='ProSmart 96F0', manufacturer_data={38182: b'\xaaV\x93\xcc\xaa\xc6'}, rssi=-81)
2024-06-04 10:36:26,035 logger INFO C6:AA:CC:93:56:AA: ProSmart 96F0:AdvertisementData(local_name='ProSmart 96F0', manufacturer_data={38182: b'\xaaV\x93\xcc\xaa\xc6'}, service_uuids=['6cd6c8b5-e378-0106-000a-1b9740683449'], rssi=-81)
2024-06-04 10:36:27,801 logger INFO C6:AA:CC:93:56:AA: ProSmart 96F0:AdvertisementData(local_name='ProSmart 96F0', manufacturer_data={38182: b'\xaaV\x93\xcc\xaa\xc6'}, service_uuids=['6cd6c8b5-e378-0106-000a-1b9740683449'], rssi=-78)
2024-06-04 10:36:27,801 logger INFO C6:AA:CC:93:56:AA: ProSmart 96F0
2024-06-04 10:36:28,717 logger INFO C6:AA:CC:93:56:AA: ProSmart 96F0:AdvertisementData(local_name='ProSmart 96F0', manufacturer_data={38182: b'\xaaV\x93\xcc\xaa\xc6'}, service_uuids=['6cd6c8b5-e378-0106-000a-1b9740683449'], rssi=-83)
2024-06-04 10:36:29,324 logger INFO 6cd6c8b5-e378-0106-010a-1b9740683449 (Handle: 15): Device Information
2024-06-04 10:36:29,636 logger INFO C6:AA:CC:93:56:AA: ProSmart 96F0:AdvertisementData(local_name='ProSmart 96F0', manufacturer_data={38182: b'\xaaV\x93\xcc\xaa\xc6'}, service_uuids=['6cd6c8b5-e378-0106-000a-1b9740683449'], rssi=-97)
Traceback (most recent call last):
File "c:\Users\85194112\OneDrive - BAT\Automation\Robot_framework\Demo\bleak_demo.py", line 152, in <module>
loop.run_until_complete(main())
File "c:\Users\85194112\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 647, in run_until_complete
return future.result()
File "c:\Users\85194112\OneDrive - BAT\Automation\Robot_framework\Demo\bleak_demo.py", line 144, in main
await asyncio.gather(scan(), test())
File "c:\Users\85194112\OneDrive - BAT\Automation\Robot_framework\Demo\bleak_demo.py", line 129, in test
value = await client.read_gatt_char(char)
File "c:\Users\85194112\AppData\Local\Programs\Python\Python39\lib\site-packages\bleak\__init__.py", line 721, in read_gatt_char
return await self._backend.read_gatt_char(char_specifier, **kwargs)
File "c:\Users\85194112\AppData\Local\Programs\Python\Python39\lib\site-packages\bleak\backends\winrt\client.py", line 859, in read_gatt_char
await characteristic.obj.read_value_async(
OSError: [WinError -2147023673] The operation was canceled by the user
Nope, I meant that you should capture Bluetooth packets with Wireshark. This is the same log as before.
bluetoothctl -v
) in case of Linux:Description
I tried to read the characteristic, and whenever it reads, it says "services changed" "unhandled services changed event". Finally there is an error "OSError: [WinError -2147023673] The operation was canceled by the user"
What I Did
Logs
I don't think that I did anything to cancel the operation. And I also try write and notify, the failure is the same as read.