Skip to content

Instantly share code, notes, and snippets.

@ts95
Last active May 9, 2025 18:30
Show Gist options
  • Save ts95/6da343963ada5da0c41a7fd11dbf4736 to your computer and use it in GitHub Desktop.
Save ts95/6da343963ada5da0c41a7fd11dbf4736 to your computer and use it in GitHub Desktop.
Wilfa Svart scale BLE Protocol

Wilfa Svart BLE Scale Protocol Documentation

This document outlines the Bluetooth Low Energy (BLE) protocol for communicating with Wilfa Svart Uni Scale devices, specifically the Gen 1 and Gen 2 models, the former being the model powered by AA batteries, and the latter being rechargeable with a USB-C cable. The implementation is reverse-engineered from official firmware behavior and the Android application.

Overview

The Wilfa Svart scale exposes BLE services and characteristics for:

  • Receiving weight data
  • Monitoring unit changes and other state updates
  • Sending commands (e.g., tare, change unit)

The protocol adapts dynamically depending on whether the connected scale is Gen 1 or Gen 2. Detection is performed via the presence of model-specific services during peripheral discovery.


Key Differences Between Gen 1 and Gen 2

Feature Gen 1 Gen 2
Unit support Grams, Ounces, Pounds Grams, Ounces
Weight characteristic FFB2 (read + notify) FFB1 (read + notify + write)
Notifications characteristic FFB1 (read + notify) FFB1 (read + notify + write)
Write characteristic FEC7 (write-only) FFB1 (read + notify + write)
Command separation Commands sent to FEC7 Commands sent to FFB1
Identification service FEE7 2600

BLE Services and Characteristics

Common Scale Service (FFB0)

Present on both models and used for transmitting primary data.

Gen 1 Exclusive Write Service (FEE7)

Presence of this service signals Gen 1. Write characteristic located here.

Gen 2 Exclusive Identification Service (2600)

Presence of this service signals Gen 2. It is unused functionally but used to identify the model.

BLE Topology

Model Service UUID Characteristic UUID(s)
Gen 1 FFB0 FFB1 (notify), FFB2 (notify)
Gen 1 FEE7 FEC7 (write)
Gen 2 FFB0 FFB1 (read/notify/write)
Gen 2 2600 — (used only for identification)

This table summarizes the BLE topology for both models, linking each characteristic to its parent service UUID.


Characteristics per Model

Gen 1

Requires references to three different characteristics.

  • Weight Characteristic (FFB2) — Emits weight readings exclusively (notify only)
  • Notifications Characteristic (FFB1) — Emits notifications like unit change, low battery, etc. (notify only)
  • Write Characteristic (FEC7) — Command interface (write only)

Gen 2

Only requires a reference to one multipurpose characteristic.

  • Unified Characteristic (FFB1) — Used for multiple purposes (read/notify/write):
    • Notifications like weight readings, unit changes, low battery warnings, etc.
    • Command interface

Packet Format

Each BLE notification or response packet begins with a 2-byte header (Big Endian), followed by packet-specific data.

Packet Headers

Header Description Gen 1 Characteristic Gen 2 Characteristic
0xFA01 Weight reading FFB2 FFB1
0xFA03 Disconnect event FFB1 FFB1
0xFA04 Unit changed FFB1 FFB1
0xFA05 Low battery warning FFB1 FFB1
0xFA06 Unstable scale FFB1 FFB1
0xFA07 Scale overloaded FFB1 FFB1

All non-weight-related notifications use the FFB1 characteristic on both generations. Only the weight reading differs between Gen 1 (FFB2) and Gen 2 (FFB1).


Command Format

All commands are written as raw byte arrays to the write characteristic (either FEC7 on Gen 1 or FFB1 on Gen 2).

Tare Command

F5 10

Change Unit Command

F5 11 <unit_code>

Where <unit_code> is:

Unit Code
Grams 00
Ounces 01
Pounds¹ 02

¹ Only supported on Gen 1.


Interpreting Unit Change Packets (0xFA04)

When the scale sends a packet with the header 0xFA04, it signals that the unit of measurement has changed. This is typically a result of a manual unit change on the scale (e.g., via button press), or in response to a successful command issued by the host (gen 2 only).

Packet Structure

Byte Index Description
0–1 Packet header 0xFA04
2 Unit code (1 byte)

Interpreting Weight Reading Packets (0xFA01)

Weight values are encoded as a 16-bit signed integer (Big Endian) at byte offset 2.

Packet Structure

Byte Index Description
0–1 Packet header 0xFA01
2-3 Weight (2 bytes)

The raw value represents grams x 10, so to obtain the actual weight in grams:

weight_in_grams = (Int16 at offset 2) / 10

The value is always emitted in grams, regardless of the selected unit on the scale. This value must be converted on the fly to the selected display unit (grams, ounces, or pounds) using standard conversion factors, based on the unit that was last broadcasted with the FA04 packet.

Weight reading frequency

Weight reading notifications are issued roughly every 120 ms (i.e., ~8 times per second.)


Handling Disconnections

The scale may proactively emit a 0xFA03 packet to indicate disconnection. On receipt, the service shall initiate a teardown of state and peripheral references.


BLE Discovery Logic

To determine the model:

  1. After service discovery:
    • If FEE7 is present → Gen 1
    • Else if 2600 is present → Gen 2
  2. Configure characteristic subscriptions and writing based on the identified model.

Summary

  • Gen 2 simplifies hardware and protocol complexity by unifying characteristics.
  • Gen 1 separates concerns across multiple characteristics.
  • Both use a shared packet format and standard BLE idioms for data flow and command handling.
@ts95
Copy link
Author

ts95 commented May 8, 2025

The latter three packet headers are documented here in Wilfa's own manual:

Header Description
0xFA05 Low battery warning
0xFA06 Unstable scale
0xFA07 Scale overloaded
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment