Open HotDog702 opened 1 year ago
i tried your code with my MoveHub and got this result:
Connected: True [Service] 00001801-0000-1000-8000-00805f9b34fb: Generic Attribute Profile [Characteristic] 00002a05-0000-1000-8000-00805f9b34fb: (Handle: 2) (indicate) | Name: Service Changed, Value: None Connected: True [Service] 00001800-0000-1000-8000-00805f9b34fb: Generic Access Profile [Characteristic] 00002a00-0000-1000-8000-00805f9b34fb: (Handle: 6) (read,write-without-response,write,authenticated-signed-writes) | Name: Device Name, Value: b'LEGO Bootloader' Connected: True [Characteristic] 00002a01-0000-1000-8000-00805f9b34fb: (Handle: 8) (read,write-without-response,write,authenticated-signed-writes) | Name: Appearance, Value: b'\x00\x00' Connected: True [Characteristic] 00002a04-0000-1000-8000-00805f9b34fb: (Handle: 10) (read) | Name: Peripheral Preferred Connection Parameters, Value: b'\xff\xff\xff\xff\x00\x00\xff\xff' Connected: True [Service] 00001625-1212-efde-1623-785feabcd123: LEGO Wireless Protocol v3 Bootloader Service [Characteristic] 00001626-1212-efde-1623-785feabcd123: (Handle: 13) (read,write-without-response,write,notify) | Name: LEGO Wireless Protocol v3 Bootloader Characteristic, Value: b'\x04\x00\x05\x02\x05' Connected: True
Hmm... In my case it returns Connected=False after first Characteristic. Do you use win10 or Linux? May be something wrong with my BT driver, but how to be sure? It works with Train hub...
I am using win10 without anaconda.
PS: Im new in GitHub and i am in the learningPhase of developing things. So i hope, i can help you with my feedback. But could you help me with a short example in addition to your code, to run one motor of the MoveHub?
Because the demo.py and the code below dosn't work for me:
from pylgbst.hub import MoveHub
hub = MoveHub()
hub.motor_A.timed(0.5, 0.8)
Hello. I have a win10 system with anaconda installed. I have a rather simple code to test bleak connection (as demo.py does not work)
The problem is that with this code I can connect and read characteristics from Handset and SmartHub, but not MoveHub. MoveHub allows to read services, but reading characteristics returns "not connected" value:
So, trying to further read descriptors raises an exception, as MoveHub really breaks the connection. Any ideas, why this happens and how to fix?
P.S. I've bought BlueGiga dongle, with it demo.py works