QR Code Generation

General

We are using different types of QR codes that are used to provision devices. The QR codes contain a device identifier such as a serial number and some secret key that gives us access to that device. By scanning one of these codes, an enrollment can be generated in various apps and this enrollment can also be imported into our platform. It is recommended that this QR code format is used for all devices running BlueRange Mesh to enable a uniform way of enrolling these devices with the same application. Vendors are free to use other ways of distributing the enrollment information but they will lose compatibility with our tools and the ecosystem.

You can download our BlueRange Setup app from the Apple App Store and Google Play Store to enroll devices with our BlueRange platform.

Device / Node QR Code

The device QR code carries the information needed to enroll a device: a serial number, a manufacturer id, a device key, and a device type discriminator. Two on-label formats currently coexist:

  • v=1 — URL-query-style, in production since project start.

  • v=2 — key/value with single-letter prefixes and /-separator, alphanumeric-only. Introduced 2026-08 to reduce the printed area (~43 % less module area at ECC L in the default case).

Readers MUST accept both v=1 and v=2 indefinitely. Emitters produce exactly one format per label (never both on the same label). Labels already printed in the field stay valid forever, so there is no v=1 deprecation.

Version detection
  • Payload starts with qt=1& → parse as v=1

  • Payload starts with 2/ → parse as v=2

Anything else is invalid.

If the manufacturer id of M-Way is being used, the device must adhere to all standards defined in this specification. No additional fields may be added. The serial number must be picked from the testing range! For production devices, you must either use your own company identifier or contact us for more information.
The device platforms EDGEROUTER and ASSET must adhere to a strict specification which is not open source at the moment. For a generic gateway solution, use the MESHBRIDGE platform.

QR codes can be generated with BlueRange OEM Kit (not yet open source but distributed to partners). You can also use e.g. http://goqr.me/de/ or some other web service.

v=1 Format (URL-query-style)

The v=1 payload is URL encoded to save space and to transmit as much information as possible. The order of fields is not necessarily the same as documented. If special characters are needed, these should be URL encoded. The different fields are:

FieldName Description Default Mandatory

qt

The QR code type (1 = Node QR Code)

-

Yes

v

The version identifier in decimal notation, currently 1

-

Yes

mf

The manufacturer id in hexadecimal notation according to the Bluetooth standard manufacturer ids. This is 0x024D for M-Way

-

Yes

pt

The product type id in hexadecimal notation. It is assigned by the manufacturer (see the manufacturer specific data) and together with mf forms a tuple that uniquely identifies the product in the BlueRange device catalog

-

No

s

The serial number in ASCII format

-

Yes

nk

The node key in hex notation that can be used to connect to this device (uppercase, no separator)

-

Yes (alternatively kt and k can be used)

nm

Human readable name for this device

Autogenerated by the enrollment application from a hardcoded name and the serial number

No

kt

Key type as integer (from FM_KEY_ID_*), used to give the type of the key together with the k parameter

-

No (mandatory if nk not given)

k

Key in hex notation (uppercase, no separator), only together with kt. If kt is FM_KEY_ID_NODE this is the same as if nk were given

-

No (mandatory if nk not given)

dt

The device type is the same as the platform in our BlueRange backend (dt=BLENODE for a mesh node, dt=EDGEROUTER for a BlueRange Gateway, dt=ASSET for asset tags, dt=MESHBRIDGE for a generic Gateway)

dt=BLENODE

No

Example of a Mesh Node QR code

qt=1&v=1&mf=024D&s=BBBBB&nk=12345678123456781234567812345678&dt=BLENODE

Example of a generic Gateway QR code

qt=1&v=1&mf=024D&s=BBBBB&nk=12345678123456781234567812345678&dt=MESHBRIDGE

v=2 Format (compact key/value)

The v=2 payload is a single-character version prefix (2) followed by /-separated base fields (+-separated vendor-specific fields, see below). Each field is a single uppercase-letter key immediately followed by its value. The payload stays strictly within the QR Alphanumeric mode character set to keep encoding efficient (~30 % fewer bits per character than Byte mode).

Grammar
2/M<mf>/S<s>/K<key_base36>[/I<key_type_ord>][/D<dt_ord>][/P<pt_hex>][/N<nm_b36_utf8>][+<letter><value>…]
Table 1. Base fields
Prefix FieldName Mandatory Format

(none)

v

yes

Version discriminator, the single character 2 at the start of the payload. Not a /-separated field — always the first character.

M

mf

yes

Manufacturer id, 4 uppercase hex characters (e.g. 024D for M-Way)

S

s

yes

Serial number in ASCII, uppercase

K

k

yes

Key value, 128 bit, Base36-encoded and zero-padded to exactly 25 characters. By default (no I present) the key is interpreted as a NodeKey; if I is present the value is a key of the type indicated by I. This is the v=2 equivalent of v=1’s nk (and, together with I, the equivalent of v=1’s kt + k).

I

kt

no (default: NodeKey)

Key type ordinal indicating what K represents. Ordinal mapping matches FruityMesh’s FM_KEY_ID_* enum. Emitters SHOULD omit /I when the key is a NodeKey (the default); readers MUST treat missing /I as NodeKey.

D

dt

no (default 1 = BLENODE, elided)

Device type as an ordinal integer. Mapping: 1 = BLENODE, 2 = EDGEROUTER, 3 = ASSET, 4 = MESHBRIDGE, 5 = KNX, 6 = BACNET, 7 = VIRTUAL.

P

pt

no (default 1)

Product type in uppercase hex. Emitters SHOULD emit pt as fixed 4-hex-character form (e.g. /P0001, /P002A). Rationale: keeping the emitted length constant avoids the QR code silently jumping to the next QR version when the value happens to grow by one character — a Zebra printer template laid out for QR v2 (25×25 modules) would break if a single-byte length increase pushed the payload into QR v3 (29×29). Readers MUST accept both fixed-length forms and short forms without leading zeros (e.g. /P1, /P2A), and MUST treat missing /P as pt = 1.

N

nm

no

Optional human-readable device name. If present, MUST be Base36-encoded from UTF-8 bytes, because the QR Alphanumeric character set contains neither lowercase letters nor non-ASCII characters. If absent, the enrollment application generates a name from a hardcoded string and the serial number (same behaviour as v=1).

Field order is irrelevant after the leading 2/ version prefix. The single-letter key immediately after each / (or + for vendor-specific fields) unambiguously identifies its field, so 2/M024D/SBBBBB/K… and 2/SBBBBB/K…/M024D and 2/K…/M024D/SBBBBB all parse to the same device. Emitters are free to pick any canonical order (writing the mandatory fields first followed by any present optional fields is the recommended human-readable convention).

Vendor-specific fields

Vendor-specific fields use the + separator instead of /. Their letter space is independent of the base-spec letter space; different vendors may use the same letter for different fields, and a vendor-defined letter never collides with a current or future base-spec letter. Vendor-specific fields are interpreted in the context of the current mf value. Detailed per-vendor letter assignments live in the internal vendor QR documentation.

The v=1 qt field has been dropped in v=2: it is obsolete because the version discriminator (leading 2/) does that job. The v=1 kt + k mechanism is preserved in v=2 as K (key value) + optional I (key type ordinal), so alternative key types remain supported.

Character set constraint

The v=2 payload MUST contain only characters from the QR Alphanumeric mode set. In practice this means:

  • Uppercase letters A – Z

  • Digits 0 – 9

  • The separators / (base) and + (vendor-specific)

Lowercase letters, =, &, ?, whitespace and any other character are not allowed. Emitters that break this constraint force the QR encoder into Byte mode and lose the compactness that v=2 was designed for.

Example of a Mesh Node (defaults: BLENODE, pt = 1), all defaults elided

2/M024D/SBBBBB/K12SRDDY53KNDUS0LMBGJGY7I0

41 characters, QR version 2 (25×25 modules) at ECC L. Same manufacturer, serial, and node key as the v=1 Mesh Node example above.

Example of a Mesh Node with the recommended fixed 4-hex pt (pt = 1)

2/M024D/SBBBBB/K12SRDDY53KNDUS0LMBGJGY7I0/P0001

47 characters, QR version 2 (25×25) at ECC L — sits at the ECC-L v2 payload cap. Same device semantics as the elided form above.

Example of a generic Gateway (dt = 4 = MESHBRIDGE)

2/M024D/SBBBBB/K12SRDDY53KNDUS0LMBGJGY7I0/D4/P0001

Example with a non-node key type (kt = 2, e.g. NetworkKey)

2/M024D/SBBBBB/K12SRDDY53KNDUS0LMBGJGY7I0/I2/P0001

Manufacturer Specific QR Code Data

Other fields are specific depending on the manufacturer of the device. These can be used to add additional data that might be necessary to provide vendor specific context.

M-Way Solutions (0x024D)

Once the M-Way Solutions manufacturer id is used, you must not add any additional arguments to the QR code. In case custom fields are necessary, your own manufacturer id must be used.

Other Vendors

We have additional information on QR codes in our commercial documentation.

EnOcean QR Code

Some of our enrollment tools also recognize the EnOcean QR code format for enrolling EnOcean BLE devices. The EnOcean QR code is encoded in a different format as specified by this documentation:

Exemplary EnOcean Switch

The QR code data read from the switch is 30SE21500003215+Z1AEAE8B80353287356675BE53D9DF609+30PE8221-A280+2PDA01+S07000461.

Necessary data to provision the switch:

  • BLE Address: E21500003215

  • Security Key: 1AEAE8B80353287356675BE53D9DF609