LEGO Mario
Mario, Luigi and Peach are battery-powered interactive figures sold from 2020 on, each with a colour sensor on port 1 and a costume contact on port 2. They speak LWP3 over Bluetooth on the standard hub service, the same link as every Powered Up hub.
Reach
| Capability | State | Note |
|---|---|---|
| Connect from any Bluetooth central | works, untested here | Ordinary LWP3 peripheral on the standard hub service: a phone, a browser or the bridge, nothing reflashed. |
| Tell the three figures apart before connecting | works, untested here | Advertising system type 0x43 Mario, 0x44 Luigi, 0x45 Peach. LEGO's published spec lists none of the three; the identifiers came from people taking the figures apart. |
| Read a printed code shown to it | works, untested here | Colour sensor on port 1, five coloured lines per code: the first two are always green then red, a header saying a code is starting, and the other three carry the value. 0x01 to 0xd2, so 210 patterns, 7 by 6 by 5. |
| Read which costume is fitted | works, untested here | Port 2, a 6-bit code 0 to 63 that the figure feels rather than sees. Not an optical channel. |
| Drive a motor or a lamp | out of reach | The figure has no outputs at all; the documented ports are inputs. |
| Use it from Flash Force | out of reach | Nothing on the figure to drive, and the page has no view for a sensor value. |
What it hears
Bluetooth, both ways, on the standard hub service, and the frames are the ordinary ones: LWP (Powered Up BLE) holds them, and the figure answers a central like any other peripheral on that link.
There is a second channel and it is not radio. The sensor reads printed colour codes, one way only, which makes the figure the one LEGO product still in production that you program by showing it a printed code. It is the Code Pilot barcode card twenty-three years later: one read bars of black on white, the other reads lines of colour, and the paper against light comparison is set out in Barcodes (Code Pilot). Costume detection is a third thing again, felt and not seen.
Reaching it today
Connect and listen. Any Bluetooth central reaches it with nothing reflashed, so the least effort is a phone or a browser page; the bridge reaches it too, but it buys nothing here because there is no infrared or lamp in the path.
A session is a read, not a drive: which code was shown, which costume is on, what the sensor sees. Clients that already do it are in the Links below, in Python and in C++.
Links
- The reverse engineering: bricklife/LEGO-Mario-Reveng, barcode detail in IOType-0x49.md.
- Clients: djipko/legomario.py · ModestBitboard/legomario · corneliusmunz/legoino.
- Hub kinds, including the three system types above: LWP (Powered Up BLE).
- Compare Code Pilot and Powered Up.