M Series Direct Communication

Overview

This development documentation outlines utilizing a Bluetooth® Smart Ready device to directly gather data from M Series Bluetooth Smart enabled equipment (M3i, M5i, M3i-TBT, and M3iX). The information can be used to supplement real time data, performance tracking, group training, or caloric burn tracking.

For scenarios in which more than 30 pieces of equipment are intended to be in use at the same time, it is recommended to use the M Series Receiver as it uses a redundant antenna scheme and larger hardware buffers to accommodate the higher traffic load

Version Note

This documentation applies to M Series consoles with version 6.32 and above. Please reference the Revision History section for information about previous console versions.

Transmission

The Keiser M Series Bluetooth radio utilizes the Bluetooth 4.0 specification for Low Energy devices (Bluetooth Smart) and operates in a TX-only mode. This allows the equipment to communicate with more than one receiving device simultaneously, as well as allowing the equipment to use less power.

The transmission from the equipment is a non-connectable advertisement packet set to transmit once every 318.75 milliseconds. Equipment versions prior to 6.32 vary in broadcast interval as noted in the Revision History section. The broadcast is non-connectable and will therefore not be visible to most applications using Bluetooth pairing designed for GATT devices. The broadcast is only visible while performing a Low Energy scan, so the recommendation is to perform a scan on a small window around the expected transmission period. The capability to perform a Low Energy scan is available on most modern platforms with the exception being some older versions of the Windows OS.

Platform Notes

iOS: iOS SDK versions 5.0 and greater supports Bluetooth Smart. Due to the energy management built into the Core Bluetooth API, running a continuous scan will often result in intermittent reception of data. The best approach for working with iOS is to toggle the scan after the receipt of a packet from the targeted equipment, or on a regular interval when receiving from multiple pieces of equipment.

Android: Bluetooth Smart is supported on Android versions 4.4 and greater. There is an API break at version 5.0, and due to the number of issues with the Bluetooth LE portion of Bluedroid it is recommended to target versions 5.0+.

Broadcast Packet Data Structure

The equipment’s data is held in the body of the advertisement broadcast, in the section designated for advertising data. Most Bluetooth APIs will extrapolate this data from the full broadcast packet and may make it available as a byte array. The advertising packet also includes a six-byte advertising address, which is a universally unique identifier, similar to a MAC address (though there is no designation for manufacturers).

Broadcast Packet

d6 be 89 8e 42 25 7e 75 29 3b 78 db 03 09 4d 33 03 19 00 00 02 01 04 15 ff 02 01 06 13 00 38 38 03 46 05 73 00 0D 00 04 27 01 00 0A 62 41 7f
  • d6 be 89 8e The access address will likely be hidden by most APIs and is not necessary.
  • 42 25 The packet header will also likely be extrapolated by the API. This includes information about the type of transmission address, packet type, and the length of the transmission.
  • 7e 75 29 3b 78 db The advertising address will likely be extrapolated by the API but is needed for quickly sorting Low Energy scan responses. The address is transmitted as little-endian, so the address parsed correctly resolves to db:78:3b:29:75:7e. This address will be universally unique, but due to obfuscation on some platforms, this address cannot be relied upon for identification of equipment across sessions.
  • 03 09 4d … 01 00 0A The advertising data contains the majority of the data and may be accessible as a byte array or may be broken down further by the API.
  • 62 41 7f The CRC is used for verifying validity of the data transmitted and will likely not be accessible via an API.

Advertising Data Structure

Within the advertising data section are several sections of structured and unstructured data. Some APIs will process the structured data portions while others will require manual parsing of this section.

Advertising Data

03 09 4d 33 03 19 00 00 02 01 04 14 ff 02 01 06 13 00 38 38 03 46 05 73 00 0D 00 04 27 01 00 0A
  • 03 09 4d 33 The local name contains the length, type, and actual name of the transmitting equipment. The M3i, M3i-TBT, and M5 will all display as M3.
  • 03 19 00 00 The appearance section is unused by Keiser, so it will always appear as 0000. This attribute is removed in revisions 6.32+.
  • 02 01 04 The flags portion contains information regarding the capabilities of the equipment broadcasting and will always be 0x04.
  • 14 ff 02 … 01 00 0A The manufacturer specific data section is where the equipment’s data is stored. The first byte is the length and will likely be hidden by most APIs. The remainder will typically be exposed as a byte array.

Manufacturer Specific Data Structure

The manufacturer specific data portion uses Keiser’s proprietary data structure. This section will require a custom parser to extract the data as data sizes vary, and some bitwise operations are required.

The manufacturer specific data section contains this data structure as a concatenated byte stream with a two-byte company identifier prefix. The two-byte prefix, along with the local name can be used to ensure the packets are coming from a Keiser M Series product. All attributes are unsigned integers unless otherwise noted. All two-byte values are little-endian (LSB first, MSB second).

Data Stream

02 01 06 30 00 38 38 03 46 05 73 00 0D 00 04 27 01 00 0A
Byte IndexAttributeSizeExample Value
0, 1Company ID2 Byte02 01
2Version Major1 Byte06
3Version Minor1 Byte30
4Data Type1 Byte00
5Equipment ID1 Byte38
6, 7Cadence2 Byte38 03
8, 9Heart Rate2 Byte46 05
10, 11Power2 Byte73 00
12, 13Caloric Burn2 Byte0D 00
14Duration Minutes1 Byte04
15Duration Seconds1 Byte27
16, 17Distance2 Byte01 00
18Gear1 Byte0A

Data Attributes

Equipment Version (Major & Minor)

The equipment version is a Semantic Versioning value composed by the major and minor version segments. This value is useful in determining the machines capabilities for parsing. Both values are transmitted as decimal representations and must to converted back to decimal upon parsing. The example segment values of 06 and 30 converts to equipment version 6.30. (See Revision History)

Data Type

The data type integer contains information regarding the interval and whether data transmitted is real time (real time mode) or review values (review mode).

A data type value of 0, or 128 to 227 indicates that the data being received is real time. A data type value 255, or 1 to 99 indicates the data being received are review values.

The data type values 0 and 255 correspond to the main interval values (both real time and review accordingly). The data type values 1 to 99 correspond to the review values for intervals 1 to 99. The data type values 128 to 227 correspond to the real time values for 1 to 99 offset by 127.

Data TypeIntervalMode
0MainReal Time
1-991-99Review
128-2271-99Real Time
255MainReview

Equipment ID

The equipment ID contains the ordinal integer assigned to the equipment. This integer is only unique within the collision domain of the equipment (typically a room or facility). This integer will always be between 0 and 200 and is the primary method of identifying the equipment.

Cadence

The cadence value corresponds to the equipment's cadence in rotations per minute with decimal precision transmitted as one order of magnitude larger (x10). In review mode this value will correspond to the average cadence for that interval.

Heart Rate

The heart rate value contains the heart rate detected by the equipment's 5kHz receiver when the user is wearing a compatible heart rate monitoring device. The value corresponds to the measured heart rate in beats per minute with decimal precision transmitted as one order of magnitude larger (x10). If no heart rate monitor is detected, a 0 value will be transmitted. In review mode this value will correspond to the average heart rate for that interval.

Power

The power value corresponds to the equipment's power value in watts with integer precision. In review mode this value will correspond to the average power for that interval.

Caloric Burn

The caloric burn value corresponds to the approximated caloric burn value determined using the measured energy output of the user assuming an average caloric burn efficiency plus an average basil metabolic rate. This method is independent of age or weight. This value is an accumulated value for the current interval and is the same for real time and review modes.

Duration (Minutes & Seconds)

The duration value is the duration of the current interval represented in minutes and seconds. The example segment values of 04 and 27 convert to a duration value of 4 Minute, 39 Seconds. This value is an accumulated value for the current interval and is the same for real time and review modes.

Distance

The distance value corresponds to the calculated distance for the current interval in units dependent upon the unites identifier bit (MSB) with decimal precision transmitted as one order of magnitude larger (x10). The 15 lowest bits contain the distance with the value range from 0 to 999. The highest bit (MSB) indicates the units used. A 1 indicates the units are metric (kilometers), while a 0 indicates the units are imperial (Miles). The example segment values of 01 and 00 covert to a distance value of 0.1 miles. This value is an accumulated value for the current interval and is the same for real time and review mode.

Gear

The gear value is an integer corresponding to the current gear as displayed on the equipment console, ranging from 1 to 24. This value will continue transmitting 24 during braking while the equipment console will show 88. This value is non-representative during the review mode and should be ignored. Equipment prior to version 6.21 will not transmit a gear value so this value will be 0 and should be ignored. (See Revision History)

Data Parse Example

02 01 06 30 00 38 38 03 46 05 73 00 0D 00 04 27 01 00 0A
DataAttributeParsed Value
02 01Prefix BitsIgnore this data
06Version Major0x06 = 6
30Version Minor0x30 = 30
00Data Type0x00 = 0 (Real Time Data)
38Equipment Id0x38 = 56
38 03Cadence0x0338 = 824 (82.4 RPM)
46 05Heart Rate0x0546 = 1350 (135.0 BPM)
73 00Power0x0073 = 115 (115 watts)
0D 00Caloric Burn0x000D = 13 (13 kilocalories)
04Duration Minutes0x04 = 4
27Duration Seconds0x27 = 39
01 00Distance0x0001 = 1 (0.1 miles)
0AGear0x0A = 10

Revision History

VersionsChanges
6.00 - 6.20-
6.21 - 6.22Addition of Gear attribute to broadcast.
6.23 - 6.29Reduced broadcast interval from 2000 ms to 1937.5 ms.
6.30 - 6.31Reduced broadcast interval from 1937.5 ms to 354.375 ms.
6.32+Reduced broadcast interval from 354.375 ms to 318.75 ms. Removes appearance data.

Code Examples

NameDescription
TypeScript M Series ParserM Series parser written in TypeScript.
TypeScript M Series Cordova ScannerKeiser M Series Bluetooth Smart (BLE) scanner for Cordova written in Typescript.
Swift M Series ParserM Series parser written in Swift.
C# M Series ParserM Series parser written in C#.

Development Tools

NameDescription
M Series Development BoardDevelopment kit that perfectly replicates M Series electronics without full equipment.
M Series Parser LibraryPortable C# library for parsing broadcast packets into usable Broadcast objects.
M Series SimulatorAndroid Studio Project which broadcasts a signal identical to an M Series broadcast for testing.
M3i BLE SimulatorLinux Bash script using HCI BLE device to simulate an M3i's BLE broadcast.
Keiser Kit CocoapodCocoaPod Library created by Ben Woodford for working with the M3i on iOS.

M Series Documentation

NameDescription
M3i Bike ID Settings PDFDescribes procedure for setting equipment distance to either miles or kilometers, and changing the equipment identification number.
M3i Bike ID Settings VideoVideo tutorials instructing how to set the equipment distance units and equipment identification number.
All Equipment ManualsAll the manuals, parts diagrams, and tutorials for Keiser equipment.

Agreements and Guidelines

Using any of the APIs outlined in these documents make you subject to the following agreements. Please read all documents in their entirety as they govern your use of the APIs.