pub struct BleDeviceInfo {
Show 13 fields pub ble_support: bool, pub id: String, pub name: String, pub bluetooth_on: bool, pub adv_extended: bool, pub adv_extended_bytes: u32, pub le_2m: bool, pub le_coded: bool, pub le_audio: bool, pub le_periodic_adv_support: bool, pub le_multiple_adv_support: bool, pub offload_filter_support: bool, pub offload_scan_batching_support: bool,
}
Expand description

BLE device information

Fields

ble_support: bool

Check if Bluetooth / Bluetooth Low Energy is supported

Android: check if a bluetooth adapter is found

id: String

Bluetooth device address 48 bit unique Bluetooth device addr e.g. 80:86:F2:08:C7:98

Android: BluetoothAdapter getAddress() https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothAdapter#getAddress()

name: String

Get Bluetooth Name this is field is purely informative

Android: BluetoothAdapter getName() https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothAdapter#getName()

bluetooth_on: bool

Bluetooth is enable / powered on

Android: BluetoothAdapter isEnabled() https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothAdapter#isEnabled()

adv_extended: bool

Is extended advertisement supported?

Android: BluetoothAdapter isLeExtendedAdvertisingSupported () https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isLeExtendedAdvertisingSupported()

adv_extended_bytes: u32

what is the maximal amount of bytes sendable via advertising?

Android: BluetoothAdapter getLeMaximumAdvertisingDataLength() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#getLeMaximumAdvertisingDataLength()

le_2m: bool

Is 2M phy supported?

Android: BluetoothAdapter isLe2MPhySupported() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isLe2MPhySupported()

le_coded: bool

is extended advertising supported in coded mode? (For long distance connections)

Android: BluetoothAdapter isLeCodedPhySupported() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isLeCodedPhySupported()

le_audio: bool

is LE audio supported?

This is the most recent BLE feature, supported on:

  • android 12 and above
  • linux ?
  • ios ?
  • macos ?
  • windows ?

Android: AndroidAdapter isLeAudioSupported() https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothAdapter#isLeAudioSupported()

le_periodic_adv_support: bool

is periodic advertisment supported?

Android: BluetoothAdapter isLePeriodicAdvertisingSupported() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isLePeriodicAdvertisingSupported()

le_multiple_adv_support: bool

Is multi advertisement supported?

When multi advertisement is supported one can have different advertisement types parallely. Each advertisement has a different device address. For scanning devices it looks, as if multiple devices devices would advertise themselves. This is helpful to support several incompatible advertisement modes at the same time.

Android: BluetoothAdapter isMultipleAdvertisementSupported() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isMultipleAdvertisementSupported()

offload_filter_support: bool

Android Specific: is Offloaded Filtering Supported?

Android: BluetoothAdapter isOffloadedFilteringSupported()

offload_scan_batching_support: bool

Android Specific: is Offloaded Scan Batching Supported?

Android: BluetoothAdapter isOffloadedScanBatchingSupported() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isOffloadedScanBatchingSupported()

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns the encoded length of the message without a length delimiter.

Clears the message, resetting all fields to their default.

Encodes the message to a buffer. Read more

Encodes the message to a newly allocated buffer.

Encodes the message with a length-delimiter to a buffer. Read more

Encodes the message with a length-delimiter to a newly allocated buffer.

Decodes an instance of the message from a buffer. Read more

Decodes a length-delimited instance of the message from the buffer.

Decodes an instance of the message from a buffer, and merges it into self. Read more

Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.