Comments (8)
This looks similar to peplin/pygatt#196
What exactly do you have in your demo.py
file?
from pylgbst.
I just copied your demo.py file
https://github.com/undera/pylgbst/blob/master/examples/demo.py
After the first trail I changed the line:
connection = get_connection_auto()
to
connection = get_connection_bluegiga(hub_mac='00:16:53:A5:5A:0B')
Both scenarios prduce the output shown above.
I'm using a Kali-Linux system.
from pylgbst.
That demo file has no job to do, because it has demo_all()
commented out. Try uncommenting it and run again.
from pylgbst.
This I already did. But nothing changed. This i my current code at the bottom of your demo.py file which produces the message:
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
try:
connection = DebugServerConnection()
except BaseException:
logging.debug("Failed to use debug server: %s", traceback.format_exc())
connection = get_connection_bluegiga(hub_mac='00:16:53:A5:5A:0B')
#connection = get_connection_auto()
try:
hub = MoveHub(connection)
sleep(1)
demo_all(hub)
finally:
connection.disconnect()
from pylgbst.
Ok, I see. Can you try with another backend BLE lib?
from pylgbst.
This is the output when I try get_connection_gattool
/usr/bin/python2.7 /root/PycharmProjects/mypy/lego/demo.py
Can't get device info: No such device
INFO:pygatt.backends.gatttool.gatttool:Running...
INFO:comms-pygatt:Discovering devices...
INFO:pygatt.backends.gatttool.gatttool:Starting BLE scan
ERROR:pygatt.backends.gatttool.gatttool:No BLE adapter found
Traceback (most recent call last):
File "/root/PycharmProjects/mypy/lego/demo.py", line 193, in <module>
connection = get_connection_gattool(hub_mac='00:16:53:A5:5A:0B')
File "/usr/local/lib/python2.7/dist-packages/pylgbst/__init__.py", line 18, in get_connection_gattool
return GattoolConnection(controller).connect(hub_mac)
File "/usr/local/lib/python2.7/dist-packages/pylgbst/comms/cpygatt.py", line 31, in connect
devices = adapter.scan(1)
File "/usr/local/lib/python2.7/dist-packages/pygatt/backends/gatttool/gatttool.py", line 326, in scan
raise BLEError(message)
pygatt.exceptions.BLEError: No BLE adapter found
and with
connection = get_connection_gatt(hub_mac='00:16:53:A5:5A:0B')
i receive this:
/usr/bin/python2.7 /root/PycharmProjects/mypy/lego/demo.py
Traceback (most recent call last):
File "/root/PycharmProjects/mypy/lego/demo.py", line 192, in <module>
connection = get_connection_gatt(hub_mac='00:16:53:A5:5A:0B')
File "/usr/local/lib/python2.7/dist-packages/pylgbst/__init__.py", line 24, in get_connection_gatt
return GattConnection(controller).connect(hub_mac)
File "/usr/local/lib/python2.7/dist-packages/pylgbst/comms/cgatt.py", line 93, in connect
self._manager.start_discovery()
File "/usr/local/lib/python2.7/dist-packages/gatt/gatt_linux.py", line 149, in start_discovery
raise _error_from_dbus_error(e)
gatt.errors.Failed: Method "SetDiscoveryFilter" with signature "a{ss}" on interface "org.bluez.Adapter1" doesn't exist
from pylgbst.
pygatt might require sudo
to run properly
from pylgbst.
I am logged in as user root on that machine. But I also tried now:
sudo python2.7 demo.py
unfortunately with the same result. I will continue investigating
from pylgbst.
Related Issues (20)
- LEDRGB: Current color can't be obtained/notified from the hub HOT 4
- Cannot connect to 88015 hub HOT 1
- Error on MacOS HOT 5
- 'MoveHub' object has no attribute 'connection' HOT 2
- Any plans for adding other hubs, maybe Mindstorms 515151? HOT 5
- [motors]Is there a way to ? HOT 1
- Technic Hub Port AB doesnt work HOT 16
- Connecting to WeDo SmartHub: no characteristic found HOT 7
- Blue Tooth Connection HOT 6
- Cannot run a Lego tram HOT 25
- How to get Sound Files with Lego Boost app? HOT 1
- Calling hub methods from callback functions blocks further operations HOT 6
- Crashes from time to time calling bluepy function HOT 14
- How to control a DC (train) motor ? HOT 40
- Support for Powered Up Remote Handset (Lego 88010) HOT 6
- Is pylgbst thread-safe? HOT 2
- To bleak or not to bleak...? HOT 3
- AttributeError: 'NoneType' object has no attribute 'timed' HOT 3
- Proper way to detect if motor is stuck during its move? HOT 3
- Remote WARNING:peripherals:Attempt to unsubscribe while port value updates are off: RemoteButton on port 0x0 HOT 3
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 pylgbst.