Skip to content
RoboGuru – RoboGuru home

Blog

Can you program LEGO WeDo 2.0 on Linux? A setup guide

LEGO never made a WeDo 2.0 app for Linux and Scratch Link does not run there. Here is how to check your Bluetooth setup and code WeDo 2.0 on Linux.

By RoboGuru Team 4 min read

Yes, you can program LEGO WeDo 2.0 on Linux, but not with LEGO’s own software, which never had a Linux version. You need a computer with Bluetooth Low Energy, the standard BlueZ Bluetooth service running, and an app that supports Linux directly, such as RoboGuru for WeDo 2.0. Scratch’s official route does not work on Linux.

Key facts

  • LEGO’s WeDo 2.0 software was released for iPad, Android, Windows, macOS and Chromebook, not Linux (LEGO system requirements).
  • The Smarthub talks over Bluetooth Low Energy, Bluetooth 4.0 (LEGO Education FAQ).
  • BlueZ is the official Linux Bluetooth protocol stack (bluez.org).
  • Scratch Link, which Scratch 3 needs for the WeDo 2.0 extension on computers, is available for Windows and macOS only (Scratch Wiki).

Why were Linux users left out?

When WeDo 2.0 launched in 2016, LEGO built its app for the devices schools bought most: iPads, Android tablets, Windows PCs, Macs and Chromebooks (LEGO system requirements). Linux was never on the list.

That mattered more than it might seem. Linux runs on many refurbished school laptops, on computers in maker spaces, and on the machines of parents who simply prefer it. Now that the official app is retired (see our timeline), a Linux version will never come from LEGO.

The free alternative did not fill the gap either. Scratch 3 reaches Bluetooth devices through a small helper program, Scratch Link, and that helper exists only for Windows and macOS. On ChromeOS and Android it is built into the Scratch app instead (Scratch help, Scratch Wiki). There is no Linux build.

How does Bluetooth Low Energy work on Linux?

On Linux, Bluetooth is handled by BlueZ, the official Linux Bluetooth stack (bluez.org). It runs as a background service, usually called bluetooth, and apps talk to it to scan for and connect to devices such as the WeDo 2.0 Smarthub. Mainstream distributions such as Ubuntu, Debian and Fedora include it.

The Smarthub uses Bluetooth Low Energy, the low-power part of Bluetooth that arrived with version 4.0. Your computer’s adapter has to support it. Most laptops made in the last ten years do; some older desktops and very cheap USB dongles do not.

What should I check before I start?

Is there a Bluetooth controller?

Open a terminal and run:

bluetoothctl show

You should see a controller with its address and Powered: yes. If you see “No default controller available”, Linux has not found a Bluetooth adapter. Check that one is fitted, or plug in a Bluetooth 4.0 or newer USB adapter.

Is the service running?

Check the BlueZ service, and if it shows inactive, start it and make it start at boot:

systemctl status bluetooth
sudo systemctl enable --now bluetooth

Is Bluetooth blocked?

List the radio blocks, and if Bluetooth shows Soft blocked: yes, unblock it:

rfkill list
rfkill unblock bluetooth

A hardware block usually means a wireless switch or a laptop key combination.

Can Linux see the hub?

Press the green button on the Smarthub so its light flashes white, then scan for devices:

bluetoothctl scan on

If a new device appears while the hub is flashing, Linux can see it. Press Ctrl+C to stop scanning. You do not need to pair the hub in bluetoothctl: the app connects to it directly. If you did pair it, remove it with bluetoothctl remove followed by its address.

How do I set up WeDo 2.0 on Linux with RoboGuru?

RoboGuru for WeDo 2.0 is an independent, paid replacement for the retired LEGO app. It uses block-based programming, works with the WeDo 2.0 Smarthub from set 45300 and has a Linux version alongside iPhone and iPad, Android, Web editor, Windows and macOS.

  1. Install the app. Get the Linux version from the download page and install it.
  2. Power on the hub. Fit fresh AA batteries or a charged rechargeable battery, then press the green button. The light flashes white.
  3. Connect. Open RoboGuru, use its connect screen to choose your hub, and wait for the hub light to turn blue.
  4. Run a program. Snap a motor block into a short program and run it to check that everything works.

If the hub does not show up, work through our Bluetooth checklist. Weak batteries and a hub still connected to another device are the usual suspects.

With Scratch 3 on Windows or macOS, there are two pieces: the Scratch editor in a web browser, and Scratch Link running in the background. The browser talks to Scratch Link, and Scratch Link talks to the hub (Scratch Wiki). Both pieces have to be installed, running and allowed by your school’s IT policy.

A native desktop app can work in one piece instead. The app talks to BlueZ itself, and BlueZ talks to the hub. That design needs no separate helper program running in the background and no particular browser, which means fewer things to install and fewer things to go wrong on lesson day.

What about the unofficial Linux option?

If you want to use Scratch on Linux anyway, an open-source project called pyscrlink acts as a Scratch Link replacement on Linux. It is unofficial and set up from the command line, so it suits hobbyists better than classrooms.

Frequently asked questions

Does LEGO WeDo 2.0 work on Linux?

The hardware does, because the Smarthub uses standard Bluetooth Low Energy, which Linux supports through BlueZ. LEGO never released its WeDo 2.0 app for Linux, and Scratch Link has no Linux version, so you need software that supports Linux directly.

Can I use Scratch with WeDo 2.0 on Linux?

Not officially. Scratch Link, the helper Scratch needs to reach Bluetooth devices, is available for Windows and macOS only. An unofficial open-source project called pyscrlink fills the gap, but it needs command-line setup.

What Bluetooth do I need on Linux for WeDo 2.0?

A Bluetooth Low Energy adapter (Bluetooth 4.0 or newer) and a running BlueZ service. Most laptops from the last decade have suitable built-in Bluetooth.