• Stars
    star
    165
  • Rank 228,906 (Top 5 %)
  • Language
    Lua
  • License
    MIT License
  • Created over 7 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Reverse engineering the LEGO BOOST Hub

BOOSTreveng

Documenting my findings on reverse engineering the LEGO BOOST Move Hub.

My main interest is using Linux (MINDSTORMS EV3 with ev3dev) but this information might be usefull to everybody.

In Linux (Ubuntu) I usually use the gatttool command (from BlueZ 5) for simple bash scripts and pybluez (or just gattlib, https://bitbucket.org/OscarAcena/pygattlib) for python scripts. Usually same scripts run fine on ev3dev but since bluez, pybluez and the linux kernel are a bit behind Ubuntu sometimes I need to call gatttool from python as a workaround.

You should also see these other projects:

DISCLAIMER:

LEGO and BOOST are Trademarks from The LEGO Company, which does not support (most probably doesn't even know about) this project. And of course I'm not responsible for any damage on your LEGO BOOST devices.

Method: I'm using an ubertooth BLE sniffer with my Ubuntu laptop. Installed LEGO BOOST App on my Android phone (Huawey P8, not supported but it works, just need to get the full APK+OBB, there are a few sources like APKPure).

It's not easy to get consistent results. I'm using Wireshark and a filter for ATT protocol ("btl2cap.cid==0x004"). Have to try several times until I capture something useful - it seems that restarting Bluetooth on Android and restarting App helps. Also disabling my laptop internal BT and not running heavy programs seems to help.

Progress so far:

  • RGB LED color control
  • Motors (A, B, A+B, C, D) speed/timed control (also angle/rotation control but not complete yet)
  • Color Sensor- can identify colors
  • Distance Sensor - can measure distances
  • Motor rotation readings (A, B, A+B, C, D)
  • Button state reading
  • MIT App Inventor 2 released last month a new version of the BLE extension with lots of new features... and it works!

People: I was amazed by having people making questions and suggestions the very same day I started this project. Lately two github users joined in and gave a strong push, revising my confusing notes, testing on their own, starting their own projects and even also bringing their own BLE sniffers.

They've created a Slack group where people can work together.

I probably should add more names here but things are going too fast for me to keep up so please forgive me.

Content:

  • details of what we've found
  • a few bash scripts for Linux, even fewer python scripts also for Linux and one or two Android MIT AppInventor examples
  • some text files trying to explain how to use bash or python

Things will look somewhat chaotic for a while. Please accept that I lack a programming background and also that I'm not writing a book.

Roadmap:

  • Move Hub 6-axis tilt sensor readings [on progress]
  • Color sensor colored-light mode
  • Color sensor ? light intensity ?

Totally blind yet:

  • battery level - why didn't LEGO used the standard characteristic?!?
  • scan hardware configuration, detect changes

Issues:

  • although gatttool works fine, I'm having problems with gattlib
  • MIT AppInventor 2 is a pain, I believe I'm having a similar problem with encoding

I really don't understand why LEGO developers opted to put everything in just one handle. It forces us to send a long string even for simple commands, which increases latency. Using MIT App Inventor 2 (and probably other blockly languages like Scratch) with long commands gets difficult and clumsy.

UPDATE: https://github.com/LEGO/lego-ble-wireless-protocol-docs LEGO released a detailed (but still draft) specification of the BLE specs (officially named LEGO Wireless Protocol, LWP)

More Repositories

1

pyb00st

Python for LEGO BOOST
Python
137
star
2

microbit

Using micro:bit with the LEGO MINDSTORMS EV3
Python
16
star
3

SnapBOOST

Snap! extension for LEGO BOOST
Python
13
star
4

ir-spybotics

Old LEGO infrared protocol (beforePower Functions) used with MINDSTORMS Spybotics, Bionicle Manas, etc.
Python
11
star
5

ev3-mqtt-micropython

Using LEGO EV3 MicroPyhton with MQTT
Python
10
star
6

SBrick-Stress-Test

Python script to test the limits of Vengit SBrick from linux system using BlueZ 5 gatttool
Python
8
star
7

AppInventor-Vernie

5
star
8

mindstorms-vll

Several methods to control LEGO Code Pilot and MicroScout with VLL
Python
4
star
9

re_interactivemotor

Reverse engineering of the LEGO(R)(TM) Interactive Motor from the BOOST set
Python
4
star
10

ev3dev-xac

Using a Microsoft Xbox Adaptive Controller with MINDSTORMS EV3 running ev3dev
Python
2
star
11

UniBrick

A universal controller for LEGO devices
2
star
12

Puppy

Small Android Application for LEGO Powered Up made with MIT App Inventor
2
star
13

SnapWeDo1

A WeDo 1.0 extension for Snap!
Python
2
star
14

randomideas

Short samples of code for random ideas that cross my mind
Python
2
star
15

ev3-barcode

using python with ev3dev to read a USB barcode scanner with LEGO MINDSTORMS EV3
Python
2
star
16

SBrick-Firmware-Update

Python script to update Vengit SBrick firmware from linux system using BlueZ 5 gatttool
Python
2
star
17

CodatexRFID-ev3dev

Python scripts to use Codatex RFID Sensor with ev3dev
Python
1
star
18

InterfaceA

How to use an old LEGO Interface A
Python
1
star
19

EV3-IoT-Train

A demo about using LEGO EV3 MicroPython to control a LEGO Train with multiple pBricks
Python
1
star
20

multicastMIDI-EV3

Using LEGO MINDSTORMS EV3 as a wireless MIDi instrument (multicast MIDI)
Python
1
star