Discuss Scratch
- zleap
-
Scratcher
25 posts
Scratch Link and GNU / Linux
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
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
- bybb
-
Scratcher
1000+ posts
Scratch Link and GNU / Linux
What is this “Scratch Link” you are referring to?
- _nix
-
Scratcher
1000+ posts
Scratch Link and GNU / Linux
What is this “Scratch Link” you are referring to?It's the technology which allows Scratch 3.0 to connect to external hardware, like the micro:bit. See scratch.mit.edu/microbit for an example.
- zleap
-
Scratcher
25 posts
Scratch Link and GNU / Linux
What is this “Scratch Link” you are referring to?It's the technology which allows Scratch 3.0 to connect to external hardware, like the micro:bit. See scratch.mit.edu/microbit for an example.
If you import the scratch 3 microbit module thing you get told you need it so the micro:bit can talk to scratch 3,. you can download for Windows and OSX. I am not 100 percent sure what this is, possibly some sort of bluetooth thing.
Paul
- smrman
-
Scratcher
1000+ posts
Scratch Link and GNU / Linux
What is this “Scratch Link” you are referring to?
It's a middleware (software in-between Scratch (browser) and the micro:bit (Bluetooth device)).
I am not 100 percent sure what this is, possibly some sort of bluetooth thing.Indeed, it is.
It is used to send “messages” using bluetooth between the micro:bit and Scratch (works in the other way too) when events are fired (shaken, tilted, button pressed, etc…) or to transmit datas like the tilt angle, speed, etc…
I guess they didn't had enough control with the Javascript Bluetooth API so they made it into a software you have to install (Scratch Link).
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.
I could be possible but still requires some work. I think the Scratch Team prefers to focus on finishing Scratch 3 than beginning with porting a program. And given the number of Scratchers using Linux and the number of different Linux distros (ik Ubuntu, Kubuntu, Lubuntu, Xubuntu share some code from Debian but still…) it's not likely to gappen soon I think (I might be wrong, the Scratch Team perhaps have a surprise for you, idk).
Last edited by smrman (Sept. 14, 2018 13:20:14)
- zleap
-
Scratcher
25 posts
Scratch Link and GNU / Linux
What is this “Scratch Link” you are referring to?
It's a middleware (software in-between Scratch (browser) and the micro:bit (Bluetooth device)).I am not 100 percent sure what this is, possibly some sort of bluetooth thing.Indeed, it is.
It is used to send “messages” using bluetooth between the micro:bit and Scratch (works in the other way too) when events are fired (shaken, tilted, button pressed, etc…) or to transmit datas like the tilt angle, speed, etc…
I guess they didn't had enough control with the Javascript Bluetooth API so they made it into a software you have to install (Scratch Link).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.
I could be possible but still requires some work. I think the Scratch Team prefers to focus on finishing Scratch 3 than beginning with porting a program. And given the number of Scratchers using Linux and the number of different Linux distros (ik Ubuntu, Kubuntu, Lubuntu, Xubuntu share some code from Debian but still…) it's not likely to gappen soon I think (I might be wrong, the Scratch Team perhaps have a surprise for you, idk).
I agree here, Maybe the Pi foundation will help with a port to Raspbian., That would allow micro:bit to perhaps work with Lego Mindstorms / Wedo. via scratch Link, and it would allow more embedded projects, Could be in their interest to help.
So yes, Linux port welcome but limiting it to Raspbian would make sense from a Technical devlopment viewpoint and I agree with concentrating on Scratch 3.0 first.
Thank you for your response.
Paul Sutton
- ninjagolloyd
-
Scratcher
500+ posts
Scratch Link and GNU / Linux
doubt that the RPF would port to linux in general? maybe just Raspbian but porting to say Redhat is unneededWhat is this “Scratch Link” you are referring to?
It's a middleware (software in-between Scratch (browser) and the micro:bit (Bluetooth device)).I am not 100 percent sure what this is, possibly some sort of bluetooth thing.Indeed, it is.
It is used to send “messages” using bluetooth between the micro:bit and Scratch (works in the other way too) when events are fired (shaken, tilted, button pressed, etc…) or to transmit datas like the tilt angle, speed, etc…
I guess they didn't had enough control with the Javascript Bluetooth API so they made it into a software you have to install (Scratch Link).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.
I could be possible but still requires some work. I think the Scratch Team prefers to focus on finishing Scratch 3 than beginning with porting a program. And given the number of Scratchers using Linux and the number of different Linux distros (ik Ubuntu, Kubuntu, Lubuntu, Xubuntu share some code from Debian but still…) it's not likely to gappen soon I think (I might be wrong, the Scratch Team perhaps have a surprise for you, idk).
I agree here, Maybe the Pi foundation will help with a port to Raspbian., That would allow micro:bit to perhaps work with Lego Mindstorms / Wedo. via scratch Link, and it would allow more embedded projects, Could be in their interest to help.
So yes, Linux port welcome but limiting it to Raspbian would make sense from a Technical devlopment viewpoint and I agree with concentrating on Scratch 3.0 first.
Thank you for your response.
Paul Sutton
- MegaApuTurkUltra
-
Scratcher
1000+ posts
Scratch Link and GNU / Linux
Is Scratch Link even open source (/free software)?
- MrMeowington
-
Scratcher
100+ posts
Scratch Link and GNU / Linux
Is Scratch Link even open source (/free software)?Scratch Link is a free-to-download program. However, to my knowledge, it is not open source, but Scratch 3.0 itself is.
The Scratch Github page can be viewed here.
- MegaApuTurkUltra
-
Scratcher
1000+ posts
Scratch Link and GNU / Linux
I took a look at the windows version (C# is very easy to decompile
) and it seems to be just a very basic websocket to bluetooth (rfcomm) / BLE (i don't really know how BLE works but something about GATT) forwarder. It can't be that hard to port…
Out of curiosity, I also tried to load up the micro bit firmware file in IDA (I assumed it was native code, not micropython since it doesn't have the MP signature at 0x3E000) - ARM little endian with entry point 0x00000000 and it looked like garbage. Maybe someone with more ARM experience can do a better job at figuring out what's going on there
) and it seems to be just a very basic websocket to bluetooth (rfcomm) / BLE (i don't really know how BLE works but something about GATT) forwarder. It can't be that hard to port…Out of curiosity, I also tried to load up the micro bit firmware file in IDA (I assumed it was native code, not micropython since it doesn't have the MP signature at 0x3E000) - ARM little endian with entry point 0x00000000 and it looked like garbage. Maybe someone with more ARM experience can do a better job at figuring out what's going on there

Last edited by MegaApuTurkUltra (Dec. 25, 2018 22:22:19)
- Passiday
-
New Scratcher
8 posts
Scratch Link and GNU / Linux
I took a look at the windows version (C# is very easy to decompile) and it seems to be just a very basic websocket to bluetooth (rfcomm) / BLE (i don't really know how BLE works but something about GATT) forwarder. It can't be that hard to port…
Out of curiosity, I also tried to load up the micro bit firmware file in IDA (I assumed it was native code, not micropython since it doesn't have the MP signature at 0x3E000) - ARM little endian with entry point 0x00000000 and it looked like garbage. Maybe someone with more ARM experience can do a better job at figuring out what's going on there
If the decompiled windows version can be extended and compiled back, you would add some logging to see what kind of data is going to and from the device (micro:bit or other). It's not that hard to monitor in the web browser the socket communication with the device-manager domain, but it might be not enough. I had this idea that if I could set up my own sockets server, I could trick Scratch into thinking it's talking to micro:bit, but in reality it is talking to my code. That would allow all kinds of fancy hardware interaction without waiting for full documentation and support of writing one's own extensions.
- SimpleScratch
-
Scratcher
500+ posts
Scratch Link and GNU / Linux

Really loving the idea of making a custom version of ScratchLink as a way of getting ability to talk to other hardware devices.
- jokebookservice1
-
Scratcher
1000+ posts
Scratch Link and GNU / Linux
Aren't the messages from Scratch to Scratch Link published already, because despite Scratch Link being closed source, Scratch is free software: the logic is publicly visible. Scratch Link presumably just converts these messages into actions for the hardware, and that should be well documented, so surely recreating Link shouldn't be too hard?
- MegaApuTurkUltra
-
Scratcher
1000+ posts
Scratch Link and GNU / Linux
Aren't the messages from Scratch to Scratch Link published already, because despite Scratch Link being closed source, Scratch is free software: the logic is publicly visible. Scratch Link presumably just converts these messages into actions for the hardware, and that should be well documented, so surely recreating Link shouldn't be too hard?The scratch link bluetooth protocol isn't documented at all as far as I can tell. You load the scratch link firmware onto the micro:bit (also closed source - not entirely sure where to start with the RE on that if one wanted to make an open source clone). But it turns out it's literally just unpacking the websocket messages and sending them over rfcomm / whatever the BLE equivalent is
- timo123456
-
Scratcher
10 posts
Scratch Link and GNU / Linux
Is Scratch Link even open source (/free software)?Scratch Link is a free-to-download program. However, to my knowledge, it is not open source, but Scratch 3.0 itself is.
The Scratch Github page can be viewed here.
The scratch team is waiting for a MIT licence for scratch link before opensourcing.
- edwardpacman9950
-
Scratcher
4 posts
Scratch Link and GNU / Linux




Last edited by edwardpacman9950 (March 12, 2019 18:21:15)
- edwardpacman9950
-
Scratcher
4 posts
Scratch Link and GNU / Linux
What is this “Scratch Link” you are referring to?
Scratch Link© is an app that if you don't have the thing that connets to scratch.

- ftraian
-
New Scratcher
2 posts
Scratch Link and GNU / Linux
Scratch Link is open source now: https://github.com/LLK/scratch-link
It would be great to have a community port for it :-)
It would be great to have a community port for it :-)
- ASD_Code
-
Scratcher
1 post
Scratch Link and GNU / Linux
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
- shin1201
-
Scratcher
1 post
Scratch Link and GNU / Linux
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.
https://github.com/kawasaki/bluepy-scratch-link
Though it is a quick rough work, it is working well with Scratch programs with micro:bit extension.
https://github.com/kawasaki/bluepy-scratch-link
Though it is a quick rough work, it is working well with Scratch programs with micro:bit extension.








) and it seems to be just a very basic websocket to bluetooth (rfcomm) / BLE (i don't really know how BLE works but something about GATT) forwarder. It can't be that hard to port…


