Comments (7)
I had the same issue recently on a Pi 4. I was able to resolve it by downgrading the Bluetooth firmware:
wget http://archive.raspberrypi.org/debian/pool/main/b/bluez-firmware/bluez-firmware_1.2-4+rpt2_all.deb
sudo dpkg -i bluez-firmware_1.2-4+rpt2_all.deb
I rebooted to make sure the updated firmware was in use.
from bricknil.
Hey jncraton, thank you for getting back to me!
I was on version:
Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-1060-raspi2 armv7l)
bluez-firmware/bionic,now 1.2-4+rpt1~bionic1.0 all [installed,automatic]
It seems like I was a version lower than the one you suggest. When I tried to upgrade using your commands it had a Firmware update + update to Ubuntu 20 waiting for my Rasbpi 3B:
name@name-desktop:$ sudo dpkg -i bluez-firmware_1.2-4+rpt2_all.debbionic1.0) ...
(Reading database ... 191338 files and directories currently installed.)
Preparing to unpack bluez-firmware_1.2-4+rpt2_all.deb ...
Unpacking bluez-firmware (1.2-4+rpt2) over (1.2-4+rpt1
dpkg: error processing archive bluez-firmware_1.2-4+rpt2_all.deb (--install):
trying to overwrite '/lib/firmware/brcm/BCM43430A1.hcd', which is also in package linux-firmware-raspi2 1.20200601+arm64-0ubuntu2~18.04.1
Errors were encountered while processing:
bluez-firmware_1.2-4+rpt2_all.deb
Check what needed upgrading I did a apt-get dist-upgrade and got the following listed out:
The following NEW packages will be installed:
libllvm10 libnetplan0 linux-image-4.15.0-1070-raspi2
linux-modules-4.15.0-1070-raspi2
The following packages will be upgraded:
libgl1-mesa-dri linux-image-raspi2 mesa-va-drivers mesa-vdpau-drivers
netplan.io
Ran the upgrade and in progress with the release upgrade now. Will try again once done and see how I go.
from bricknil.
Did the upgrade, package didn't update all so I did a force upgrade.
Reinstalled all packages, still same issue, will need to keep digging
name@name-desktop:~$ python3 legotraintest.py
started thread for curio
inside curio run loop
INFO:BLE Event Q.0:using bleak
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
Unhandled Error
Traceback (most recent call last):
File "/home/name/.local/lib/python3.8/site-packages/txdbus/protocol.py", line 140, in dataReceived
self.rawDBusMessageReceived(raw_msg)
File "/home/name/.local/lib/python3.8/site-packages/txdbus/protocol.py", line 266, in rawDBusMessageReceived
self.signalReceived(m)
File "/home/name/.local/lib/python3.8/site-packages/txdbus/client.py", line 642, in signalReceived
self.router.routeMessage(msig)
File "/home/name/.local/lib/python3.8/site-packages/txdbus/router.py", line 128, in routeMessage
r.match(m)
--- ---
File "/home/name/.local/lib/python3.8/site-packages/txdbus/router.py", line 67, in match
self.callback(m)
File "/home/name/.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/discovery.py", line 65, in parse_msg
device_interface = message.body[1].get("org.bluez.Device1", {})
builtins.AttributeError: 'list' object has no attribute 'get'
Unhandled Error
Traceback (most recent call last):
File "/home/name/.local/lib/python3.8/site-packages/txdbus/protocol.py", line 140, in dataReceived
self.rawDBusMessageReceived(raw_msg)
File "/home/name/.local/lib/python3.8/site-packages/txdbus/protocol.py", line 266, in rawDBusMessageReceived
self.signalReceived(m)
File "/home/name/.local/lib/python3.8/site-packages/txdbus/client.py", line 642, in signalReceived
self.router.routeMessage(msig)
File "/home/name/.local/lib/python3.8/site-packages/txdbus/router.py", line 128, in routeMessage
r.match(m)
--- ---
File "/home/name/.local/lib/python3.8/site-packages/txdbus/router.py", line 67, in match
self.callback(m)
File "/home/name/.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/discovery.py", line 65, in parse_msg
device_interface = message.body[1].get("org.bluez.Device1", {})
builtins.AttributeError: 'list' object has no attribute 'get'
Unhandled Error
Traceback (most recent call last):
File "/home/name/.local/lib/python3.8/site-packages/txdbus/protocol.py", line 140, in dataReceived
self.rawDBusMessageReceived(raw_msg)
File "/home/name/.local/lib/python3.8/site-packages/txdbus/protocol.py", line 266, in rawDBusMessageReceived
self.signalReceived(m)
File "/home/name/.local/lib/python3.8/site-packages/txdbus/client.py", line 642, in signalReceived
self.router.routeMessage(msig)
File "/home/name/.local/lib/python3.8/site-packages/txdbus/router.py", line 128, in routeMessage
r.match(m)
--- ---
File "/home/name/.local/lib/python3.8/site-packages/txdbus/router.py", line 67, in match
self.callback(m)
File "/home/name/.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/discovery.py", line 65, in parse_msg
device_interface = message.body[1].get("org.bluez.Device1", {})
builtins.AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
File "legotraintest.py", line 70, in
start(system)
File "/home/name/.local/lib/python3.8/site-packages/bricknil/bricknil.py", line 214, in start
ble.run()
File "/home/name/.local/lib/python3.8/site-packages/bricknil/bleak_interface.py", line 52, in run
self.loop.run_until_complete(self.asyncio_loop())
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/name/.local/lib/python3.8/site-packages/bricknil/bleak_interface.py", line 65, in asyncio_loop
devices = await bleak.discover(timeout=1, loop=self.loop)
File "/home/name/.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/discovery.py", line 161, in discover
properties = await bus.callRemote(
txdbus.error.RemoteError: org.freedesktop.DBus.Error.UnknownObject: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Pro perties" doesn't exist
from bricknil.
Just FYI I re-ran this as sudo after fixing all of that up, didn't work. I downloaded the examples from this git repo - still didn't work.
from bricknil.
Interestingly after installing regular Bleak manually I get the following errors now
name@name-desktop:~/bricknil$ sudo python3 examples/duplo_train.py
started thread for curio
inside curio run loop
INFO:BLE Event Q.0:using bleak
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
ERROR:curio.kernel:Task Crash: Task(id=7, name='BLEventQ.connect', state='TERMINATED')
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/curio/kernel.py", line 737, in kernel_run
trap = current.send(current._trap_result)
File "/usr/local/lib/python3.8/dist-packages/curio/task.py", line 167, in send
return self._send(value)
File "/usr/local/lib/python3.8/dist-packages/curio/task.py", line 171, in _task_runner
return await coro
File "/usr/local/lib/python3.8/dist-packages/bricknil/ble_queue.py", line 228, in connect
await self._ble_connect(hub.uart_uuid, hub.ble_name, hub.manufacturer_id, ble_id)
File "/usr/local/lib/python3.8/dist-packages/bricknil/ble_queue.py", line 171, in _ble_connect
devices = [d for d in devices if str(uart_uuid) in d.uuids]
File "/usr/local/lib/python3.8/dist-packages/bricknil/ble_queue.py", line 171, in
devices = [d for d in devices if str(uart_uuid) in d.uuids]
AttributeError: 'BLEDevice' object has no attribute 'uuids'
INFO:BLE Event Q.0:Terminating and disconnecxting
quitting
INFO:root:quitting
quit
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/curio/kernel.py", line 737, in kernel_run
trap = current.send(current._trap_result)
File "/usr/local/lib/python3.8/dist-packages/curio/task.py", line 167, in send
return self._send(value)
File "/usr/local/lib/python3.8/dist-packages/curio/task.py", line 171, in _task_runner
return await coro
File "/usr/local/lib/python3.8/dist-packages/bricknil/ble_queue.py", line 228, in connect
await self._ble_connect(hub.uart_uuid, hub.ble_name, hub.manufacturer_id, ble_id)
File "/usr/local/lib/python3.8/dist-packages/bricknil/ble_queue.py", line 171, in _ble_connect
devices = [d for d in devices if str(uart_uuid) in d.uuids]
File "/usr/local/lib/python3.8/dist-packages/bricknil/ble_queue.py", line 171, in
devices = [d for d in devices if str(uart_uuid) in d.uuids]
AttributeError: 'BLEDevice' object has no attribute 'uuids'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/dist-packages/bricknil/bricknil.py", line 191, in _curio_event_run
run(_run_all(ble, system), with_monitor=False)
File "/usr/local/lib/python3.8/dist-packages/curio/kernel.py", line 823, in run
return kernel.run(corofunc, *args)
File "/usr/local/lib/python3.8/dist-packages/curio/kernel.py", line 173, in run
raise ret_exc
File "/usr/local/lib/python3.8/dist-packages/curio/kernel.py", line 737, in kernel_run
trap = current.send(current._trap_result)
File "/usr/local/lib/python3.8/dist-packages/curio/task.py", line 167, in send
return self._send(value)
File "/usr/local/lib/python3.8/dist-packages/curio/task.py", line 171, in _task_runner
return await coro
File "/usr/local/lib/python3.8/dist-packages/bricknil/bricknil.py", line 138, in _run_all
await task_connect.join()
File "/usr/local/lib/python3.8/dist-packages/curio/task.py", line 187, in join
raise TaskError('Task crash') from self.exception
curio.errors.TaskError: Task crash
from bricknil.
I'm having the same issue. I also have an RPi3 that is giving the error
File "/usr/local/lib/python3.7/dist-packages/bleak/backends/bluezdbus/discovery.py", line 65, in
parse_msg
device_interface = message.body[1].get("org.bluez.Device1", {})
builtins.AttributeError: 'list' object has no attribute 'get'
I'm using the example off the front page like sudo python3 example.py
- the only change is adding lines to increase the logging level to INFO
.
How can I help debug this? I'm eager to make it work.
from bricknil.
I also run into the original error (txdbus.error.RemoteError: org.freedesktop.DBus.Error.UnknownObject: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist) when connecting to a normal PoweredUpHub with a train motor attached, Downgrading the bluetooth firmware as suggested by @jncraton did not resolve the issue for me.
Interestingly, in my case, it appears rather occasionally (roughly 50% of connection attempts). When connecting to 2 hubs simultaneously, it appears roughly 90% of the time, which is really annoying.
Does anyone have a solution?
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
- Technic Control+ Hub gets disconnected on "notify" (raspberry pi 4) HOT 2
- Not able to run lego passenger train due to Bleak error
- 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.