-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
demo.py & examples fail with "Failed to obtain all builtin devices" #23
Comments
Hi, builtin_devices = (self.led, self.motor_A, self.motor_B, self.motor_AB, self.button) This way it will pass startup health check. |
Hi Andrey, thanks a lot for your help! I changed this line, but when I start the demo, it still fails with the same message. I guess I need to publish/install a new version of the pylgbst module using "pip3 install ..."? Michael |
Two ways:
I did not want to bother you with subclassing way, where you can create a class that would inherit from |
OK, reinstalling using pip3 works when using "--upgrade": I still have a problem using
Now, when running it with
Any idea how to solve this? Well, now to the actual problem with BLE connection/communication. After some trial & error I found the following:
Another way to make it work was to remove all (or: all undiscoverable) sensors from the
I'm not sure why my MoveHub behaves so strange, but at least I got it working now :-) My next topic would be to get android_remote.py to work, but that fails with this error message:
What do I need to do to make that work? Thanks a lot! |
The problem is with PYTHONPATH. You need to add source root to Pythonpath so interpreter will find the modules |
Regarding PYTHONPATH: I tried the following:
I also tried to set PATHONPATH to Regarding the android_remote.py: can you advise me how to get it working? My son is desperate to see Vernie move according to the movements of the phone/tablet ... Thanks a lot! |
Documentation clearly states that some of BLE backend libs might require sudo: https://github.com/undera/pylgbst#bluetooth-backend-prerequisites . I did not develop those libs and can't explain why. I have made small change to android_remote.py, should help with import error. |
Andrey, thanks again for your great support!
Any idea why the module is not found as sudo? The pylgbst module is properly installed and the demo.py works as well:
Thanks a lot! |
Probably, inside sudo-ed shell, the PYTHONPATH is not set. One way to try is to run |
Thank you for the hint about "sudo bash" - this works well :-) And I even found a ticket for the issue why sudo is required in the first place: Unfortunately non of the suggested solutions works for me :-( I think we covered enough topics here now and can close this issue now. Thanks again! |
Good stuff! |
Hi Andrey,
first of all: thanks a lot for all the effort you put into this library & the related Youtube videos! Those got me triggered in buying a Raspi Zero W and a BLED112 (for testing on Windows) and trying to learn Python :-)
Since I'm a complete noob to Python and this whole BLE topic, I had a hard time to setup the library and its requirements. I didnt get it to work on Windows (using PyCharm), but on the Raspi I'm now at a point where I think I have everything correctly setup - but still cannot "talk" to the Lego Boost.
I'm using Python3 and installed bluepy and the pylgbst lib:
I can use bluetoothctl to discover, pair and connect to the Boost Hub. However, when I try to run the demo.py, I get the following error:
I have all motors and the sensor connected. I also tried without any connected motors/sensors, but the error is the same.
I can launch the DebugServer as described in the readme, and that starts successfully - but running demo.py still fails:
Any idea what I'm doing wrong here? I also cloned your repo to the Raspi, so I'd happily try any suggested code change (if you tell me how to use the local repo instead of the installed pip3 pylgbst lib... ;-)
Furthermore I tried to run the android_remote.py but that fails with another error message:
What do I need to do to make that work?
Regards
Michael
The text was updated successfully, but these errors were encountered: