🔍
v1.3.8

XBB Code Platform

This chapter is a complete guide to using the XBB Code web platform at www.xbb-code.com. It covers every page and feature - from signing in to compiling and sharing your recipes.

Overview

XBB Code is the online development environment where you write, compile, and manage TSharkRex recipes for XBB automotive dongles. The platform consists of:

Signing In

When you visit xbb-code.com, you are presented with the login page. XBB Code uses the same account as the XBB Configurator mobile app.

If you already have an account

Enter your email and password, then click Sign in. These are the same credentials you use in the XBB Configurator app on your phone.

If you need to create an account

Account creation is done through the XBB Configurator mobile app:

  1. Download XBB Configurator from Google Play or the App Store
  2. Create your account inside the app
  3. Return to xbb-code.com and sign in with the same credentials
Note: There is no separate registration on the website. Your account is always created through the XBB Configurator app first.

Projects Page

After signing in, you land on the Projects page. This is your home screen - it shows all your recipes and provides quick access to create new ones.

Top Bar

The top bar displays XBB Code on the left, and a theme toggle (switch between dark and light mode), your email address, and a Sign out button on the right.

Quick Start Cards

Below the welcome message, four cards let you get started quickly:

CardWhat it does
Empty Project Creates a blank recipe with no code. Best when you want to write everything from scratch.
From Template Creates a recipe pre-filled with starter code from a template (e.g. wake-up routine, DID reader). Good for learning the basic structure.
Copy Existing Copies a production recipe - including all code and library links. This is the recommended way to get started if you have a supported vehicle, because you begin with a working recipe that you can modify.
Documentation Opens this TSharkRex reference in a new tab.

My Projects

Below the quick start cards, the My Projects section lists all recipes you have created. Each recipe card shows:

Shared With Me

If another user has shared a recipe with you, it appears in the Shared with me section. You can open and view the code, but your ability to edit depends on the access level the owner has granted you.

Creating a New Project

Clicking any of the three creation cards opens a dialog where you configure your new recipe.

Empty Project

Creates a recipe with no code. Fill in:

Click Create Project to create the recipe and open it in the editor.

From Template

Templates provide starter code with common patterns already written for you.

  1. A list of available templates is shown. Click one to select it.
  2. After selecting, fill in the recipe name, description, registration number, and country.
  3. Click Create from Template.

The recipe is created with the template code pre-filled. You can then modify it in the editor.

Tip: You can click Change to go back and pick a different template before creating.

Copy Existing

This is the most powerful way to get started. It copies an existing production recipe - including all library links - so you begin with a fully working setup.

  1. A searchable tree of all available recipes is shown, organized by Brand > Model > Recipe.
  2. Use the search field to filter (e.g. type "BMW 3" to find BMW 3-series recipes).
  3. Click a brand to expand it, then click a recipe to select it.
  4. Give your copy a new name and optional description.
  5. Click Copy Recipe.

The new recipe is an independent copy - changes you make will not affect the original.

Recommended for beginners: Start with Copy Existing to get a working recipe for your vehicle. Then study the code and make modifications to understand how it works. This is faster than writing from scratch.

The Editor

The editor is where you write and compile your TSharkRex code. It opens when you click a recipe from the projects page.

Layout

The editor page has four main areas:

Top Bar Actions

ButtonShortcutWhat it does
Back to Projects - Return to the projects page
Recipe name - Click to open project settings (rename, share, etc.)
Save Recipe Ctrl+S Saves the current code and any library order changes
Compile (F10) F10 Sends code + libraries to the compiler. Shows flash/RAM usage on success, or error details on failure.
Update Recipe - After a successful compile, uploads the compiled binary to the recipe so it can be downloaded by the XBB Configurator app. This button is only active after a successful compilation.

Typical Workflow

  1. Edit code in the editor
  2. Save Recipe (Ctrl+S) to persist your changes to the server
  3. Compile (F10) to check for errors and see flash/RAM usage
  4. If there are errors, fix them and compile again
  5. Once compilation succeeds, click Update Recipe to publish the compiled binary
  6. Open the XBB Configurator app on your phone — the updated recipe appears under My Recipes

Save, Compile, and Publish

It is important to understand the difference between these three steps:

StepWhat happensAffects the app?
Save Recipe (Ctrl+S) Your code is saved to the server. Nothing is compiled or published. No
Compile (F10) Your code and all linked libraries are sent to the compiler. You get back flash/RAM usage or error details. The compiled result is held temporarily in the editor. No
Update Recipe The compiled binary is published to the recipe. This is the only step that changes what the XBB Configurator app sees. Yes
Safe to experiment

You can save and compile as many times as you want without affecting the recipe in the app. The version running on your dongle only changes when you click Update Recipe and then download it in the XBB Configurator app. This means you can freely experiment, test different approaches, and fix errors without any risk of breaking a working recipe.

Downloading to Dongle

After clicking Update Recipe, the new version is available in the XBB Configurator app:

  1. Open the XBB Configurator app on your phone
  2. Go to My Recipes — your recipe appears here with the latest compiled version
  3. Connect to your XBB dongle via Bluetooth
  4. Select the recipe and flash it to the dongle

The sidebar on the left side of the editor provides navigation and management for your recipe's components.

Current Recipe

The top section shows the recipe name. Click it to switch the editor to the recipe's main code. This is your primary code file - the entry point that runs on the dongle.

Libraries

Below the recipe, the Libraries section lists all linked libraries. Libraries are reusable code modules that are compiled together with your recipe (see Chapter 24 - Recipe Structure for details on how layers work).

Each library shows:

Managing libraries

Important: Library order matters! Libraries are compiled from top to bottom. If library B uses a variable defined in library A, then A must come before B in the list. The recipe itself is always compiled first (position 1).

Library Access Levels

Not all libraries may be editable. Access depends on permissions set by the library owner:

Access LevelCan view codeCan edit code
Use onlyNoNo
ReadYesNo
Read/WriteYesYes
OwnerYesYes

Libraries you cannot view will show a modal with available VAR_SIGNAL variables when clicked, so you can still see which signals the library provides. The signal data comes from the compiled recipe.

Snippets

The bottom section of the sidebar contains code snippets - pre-written code blocks you can drag into the editor. Snippets are organized in folders (e.g. CAN, IEC Standard) and include common patterns like CAN_TX/RX setup, timer patterns, and output declarations.

To use a snippet: click and drag it from the sidebar into the code editor at the position where you want to insert it.

Recipe Data Panel

The Recipe Data panel on the right side of the editor shows all VAR_SIGNAL variables from the compiled recipe, grouped by the library they originate from. This panel is resizable by dragging its left edge.

Signal List

After compiling and updating a recipe, all VAR_SIGNAL variables are displayed in a scrollable list. Each signal shows:

Signals are grouped under their origin library name, making it easy to see which variables come from which library.

Filter Chips

At the top of the panel, filter chips let you show or hide variables based on their declaration type. By default, HARDWARE and SETTING types are hidden since they have many internal sub-variables (e.g. HW.GYRO_X, HW.SUPPLY_VOLTAGE). Click a chip to toggle visibility.

When a type is hidden, both the parent variable and all its children are removed from the list. For example, hiding HARDWARE removes HW as well as HW.GYRO_X, HW.BUTTON, etc.

Filter preferences are saved per recipe (requires cookie consent).

Drag and Drop

You can drag any signal from the list directly into the code editor. The variable name is inserted at the drop position. A visual indicator in the editor shows exactly where the code will be placed, with the surrounding lines shifting to make room.

Note: The Recipe Data panel requires the recipe to be compiled and updated at least once. If the panel shows "No data available", compile your recipe (F10) and then click Update Recipe.

Code Editor

The code editor is a full-featured editor with TSharkRex syntax highlighting. It provides:

Compile Output

After pressing Compile (F10), the compile output panel appears below the editor.

On Success

A successful compilation shows resource usage:

After a successful compile, the Update Recipe button becomes active.

On Error

If compilation fails, one or more error cards are shown. Each error includes:

Project Settings

Open project settings by clicking the recipe name in the editor top bar, or the gear icon on a project card.

General

Click Save Changes to apply.

Sharing

The sharing section lets you give other users access to your recipe and its libraries.

Adding a share

  1. Click + Share with someone
  2. Enter the email address of the person you want to share with
  3. For each library, select the access level (Use only, Read, Read/Write, Owner)
  4. Click Share

Managing shares

Note: When you share a recipe, the other user sees it in their "Shared with me" section. They can view the recipe code and any libraries you grant access to. Sharing does not give them ownership - they cannot delete or reshare the recipe.

Mobile Support

XBB Code works on mobile devices. On screens narrower than 768px, the layout automatically switches to a mobile-optimized view:

Tapping a library in the Libraries tab opens its code in the Code tab. The compile output appears as an overlay at the bottom of the Code tab.

Keyboard Shortcuts

ShortcutAction
Ctrl+SSave code and library order
F10Compile recipe
EscapeClose compile output panel
TabInsert indentation
Shift+TabRemove indentation

Tips and Best Practices