Comments (2)
Tried to delete vext and vext.pi. It got connected once again and after just a restart stopped working again. Here are logs without vext for the case it helps somehow:
DEBUG:asyncio:Using selector: EpollSelector
started thread for curio
inside curio run loop
INFO:BLE Event Q.0:using bleak
DEBUG:excavator.2:Decorating class ExcavatorBase with CPlusXLMotor
INFO:BLE Event Q.0:Starting scan for UART 00001623-1212-efde-1623-785feabcd123
INFO:BLE Event Q.0:Looking for first matching hub
Awaiting on bleak discover
Done Awaiting on bleak discover
INFO:BLE Event Q.0:Rescanning for 00001623-1212-efde-1623-785feabcd123 (60 tries left)
Awaiting on bleak discover
Done Awaiting on bleak discover
INFO:BLE Event Q.0:Rescanning for 00001623-1212-efde-1623-785feabcd123 (59 tries left)
Awaiting on bleak discover
Done Awaiting on bleak discover
INFO:BLE Event Q.0:Rescanning for 00001623-1212-efde-1623-785feabcd123 (58 tries left)
Awaiting on bleak discover
Done Awaiting on bleak discover
INFO:BLE Event Q.0:Rescanning for 00001623-1212-efde-1623-785feabcd123 (57 tries left)
Awaiting on bleak discover
Done Awaiting on bleak discover
INFO:BLE Event Q.0:Rescanning for 00001623-1212-efde-1623-785feabcd123 (56 tries left)
Awaiting on bleak discover
Done Awaiting on bleak discover
INFO:BLE Event Q.0:Rescanning for 00001623-1212-efde-1623-785feabcd123 (55 tries left)
Awaiting on bleak discover
Done Awaiting on bleak discover
INFO:BLE Event Q.0:Rescanning for 00001623-1212-efde-1623-785feabcd123 (54 tries left)
Awaiting on bleak discover
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
Done Awaiting on bleak discover
INFO:BLE Event Q.0:checking manufacturer ID for device named Technic Hub for Control+ Hub
INFO:BLE Event Q.0:found device Technic Hub
DEBUG:bleak.backends.bluezdbus.client:Connecting to BLE device @ 90:84:2B:4E:A1:92 with hci0
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.client:Connection successful.
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.client:Get Services...
DEBUG:bleak.backends.bluezdbus.client:
Primary Service
/org/bluez/hci0/dev_90_84_2B_4E_A1_92/service000c
00001623-1212-efde-1623-785feabcd123
Unknown
DEBUG:bleak.backends.bluezdbus.client:
Characteristic
/org/bluez/hci0/dev_90_84_2B_4E_A1_92/service000c/char000d
00001624-1212-efde-1623-785feabcd123
Unknown
DEBUG:bleak.backends.bluezdbus.client:
Descriptor
/org/bluez/hci0/dev_90_84_2B_4E_A1_92/service000c/char000d/desc000f
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
DEBUG:bleak.backends.bluezdbus.client:
Primary Service
/org/bluez/hci0/dev_90_84_2B_4E_A1_92/service0001
00001801-0000-1000-8000-00805f9b34fb
Generic Attribute Profile
DEBUG:bleak.backends.bluezdbus.client:
Characteristic
/org/bluez/hci0/dev_90_84_2B_4E_A1_92/service0001/char0002
00002a05-0000-1000-8000-00805f9b34fb
Service Changed
DEBUG:bleak.backends.bluezdbus.client:
Descriptor
/org/bluez/hci0/dev_90_84_2B_4E_A1_92/service0001/char0002/desc0004
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
INFO:BLE Event Q.0:Device advertised: {'00001624-1212-efde-1623-785feabcd123': {'UUID': '00001624-1212-efde-1623-785feabcd123', 'Service': '/org/bluez/hci0/dev_90_84_2B_4E_A1_92/service000c', 'Value': [15, 0, 4, 0, 1, 47, 0, 0, 16, 0, 0, 0, 16, 0, 0], 'Notifying': False, 'Flags': ['read', 'write-without-response', 'write', 'notify'], 'WriteAcquired': False, 'NotifyAcquired': False, 'Path': '/org/bluez/hci0/dev_90_84_2B_4E_A1_92/service000c/char000d'}, '00002a05-0000-1000-8000-00805f9b34fb': {'UUID': '00002a05-0000-1000-8000-00805f9b34fb', 'Service': '/org/bluez/hci0/dev_90_84_2B_4E_A1_92/service0001', 'Value': [], 'Notifying': False, 'Flags': ['indicate'], 'Path': '/org/bluez/hci0/dev_90_84_2B_4E_A1_92/service0001/char0002'}}
INFO:BLE Event Q.0:Connected to device Technic Hub:90:84:2B:4E:A1:92
INFO:BLE Event Q.0:Waiting for hubs to end
DEBUG:excavator.2:starting peripheral message loop
INFO:excavator.2:Running
DEBUG:BLE Event Q.0:Got msg: req mode info on 255 = [0, 33, 255, 1]
DEBUG:bleak.backends.bluezdbus.client:GATT Char Properties Changed: /org/bluez/hci0/dev_90_84_2B_4E_A1_92/service000c/char000d | [{'Value': [15, 0, 4, 0, 1, 47, 0, 0, 16, 0, 0, 0, 16, 0, 0]}, []]
DEBUG:BLE Event Q.0:Bleak Raw data received: bytearray(b'\x0f\x00\x04\x00\x01/\x00\x00\x10\x00\x00\x00\x10\x00\x00')
DEBUG:BLE Event Q.0:excavator Received: Attached IO Port:0 Technic Control+ XL Motor HW:0x0.0x0.0x100x0 SW:0x0.0x0.0x100x0
DEBUG:excavator.2:peripheral msg: right_drive.1 attach
DEBUG:BLE Event Q.0:Got msg: req mode info on 0 = [0, 33, 0, 1]
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.discovery:dev_90_84_2B_4E_A1_92, 90:84:2B:4E:A1:92 (-63 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_4E_A1_92
DEBUG:bleak.backends.bluezdbus.client:Write Characteristic 00001624-1212-efde-1623-785feabcd123 | /org/bluez/hci0/dev_90_84_2B_4E_A1_92/service000c/char000d: bytearray(b'\x05\x00!\xff\x01')
Traceback (most recent call last):
File "main.py", line 53, in <module>
start(system)
File "/home/pi/dev/lego/bricknil/bricknil.py", line 214, in start
ble.run()
File "/home/pi/dev/lego/bricknil/bleak_interface.py", line 52, in run
self.loop.run_until_complete(self.asyncio_loop())
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/home/pi/dev/lego/bricknil/bleak_interface.py", line 75, in asyncio_loop
await device.write_gatt_char(char_uuid, msg_bytes)
File "/home/pi/dev/lego_venv/lib/python3.7/site-packages/bleak/backends/bluezdbus/client.py", line 252, in write_gatt_char
self.loop
txdbus.error.RemoteError: org.bluez.Error.Failed: Not connected
from bricknil.
Hi, I managed to get my 42100 to work using the fork from janvrany.
But I observed communication problems too.
If I have problems currently only stopping bluetooth and removing the usb dongle resets the system in a way that allows to run the python program again.
from bricknil.
Related Issues (20)
- ModuleNotFoundError: No module named 'Windows' HOT 3
- I want to have multiple functions to control the Lego hub motors not Just the run() function
- Documentation clarification - Windows USB adapter support HOT 1
- Hub disconnects on first write?
- crashes one first communication with boost sensor HOT 3
- ID of sensors inside Technic Plus Hub HOT 3
- Minor changes to make it works with bleak 0.6.4 HOT 9
- Dashboard & API
- Not able to run lego passenger train due to Bleak error
- Duplo Train - Bricknil Traceback Crash HOT 7
- Cant connect Lego Move Hub HOT 3
- Train Hub not advertised/connected HOT 1
- Support for Large Technic Motor (88013), e.g. for Lego Crocodile (10277) HOT 2
- Cannot connect to Large Angular Motor for a Technic Hub set HOT 1
- Controlling 2 Train motors in a hub
- Bluetooth discovery sometimes errors out
- Windows 11: Bleak discover has an exception: Unhandled Exception: System.NotSupportedException: Cannot create uninitialized instances of types requiring managed activation.
- Raspberry Pi: Software caused connection abort HOT 1
- MicroPython support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bricknil.