Skip to content

Raspberry Pi: demo.py sometimes work, sometimes not #69

@tonka3000

Description

@tonka3000

Hey @undera ,

I have troubles to get the demo.py example from your repo to work always. It worked multiple times (3-4 times), but most of the time the hub switches off WARNING:hub:Hub switches off, before an action can be started and the program stuck on that state. The bot turns off after 10 seconds of not interaction which is the default as far as I can tell. I've tried it on my mac, but no bluetooth backend seems to support MacOS so not test possible. For me it looks like the program on the pi is so slow (maybe wait for an event) and reach timeout before.

Hardware: raspberry pi 3 B, Lego Boost Robot
python: 3.7.3
virtual env: yes, with python3 -m venv
Bluetooth backend: bluepy 1.3.0
Firmware-Version: 2.0.00.0017

Here is the application stdout from demo.py. It extremely fast found the hub but it stuck on the line INFO:hub:Attached peripheral: LEDRGB on port 0x32 for some time, so it seems that the program is waiting for something here.

INFO:root:Trying get_connection_bluepy
INFO:comms-bluepy:Discovering devices...
INFO:comms-bluepy:Discovering devices...
INFO:comms:Found LEGO Move Hub at 00:16:53:ba:05:69
INFO:hub:Attached peripheral: EncodedMotor on port 0x0
INFO:hub:Attached peripheral: EncodedMotor on port 0x1
INFO:hub:Attached peripheral: VisionSensor on port 0x2
INFO:hub:Attached peripheral: EncodedMotor on port 0x3
INFO:hub:Attached peripheral: EncodedMotor on port 0x10
INFO:hub:Attached peripheral: LEDRGB on port 0x32 //<= stuck for multiple seconds here
INFO:hub:Attached peripheral: TiltSensor on port 0x3a
INFO:hub:Attached peripheral: Current on port 0x3b
INFO:hub:Attached peripheral: Voltage on port 0x3c
WARNING:hub:Have not dedicated class for peripheral type 0x42 on port 0x46
INFO:hub:Attached peripheral: Peripheral on port 0x46
WARNING:hub:Hub switches off

Maybe you have an idea how I can debug that problem.

Greetings

Tonka

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions