-
Notifications
You must be signed in to change notification settings - Fork 40
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
Problems with installation and usage on Windows 10, Ubuntu, Raspbian #12
Comments
So I've just seen https://virantha.github.io/bricknil/readme.html#installation and https://virantha.github.io/bricknil/pi_setup.html I've reinstalled bricknil with sudo and the above error does not occur. However, nothing happens when I spin the front wheels manually.
The sample code says the hub button needs to be pushed, which turns off the train.
Ok so I got it to work once by connecting, shutting down the train when connected, starting the train again. But I can't reproduce. |
Got a Bluetooth 4.0 dongle, and it starts working on Windows, although the Bricknil commands seem to be interrupted by the train:
|
Thanks @gnbl, by following these instructions I was finally able to get an example running on Windows 10. |
Summary:
On Windows 10 with the latest Python 3.8.1,
pip3 install bricknil
(following https://virantha.github.io/bricknil/readme.html#installation) fails when installingpythonnet
due to missing dependencywheel
.pip3 install wheel
resolves that, but building fails due toModuleNotFoundError: No module named 'pycparser'
.pip3 install pycparser
solves that, but building fails.Digging deeper:
https://pypi.org/project/pythonnet/#files last wheel release from mid 2019, so Python 3.7 needed, e.g.
https://www.python.org/ftp/python/3.7.6/python-3.7.6.exe
works.
Then, running https://virantha.github.io/bricknil/readme.html#using-the-duplo-train-and-playing-sounds as brick.py:
Google finds this issue and solution: hbldh/bleak#53 (comment)
i.e.
%localappdata%\Programs\Python\Python37-32\Scripts\bleak-lescan
runs without error, albeit not giving any output.The bricknil example does not find anything (Android nrF Connect has no issue connecting to the train) and "crashes":
which I cannot quit (CTRL+C or anything else).
So my Bluetooth 4.0 dongle (CSR) and Windows likely are the actual problem.
https://www.lego.com/en-us/service/device-guide/duplo-connected-train
Although BLE is part of Bluetooth since 4.0!?
I'll try this on Linux.
Same error on Timeout in Ubuntu:
error.txt
Issue with bluetooth adapter ("dongle")?
So it seems it's only a Bluetooth 2.0 Dongle and does not support BLE... Argh!
Trying on RPi Zero W with current Raspbian Lite:
Following
https://raspberrypi.stackexchange.com/questions/71333/bluetooth-does-not-work-with-raspbian-stretch-and-raspberry-pi-3
seems to fix the access problem, but there is another Exception:
The text was updated successfully, but these errors were encountered: