Discuss Scratch

smrman
Scratcher
1000+ posts

Scratch Link and GNU / Linux

I started re-writing the Scratch Link middleware a few months ago too.
Tho it was supposed to be something more robust, written in C++ (thanks to the Qt framework).
I never finished it unfortunately…

I had a look at your code (I'm not a Python expert) and it looks good
The Linux community now has something they can use and that's great.
Thank you
cristore2018
Scratcher
1 post

Scratch Link and GNU / Linux

i need an help, when scratch tries to connect with bt i got this

Start session for web socket path: /scratch/ble
Failure in session for web socket path: /scratch/ble
invalid literal for int() with base 10: ‘00001523-1212-efde-1523-785feabcd123’
Exception ignored in: <function BLESession.__del__ at 0x7f62fd2c7680>
Traceback (most recent call last):
File “./scratch_link.py”, line 198, in __del__
close(self)
NameError: name ‘close’ is not defined

any ideas?
zleap
Scratcher
25 posts

Scratch Link and GNU / Linux

@shin1201
Cool thanks will have a look

Paul
Foxerich
New Scratcher
2 posts

Scratch Link and GNU / Linux

shin1201 wrote:

I have written a python script to act as Scratch Link on Linux based systems. Though it has some limitation, it connected my micro:bit with Scratch on my Linux system. I posted it on github.

unfortunately your script does not work with lego boost. The problem is that the “sevice to check: 00001623-1212-efde-1623-785feabcd123” must be int (on micro:bit the message reads “sevice to check: 61445”)


Foxerich
New Scratcher
2 posts

Scratch Link and GNU / Linux

The difference is in the requestparameters:

micro:bit request:
request: {“jsonrpc”:“2.0”,“method”:“discover”,“params”:{“filters”:[{“services”:}]},“id”:0}

boost request:
request: {“jsonrpc”:“2.0”,“method”:“discover”,“params”:{“filters”:[{“services”:,“manufacturerData”:{“919”:{“dataPrefix”:,“mask”:}}}],“optionalServices”:},“id”:0}
drchips
Scratcher
1 post

Scratch Link and GNU / Linux

Hi. I’m trying to connect Scratch 3 running on a Raspberry Pi to the Lego WeDo 2 unit. Would this python script work for this?

Thanks!
minor-edit
Scratcher
500+ posts

Scratch Link and GNU / Linux

Here is the Linux version of scratch-link? topic at GitHub.
chrisglencross
New Scratcher
1 post

Scratch Link and GNU / Linux

I've created a fork of @shin1201's Python script which adds support for Lego Mindstorms EV3.

https://github.com/chrisglencross/bluepy-scratch-link
https://github.com/kawasaki/bluepy-scratch-link/pull/6

It MIGHT also work with other devices which use non-BLE (Bluetooth Low Energy) Bluetooth connections, but I have only tested with Lego Mindstorms.

If you tried using shin1201's script with a device and received the message “BT session handler is not implemented” you might want to try this instead.
pranavhaha
Scratcher
91 posts

Scratch Link and GNU / Linux

zleap wrote:

Hi

Just wondered if Scratch Link will be available for GNU / Linux based systems, given the number of different distributions perhaps support for Debian or the Raspbian distribution for the Raspberry Pi would be a good start.



Thanks

Paul Sutton
https://scratux.org/ From here Download scratch 3.0 for ubuntu in all versions like raspberry, appimage etc
ElsieBreeze
Scratcher
100+ posts

Scratch Link and GNU / Linux

pranavhaha wrote:

zleap wrote:

Hi

Just wondered if Scratch Link will be available for GNU / Linux based systems, given the number of different distributions perhaps support for Debian or the Raspbian distribution for the Raspberry Pi would be a good start.



Thanks

Paul Sutton
https://scratux.org/ From here Download scratch 3.0 for ubuntu in all versions like raspberry, appimage etc
I don't Scratux has a port of Scratch Link, does it?
ecavalli
Scratcher
1 post

Scratch Link and GNU / Linux

Any news about Scratch Link for Linux?

Powered by DjangoBB