Skip to content
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

Mindstorms Inventor does not connect #100

Open
ChristophGaukel opened this issue Aug 12, 2021 · 5 comments
Open

Mindstorms Inventor does not connect #100

ChristophGaukel opened this issue Aug 12, 2021 · 5 comments

Comments

@ChristophGaukel
Copy link

Hello,
in your file init.py I did set the logging to DEBUG, done by: logging.basicConfig(level=logging.DEBUG)
then I did run this program:

from pylgbst import get_connection_gatt

conn = get_connection_gatt(hub_mac='A8:E2:C1:9B:AC:29')
print('connection:', conn)

Its output:
DEBUG:comms-gatt:Starting DeviceManager...
INFO:comms-gatt:Discovering devices...
DEBUG:comms-gatt:Devices: dict_values([<gatt.gatt_linux.Device object at 0x7f093f99f790>, <gatt.gatt_linux.Device object at 0x7f093f03c9d0>, <gatt.gatt_linux.Device object at 0x7f093f03cbb0>, <gatt.gatt_linux.Device object at 0x7f093f03cd90>])
DEBUG:comms:Checking device: Hugo, MAC: 00:16:53:42:2b:99
DEBUG:comms:Checking device: LEGO Hub@Egon, MAC: a8:e2:c1:9b:ac:29
INFO:comms:Found LEGO Hub@Egon at a8:e2:c1:9b:ac:29
INFO:comms-gatt:Waiting for device connection...
DEBUG:comms-gatt:Sleeping...
DEBUG:comms-gatt:Sleeping...
DEBUG:comms-gatt:Sleeping...
DEBUG:comms-gatt:Sleeping...
...

It does never connect. Do you know, what happens?

@undera
Copy link
Owner

undera commented Aug 12, 2021

Hello,
This library is for PoweredUp-compatible devices. It would not work with EV3-devices, because of different technology. Is "Mindstorms Inventor" a kind of PoweredUp device?

@ChristophGaukel
Copy link
Author

Mindstorms Inventor (Set 51515) is quite similar to Spike Prime (Set 45678) and quite different from EV3. Yes, it is a PoweredUp device. At least LEGO tells so.

@undera
Copy link
Owner

undera commented Aug 13, 2021

if it's a PoweredUp device, then the issue might be in the BLE library. I'd suggest using Bleak as the most modern lib.

@chey
Copy link

chey commented Aug 23, 2021

I am curious if this library does work for Robot Inventor (https://www.lego.com/en-us/product/robot-inventor-51515)

Any luck @ChristophGaukel ?

@cpseager
Copy link

cpseager commented Aug 23, 2021

Just for clarity, Spike/RI hub opens a more traditional bluetooth v2.1 virtual serial port and communicates to the computer that way. It does not use BLE in normal use with the LEGO app. It's much more like EV3 than the other powered up hubs in that respect.

However it does also support BLE, so that it can connect to and control other powered up hubs/remotes (and bluetooth joysticks etc.). However you would probably need to program it to do that in micropython on the hub itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants