BlePhy enum

Represents the Bluetooth Low Energy physical layer (PHY) options for a connection.

Different PHYs offer trade-offs between throughput, range, and power consumption. The actual PHY negotiated after a request depends on what both the central and the peripheral support. Requesting a PHY that is unsupported by the peripheral will result in the connection staying on the current PHY.

PHY selection applies to the LE link layer and is available on BLE 5.0+ hardware. On older hardware, the platform may silently ignore the request.

Inheritance
Available extensions

Values

le1m → const BlePhy

1 Mbps Bluetooth Low Energy PHY (LE 1M).

The original and most widely supported BLE PHY. Offers a reliable balance of range and throughput. All BLE 4.0+ devices support LE 1M.

le2m → const BlePhy

2 Mbps Bluetooth Low Energy PHY (LE 2M).

Doubles the data rate compared to LE 1M by reducing the symbol interval. This shortens the time required to transmit the same payload, which is especially valuable for large data transfers such as firmware image delivery.

Range is slightly reduced compared to LE 1M. Requires BLE 5.0+ on both the central and the peripheral.

leCoded → const BlePhy

Coded Bluetooth Low Energy PHY (LE Coded).

Applies forward error correction to extend the effective range at the cost of significantly reduced data throughput. Two coding schemes are defined: S=2 (roughly 500 kbps) and S=8 (roughly 125 kbps). The coding scheme is chosen by the peripheral.

Requires BLE 5.0+ on both the central and the peripheral. Not suitable for high-throughput applications such as OTA firmware transfers.

Properties

hashCode int
The hash code for this object.
no setterinherited
identifier int
The integer identifier used when communicating this PHY over the method channel.
no setter
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromIdentifier(int identifier) BlePhy
Constructs a BlePhy from the integer identifier returned by the platform.

Constants

values → const List<BlePhy>
A constant List of the values in this enum, in order of their declaration.