LegacyAdvertisingSetParameters

class LegacyAdvertisingSetParameters(val connectable: Boolean, val discoverable: Boolean = connectable, val interval: Duration = AdvertisingInterval.MEDIUM, val txPowerLevel: Int = TxPowerLevel.MEDIUM) : AdvertisingSetParameters

The advertising parameters for legacy advertising.

The maximum advertising packet length is 31 bytes and data are sent using PHY 1M.

Parameters

connectable

Whether the advertisement will be connectable and scannable.

discoverable

Whether the General Discoverable flag should be added to the scannable or connectable advertisement. By default, a connectable advertisements will be discoverable. Devices connecting to non-discoverable advertisements cannot initiate bonding. This flag is ignored for non-scannable and non-connectable advertisements.

interval

The advertising interval, in range 20 ms - 10.24 sec. Use AdvertisingInterval for recommended values.

txPowerLevel

The requested TX power level for advertising. The actual TX power level may be different, depending on the hardware and implementation. Use TxPowerLevel for recommended values.

Constructors

Link copied to clipboard
constructor(connectable: Boolean, discoverable: Boolean = connectable, interval: Duration = AdvertisingInterval.MEDIUM, txPowerLevel: Int = TxPowerLevel.MEDIUM)

Properties

Link copied to clipboard

Whether the advertisement will be connectable.

Link copied to clipboard

Whether the General Discoverable flag should be added to the scannable or connectable advertisement. By default, a connectable advertisements will be discoverable. Devices connecting to non-discoverable advertisements cannot initiate bonding. This flag is ignored for non-scannable and non-connectable advertisements.

Link copied to clipboard
Link copied to clipboard

The requested TX power level for advertising. The actual TX power level may be different, depending on the hardware and implementation.