whatisgithub

What is prime-connect?

somespi/prime-connect — explained in plain English

Analysis updated 2026-05-18

1HTMLAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A discovery note showing how to unlock direct Bluetooth control on a LEGO SPIKE Prime hub via MicroPython, without changing its firmware.

Mindmap

mindmap
  root((prime connect))
    What it does
      Unlocks BLE control
      Uses hub REPL
      No firmware changes
    Tech stack
      MicroPython
      SPIKE Prime hub
      USB REPL
    Use cases
      Custom BLE projects
      Robotics experimentation
      Learn hub internals
    Audience
      LEGO robotics hobbyists
      MicroPython tinkerers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Write custom MicroPython code that controls Bluetooth directly on a SPIKE Prime hub

USE CASE 2

Experiment with BLE robotics projects without installing Pybricks

USE CASE 3

Study how the SPIKE Prime hub's USB REPL exposes internal configuration

What is it built with?

MicroPythonSPIKE PrimeBLE

How does it compare?

somespi/prime-connectabhishek-kumar09/mern-live-js-june-2021abhishek-kumar09/z
Stars111
LanguageHTMLHTMLHTML
Last pushed2021-09-132019-12-23
MaintenanceDormantDormant
Setup difficultymoderatemoderateeasy
Complexity3/52/51/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a physical SPIKE Prime hub and comfort editing hub config values over USB.

The README does not state a license, so usage rights are unclear.

So what is it?

This repository documents a trick for using Bluetooth Low Energy, or BLE, directly on a LEGO SPIKE Prime robot hub, without needing to install Pybricks or modify the hub's official firmware. LEGO's SPIKE Prime kit normally runs its own operating system that controls Bluetooth internally, leaving little room for custom Bluetooth code. The author found this method by watching the USB traffic between the SPIKE Prime app and the hub using a tool called USBPcap. They discovered that the hub's USB connection exposes a MicroPython REPL, an interactive command line built into the hub. Through that REPL, it is possible to change two internal configuration values that normally control how the hub's built in operating system manages Bluetooth. By turning those two settings off, control over Bluetooth is handed over from the hub's operating system to MicroPython itself. This means code written in MicroPython running on the hub can then manage Bluetooth communication directly, opening the door to custom BLE behavior while leaving the hub's original firmware untouched. The README is short and reads like a discovery note rather than a full guide, describing what was found rather than walking through step by step instructions. It does not include ready made example code, so anyone trying this would need to write their own MicroPython program to take advantage of the direct Bluetooth access once it is unlocked, based on the two configuration values described. Because it works by changing internal hub settings rather than replacing the hub's software entirely, it sits between the two more common approaches people use with SPIKE Prime: installing an alternative firmware like Pybricks, or staying entirely within LEGO's official app and its limitations. This middle path keeps the original firmware intact while still opening up lower level control. It is aimed at hobbyists and robotics enthusiasts who already own a SPIKE Prime hub and want more control over its Bluetooth capabilities than LEGO's official software allows, particularly people comfortable writing MicroPython and inspecting USB traffic themselves.

Copy-paste prompts

Prompt 1
Explain how disabling hub_os_handle_bluetooth changes who controls BLE on this hub
Prompt 2
Help me write MicroPython code to manage BLE after applying this trick
Prompt 3
Walk me through accessing the SPIKE Prime hub's MicroPython REPL over USB
Prompt 4
Summarize the risks of changing these hub configuration values

Frequently asked questions

What is prime-connect?

A discovery note showing how to unlock direct Bluetooth control on a LEGO SPIKE Prime hub via MicroPython, without changing its firmware.

What language is prime-connect written in?

Mainly HTML. The stack also includes MicroPython, SPIKE Prime, BLE.

What license does prime-connect use?

The README does not state a license, so usage rights are unclear.

How hard is prime-connect to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is prime-connect for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.