Comments (17)
Version 1.1.0 requires new version of hub firmware. Have you upgraded upgraded hub firmware? It is done via official mobile app.
from pylgbst.
If you did, please provide full log of startup.
from pylgbst.
Thank you for your swift response.
Yes it was after the firmware was updated to 2.0.00.0017. When I run the demo.py code from you, it appears it sees the Lego hub but does not connect. The attached file shows the printout that occurs constantly I hope there is enough of it to see what is happening.
demoLog.txt
from pylgbst.
Can you switch it into debug logging and send log with DEBUG messages?
Also, it is known problem that if you have renamed your device, it will fail to connect. To workaround it, please use MAC address to connect to it. See https://github.com/undera/pylgbst#bluetooth-connection-options
from pylgbst.
Thanks, I haven't changed any names. I can see you can switch it into debug mode by using
python -c "import logging; logging.basicConfig(level=logging.DEBUG);
import pylgbst; pylgbst.start_debug_server()"
But where do I enter this? I have tried the python console which gives me an syntax error and the terminal window which tells me it can't find stuff, both with and without sudo. Sorry to be a pain but I am more a hardware person than a systems level person.
from pylgbst.
https://github.com/undera/pylgbst/blob/master/examples/demo.py#L185
That line shows setting logging to INFO. You need DEBUG
from pylgbst.
Thanks. Attached is what I get. Note again this was all working before upgrading to V1.0 so I am assuming the dependencies I installed to get the older version working is sufficient for the new one. I see the permission denied so I will try again in sudo mode. This resulted in a no module named pylgbst.hub error message.
debugMode.txt
from pylgbst.
I got it. It's the problem of Hub name that I experienced in the past. Please install version 1.1.1, it should help to fix it.
from pylgbst.
Thanks upgraded. This is the result of the debug in the demo.py program. Unfortunately still nothing works. When I try the peripherals detected on Hub I get nothing. When I try including GattConnection I get:-
Traceback (most recent call last): File "/home/pi/MagPi/Boost/Part 3/Si-clops.py", line 9, in <module> from pylgbst.comms.cgatt import GattConnection File "/home/pi/.local/lib/python3.5/site-packages/pylgbst/comms/cgatt.py", line 6, in <module> import gatt ImportError: No module named 'gatt'
`
I had reinstalled pygat and it is now at version 4.0.5
File of the demo with debug attached
debugMode.txt
from pylgbst.
Sorry for late reply.
From your log, I see all devices are attached successfully, but the calls after that don't work. What I see is Python sends command to read device name and never gets reply from device.
I have no idea what causes Hub to not reply, from Python side everything looks correct. The fact you have device attach messages tells that Hub is generally functional and is able to communicate.
One thing you can try is instead of MoveHub() class try to use basic Hub() class. It won't have any simplifications like MoveHub, but will still let you interact with the devices via peripherals
field.
Another way is to subclass MoveHub and override _report_status()
method to remove attempt to print device name.
from pylgbst.
Thanks upgraded. This is the result of the debug in the demo.py program. Unfortunately still nothing works. When I try the peripherals detected on Hub I get nothing. When I try including GattConnection I get:-
Traceback (most recent call last): File "/home/pi/MagPi/Boost/Part 3/Si-clops.py", line 9, in <module> from pylgbst.comms.cgatt import GattConnection File "/home/pi/.local/lib/python3.5/site-packages/pylgbst/comms/cgatt.py", line 6, in <module> import gatt ImportError: No module named 'gatt'
`
I had reinstalled pygat and it is now at version 4.0.5
File of the demo with debug attached
debugMode.txt
Hello Grumpy-Mike and undera,
could you make any progress on this issue? I just started to try to run Mike Lego Boost Demo and ran into the same issue but I use different hardware (raspi zero w).
I'm have not much experience with python but if I can support the problem finding and solving please let me know.
br
Nikolay
from pylgbst.
I don't have access to RaspberryPI, sorry. The issue seem to need some deeper debugging and Python background.
from pylgbst.
Спасибо for you quick reply ;-)
I hope the community can help us out.
br nikolay
from pylgbst.
Hi undera,
just a quick update because I ran some test during the weekend. I was able to run your demo from pylgbst-master on my raspberry pi zero w and connect to my Lego Boost R2D2 and it started flashing the LED and dancing :-).
I'm using pylgbst 1.1.2 and an up-to-date raspi standard system on raspi zero w.
One thing was strange because I had to run the demo several times until it worked. The first time i connected it I could the Lego Boost Hub in the list of bluetooth devices but the demo crashed. Than I repeated the demo (this time without pressing the button on the lego boost). Result was that the list didn't contain the Boost anymore (so as expected). Than I ran the demo again and pressed the button this time. Result was a successfully running demo.
Thanks for providing this great lib!
from pylgbst.
Great
from pylgbst.
from pylgbst.
You would just instantiate two Hub classes, with two different connections to them. I guess using hub_mac parameter for connection is the key.
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.