diff --git a/README.md b/README.md index 6794d24..3a9a4a7 100644 --- a/README.md +++ b/README.md @@ -2,24 +2,34 @@ A **simple** library/framework to work with Bluetooth Smart (BLE) GATT services and characteristics. -Note: This is a fork from the no longer maintained project at https://github.com/sputnikdev/bluetooth-gatt-parser. +> This is a fork of the no longer maintained project at +> https://github.com/sputnikdev/bluetooth-gatt-parser. + +Parsing a standard characteristic (Battery Level, `0x2A19`) is a one-liner: -Have a look at an example of parsing a standard characteristic ([Battery Level 0x2A19](https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.battery_level.xml)) value: ```java BluetoothGattParserFactory.getDefault().parse("2A19", new byte[] {51}).get("Level").getInteger(null); ``` -This would print 51. -**Features:** +This prints `51`. + +## Features + +1. Ships the standard [Bluetooth SIG GATT services and characteristics](https://www.bluetooth.com/specifications/assigned-numbers/), plus a number + of characteristics recovered from the SIG's retired characteristic XML and + generated from the current [GATT Specification Supplement](https://www.bluetooth.com/specifications/gss/). +2. Parses single- and multi-field characteristics into a user-friendly data format. +3. Serializes (writes) single- and multi-field characteristics. +4. Validates input against the GATT specification (format types and mandatory fields). +5. Supports variable-length array fields (e.g. the RR-Interval list in Heart Rate Measurement). +6. Extensible: user-defined services and characteristics via drop-in XML. +7. Supports all defined [format types](https://www.bluetooth.com/specifications/assigned-numbers/), including the + IEEE-11073 `SFLOAT`/`FLOAT` (GSS `medfloat16`/`medfloat32`) types. -1. Supports 99% of the existing/standard [GATT services and characteristics specifications](https://www.bluetooth.com/specifications/gatt). -2. Parse/read single and multi field characteristics into a user-friendly data format. -3. Writing single and multi field characteristics. -4. Validating input data whether it conforms to GATT specifications (format types and mandatory fields). -5. Extensibility. User defined services and characteristics. -6. Support for all defined [format types](https://www.bluetooth.com/specifications/assigned-numbers/format-types). +## Usage + +Add the Maven dependency: -**Start using the library by including a maven dependency in your project:** ```xml org.openhab @@ -28,66 +38,72 @@ This would print 51. ``` -A more complex example of parsing multi-field characteristics ([Heart Rate service](https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.heart_rate.xml)): +Reading and writing multi-field characteristics: ```java -// Getting a default implementation which is capable of reading/writing the standard GATT services and characteristics +// A default parser that reads/writes the bundled standard GATT services and characteristics. BluetoothGattParser parser = BluetoothGattParserFactory.getDefault(); -// Reading Body Sensor Location (0x2A38) characteristic (sigle field) -byte[] data = new byte[] {1}; // 1 == Chest -GattResponse response = parser.parse("2A38", data); -String sensorLocation = response.get("Body Sensor Location").getInteger(null); // prints 1 (Chest) +// Read Body Sensor Location (0x2A38) — a single-field characteristic. +GattResponse response = parser.parse("2A38", new byte[] {1}); // 1 == Chest +int sensorLocation = response.get("Body Sensor Location").getInteger(null); // 1 (Chest) -// Reading Heart Rate Measurement (0x2A37) characteristic (multi field) -byte[] data = new byte[] {20, 74, 13, 3}; -GattResponse response = parser.parse("2A37", data); -String heartRateValue = response.get("Heart Rate Measurement Value (uint8)").getInteger(null); // prints 74 -String rrIntervalValue = response.get("RR-Interval").getInteger(null); // prints 781 +// Read Heart Rate Measurement (0x2A37) — a multi-field characteristic. +response = parser.parse("2A37", new byte[] {20, 74, 13, 3}); +int heartRate = response.get("Heart Rate Measurement Value (8 bit resolution)").getInteger(null); // 74 -// Writing Heart Rate Control Point (0x2A39) characteristic +// Write Heart Rate Control Point (0x2A39). GattRequest request = parser.prepare("2A39"); -request.setField("Heart Rate Control Point", 1); // control value to be sent to a bluetooth device +request.setField("Heart Rate Control Point", 1); byte[] data = parser.serialize(request); ``` -See more examples in the integration tests: [GenericCharacteristicParserIntegrationTest](src/test/java/org/bluetooth/gattparser/GenericCharacteristicParserIntegrationTest.java) - ---- -**Extending the library with user defined services and characteristics** +See more in the integration tests: +[GenericCharacteristicParserIntegrationTest](src/test/java/org/openhab/bluetooth/gattparser/GenericCharacteristicParserIntegrationTest.java). -The gatt-parser library is designed to be able to add support for some new custom services/characteristics or to override an existing ("approved") [service and characteristic](https://www.bluetooth.com/specifications/gatt). This can be done by just providing a new GATT XML file which specifies your service and characteristic (have a look at the standard definition for the [Battery Level characteristic](src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_level.xml)). The library will read your custom files and build internal rules/conditions for parsing and serialization of your custom characteristics. This means you don't have to write any code to parse/serialize simple or complex custom characteristics. +## Extending with user-defined services and characteristics -_Loading XML GATT specification files (GATT-like specifications) from a folder:_ +The library can add support for custom services/characteristics, or override a +bundled one, purely by providing a GATT XML file — no code required. See the +bundled [Battery Level characteristic](src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_level.xml) +for the schema. ```java BluetoothGattParser parser = BluetoothGattParserFactory.getDefault(); -File extensionsFolderFile = new File(..); -gattParser.loadExtensionsFromFolder(extensions); +parser.loadExtensionsFromFolder(new File("/path/to/gatt-extensions")); ``` -**A custom parser can be added for a characteristic if you are not satisfied with the default one** +If the generic parser is not enough for a given characteristic, register your own: -See the default one for a hint and a reference: [GenericCharacteristicParser](src/main/java/org/bluetooth/gattparser/GenericCharacteristicParser.java) ```java BluetoothGattParser parser = BluetoothGattParserFactory.getDefault(); -CharacteristicParser customParser = new ...; // your own implementation -parser.registerParser(CHARACTERISTIC_UUID, customParser); +parser.registerParser(CHARACTERISTIC_UUID, myCustomParser); ``` ---- -## Contribution +## Bundled GATT specifications + +Each characteristic/service is one XML file under `src/main/resources/gatt/`. A +build-time generator indexes them into `gatt_spec_registry.json` (the `type` +attribute of each file must equal its filename). -You are welcome to contribute to the project. +The Bluetooth SIG **retired** the machine-readable characteristic XML repository +around 2019. Since then it publishes the [GATT Specification Supplement (GSS)](https://www.bluetooth.com/specifications/gss/) +as YAML, where the field structure is present but scaling/unit/presence are +encoded as a rigid mini-grammar inside prose. The characteristics added here were +derived from that GSS: scalars are high fidelity, while cases the prose cannot +express unambiguously carry an inline `` marker rather than a +fabricated value. -The build process is streamlined by using standard maven tools. +## Contribution + +Contributions are welcome. Build with Maven: -To build the project with maven: ```bash mvn clean install ``` -To cut a new release and upload it to the Maven Central Repository: +Cut a release to Maven Central: + ```bash mvn release:prepare -B mvn release:perform diff --git a/src/main/java/org/openhab/bluetooth/gattparser/FieldHolder.java b/src/main/java/org/openhab/bluetooth/gattparser/FieldHolder.java index 38eb158..43c06f1 100644 --- a/src/main/java/org/openhab/bluetooth/gattparser/FieldHolder.java +++ b/src/main/java/org/openhab/bluetooth/gattparser/FieldHolder.java @@ -161,7 +161,7 @@ public Long getLong(Long def) { public BigInteger getBigInteger(BigInteger def) { BigDecimal result = new BigDecimalConverter(null).convert(BigDecimal.class, prepareValue()); return result != null - ? result.multiply(BigDecimal.valueOf(getMultiplier())) + ? result.multiply(getMultiplierExact()) .add(BigDecimal.valueOf(getOffset())).setScale(0, RoundingMode.HALF_UP).toBigInteger() : def; } @@ -175,7 +175,7 @@ public BigInteger getBigInteger(BigInteger def) { public BigDecimal getBigDecimal(BigDecimal def) { BigDecimal result = new BigDecimalConverter(null).convert(BigDecimal.class, prepareValue()); return result != null - ? result.multiply(BigDecimal.valueOf(getMultiplier())) + ? result.multiply(getMultiplierExact()) : def; } @@ -585,6 +585,29 @@ private double getMultiplier() { return multiplier; } + /** + * Exact BigDecimal counterpart of {@link #getMultiplier()}. The decimal exponent is applied via + * {@link BigDecimal#scaleByPowerOfTen(int)} and the binary exponent via exact powers of two, so + * the BigDecimal paths do not inherit the rounding error of {@code Math.pow(10, e)}. + */ + private BigDecimal getMultiplierExact() { + BigDecimal multiplier = BigDecimal.ONE; + if (field.getDecimalExponent() != null) { + multiplier = multiplier.scaleByPowerOfTen(field.getDecimalExponent()); + } + if (field.getBinaryExponent() != null) { + int b = field.getBinaryExponent(); + BigDecimal powerOfTwo = new BigDecimal(BigInteger.TWO.pow(Math.abs(b))); + multiplier = b >= 0 + ? multiplier.multiply(powerOfTwo) + : multiplier.divide(powerOfTwo); // negative power of two is always exact (terminates in binary) + } + if (field.getMultiplier() != null && field.getMultiplier() != 0) { + multiplier = multiplier.multiply(BigDecimal.valueOf(field.getMultiplier())); + } + return multiplier; + } + /** * Reads offset-to-be-added to field value received from request. * This is an extension to official GATT characteristic field specification, diff --git a/src/main/java/org/openhab/bluetooth/gattparser/GenericCharacteristicParser.java b/src/main/java/org/openhab/bluetooth/gattparser/GenericCharacteristicParser.java index 569bfdf..a4c06b8 100644 --- a/src/main/java/org/openhab/bluetooth/gattparser/GenericCharacteristicParser.java +++ b/src/main/java/org/openhab/bluetooth/gattparser/GenericCharacteristicParser.java @@ -90,6 +90,24 @@ public LinkedHashMap parse(Characteristic characteristic, b continue; } FieldFormat fieldFormat = field.getFormat(); + if (field.isRepeated()) { + // Array field (GSS uint16[n] etc.): repeat the element either a fixed number + // of times or, when repeats == 0, until the data is exhausted. Elements are + // exposed as indexed holders "Name[0]", "Name[1]", ... + int elementSize = fieldFormat.getSize(); + if (elementSize == FieldFormat.FULL_SIZE || elementSize <= 0) { + throw new CharacteristicFormatException( + "Repeated field \"" + field.getName() + "\" must have a fixed-size element format."); + } + int repeats = field.getRepeats(); + int index = 0; + while (repeats == 0 ? offset + elementSize <= raw.length * 8 : index < repeats) { + result.put(field.getName() + "[" + index + "]", parseField(field, raw, offset)); + offset += elementSize; + index++; + } + continue; + } result.put(field.getName(), parseField(field, raw, offset)); if (fieldFormat.getSize() == FieldFormat.FULL_SIZE) { // full size field, e.g. a string diff --git a/src/main/java/org/openhab/bluetooth/gattparser/num/IEEE11073FloatingPointNumberFormatter.java b/src/main/java/org/openhab/bluetooth/gattparser/num/IEEE11073FloatingPointNumberFormatter.java index 5fdf55a..3bf2f5b 100644 --- a/src/main/java/org/openhab/bluetooth/gattparser/num/IEEE11073FloatingPointNumberFormatter.java +++ b/src/main/java/org/openhab/bluetooth/gattparser/num/IEEE11073FloatingPointNumberFormatter.java @@ -82,23 +82,81 @@ public Float deserializeFloat(BitSet bits) { @Override public Double deserializeDouble(BitSet bits) { - throw new IllegalStateException("Operation not supported"); + // IEEE-11073 defines no 64-bit form; the 32-bit FLOAT is the widest, decoded as a Double. + Float value = deserializeFloat(bits); + return value != null ? value.doubleValue() : null; } @Override public BitSet serializeSFloat(Float number) { - throw new IllegalStateException("Operation not supported"); + return serialize(number, 12, 4, SFLOAT_NaN, SFLOAT_POSITIVE_INFINITY, SFLOAT_NEGATIVE_INFINITY); } @Override public BitSet serializeFloat(Float number) { - throw new IllegalStateException("Operation not supported"); + return serialize(number, 24, 8, FLOAT_NaN, FLOAT_POSITIVE_INFINITY, FLOAT_NEGATIVE_INFINITY); } @Override public BitSet serializeDouble(Double number) { - throw new IllegalStateException("Operation not supported"); + return serializeFloat(number != null ? number.floatValue() : null); + } + + /** + * Encodes a decimal value as an IEEE-11073 SFLOAT/FLOAT: a two's-complement mantissa in the low + * {@code mantissaSize} bits and a base-10 exponent in the top {@code exponentSize} bits, laid out + * little-endian to match the deserialize path. The exponent is chosen so the mantissa fits its + * signed range while preserving as much precision as the format allows. + */ + private BitSet serialize(Float number, int mantissaSize, int exponentSize, + int nanMantissa, int posInfMantissa, int negInfMantissa) { + int mantissa; + int exponent = 0; + if (number == null || Float.isNaN(number)) { + mantissa = nanMantissa; + } else if (number == Float.POSITIVE_INFINITY) { + mantissa = posInfMantissa; + } else if (number == Float.NEGATIVE_INFINITY) { + mantissa = negInfMantissa; + } else { + long mantissaMax = (1L << (mantissaSize - 1)) - 1; // largest positive signed mantissa + long mantissaMin = -(1L << (mantissaSize - 1)); + int expMax = (1 << (exponentSize - 1)) - 1; + int expMin = -(1 << (exponentSize - 1)); + double value = number; + // Raise the exponent until the mantissa fits the signed range. + double scaled = value; + while ((Math.round(scaled) > mantissaMax || Math.round(scaled) < mantissaMin) && exponent < expMax) { + scaled /= 10.0; + exponent++; + } + // Lower the exponent to keep fractional precision while the mantissa still fits. + while (exponent > expMin) { + double finer = scaled * 10.0; + if (Math.round(finer) > mantissaMax || Math.round(finer) < mantissaMin) { + break; + } + scaled = finer; + exponent--; + } + mantissa = (int) Math.round(scaled); + } + + BitSet result = new BitSet(mantissaSize + exponentSize); + BitSet mantissaBits = twosComplementNumberFormatter.serialize(mantissa, mantissaSize, true); + BitSet exponentBits = twosComplementNumberFormatter.serialize(exponent, exponentSize, true); + for (int i = 0; i < mantissaSize; i++) { + if (mantissaBits.get(i)) { + result.set(i); + } + } + for (int i = 0; i < exponentSize; i++) { + if (exponentBits.get(i)) { + result.set(mantissaSize + i); + } + } + return result; } } diff --git a/src/main/java/org/openhab/bluetooth/gattparser/num/TwosComplementNumberFormatter.java b/src/main/java/org/openhab/bluetooth/gattparser/num/TwosComplementNumberFormatter.java index 290ab45..4f7c060 100644 --- a/src/main/java/org/openhab/bluetooth/gattparser/num/TwosComplementNumberFormatter.java +++ b/src/main/java/org/openhab/bluetooth/gattparser/num/TwosComplementNumberFormatter.java @@ -33,21 +33,7 @@ public Integer deserializeInteger(BitSet bits, int size, boolean signed) { if (size > 32) { throw new IllegalArgumentException("size must be less or equal 32"); } - - if (size == 1) { - signed = false; - } - - boolean isNegative = signed && size > 1 && bits.get(size - 1); - int value = isNegative ? -1 : 0; - for (int i = 0; i < bits.length() && i < size; i++) { - if (isNegative && !bits.get(i)) { - value ^= 1 << i; - } else if (!isNegative && bits.get(i)) { - value |= 1 << i; - } - } - return value; + return (int) deserialize(bits, size, signed); } @Override @@ -55,20 +41,29 @@ public Long deserializeLong(BitSet bits, int size, boolean signed) { if (size > 64) { throw new IllegalArgumentException("size must be less or equal than 64"); } + return deserialize(bits, size, signed); + } + /** + * Reads up to 64 bits, little-endian, into a long and sign-extends when required. The BitSet + * already holds the bits little-endian (bit 0 = LSB), so a straight accumulation of the low + * {@code size} bits yields the unsigned magnitude; a set top bit under two's-complement is then + * extended into the unused high bits. + */ + private long deserialize(BitSet bits, int size, boolean signed) { if (size == 1) { signed = false; } - - boolean isNegative = signed && size > 1 && bits.get(size - 1); - long value = isNegative ? -1L : 0L; - for (int i = 0; i < bits.length() && i < size; i++) { - if (isNegative && !bits.get(i)) { - value ^= 1L << i; - } else if (!isNegative && bits.get(i)) { + long value = 0L; + int limit = Math.min(size, bits.length()); + for (int i = 0; i < limit; i++) { + if (bits.get(i)) { value |= 1L << i; } } + if (signed && size > 1 && size < 64 && (value & (1L << (size - 1))) != 0) { + value |= -(1L << size); // sign-extend the two's-complement top bit + } return value; } diff --git a/src/main/java/org/openhab/bluetooth/gattparser/spec/Field.java b/src/main/java/org/openhab/bluetooth/gattparser/spec/Field.java index a80b189..6b538d5 100644 --- a/src/main/java/org/openhab/bluetooth/gattparser/spec/Field.java +++ b/src/main/java/org/openhab/bluetooth/gattparser/spec/Field.java @@ -65,6 +65,10 @@ public class Field { private boolean unknown; @XStreamAsAttribute private boolean system; + // Repeated (array) field, from GSS types like uint16[n]. null/absent = single occurrence; + // 0 = repeat to end of data; N > 0 = exactly N occurrences. + @XStreamAsAttribute + private Integer repeats; public String getName() { return name != null ? name.trim() : null; @@ -122,6 +126,21 @@ public String getReference() { return reference; } + /** + * Returns the repeat specification for an array field (GSS types like {@code uint16[n]}). + * {@code null} means a single (non-repeated) field; {@code 0} means repeat until the end of + * the data; a positive value means exactly that many occurrences. + * + * @return the repeat count, or null when the field is not repeated + */ + public Integer getRepeats() { + return repeats; + } + + public boolean isRepeated() { + return repeats != null; + } + public boolean isUnknown() { return unknown; } diff --git a/src/main/java/org/openhab/bluetooth/gattparser/spec/FieldFormat.java b/src/main/java/org/openhab/bluetooth/gattparser/spec/FieldFormat.java index 237a476..da6afb5 100644 --- a/src/main/java/org/openhab/bluetooth/gattparser/spec/FieldFormat.java +++ b/src/main/java/org/openhab/bluetooth/gattparser/spec/FieldFormat.java @@ -37,6 +37,9 @@ public class FieldFormat { put("float64", new FieldFormat("float64", FieldType.FLOAT_IEE754, 64)); put("sfloat", new FieldFormat("SFLOAT", FieldType.FLOAT_IEE11073, 16)); put("float", new FieldFormat("FLOAT", FieldType.FLOAT_IEE11073, 32)); + // GSS (Bluetooth Specification Supplement) names for the IEEE-11073 floats. + put("medfloat16", new FieldFormat("medfloat16", FieldType.FLOAT_IEE11073, 16)); + put("medfloat32", new FieldFormat("medfloat32", FieldType.FLOAT_IEE11073, 32)); //put("duint16", new FieldFormat("duint16", FieldType.UINT, 16)); put("utf8s", new FieldFormat("utf8s", FieldType.UTF8S, FULL_SIZE)); put("utf16s", new FieldFormat("utf16s", FieldType.UTF16S, FULL_SIZE)); diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.acceleration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.acceleration.xml new file mode 100644 index 0000000..aec0bdf --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.acceleration.xml @@ -0,0 +1,12 @@ + + + + + sint32 + -3 + org.bluetooth.unit.acceleration.metres_per_seconds_squared + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.acceleration_3d.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.acceleration_3d.xml new file mode 100644 index 0000000..297f2c4 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.acceleration_3d.xml @@ -0,0 +1,28 @@ + + + + + sint8 + -2 + org.bluetooth.unit.standard_acceleration_due_to_gravity + -1.28 + 1.25 + + + sint8 + -2 + org.bluetooth.unit.standard_acceleration_due_to_gravity + -1.28 + 1.25 + + + sint8 + -2 + org.bluetooth.unit.standard_acceleration_due_to_gravity + -1.28 + 1.25 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.acceleration_detection_status.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.acceleration_detection_status.xml new file mode 100644 index 0000000..1e94410 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.acceleration_detection_status.xml @@ -0,0 +1,10 @@ + + + + + uint8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.activity_goal.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.activity_goal.xml new file mode 100644 index 0000000..9c4ce42 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.activity_goal.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + uint16 + 3 + org.bluetooth.unit.energy.joule + C0 + + + uint24 + org.bluetooth.unit.unitless + C1 + + + uint24 + org.bluetooth.unit.unitless + C2 + + + uint24 + org.bluetooth.unit.unitless + C3 + + + uint24 + 1 + org.bluetooth.unit.length.metre + C4 + + + uint24 + org.bluetooth.unit.time.second + C5 + + + uint24 + org.bluetooth.unit.time.second + C6 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.aerobic_heart_rate_upper_limit.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.aerobic_heart_rate_upper_limit.xml new file mode 100644 index 0000000..9fcb4fb --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.aerobic_heart_rate_upper_limit.xml @@ -0,0 +1,22 @@ + + + + + Upper limit of the heart rate where the user enhances + his endurance while exercising + + + + Unit is in beats per minute with a + resolution of 1 + Mandatory + uint8 + org.bluetooth.unit.period.beats_per_minute + 0 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.aerobic_threshold.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.aerobic_threshold.xml new file mode 100644 index 0000000..cda2705 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.aerobic_threshold.xml @@ -0,0 +1,28 @@ + + + + + First metabolic threshold. + + + + The Unit is beats per minute with a + resolution of 1 + Mandatory + uint8 + org.bluetooth.unit.period.beats_per_minute + 0 + + + +

Aerobic Threshold and Anaerobic Threshold together with the + Sport Type for Aerobic and Anaerobic Thresholds describe the + metabolic thresholds of the user. The Sport Type for Aerobic + and Anaerobic Thresholds identifies how the measurement was + performed.

+
+
diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.ammonia_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.ammonia_concentration.xml new file mode 100644 index 0000000..39f1724 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.ammonia_concentration.xml @@ -0,0 +1,11 @@ + + + + + medfloat16 + org.bluetooth.unit.density.kilogram_per_cubic_meter + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.apparent_energy_32.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.apparent_energy_32.xml new file mode 100644 index 0000000..617f60e --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.apparent_energy_32.xml @@ -0,0 +1,14 @@ + + + + + uint32 + -3 + 0 + 4294967.293 + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.apparent_power.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.apparent_power.xml new file mode 100644 index 0000000..2d3f605 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.apparent_power.xml @@ -0,0 +1,14 @@ + + + + + uint24 + -1 + 0 + 1677721.3 + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.average_current.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.average_current.xml new file mode 100644 index 0000000..595c287 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.average_current.xml @@ -0,0 +1,13 @@ + + + + + org.bluetooth.characteristic.electric_current + + + org.bluetooth.characteristic.time_exponential_8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.average_voltage.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.average_voltage.xml new file mode 100644 index 0000000..b2b26b1 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.average_voltage.xml @@ -0,0 +1,13 @@ + + + + + org.bluetooth.characteristic.voltage + + + org.bluetooth.characteristic.time_exponential_8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_critical_status.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_critical_status.xml new file mode 100644 index 0000000..528c249 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_critical_status.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_energy_status.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_energy_status.xml new file mode 100644 index 0000000..a311e1d --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_energy_status.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + medfloat16 + org.bluetooth.unit.power.watt + C0 + + + medfloat16 + org.bluetooth.unit.electric_potential_difference.volt + C1 + + + medfloat16 + org.bluetooth.unit.energy.kilowatt_hour + C2 + + + medfloat16 + org.bluetooth.unit.energy.kilowatt_hour + C3 + + + medfloat16 + org.bluetooth.unit.power.watt + C4 + + + medfloat16 + org.bluetooth.unit.energy.kilowatt_hour + C5 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_health_information.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_health_information.xml new file mode 100644 index 0000000..a326a98 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_health_information.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + uint16 + C0 + + + sint8 + org.bluetooth.unit.thermodynamic_temperature.degree_celsius + C1 + + + sint8 + org.bluetooth.unit.thermodynamic_temperature.degree_celsius + C1 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_health_status.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_health_status.xml new file mode 100644 index 0000000..2de7bb3 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_health_status.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + uint8 + org.bluetooth.unit.percentage + C0 + + + uint16 + C1 + + + sint8 + org.bluetooth.unit.thermodynamic_temperature.degree_celsius + C2 + + + uint16 + C3 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_information.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_information.xml new file mode 100644 index 0000000..9e0dc5e --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_information.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + uint24 + org.bluetooth.unit.time.day + C0 + + + uint24 + org.bluetooth.unit.time.day + C1 + + + medfloat16 + org.bluetooth.unit.energy.kilowatt_hour + C2 + + + medfloat16 + org.bluetooth.unit.energy.kilowatt_hour + C3 + + + medfloat16 + org.bluetooth.unit.energy.kilowatt_hour + C4 + + + uint8 + C5 + + + medfloat16 + org.bluetooth.unit.electric_potential_difference.volt + C6 + + + uint8 + C7 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_level_status.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_level_status.xml new file mode 100644 index 0000000..1bbc36c --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_level_status.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + uint16 + C0 + + + uint8 + C1 + + + + + + + + + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_time_status.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_time_status.xml new file mode 100644 index 0000000..b102b1b --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_time_status.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + uint24 + org.bluetooth.unit.time.minute + + + uint24 + org.bluetooth.unit.time.minute + C0 + + + uint24 + org.bluetooth.unit.time.minute + C1 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.blood_pressure_record.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.blood_pressure_record.xml new file mode 100644 index 0000000..09b3c39 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.blood_pressure_record.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + uint16 + + + uint16 + + + Determined by UUID + + + uint16 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.boolean.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.boolean.xml new file mode 100644 index 0000000..5806eed --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.boolean.xml @@ -0,0 +1,10 @@ + + + + + uint8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.boot_mouse_input_report.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.boot_mouse_input_report.xml new file mode 100644 index 0000000..99bef8b --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.boot_mouse_input_report.xml @@ -0,0 +1,21 @@ + + + + + The Boot Mouse Input Report characteristic is used to + transfer fixed format and length Input Report data between a + HID Host operating in Boot Protocol Mode and a HID Service + corresponding to a boot mouse. + + + + Mandatory + uint8 + true + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.caloric_intake.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.caloric_intake.xml new file mode 100644 index 0000000..83c756b --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.caloric_intake.xml @@ -0,0 +1,11 @@ + + + + + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.carbon_monoxide_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.carbon_monoxide_concentration.xml new file mode 100644 index 0000000..aec5a27 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.carbon_monoxide_concentration.xml @@ -0,0 +1,11 @@ + + + + + medfloat16 + org.bluetooth.unit.density.kilogram_per_cubic_meter + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromatic_distance_from_planckian.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromatic_distance_from_planckian.xml new file mode 100644 index 0000000..38cbbab --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromatic_distance_from_planckian.xml @@ -0,0 +1,14 @@ + + + + + sint16 + -5 + -0.05 + 0.05 + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_coordinate.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_coordinate.xml new file mode 100644 index 0000000..34b958a --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_coordinate.xml @@ -0,0 +1,14 @@ + + + + + uint16 + -16 + 0 + 1.0 + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_coordinates.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_coordinates.xml new file mode 100644 index 0000000..d1f7e55 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_coordinates.xml @@ -0,0 +1,13 @@ + + + + + org.bluetooth.characteristic.chromaticity_coordinate + + + org.bluetooth.characteristic.chromaticity_coordinate + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_in_cct_and_duv_values.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_in_cct_and_duv_values.xml new file mode 100644 index 0000000..df5000c --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_in_cct_and_duv_values.xml @@ -0,0 +1,13 @@ + + + + + org.bluetooth.characteristic.correlated_color_temperature + + + org.bluetooth.characteristic.chromatic_distance_from_planckian + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_tolerance.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_tolerance.xml new file mode 100644 index 0000000..65b5e84 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.chromaticity_tolerance.xml @@ -0,0 +1,14 @@ + + + + + uint8 + -4 + 0 + 0.0255 + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cie_13_3_1995_color_rendering_index.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cie_13_3_1995_color_rendering_index.xml new file mode 100644 index 0000000..13c5b11 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cie_13_3_1995_color_rendering_index.xml @@ -0,0 +1,13 @@ + + + + + sint8 + -128 + 100 + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.co2_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.co2_concentration.xml new file mode 100644 index 0000000..2d84814 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.co2_concentration.xml @@ -0,0 +1,11 @@ + + + + + uint16 + org.bluetooth.unit.ppm + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.coefficient.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.coefficient.xml new file mode 100644 index 0000000..d1c9915 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.coefficient.xml @@ -0,0 +1,10 @@ + + + + + float32 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.contact_status_8.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.contact_status_8.xml new file mode 100644 index 0000000..17f0cf9 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.contact_status_8.xml @@ -0,0 +1,31 @@ + + + + + uint1 + + + uint1 + + + uint1 + + + uint1 + + + uint1 + + + uint1 + + + uint1 + + + uint1 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.content_control_id.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.content_control_id.xml new file mode 100644 index 0000000..3754501 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.content_control_id.xml @@ -0,0 +1,10 @@ + + + + + uint8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cooking_step_status.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cooking_step_status.xml new file mode 100644 index 0000000..2c3b21c --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cooking_step_status.xml @@ -0,0 +1,17 @@ + + + + + + + + + uint16 + + + uint16 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cooking_temperature.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cooking_temperature.xml new file mode 100644 index 0000000..7d3b9d8 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cooking_temperature.xml @@ -0,0 +1,14 @@ + + + + + sint16 + -1 + org.bluetooth.unit.thermodynamic_temperature.degree_celsius + -100.0 + 1000.0 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cooking_zone_capabilities.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cooking_zone_capabilities.xml new file mode 100644 index 0000000..bed6add --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cooking_zone_capabilities.xml @@ -0,0 +1,44 @@ + + + + + + + + + uint8 + + + uint16 + + + struct + + + + uint8 + org.bluetooth.unit.percentage + 0 + 255 + C1 + + + struct + + + + struct + + + + struct + + + + struct + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.correlated_color_temperature.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.correlated_color_temperature.xml new file mode 100644 index 0000000..56b8caa --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.correlated_color_temperature.xml @@ -0,0 +1,13 @@ + + + + + uint16 + org.bluetooth.unit.thermodynamic_temperature.kelvin + 800 + 65534 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cosine_of_the_angle.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cosine_of_the_angle.xml new file mode 100644 index 0000000..01bf853 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cosine_of_the_angle.xml @@ -0,0 +1,14 @@ + + + + + sint8 + -2 + org.bluetooth.unit.unitless + -100 + 100 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.count_16.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.count_16.xml new file mode 100644 index 0000000..b4bd963 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.count_16.xml @@ -0,0 +1,13 @@ + + + + + uint16 + 0 + 65534 + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.count_24.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.count_24.xml new file mode 100644 index 0000000..8ca5408 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.count_24.xml @@ -0,0 +1,13 @@ + + + + + uint24 + 0 + 16777214 + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.country_code.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.country_code.xml new file mode 100644 index 0000000..deda1e3 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.country_code.xml @@ -0,0 +1,13 @@ + + + + + uint16 + 0 + 4095 + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cross_trainer_data.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cross_trainer_data.xml new file mode 100644 index 0000000..afd2d3b --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.cross_trainer_data.xml @@ -0,0 +1,272 @@ + + + + + The Cross Trainer Data characteristic is used to send + training-related data to the Client from a cross trainer + (Server). + + + + Mandatory + 24bit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Kilometer per hour with a resolution of + 0.01 + C1 + uint16 + org.bluetooth.unit.velocity.kilometre_per_hour + -2 + + + Kilometer per hour with a resolution of + 0.01 + C2 + uint16 + org.bluetooth.unit.velocity.kilometre_per_hour + -2 + + + Meters with a resolution of + 1 + C3 + uint24 + org.bluetooth.unit.length.metre + + + Step/minute with a resolution of + 1 + C4 + uint16 + org.bluetooth.unit.step_per_minute + + + Step/minute with a resolution of + 1 + C4 + uint16 + org.bluetooth.unit.step_per_minute + + + Unitless with a resolution of + 0.1 + C5 + uint16 + -1 + org.bluetooth.unit.unitless + + + Meters with a resolution of + 1 + C6 + uint16 + org.bluetooth.unit.length.metre + + + Meters with a resolution of + 1 + C6 + uint16 + org.bluetooth.unit.length.metre + + + Percent with a resolution of + 0.1 + C7 + sint16 + org.bluetooth.unit.percentage + -1 + + + Degree with a resolution of + 0.1 + C7 + sint16 + org.bluetooth.unit.plane_angle.degree + -1 + + + Unitless with a resolution of + 0.1 + C8 + sint16 + -1 + org.bluetooth.unit.unitless + + + Watts with a resolution of + 1 + C9 + sint16 + org.bluetooth.unit.power.watt + + + Watts with a resolution of + 1 + C10 + sint16 + org.bluetooth.unit.power.watt + + + Kilo Calorie with a resolution of + 1 + C11 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C11 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C11 + uint8 + org.bluetooth.unit.energy.kilogram_calorie + + + Beats per minute with a resolution of + 1 + C12 + uint8 + org.bluetooth.unit.period.beats_per_minute + + + Metabolic Equivalent with a resolution of + 0.1 + C13 + uint8 + -1 + org.bluetooth.unit.metabolic_equivalent + + + Second with a resolution of + 1 + C14 + uint16 + org.bluetooth.unit.time.second + + + Second with a resolution of + 1 + C15 + uint16 + org.bluetooth.unit.time.second + + + The fields in the above table, reading from top to bottom, + are shown in the order of LSO to MSO, where LSO = Least + Significant Octet and MSO = Most Significant Octet. The Least + Significant Octet represents the eight bits numbered 0 to + 7. + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.date_utc.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.date_utc.xml new file mode 100644 index 0000000..547603d --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.date_utc.xml @@ -0,0 +1,13 @@ + + + + + uint24 + org.bluetooth.unit.time.day + 1 + 16777214 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.device_wearing_position.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.device_wearing_position.xml new file mode 100644 index 0000000..48472e4 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.device_wearing_position.xml @@ -0,0 +1,10 @@ + + + + + uint8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.door_window_status.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.door_window_status.xml new file mode 100644 index 0000000..2bd9d95 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.door_window_status.xml @@ -0,0 +1,10 @@ + + + + + uint8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.elapsed_time.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.elapsed_time.xml new file mode 100644 index 0000000..ae4cda8 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.elapsed_time.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + uint48 + + + uint8 + + + sint8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current.xml new file mode 100644 index 0000000..282ded5 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current.xml @@ -0,0 +1,14 @@ + + + + + uint16 + -2 + org.bluetooth.unit.electric_current.ampere + 0 + 655.34 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current_range.xml new file mode 100644 index 0000000..aa4251a --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current_range.xml @@ -0,0 +1,13 @@ + + + + + org.bluetooth.characteristic.electric_current + + + org.bluetooth.characteristic.electric_current + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current_specification.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current_specification.xml new file mode 100644 index 0000000..acd7fef --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current_specification.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.electric_current + + + org.bluetooth.characteristic.electric_current + + + org.bluetooth.characteristic.electric_current + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current_statistics.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current_statistics.xml new file mode 100644 index 0000000..5245b6f --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.electric_current_statistics.xml @@ -0,0 +1,22 @@ + + + + + org.bluetooth.characteristic.electric_current + + + org.bluetooth.characteristic.electric_current + + + org.bluetooth.characteristic.electric_current + + + org.bluetooth.characteristic.electric_current + + + org.bluetooth.characteristic.time_exponential_8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.energy.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.energy.xml new file mode 100644 index 0000000..b24f344 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.energy.xml @@ -0,0 +1,13 @@ + + + + + uint24 + org.bluetooth.unit.energy.kilowatt_hour + 0 + 16777214 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.energy_32.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.energy_32.xml new file mode 100644 index 0000000..2e6173d --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.energy_32.xml @@ -0,0 +1,14 @@ + + + + + uint32 + -3 + org.bluetooth.unit.energy.kilowatt_hour + 0 + 4294967.293 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.energy_in_a_period_of_day.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.energy_in_a_period_of_day.xml new file mode 100644 index 0000000..22966b3 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.energy_in_a_period_of_day.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.energy + + + org.bluetooth.characteristic.time_decihour_8 + + + org.bluetooth.characteristic.time_decihour_8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.enhanced_blood_pressure_measurement.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.enhanced_blood_pressure_measurement.xml new file mode 100644 index 0000000..6b1991f --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.enhanced_blood_pressure_measurement.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + struct + + + + struct + + + + uint32 + C1 + + + medfloat16 + org.bluetooth.unit.period.beats_per_minute + C2 + + + uint8 + C3 + + + 16bit + + + + uint32 + C5 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.enhanced_intermediate_cuff_pressure.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.enhanced_intermediate_cuff_pressure.xml new file mode 100644 index 0000000..db987f7 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.enhanced_intermediate_cuff_pressure.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + medfloat16 + 3 + org.bluetooth.unit.pressure.millimetre_of_mercury + + + uint32 + C1 + + + medfloat16 + org.bluetooth.unit.period.beats_per_minute + C2 + + + uint8 + C3 + + + 16bit + + + + uint32 + C5 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.estimated_service_date.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.estimated_service_date.xml new file mode 100644 index 0000000..2fd2d93 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.estimated_service_date.xml @@ -0,0 +1,11 @@ + + + + + uint24 + org.bluetooth.unit.time.day + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.event_statistics.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.event_statistics.xml new file mode 100644 index 0000000..a2a331b --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.event_statistics.xml @@ -0,0 +1,19 @@ + + + + + org.bluetooth.characteristic.count_16 + + + org.bluetooth.characteristic.time_second_16 + + + org.bluetooth.characteristic.time_exponential_8 + + + org.bluetooth.characteristic.time_exponential_8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fitness_machine_control_point.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fitness_machine_control_point.xml new file mode 100644 index 0000000..0e68404 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fitness_machine_control_point.xml @@ -0,0 +1,12 @@ + + + + + The Fitness Machine Control Point characteristic is + defined in the Fitness Machine Service Specification. + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fitness_machine_feature.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fitness_machine_feature.xml new file mode 100644 index 0000000..3b5bdd2 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fitness_machine_feature.xml @@ -0,0 +1,12 @@ + + + + + The Fitness Machine Feature characteristic is defined + in the Fitness Machine Service Specification. + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fitness_machine_status.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fitness_machine_status.xml new file mode 100644 index 0000000..5a1af23 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fitness_machine_status.xml @@ -0,0 +1,12 @@ + + + + + The Fitness Machine Status characteristic is defined + in the Fitness Machine Service Specification. + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_16.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_16.xml new file mode 100644 index 0000000..66a2eed --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_16.xml @@ -0,0 +1,10 @@ + + + + + utf8s\{16\} + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_24.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_24.xml new file mode 100644 index 0000000..1e95b2e --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_24.xml @@ -0,0 +1,10 @@ + + + + + utf8s\{24\} + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_36.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_36.xml new file mode 100644 index 0000000..b4d67b2 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_36.xml @@ -0,0 +1,10 @@ + + + + + utf8s\{36\} + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_64.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_64.xml new file mode 100644 index 0000000..0254e45 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_64.xml @@ -0,0 +1,10 @@ + + + + + utf8s\{64\} + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_8.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_8.xml new file mode 100644 index 0000000..6e313a0 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.fixed_string_8.xml @@ -0,0 +1,10 @@ + + + + + utf8s\{8\} + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.force.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.force.xml new file mode 100644 index 0000000..504b40f --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.force.xml @@ -0,0 +1,12 @@ + + + + + sint32 + -3 + org.bluetooth.unit.force.newton + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.four_zone_heart_rate_limits.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.four_zone_heart_rate_limits.xml new file mode 100644 index 0000000..09b7857 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.four_zone_heart_rate_limits.xml @@ -0,0 +1,19 @@ + + + + + uint8 + org.bluetooth.unit.period.beats_per_minute + + + uint8 + org.bluetooth.unit.period.beats_per_minute + + + uint8 + org.bluetooth.unit.period.beats_per_minute + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.gap.central_address_resolution.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.gap.central_address_resolution.xml new file mode 100644 index 0000000..55ac146 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.gap.central_address_resolution.xml @@ -0,0 +1,38 @@ + + + + + + + + + The Peripheral checks if the peer device supports + address resolution by reading the Central Address Resolution + characteristic before using directed advertisement where the + initiator address is set to a Resolvable Private Address + (RPA). + + + + Mandatory + uint8 + + + + + + + + +

A device has only one instance of the Central Address + Resolution characteristic. If the Central Address Resolution + characteristic is not present, then it is assumed that Central + Address Resolution is not supported.

+
+
diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.generic_level.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.generic_level.xml new file mode 100644 index 0000000..0e79fde --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.generic_level.xml @@ -0,0 +1,13 @@ + + + + + uint16 + 0 + 65535 + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.global_trade_item_number.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.global_trade_item_number.xml new file mode 100644 index 0000000..4da7624 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.global_trade_item_number.xml @@ -0,0 +1,10 @@ + + + + + uint48 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.handedness.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.handedness.xml new file mode 100644 index 0000000..e9efb48 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.handedness.xml @@ -0,0 +1,10 @@ + + + + + uint8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_intensity_exercise_threshold.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_intensity_exercise_threshold.xml new file mode 100644 index 0000000..4352386 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_intensity_exercise_threshold.xml @@ -0,0 +1,32 @@ + + + + + uint8 + + + uint16 + 3 + org.bluetooth.unit.energy.joule + + + + uint8 + -1 + org.bluetooth.unit.metabolic_equivalent + + + + uint8 + org.bluetooth.unit.percentage + + + + uint8 + org.bluetooth.unit.period.beats_per_minute + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_resolution_height.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_resolution_height.xml new file mode 100644 index 0000000..3dee8e1 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_resolution_height.xml @@ -0,0 +1,12 @@ + + + + + uint16 + -4 + org.bluetooth.unit.length.meter + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_temperature.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_temperature.xml new file mode 100644 index 0000000..ec2b026 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_temperature.xml @@ -0,0 +1,12 @@ + + + + + sint16 + -1 + org.bluetooth.unit.thermodynamic_temperature.degree_celsius + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_voltage.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_voltage.xml new file mode 100644 index 0000000..b48e623 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.high_voltage.xml @@ -0,0 +1,14 @@ + + + + + uint24 + 6 + org.bluetooth.unit.electric_potential_difference.volt + 0.0 + 262143.97 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.humidity_8.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.humidity_8.xml new file mode 100644 index 0000000..88a15ce --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.humidity_8.xml @@ -0,0 +1,14 @@ + + + + + uint8 + -1 + org.bluetooth.unit.percentage + 0 + 100 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.illuminance.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.illuminance.xml new file mode 100644 index 0000000..f4dfbf3 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.illuminance.xml @@ -0,0 +1,14 @@ + + + + + uint24 + -2 + org.bluetooth.unit.illuminance.lux + 0 + 167772.14 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.illuminance_16.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.illuminance_16.xml new file mode 100644 index 0000000..21586e1 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.illuminance_16.xml @@ -0,0 +1,13 @@ + + + + + uint16 + org.bluetooth.unit.illuminance.lux + 0 + 65534 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.indoor_bike_data.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.indoor_bike_data.xml new file mode 100644 index 0000000..4c45963 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.indoor_bike_data.xml @@ -0,0 +1,219 @@ + + + + + The Indoor Bike Data characteristic is used to send + training-related data to the Client from an indoor bike + (Server). + + + + Mandatory + 16bit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Kilometer per hour with a resolution of + 0.01 + C1 + uint16 + -2 + org.bluetooth.unit.velocity.kilometre_per_hour + + + Kilometer per hour with a resolution of + 0.01 + C2 + uint16 + -2 + org.bluetooth.unit.velocity.kilometre_per_hour + + + 1/minute with a resolution of + 0.5 + C3 + -1 + uint16 + + org.bluetooth.unit.angular_velocity.revolution_per_minute + + + 1/minute with a resolution of + 0.5 + C4 + -1 + uint16 + + org.bluetooth.unit.angular_velocity.revolution_per_minute + + + Meters with a resolution of + 1 + C5 + uint24 + org.bluetooth.unit.length.metre + + + Unitless with a resolution of + 1 + C6 + sint16 + org.bluetooth.unit.unitless + + + Watts with a resolution of + 1 + C7 + sint16 + org.bluetooth.unit.power.watt + + + Watts with a resolution of + 1 + C8 + sint16 + org.bluetooth.unit.power.watt + + + Kilo Calorie with a resolution of + 1 + C9 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C9 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C9 + uint8 + org.bluetooth.unit.energy.kilogram_calorie + + + Beats per minute with a resolution of + 1 + C10 + uint8 + org.bluetooth.unit.period.beats_per_minute + + + Metabolic Equivalent with a resolution of + 0.1 + C11 + uint8 + -1 + org.bluetooth.unit.metabolic_equivalent + + + Second with a resolution of + 1 + C12 + uint16 + org.bluetooth.unit.time.second + + + Second with a resolution of + 1 + C13 + uint16 + org.bluetooth.unit.time.second + + + The fields in the above table, reading from top to bottom, + are shown in the order of LSO to MSO, where LSO = Least + Significant Octet and MSO = Most Significant Octet. The Least + Significant Octet represents the eight bits numbered 0 to + 7. + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.kitchen_appliance_airflow.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.kitchen_appliance_airflow.xml new file mode 100644 index 0000000..8cb1c42 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.kitchen_appliance_airflow.xml @@ -0,0 +1,14 @@ + + + + + uint16 + -3 + org.bluetooth.unit.flow.cubic_metre_per_second + 0 + 65534 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.length.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.length.xml new file mode 100644 index 0000000..c244c44 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.length.xml @@ -0,0 +1,12 @@ + + + + + uint32 + -7 + org.bluetooth.unit.length.metre + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.light_distribution.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.light_distribution.xml new file mode 100644 index 0000000..2729db7 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.light_distribution.xml @@ -0,0 +1,10 @@ + + + + + uint8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.light_output.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.light_output.xml new file mode 100644 index 0000000..a6be951 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.light_output.xml @@ -0,0 +1,11 @@ + + + + + uint24 + org.bluetooth.unit.illuminance.lumen + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.light_source_type.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.light_source_type.xml new file mode 100644 index 0000000..b620186 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.light_source_type.xml @@ -0,0 +1,10 @@ + + + + + uint8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.linear_position.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.linear_position.xml new file mode 100644 index 0000000..bc4e80c --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.linear_position.xml @@ -0,0 +1,12 @@ + + + + + sint32 + -7 + org.bluetooth.unit.length.metre + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_efficacy.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_efficacy.xml new file mode 100644 index 0000000..67468ad --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_efficacy.xml @@ -0,0 +1,14 @@ + + + + + uint16 + -1 + org.bluetooth.unit.luminous_efficacy.lumen_per_watt + 0 + 1800 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_energy.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_energy.xml new file mode 100644 index 0000000..0868c1f --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_energy.xml @@ -0,0 +1,14 @@ + + + + + uint24 + 3 + org.bluetooth.unit.luminous_energy.lumen_per_hour + 0 + 16777214000 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_exposure.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_exposure.xml new file mode 100644 index 0000000..8c59d27 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_exposure.xml @@ -0,0 +1,14 @@ + + + + + uint24 + 3 + org.bluetooth.unit.luminous_exposure.lux_hour + 0 + 16777214000 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_flux.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_flux.xml new file mode 100644 index 0000000..51836ae --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_flux.xml @@ -0,0 +1,13 @@ + + + + + uint16 + org.bluetooth.unit.luminous_flux.lumen + 0 + 65534 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_flux_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_flux_range.xml new file mode 100644 index 0000000..1b97a78 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_flux_range.xml @@ -0,0 +1,13 @@ + + + + + org.bluetooth.characteristic.luminous_flux + + + org.bluetooth.characteristic.luminous_flux + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_intensity.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_intensity.xml new file mode 100644 index 0000000..ba6d76a --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.luminous_intensity.xml @@ -0,0 +1,13 @@ + + + + + uint16 + org.bluetooth.unit.luminous_intensity.candela + 0 + 65534 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.magnetic_flux_density_2d.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.magnetic_flux_density_2d.xml new file mode 100644 index 0000000..d99bd01 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.magnetic_flux_density_2d.xml @@ -0,0 +1,17 @@ + + + + + sint16 + -7 + org.bluetooth.unit.magnetic_flux_density.tesla + + + sint16 + -7 + org.bluetooth.unit.magnetic_flux_density.tesla + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.magnetic_flux_density_3d.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.magnetic_flux_density_3d.xml new file mode 100644 index 0000000..52205df --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.magnetic_flux_density_3d.xml @@ -0,0 +1,22 @@ + + + + + sint16 + -7 + org.bluetooth.unit.magnetic_flux_density.tesla + + + sint16 + -7 + org.bluetooth.unit.magnetic_flux_density.tesla + + + sint16 + -7 + org.bluetooth.unit.magnetic_flux_density.tesla + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.mass_flow.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.mass_flow.xml new file mode 100644 index 0000000..2755bf3 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.mass_flow.xml @@ -0,0 +1,13 @@ + + + + + uint16 + org.bluetooth.unit.mass_flow.gram_per_second + 0 + 65534 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.methane_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.methane_concentration.xml new file mode 100644 index 0000000..45e4de7 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.methane_concentration.xml @@ -0,0 +1,11 @@ + + + + + medfloat16 + org.bluetooth.unit.concentration.parts_per_billion + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.middle_name.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.middle_name.xml new file mode 100644 index 0000000..c385b3f --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.middle_name.xml @@ -0,0 +1,10 @@ + + + + + utf8s + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.nitrogen_dioxide_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.nitrogen_dioxide_concentration.xml new file mode 100644 index 0000000..1aa89f8 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.nitrogen_dioxide_concentration.xml @@ -0,0 +1,11 @@ + + + + + medfloat16 + org.bluetooth.unit.density.kilogram_per_cubic_meter + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.noise.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.noise.xml new file mode 100644 index 0000000..07aa43b --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.noise.xml @@ -0,0 +1,11 @@ + + + + + uint8 + org.bluetooth.unit.sound_pressure.decibel_spl + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.non-methane_volatile_organic_compounds_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.non-methane_volatile_organic_compounds_concentration.xml new file mode 100644 index 0000000..3129841 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.non-methane_volatile_organic_compounds_concentration.xml @@ -0,0 +1,11 @@ + + + + + medfloat16 + org.bluetooth.unit.density.kilogram_per_cubic_meter + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.ozone_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.ozone_concentration.xml new file mode 100644 index 0000000..b87edc7 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.ozone_concentration.xml @@ -0,0 +1,11 @@ + + + + + medfloat16 + org.bluetooth.unit.density.kilogram_per_cubic_meter + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.particulate_matter_pm10_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.particulate_matter_pm10_concentration.xml new file mode 100644 index 0000000..c90c5eb --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.particulate_matter_pm10_concentration.xml @@ -0,0 +1,11 @@ + + + + + medfloat16 + org.bluetooth.unit.density.kilogram_per_cubic_meter + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.particulate_matter_pm1_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.particulate_matter_pm1_concentration.xml new file mode 100644 index 0000000..2096094 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.particulate_matter_pm1_concentration.xml @@ -0,0 +1,11 @@ + + + + + medfloat16 + org.bluetooth.unit.density.kilogram_per_cubic_meter + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.particulate_matter_pm2_5_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.particulate_matter_pm2_5_concentration.xml new file mode 100644 index 0000000..44bc164 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.particulate_matter_pm2_5_concentration.xml @@ -0,0 +1,11 @@ + + + + + medfloat16 + org.bluetooth.unit.density.kilogram_per_cubic_meter + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.perceived_lightness.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.perceived_lightness.xml new file mode 100644 index 0000000..ac78680 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.perceived_lightness.xml @@ -0,0 +1,13 @@ + + + + + uint16 + 0 + 65535 + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.percentage_8.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.percentage_8.xml new file mode 100644 index 0000000..f901817 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.percentage_8.xml @@ -0,0 +1,14 @@ + + + + + uint8 + -1 + org.bluetooth.unit.percentage + 0 + 100 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.percentage_8_steps.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.percentage_8_steps.xml new file mode 100644 index 0000000..e59e005 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.percentage_8_steps.xml @@ -0,0 +1,13 @@ + + + + + uint8 + org.bluetooth.unit.unitless + 1 + 200 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.power.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.power.xml new file mode 100644 index 0000000..c3c7a89 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.power.xml @@ -0,0 +1,14 @@ + + + + + uint24 + -1 + org.bluetooth.unit.power.watt + 0 + 1677721.3 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.power_specification.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.power_specification.xml new file mode 100644 index 0000000..d6331bd --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.power_specification.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.power + + + org.bluetooth.characteristic.power + + + org.bluetooth.characteristic.power + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.precise_acceleration_3d.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.precise_acceleration_3d.xml new file mode 100644 index 0000000..73c6a9d --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.precise_acceleration_3d.xml @@ -0,0 +1,28 @@ + + + + + sint16 + -3 + org.bluetooth.unit.standard_acceleration_due_to_gravity + -32.768 + 32.765 + + + sint16 + -3 + org.bluetooth.unit.standard_acceleration_due_to_gravity + -32.768 + 32.765 + + + sint16 + -3 + org.bluetooth.unit.standard_acceleration_due_to_gravity + -32.768 + 32.765 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.preferred_units.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.preferred_units.xml new file mode 100644 index 0000000..f0f759f --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.preferred_units.xml @@ -0,0 +1,10 @@ + + + + + uint16 [1-256] + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.pushbutton_status_8.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.pushbutton_status_8.xml new file mode 100644 index 0000000..a6db879 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.pushbutton_status_8.xml @@ -0,0 +1,19 @@ + + + + + uint2 + + + uint2 + + + uint2 + + + uint2 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.recipe_control.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.recipe_control.xml new file mode 100644 index 0000000..672b369 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.recipe_control.xml @@ -0,0 +1,13 @@ + + + + + uint8 + + + uint16 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.recipe_parameters.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.recipe_parameters.xml new file mode 100644 index 0000000..5cd0573 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.recipe_parameters.xml @@ -0,0 +1,41 @@ + + + + + + + + + uint16 + + + uint8 + + + uint16 + + + + struct + + + + uint8 + -1 + org.bluetooth.unit.kelvin_per_second + -12.8 + 12.7 + + + + struct + + + + + + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_runtime_in_a_correlated_color_temperature_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_runtime_in_a_correlated_color_temperature_range.xml new file mode 100644 index 0000000..75c0294 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_runtime_in_a_correlated_color_temperature_range.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.percentage_8 + + + uint16 + + + uint16 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_runtime_in_a_current_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_runtime_in_a_current_range.xml new file mode 100644 index 0000000..f3e11d0 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_runtime_in_a_current_range.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.percentage_8 + + + org.bluetooth.characteristic.electric_current + + + org.bluetooth.characteristic.electric_current + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_runtime_in_a_generic_level_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_runtime_in_a_generic_level_range.xml new file mode 100644 index 0000000..483ac92 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_runtime_in_a_generic_level_range.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.percentage_8 + + + org.bluetooth.characteristic.generic_level + + + org.bluetooth.characteristic.generic_level + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_a_period_of_day.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_a_period_of_day.xml new file mode 100644 index 0000000..35ce93f --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_a_period_of_day.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.percentage_8 + + + org.bluetooth.characteristic.time_decihour_8 + + + org.bluetooth.characteristic.time_decihour_8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_a_temperature_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_a_temperature_range.xml new file mode 100644 index 0000000..e8948cc --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_a_temperature_range.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.percentage_8 + + + org.bluetooth.characteristic.temperature + + + org.bluetooth.characteristic.temperature + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_a_voltage_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_a_voltage_range.xml new file mode 100644 index 0000000..4902aca --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_a_voltage_range.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.percentage_8 + + + org.bluetooth.characteristic.voltage + + + org.bluetooth.characteristic.voltage + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_an_illuminance_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_an_illuminance_range.xml new file mode 100644 index 0000000..21c03ad --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.relative_value_in_an_illuminance_range.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.percentage_8 + + + org.bluetooth.characteristic.illuminance + + + org.bluetooth.characteristic.illuminance + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.resolvable_private_address_only.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.resolvable_private_address_only.xml new file mode 100644 index 0000000..5fec880 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.resolvable_private_address_only.xml @@ -0,0 +1,30 @@ + + + + + The Resolvable Private Address Only characteristic + defines whether the device will only use Resolvable Private + Addresses (RPAs) as local addresses. + + + + Mandatory + uint8 + org.bluetooth.unit.unitless + + + + + + + A device shall have only one instance of the Resolvable + Private Address Only characteristic. If the Resolvable Private + Address Only characteristic is not present, then it cannot be + assumed that only Resolvable Private Addresses will be used over + the air. + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.rotational_speed.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.rotational_speed.xml new file mode 100644 index 0000000..b24ee3a --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.rotational_speed.xml @@ -0,0 +1,11 @@ + + + + + sint32 + org.bluetooth.unit.rotational_speed.revolutions_per_minute + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.rower_data.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.rower_data.xml new file mode 100644 index 0000000..dc28121 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.rower_data.xml @@ -0,0 +1,220 @@ + + + + + The Rower Data characteristic is used to send + training-related data to the Client from a rower + (Server). + + + + Mandatory + 16bit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + stroke/minute with a resolution of + 0.5 + C1 + uint8 + -1 + org.bluetooth.unit.stroke_per_minute + + + Unitless with a resolution of + 1 + C1 + uint16 + org.bluetooth.unit.unitless + + + 1/minute with a resolution of + 0.5 + C2 + uint8 + -1 + org.bluetooth.unit.stroke_per_minute + + + Meters with a resolution of + 1 + C3 + uint24 + org.bluetooth.unit.length.metre + + + Second with a resolution of + 1 + C4 + uint16 + org.bluetooth.unit.time.second + + + Second with a resolution of + 1 + C5 + uint16 + org.bluetooth.unit.time.second + + + Watts with a resolution of + 1 + C6 + sint16 + org.bluetooth.unit.power.watt + + + Watts with a resolution of + 1 + C7 + sint16 + org.bluetooth.unit.power.watt + + + Unitless with a resolution of + 1 + C8 + sint16 + org.bluetooth.unit.unitless + + + Kilo Calorie with a resolution of + 1 + C9 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C9 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C9 + uint8 + org.bluetooth.unit.energy.kilogram_calorie + + + Beats per minute with a resolution of + 1 + C10 + uint8 + org.bluetooth.unit.period.beats_per_minute + + + Metabolic Equivalent with a resolution of + 0.1 + C11 + uint8 + -1 + org.bluetooth.unit.metabolic_equivalent + + + Second with a resolution of + 1 + C12 + uint16 + org.bluetooth.unit.time.second + + + Second with a resolution of + 1 + C13 + uint16 + org.bluetooth.unit.time.second + + + The fields in the above table, reading from top to bottom, + are shown in the order of LSO to MSO, where LSO = Least + Significant Octet and MSO = Most Significant Octet. The Least + Significant Octet represents the eight bits numbered 0 to + 7. + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.sedentary_interval_notification.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.sedentary_interval_notification.xml new file mode 100644 index 0000000..6a0fc2a --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.sedentary_interval_notification.xml @@ -0,0 +1,11 @@ + + + + + uint16 + org.bluetooth.unit.time.second + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.stair_climber_data.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.stair_climber_data.xml new file mode 100644 index 0000000..632507c --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.stair_climber_data.xml @@ -0,0 +1,174 @@ + + + + + The Stair Climber Data characteristic is used to send + training-related data to the Client from a stair climber + (Server). + + + + Mandatory + 16bit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unitless with a resolution of + 1 + C1 + uint16 + org.bluetooth.unit.unitless + + + Step/minute with a resolution of + 1 + C2 + uint16 + org.bluetooth.unit.step_per_minute + + + Step/minute with a resolution of + 1 + C3 + uint16 + org.bluetooth.unit.step_per_minute + + + Meters with a resolution of + 1 + C4 + uint16 + org.bluetooth.unit.length.metre + + + Unitless with a resolution of + 1 + C5 + uint16 + org.bluetooth.unit.unitless + + + Kilo Calorie with a resolution of + 1 + C6 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C6 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C6 + uint8 + org.bluetooth.unit.energy.kilogram_calorie + + + Beats per minute with a resolution of + 1 + C7 + uint8 + org.bluetooth.unit.period.beats_per_minute + + + Metabolic Equivalent with a resolution of + 0.1 + C8 + uint8 + -1 + org.bluetooth.unit.metabolic_equivalent + + + Second with a resolution of + 1 + C9 + uint16 + org.bluetooth.unit.time.second + + + Second with a resolution of + 1 + C10 + uint16 + org.bluetooth.unit.time.second + + + The fields in the above table, reading from top to bottom, + are shown in the order of LSO to MSO, where LSO = Least + Significant Octet and MSO = Most Significant Octet. The Least + Significant Octet represents the eight bits numbered 0 to + 7. + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.step_climber_data.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.step_climber_data.xml new file mode 100644 index 0000000..dbf07f0 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.step_climber_data.xml @@ -0,0 +1,168 @@ + + + + + The Step Climber Data characteristic is used to send + training-related data to the Client from a step climber + (Server). + + + + Mandatory + 16bit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unitless with a resolution of + 1 + C1 + uint16 + org.bluetooth.unit.unitless + + + Unitless with a resolution of + 1 + C1 + uint16 + org.bluetooth.unit.unitless + + + Step/minute with a resolution of + 1 + C2 + uint16 + org.bluetooth.unit.step_per_minute + + + Step/minute with a resolution of + 1 + C3 + uint16 + org.bluetooth.unit.step_per_minute + + + Meters with a resolution of + 1 + C4 + uint16 + org.bluetooth.unit.length.metre + + + Kilo Calorie with a resolution of + 1 + C5 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C5 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C5 + uint8 + org.bluetooth.unit.energy.kilogram_calorie + + + Beats per minute with a resolution of + 1 + C6 + uint8 + org.bluetooth.unit.period.beats_per_minute + + + Metabolic Equivalent with a resolution of + 0.1 + C7 + uint8 + -1 + org.bluetooth.unit.metabolic_equivalent + + + Second with a resolution of + 1 + C8 + uint16 + org.bluetooth.unit.time.second + + + Second with a resolution of + 1 + C9 + uint16 + org.bluetooth.unit.time.second + + + The fields in the above table, reading from top to bottom, + are shown in the order of LSO to MSO, where LSO = Least + Significant Octet and MSO = Most Significant Octet. The Least + Significant Octet represents the eight bits numbered 0 to + 7. + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.stride_length.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.stride_length.xml new file mode 100644 index 0000000..bf2f948 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.stride_length.xml @@ -0,0 +1,12 @@ + + + + + uint16 + -3 + org.bluetooth.unit.length.metre + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.sulfur_dioxide_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.sulfur_dioxide_concentration.xml new file mode 100644 index 0000000..6f77f60 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.sulfur_dioxide_concentration.xml @@ -0,0 +1,11 @@ + + + + + medfloat16 + org.bluetooth.unit.density.kilogram_per_cubic_meter + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.sulfur_hexafluoride_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.sulfur_hexafluoride_concentration.xml new file mode 100644 index 0000000..f1d7fe4 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.sulfur_hexafluoride_concentration.xml @@ -0,0 +1,11 @@ + + + + + medfloat16 + org.bluetooth.unit.density.kilogram_per_cubic_meter + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_heart_rate_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_heart_rate_range.xml new file mode 100644 index 0000000..1bfef17 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_heart_rate_range.xml @@ -0,0 +1,36 @@ + + + + + The Supported Heart Rate Range characteristic is used + to send the supported Heart Rate range as well as the minimum + Heart Rate increment supported by the Server. + + + + Beats per minute with a resolution of + 1 + Mandatory + uint8 + org.bluetooth.unit.period.beats_per_minute + + + Beats per minute with a resolution of + 1 + Mandatory + uint8 + org.bluetooth.unit.period.beats_per_minute + + + Beats per minute with a resolution of + 1 + Mandatory + uint8 + org.bluetooth.unit.period.beats_per_minute + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_inclination_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_inclination_range.xml new file mode 100644 index 0000000..7828d95 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_inclination_range.xml @@ -0,0 +1,39 @@ + + + + + The Supported Inclination Range characteristic is used + to send the supported inclination range as well as the minimum + inclination increment supported by the Server. + + + + Percent with a resolution of + 0.1 + Mandatory + sint16 + org.bluetooth.unit.percentage + -1 + + + Percent with a resolution of + 0.1 + Mandatory + sint16 + org.bluetooth.unit.percentage + -1 + + + Percent with a resolution of + 0.1 + Mandatory + uint16 + org.bluetooth.unit.percentage + -1 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_power_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_power_range.xml new file mode 100644 index 0000000..0961a42 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_power_range.xml @@ -0,0 +1,36 @@ + + + + + The Supported Power Range characteristic is used to + send the supported power range as well as the minimum power + increment supported by the Server. + + + + Watt with a resolution of + 1 + Mandatory + sint16 + org.bluetooth.unit.power.watt + + + Watt with a resolution of + 1 + Mandatory + sint16 + org.bluetooth.unit.power.watt + + + Watt with a resolution of + 1 + Mandatory + uint16 + org.bluetooth.unit.power.watt + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_resistance_level_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_resistance_level_range.xml new file mode 100644 index 0000000..aa7c2a2 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_resistance_level_range.xml @@ -0,0 +1,40 @@ + + + + + The Supported Resistance Level Range characteristic is + used to send the supported resistance level range as well as + the minimum resistance increment supported by the + Server. + + + + Unitless with a resolution of + 0.1 + Mandatory + sint16 + org.bluetooth.unit.unitless + -1 + + + Unitless with a resolution of + 0.1 + Mandatory + sint16 + org.bluetooth.unit.unitless + -1 + + + Unitless with a resolution of + 0.1 + Mandatory + uint16 + org.bluetooth.unit.unitless + -1 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_speed_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_speed_range.xml new file mode 100644 index 0000000..39ab923 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.supported_speed_range.xml @@ -0,0 +1,39 @@ + + + + + The Supported Speed Range characteristic is used to + send the supported speed range as well as the minimum speed + increment supported by the Server. + + + + Kilometer per hour with a resolution of + 0.01 + Mandatory + uint16 + org.bluetooth.unit.velocity.kilometre_per_hour + -2 + + + Kilometer per hour with a resolution of + 0.01 + Mandatory + uint16 + org.bluetooth.unit.velocity.kilometre_per_hour + -2 + + + Meters per second with a resolution of + 0.01 + Mandatory + uint16 + org.bluetooth.unit.velocity.kilometre_per_hour + -2 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_8.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_8.xml new file mode 100644 index 0000000..38509e3 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_8.xml @@ -0,0 +1,14 @@ + + + + + sint8 + -1 + org.bluetooth.unit.thermodynamic_temperature.degree_celsius + -64.0 + 63.0 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_8_in_a_period_of_day.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_8_in_a_period_of_day.xml new file mode 100644 index 0000000..baceef1 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_8_in_a_period_of_day.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.temperature_8 + + + org.bluetooth.characteristic.time_decihour_8 + + + org.bluetooth.characteristic.time_decihour_8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_8_statistics.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_8_statistics.xml new file mode 100644 index 0000000..ce2271e --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_8_statistics.xml @@ -0,0 +1,22 @@ + + + + + org.bluetooth.characteristic.temperature_8 + + + org.bluetooth.characteristic.temperature_8 + + + org.bluetooth.characteristic.temperature_8 + + + org.bluetooth.characteristic.temperature_8 + + + org.bluetooth.characteristic.time_exponential_8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_range.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_range.xml new file mode 100644 index 0000000..6c2f994 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_range.xml @@ -0,0 +1,13 @@ + + + + + org.bluetooth.characteristic.temperature + + + org.bluetooth.characteristic.temperature + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_statistics.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_statistics.xml new file mode 100644 index 0000000..aeee15d --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.temperature_statistics.xml @@ -0,0 +1,22 @@ + + + + + org.bluetooth.characteristic.temperature + + + org.bluetooth.characteristic.temperature + + + org.bluetooth.characteristic.temperature + + + org.bluetooth.characteristic.temperature + + + org.bluetooth.characteristic.time_exponential_8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_decihour_8.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_decihour_8.xml new file mode 100644 index 0000000..860f04b --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_decihour_8.xml @@ -0,0 +1,14 @@ + + + + + uint8 + -1 + org.bluetooth.unit.time.hour + 0.0 + 23.9 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_exponential_8.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_exponential_8.xml new file mode 100644 index 0000000..4c07dd8 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_exponential_8.xml @@ -0,0 +1,13 @@ + + + + + uint8 + org.bluetooth.unit.time.second + 0.0 + 66560641 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_hour_24.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_hour_24.xml new file mode 100644 index 0000000..fe1c375 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_hour_24.xml @@ -0,0 +1,13 @@ + + + + + uint24 + org.bluetooth.unit.time.hour + 0 + 16777214 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_millisecond_24.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_millisecond_24.xml new file mode 100644 index 0000000..b5ec83b --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_millisecond_24.xml @@ -0,0 +1,14 @@ + + + + + uint24 + -3 + org.bluetooth.unit.time.second + 0 + 16777.214 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_second_16.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_second_16.xml new file mode 100644 index 0000000..ca962ae --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_second_16.xml @@ -0,0 +1,13 @@ + + + + + uint16 + org.bluetooth.unit.time.second + 0 + 65534 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_second_32.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_second_32.xml new file mode 100644 index 0000000..0c9badd --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_second_32.xml @@ -0,0 +1,13 @@ + + + + + uint32 + org.bluetooth.unit.time.second + 0 + 4294967294 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_second_8.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_second_8.xml new file mode 100644 index 0000000..3ffb38a --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.time_second_8.xml @@ -0,0 +1,13 @@ + + + + + uint8 + org.bluetooth.unit.time.second + 0 + 254 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.torque.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.torque.xml new file mode 100644 index 0000000..a7ca1fa --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.torque.xml @@ -0,0 +1,12 @@ + + + + + sint32 + -2 + org.bluetooth.unit.moment_of_force.newton_metre + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.training_status.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.training_status.xml new file mode 100644 index 0000000..d50179d --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.training_status.xml @@ -0,0 +1,12 @@ + + + + + The Training Status characteristic is defined in the + Fitness Machine Service Specification. + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.treadmill_data.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.treadmill_data.xml new file mode 100644 index 0000000..4b2eaf2 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.treadmill_data.xml @@ -0,0 +1,242 @@ + + + + + The Treadmill Data characteristic is used to send + training-related data to the Client from a treadmill + (Server). + + + + Mandatory + 16bit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Kilometer per hour with a resolution of + 0.01 + C1 + uint16 + org.bluetooth.unit.velocity.kilometre_per_hour + -2 + + + Kilometer per hour with a resolution of + 0.01 + C2 + uint16 + org.bluetooth.unit.velocity.kilometre_per_hour + -2 + + + Meters with a resolution of + 1 + C3 + uint24 + org.bluetooth.unit.length.metre + + + Percent with a resolution of + 0.1 + C4 + sint16 + org.bluetooth.unit.percentage + -1 + + + Degree with a resolution of + 0.1 + C4 + sint16 + org.bluetooth.unit.plane_angle.degree + -1 + + + Meters with a resolution of + 0.1 + C5 + uint16 + org.bluetooth.unit.length.metre + -1 + + + Meters with a resolution of + 0.1 + C5 + uint16 + org.bluetooth.unit.length.metre + -1 + + + Kilometer per minute with a resolution of + 0.1 + C6 + uint8 + org.bluetooth.unit.velocity.kilometre_per_minute + -1 + + + Kilometer per minute with a resolution of + 0.1 + C7 + uint8 + org.bluetooth.unit.velocity.kilometre_per_minute + -1 + + + Kilo Calorie with a resolution of + 1 + C8 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C8 + uint16 + org.bluetooth.unit.energy.kilogram_calorie + + + Kilo Calorie with a resolution of + 1 + C8 + uint8 + org.bluetooth.unit.energy.kilogram_calorie + + + Beats per minute with a resolution of + 1 + C9 + uint8 + org.bluetooth.unit.period.beats_per_minute + + + Metabolic Equivalent with a resolution of + 0.1 + C10 + uint8 + org.bluetooth.unit.metabolic_equivalent + + + Second with a resolution of + 1 + C11 + uint16 + org.bluetooth.unit.time.second + + + Second with a resolution of + 1 + C12 + uint16 + org.bluetooth.unit.time.second + + + Newton with a resolution of + 1 + C13 + sint16 + org.bluetooth.unit.force.newton + + + Watts with a resolution of + 1 + C13 + sint16 + org.bluetooth.unit.power.watt + + + The fields in the above table, reading from top to bottom, + are shown in the order of LSO to MSO, where LSO = Least + Significant Octet and MSO = Most Significant Octet. The Least + Significant Octet represents the eight bits numbered 0 to + 7. + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.two_zone_heart_rate_limits.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.two_zone_heart_rate_limits.xml new file mode 100644 index 0000000..e7028c8 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.two_zone_heart_rate_limits.xml @@ -0,0 +1,11 @@ + + + + + uint8 + org.bluetooth.unit.period.beats_per_minute + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.udi_for_medical_devices.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.udi_for_medical_devices.xml new file mode 100644 index 0000000..636777e --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.udi_for_medical_devices.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + utf8s + C0 + + + utf8s + C1 + + + utf8s + C2 + + + utf8s + C3 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voc_concentration.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voc_concentration.xml new file mode 100644 index 0000000..c0f1471 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voc_concentration.xml @@ -0,0 +1,11 @@ + + + + + uint16 + org.bluetooth.unit.ppb + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage.xml new file mode 100644 index 0000000..7154810 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage.xml @@ -0,0 +1,14 @@ + + + + + uint16 + -6 + org.bluetooth.unit.electric_potential_difference.volt + 0.0 + 1022.0 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage_frequency.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage_frequency.xml new file mode 100644 index 0000000..694b26b --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage_frequency.xml @@ -0,0 +1,13 @@ + + + + + uint16 + org.bluetooth.unit.hertz + 1 + 65533 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage_specification.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage_specification.xml new file mode 100644 index 0000000..cbbe0c0 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage_specification.xml @@ -0,0 +1,16 @@ + + + + + org.bluetooth.characteristic.voltage + + + org.bluetooth.characteristic.voltage + + + org.bluetooth.characteristic.voltage + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage_statistics.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage_statistics.xml new file mode 100644 index 0000000..0b85e01 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.voltage_statistics.xml @@ -0,0 +1,22 @@ + + + + + org.bluetooth.characteristic.voltage + + + org.bluetooth.characteristic.voltage + + + org.bluetooth.characteristic.voltage + + + org.bluetooth.characteristic.voltage + + + org.bluetooth.characteristic.time_exponential_8 + + + diff --git a/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.volume_flow.xml b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.volume_flow.xml new file mode 100644 index 0000000..9f45fc5 --- /dev/null +++ b/src/main/resources/gatt/characteristic/org.bluetooth.characteristic.volume_flow.xml @@ -0,0 +1,14 @@ + + + + + uint16 + -3 + org.bluetooth.unit.volume_flow.litre_per_second + 0 + 65534 + + + diff --git a/src/main/resources/gatt/service/org.bluetooth.service.fitness_machine.xml b/src/main/resources/gatt/service/org.bluetooth.service.fitness_machine.xml new file mode 100644 index 0000000..d5f3727 --- /dev/null +++ b/src/main/resources/gatt/service/org.bluetooth.service.fitness_machine.xml @@ -0,0 +1,378 @@ + + + + + This service exposes training-related data in the + sports and fitness environment, which allows a Server (e.g., a + fitness machine) to send training-related data to a + Client. + The Fitness Machine Service (FTMS) exposes + training-related data in the sports and fitness environment, + which allows a Client to collect training data while a user is + exercising with a fitness machine (Server). + + + This service has no dependencies on other + GATT-based services. + + + + Mandatory + + Mandatory + C.1 + Optional + + C1: Mandatory if the Fitness Machine Control Point is + supported, otherwise Optional. + + true + true + true + + + + Mandatory + + Mandatory + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + + + + Optional + + Excluded + Excluded + Excluded + Excluded + Excluded + Mandatory + Excluded + Excluded + Excluded + + + + + Mandatory + + Mandatory + Mandatory + + + + + + Optional + + Excluded + Excluded + Excluded + Excluded + Excluded + Mandatory + Excluded + Excluded + Excluded + + + + + Mandatory + + Mandatory + Mandatory + + + + + + Optional + + Excluded + Excluded + Excluded + Excluded + Excluded + Mandatory + Excluded + Excluded + Excluded + + + + + Mandatory + + Mandatory + Mandatory + + + + + + Optional + + Excluded + Excluded + Excluded + Excluded + Excluded + Mandatory + Excluded + Excluded + Excluded + + + + + Mandatory + + Mandatory + Mandatory + + + + + + Optional + + Excluded + Excluded + Excluded + Excluded + Excluded + Mandatory + Excluded + Excluded + Excluded + + + + + Mandatory + + Mandatory + Mandatory + + + + + + Optional + + Excluded + Excluded + Excluded + Excluded + Excluded + Mandatory + Excluded + Excluded + Excluded + + + + + Mandatory + + Mandatory + Mandatory + + + + + + Optional + + Mandatory + Excluded + Excluded + Excluded + Excluded + Mandatory + Excluded + Excluded + Excluded + + + + + Mandatory + + Mandatory + Mandatory + + + + + + C1 + + C1: Mandatory if the Speed Target Setting + feature is supported; otherwise Optional. + Mandatory + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + + + + C2 + + C2: Mandatory if the Inclination Target + Setting feature is supported; otherwise + Optional. + Mandatory + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + + + + C3 + + C3: Mandatory if the Resistance Target + Setting feature is supported; otherwise + Optional. + Mandatory + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + + + + C4 + + C4: Mandatory if the Power Target Setting + feature is supported; otherwise Optional. + Mandatory + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + + + + C5 + + C5: Mandatory if the Heart Rate Target + Setting feature is supported; otherwise + Optional. + Mandatory + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + Excluded + + + + Optional + + Excluded + Mandatory + Excluded + Excluded + Excluded + Excluded + Mandatory + Excluded + Excluded + + + + + Mandatory + + Mandatory + Mandatory + + + + + + C6 + + C6: Mandatory if the Fitness Machine + Control Point is supported; otherwise + Optional. + Excluded + Excluded + Excluded + Excluded + Excluded + Mandatory + Excluded + Excluded + Excluded + + + + + Mandatory + + Mandatory + Mandatory + + + + + + diff --git a/src/test/java/org/openhab/bluetooth/gattparser/FieldHolderTest.java b/src/test/java/org/openhab/bluetooth/gattparser/FieldHolderTest.java index 69062e0..a00d857 100644 --- a/src/test/java/org/openhab/bluetooth/gattparser/FieldHolderTest.java +++ b/src/test/java/org/openhab/bluetooth/gattparser/FieldHolderTest.java @@ -60,6 +60,24 @@ public void testGetField() throws Exception { assertEquals(field, fieldHolder.getField()); } + @Test + public void testGetBigDecimalExactDecimalScaling() { + // 1234 * 10^-2 must be exactly 12.34, not 12.340000000000000... — the BigDecimal path + // uses scaleByPowerOfTen, not Math.pow(10, e). + FieldHolder fieldHolder = new FieldHolder(field, 1234); + mockField(-2, null, null, null); + assertEquals(0, fieldHolder.getBigDecimal(null).compareTo(new java.math.BigDecimal("12.34"))); + assertEquals("12.34", fieldHolder.getBigDecimal(null).stripTrailingZeros().toPlainString()); + } + + @Test + public void testGetBigDecimalExactBinaryScaling() { + // 32768 * 2^-6 = 512 exactly (e.g. the GATT Voltage characteristic, 1/64 V resolution). + FieldHolder fieldHolder = new FieldHolder(field, 32768); + mockField(null, -6, null, null); + assertEquals(0, fieldHolder.getBigDecimal(null).compareTo(new java.math.BigDecimal("512"))); + } + @Test public void testIsNumber() throws Exception { FieldHolder fieldHolder = new FieldHolder(field, new Object()); diff --git a/src/test/java/org/openhab/bluetooth/gattparser/GenericCharacteristicParserTest.java b/src/test/java/org/openhab/bluetooth/gattparser/GenericCharacteristicParserTest.java index e76c36a..1a8a6b2 100644 --- a/src/test/java/org/openhab/bluetooth/gattparser/GenericCharacteristicParserTest.java +++ b/src/test/java/org/openhab/bluetooth/gattparser/GenericCharacteristicParserTest.java @@ -238,6 +238,46 @@ public void testParseComplex() { } + @Test + public void testParseRepeatedFieldToEnd() { + when(twosComplementNumberFormatter.deserializeInteger(Matchers.any(), anyInt(), anyBoolean())).thenReturn(7); + // 4 bytes = two uint16 elements; repeats == 0 means consume to the end of the data. + byte[] data = new byte[] {1, 0, 2, 0}; + + List fields = new ArrayList<>(); + fields.add(MockUtils.mockRepeatedFieldFormat("RR-Interval", "uint16", 0)); + when(reader.getFields(characteristic)).thenReturn(fields); + when(characteristic.getValue().getFields()).thenReturn(fields); + when(characteristic.isValidForRead()).thenReturn(true); + + LinkedHashMap result = parser.parse(characteristic, data); + + assertEquals(2, result.size()); + assertTrue(result.containsKey("RR-Interval[0]")); + assertTrue(result.containsKey("RR-Interval[1]")); + verify(twosComplementNumberFormatter, times(1)).deserializeInteger(BitSet.valueOf(data).get(0, 16), 16, false); + verify(twosComplementNumberFormatter, times(1)).deserializeInteger(BitSet.valueOf(data).get(16, 32), 16, false); + } + + @Test + public void testParseRepeatedFieldFixedCount() { + when(twosComplementNumberFormatter.deserializeInteger(Matchers.any(), anyInt(), anyBoolean())).thenReturn(3); + // 3 bytes present, but the field is fixed at exactly 2 uint8 occurrences. + byte[] data = new byte[] {10, 20, 30}; + + List fields = new ArrayList<>(); + fields.add(MockUtils.mockRepeatedFieldFormat("Sample", "uint8", 2)); + when(reader.getFields(characteristic)).thenReturn(fields); + when(characteristic.getValue().getFields()).thenReturn(fields); + when(characteristic.isValidForRead()).thenReturn(true); + + LinkedHashMap result = parser.parse(characteristic, data); + + assertEquals(2, result.size()); + assertTrue(result.containsKey("Sample[0]")); + assertTrue(result.containsKey("Sample[1]")); + } + @Test public void testParseComplexWithReferences() { when(twosComplementNumberFormatter.deserializeInteger(Matchers.any(), eq(8), eq(false))).thenReturn(10); diff --git a/src/test/java/org/openhab/bluetooth/gattparser/MockUtils.java b/src/test/java/org/openhab/bluetooth/gattparser/MockUtils.java index 3847d2d..2b4dd57 100644 --- a/src/test/java/org/openhab/bluetooth/gattparser/MockUtils.java +++ b/src/test/java/org/openhab/bluetooth/gattparser/MockUtils.java @@ -115,6 +115,13 @@ public static Field mockFieldFormat(String name, String format, String... requir return field; } + public static Field mockRepeatedFieldFormat(String name, String format, int repeats) { + Field field = mockFieldFormat(name, format); + when(field.getRepeats()).thenReturn(repeats); + when(field.isRepeated()).thenReturn(true); + return field; + } + public static Enumeration mockEnumeration(Integer key, String flag) { Enumeration enumeration = mock(Enumeration.class); when(enumeration.getKey()).thenReturn(BigInteger.valueOf(key)); diff --git a/src/test/java/org/openhab/bluetooth/gattparser/num/IEEE11073FloatingPointNumberFormatterTest.java b/src/test/java/org/openhab/bluetooth/gattparser/num/IEEE11073FloatingPointNumberFormatterTest.java index f7de341..5075423 100644 --- a/src/test/java/org/openhab/bluetooth/gattparser/num/IEEE11073FloatingPointNumberFormatterTest.java +++ b/src/test/java/org/openhab/bluetooth/gattparser/num/IEEE11073FloatingPointNumberFormatterTest.java @@ -83,24 +83,42 @@ public void testDeserializeFloat() throws Exception { formatter.deserializeFloat(BitSet.valueOf(new long[]{IEEE11073FloatingPointNumberFormatter.FLOAT_POSITIVE_INFINITY})), 0.0); } - @Test(expected = IllegalStateException.class) + @Test public void testDeserializeDouble() throws Exception { - formatter.deserializeDouble(BitSet.valueOf(new long[]{0b10L})); + // No 64-bit IEEE-11073 form: deserializeDouble decodes the 32-bit FLOAT as a Double. + assertEquals(36.4, + formatter.deserializeDouble(BitSet.valueOf(new long[]{0b11111111000000000000000101101100})), 0.00001); } - @Test(expected = IllegalStateException.class) + @Test public void testSerializeSFloat() { - formatter.serializeSFloat(0.0F); + for (float v : new float[] {0.0F, 36.4F, -36.4F, 364F, -364F, 3.64F, 0.001F, -3640F}) { + float back = formatter.deserializeSFloat(formatter.serializeSFloat(v)); + assertEquals("SFLOAT round-trip " + v, v, back, Math.max(0.001, Math.abs(v) * 0.001)); + } + } + + @Test + public void testSerializeSFloatSpecialValues() { + assertEquals(Float.NaN, formatter.deserializeSFloat(formatter.serializeSFloat(Float.NaN)), 0.0); + assertEquals(Float.POSITIVE_INFINITY, + formatter.deserializeSFloat(formatter.serializeSFloat(Float.POSITIVE_INFINITY)), 0.0); + assertEquals(Float.NEGATIVE_INFINITY, + formatter.deserializeSFloat(formatter.serializeSFloat(Float.NEGATIVE_INFINITY)), 0.0); } - @Test(expected = IllegalStateException.class) + @Test public void testSerializeFloat() { - formatter.serializeFloat(0.0F); + for (float v : new float[] {0.0F, 36.4F, -36.4F, 364F, -364F, 3.64F, 12345.678F, -3640F}) { + float back = formatter.deserializeFloat(formatter.serializeFloat(v)); + assertEquals("FLOAT round-trip " + v, v, back, Math.max(0.001, Math.abs(v) * 0.001)); + } } - @Test(expected = IllegalStateException.class) + @Test public void testSerializeDouble() { - formatter.serializeDouble(0.0); + double back = formatter.deserializeDouble(formatter.serializeDouble(36.4)); + assertEquals(36.4, back, 0.001); } diff --git a/src/test/java/org/openhab/bluetooth/gattparser/spec/FieldFormatTest.java b/src/test/java/org/openhab/bluetooth/gattparser/spec/FieldFormatTest.java index 6725508..bcd863f 100644 --- a/src/test/java/org/openhab/bluetooth/gattparser/spec/FieldFormatTest.java +++ b/src/test/java/org/openhab/bluetooth/gattparser/spec/FieldFormatTest.java @@ -33,6 +33,9 @@ public void testValueOf() throws Exception { assertFieldType("float64", FieldType.FLOAT_IEE754, 64, FieldFormat.valueOf("fLoAt64")); assertFieldType("SFLOAT", FieldType.FLOAT_IEE11073, 16, FieldFormat.valueOf("SFLOAT")); assertFieldType("FLOAT", FieldType.FLOAT_IEE11073, 32, FieldFormat.valueOf("FLOAT")); + // GSS aliases for the IEEE-11073 floats. + assertFieldType("medfloat16", FieldType.FLOAT_IEE11073, 16, FieldFormat.valueOf("meDFloat16")); + assertFieldType("medfloat32", FieldType.FLOAT_IEE11073, 32, FieldFormat.valueOf("meDFloat32")); //assertFieldType("duint16", FieldType.UINT, 16, FieldFormat.valueOf("duint16")); assertFieldType("utf8s", FieldType.UTF8S, FieldFormat.FULL_SIZE, FieldFormat.valueOf("uTf8s")); assertFieldType("utf16s", FieldType.UTF16S, FieldFormat.FULL_SIZE, FieldFormat.valueOf("Utf16s"));