Skip to content

LEGO boost #34

@ratschan

Description

@ratschan

I am trying to connect to LEGO boost from Ubuntu/Firefox/Scratch via a BLE dongle using pyscrlink. Installation (following the instructions at https://github.com/kawasaki/pyscrlink) works fine. But trying to connect from Scratch, as described in the instructions, fails, the LEGO boost extension saying "no devices found". Doing so, scratch_link -d outputs the following:

Print debug messages
2023-02-25 15:52:14,387 set scan_seconds: 10.0
2023-02-25 15:52:14,412 Certificate is ready in FireFox NSS DB: /home/ratschan/.mozilla/firefox/wx5xyc5d.default-release
2023-02-25 15:52:15,271 Certificate is ready in FireFox NSS DB: /home/ratschan/.mozilla/firefox/dj0c5tt0.default
2023-02-25 15:52:15,301 Certificate is ready for Chrome
2023-02-25 15:52:15,356 Started scratch-link
2023-02-25 15:54:57,652 Start session for web socket path: /scratch/ble
2023-02-25 15:54:57,652 start session handler
2023-02-25 15:54:57,652 start recv_request
2023-02-25 15:54:57,754 start recv_request
2023-02-25 15:54:57,754 request: {"jsonrpc":"2.0","method":"discover","params":{"filters":[{"services":["00001623-1212-efde-1623-785feabcd123"],"manufacturerData":{"919":{"dataPrefix":[0,64],"mask":[0,255]}}}],"optionalServices":[]},"id":0}
2023-02-25 15:54:57,754 handle request to BLE device
2023-02-25 15:54:57,754 discover
2023-02-25 15:54:57,754 {'filters': [{'services': ['00001623-1212-efde-1623-785feabcd123'], 'manufacturerData': {'919': {'dataPrefix': [0, 64], 'mask': [0, 255]}}}], 'optionalServices': []}
2023-02-25 15:54:57,763 start BLE scan: 10.0 seconds
2023-02-25 15:55:07,788 Failure in session for web socket path: /scratch/ble
2023-02-25 15:55:07,788 BTLEDisconnectError: Device disconnected

I also tried to follow the steps "at In Case You Fail to Connect" but could not really make sense of the instructions. Opening "https://device-manager.scratch.mit.edu:20110/" in the browser, I get "Failed to open a WebSocket connection: invalid Connection header: keep-alive. You cannot access a WebSocket server directly with a browser. You need a WebSocket client.". But the instructions say "This is expected". Now I do not understand what to conclude from this ...

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