This module includes the platform abstraction for BLE Host communication. The platform needs to implement Bluetooth LE 4.2 or higher. More...
Data Structures | |
struct | otPlatBleDeviceAddr |
struct | otPlatBleGapConnParams |
union | otPlatBleUuidValue |
struct | otPlatBleUuid |
struct | otPlatBleGattCharacteristic |
struct | otPlatBleGattDescriptor |
struct | otBleRadioPacket |
Typedefs | |
typedef enum otPlatBleAddressType | otPlatBleAddressType |
typedef enum otPlatBleCccdFlags | otPlatBleCccdFlags |
typedef struct otPlatBleDeviceAddr | otPlatBleDeviceAddr |
typedef enum otPlatBleAdvMode | otPlatBleAdvMode |
typedef struct otPlatBleGapConnParams | otPlatBleGapConnParams |
typedef enum otPlatBleUuidType | otPlatBleUuidType |
typedef union otPlatBleUuidValue | otPlatBleUuidValue |
typedef struct otPlatBleUuid | otPlatBleUuid |
typedef struct otPlatBleGattCharacteristic | otPlatBleGattCharacteristic |
typedef struct otPlatBleGattDescriptor | otPlatBleGattDescriptor |
typedef struct otBleRadioPacket | otBleRadioPacket |
This module includes the platform abstraction for BLE Host communication. The platform needs to implement Bluetooth LE 4.2 or higher.
typedef struct otBleRadioPacket otBleRadioPacket |
This structure represents an BLE packet.
typedef enum otPlatBleAddressType otPlatBleAddressType |
This enum represents BLE Device Address types.
typedef enum otPlatBleAdvMode otPlatBleAdvMode |
This enumeration defines flags for BLE advertisement mode.
typedef enum otPlatBleCccdFlags otPlatBleCccdFlags |
This enumeration defines the characterstic properties flags for a Client Characteristic Configuration Descriptor (CCCD).
See v4.2 [Vol 3, Part G] 3.3.1.1 Characteristic Properties - Table 3.5
typedef struct otPlatBleDeviceAddr otPlatBleDeviceAddr |
This structure represents BLE Device Address.
typedef struct otPlatBleGapConnParams otPlatBleGapConnParams |
This structure represents BLE connection parameters.
typedef struct otPlatBleGattCharacteristic otPlatBleGattCharacteristic |
This structure represents GATT Characteristic.
typedef struct otPlatBleGattDescriptor otPlatBleGattDescriptor |
This structure represents GATT Descriptor.
typedef struct otPlatBleUuid otPlatBleUuid |
This structure represents BLE UUID.
typedef enum otPlatBleUuidType otPlatBleUuidType |
This enumeration represents BLE UUID value.
typedef union otPlatBleUuidValue otPlatBleUuidValue |
This structure represents BLE UUID value.
anonymous enum |
enum otPlatBleAddressType |
This enum represents BLE Device Address types.
enum otPlatBleAdvMode |
enum otPlatBleCccdFlags |
This enumeration defines the characterstic properties flags for a Client Characteristic Configuration Descriptor (CCCD).
See v4.2 [Vol 3, Part G] 3.3.1.1 Characteristic Properties - Table 3.5
enum otPlatBleUuidType |
otError otPlatBleDisable | ( | otInstance * | aInstance | ) |
Disable the Bluetooth Low Energy radio.
When disabled, the BLE stack will flush event queues and not generate new events. The BLE peripheral is turned off or put into a low power sleep state. Any dynamic memory used by the stack should be released, but static memory may remain reserved.
[in] | aInstance | The OpenThread instance structure. |
OT_ERROR_NONE | Successfully transitioned to disabled. |
OT_ERROR_FAILED | The BLE radio could not be disabled. |
otError otPlatBleEnable | ( | otInstance * | aInstance | ) |
Enable the Bluetooth Low Energy radio.
[in] | aInstance | The OpenThread instance structure. |
OT_ERROR_NONE | Successfully enabled. |
OT_ERROR_FAILED | The BLE radio could not be enabled. |
otError otPlatBleGapAddressGet | ( | otInstance * | aInstance, |
otPlatBleDeviceAddr * | aAddress | ||
) |
Gets Bluetooth Device Address.
[in] | aInstance | The OpenThread instance structure. |
[out] | aAddress | The pointer to Bluetooth Device Address. |
OT_ERROR_NONE | Request has been successfully done. |
OT_ERROR_INVALID_ARGS | Invalid parameters has been supplied. |
otError otPlatBleGapAddressSet | ( | otInstance * | aInstance, |
const otPlatBleDeviceAddr * | aAddress | ||
) |
Sets Bluetooth Device Address.
[in] | aInstance | The OpenThread instance structure. |
[in] | aAddress | The pointer to Bluetooth Device Address. |
OT_ERROR_NONE | Request has been successfully done. |
OT_ERROR_INVALID_ARGS | Invalid parameters has been supplied. |
otError otPlatBleGapAdvDataSet | ( | otInstance * | aInstance, |
const uint8_t * | aAdvData, | ||
uint8_t | aAdvDataLength | ||
) |
Sets BLE Advertising packet content.
[in] | aInstance | The OpenThread instance structure. |
[in] | aAdvData | A pointer to advertising data content in raw format. |
[in] | aAdvDataLength | The size of advertising data. Shall not exceed OT_BLE_ADV_DATA_MAX_LENGTH. |
OT_ERROR_NONE | Advertising data has been successfully set. |
OT_ERROR_INVALID_ARGS | Invalid advertising data has been supplied. |
otError otPlatBleGapAdvStart | ( | otInstance * | aInstance, |
uint16_t | aInterval, | ||
uint8_t | aType | ||
) |
Starts BLE Advertising procedure.
The BLE device shall use undirected advertising with no filter applied. A single BLE Advertising packet must be sent on all advertising channels (37, 38 and 39).
[in] | aInstance | The OpenThread instance structure. |
[in] | aInterval | The interval between subsequent advertising packets in OT_BLE_ADV_INTERVAL_UNIT units. Shall be within OT_BLE_ADV_INTERVAL_MIN and OT_BLE_ADV_INTERVAL_MAX range. |
[in] | aType | The advertisement properties as a bitmask: whether it is connectable | scannable. |
OT_ERROR_NONE | Advertising procedure has been started. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid interval value has been supplied. |
otError otPlatBleGapAdvStop | ( | otInstance * | aInstance | ) |
Stops BLE Advertising procedure.
[in] | aInstance | The OpenThread instance structure. |
OT_ERROR_NONE | Advertising procedure has been stopped. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
otError otPlatBleGapConnect | ( | otInstance * | aInstance, |
otPlatBleDeviceAddr * | aAddress, | ||
uint16_t | aInterval, | ||
uint16_t | aWindow | ||
) |
Starts BLE Connection procedure.
[in] | aInstance | The OpenThread instance structure. |
[in] | aAddress | An address of the advertising device. |
[in] | aInterval | The scanning interval in OT_BLE_SCAN_INTERVAL_UNIT units. Shall be in OT_BLE_SCAN_INTERVAL_MIN and OT_BLE_SCAN_INTERVAL_MAX range. |
[in] | aWindow | The scanning window in OT_BLE_SCAN_WINDOW_UNIT units. Shall be in OT_BLE_SCAN_WINDOW_MIN and OT_BLE_SCAN_WINDOW_MAX range. |
OT_ERROR_NONE | Connection procedure has been started. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid address, interval or window value has been supplied. |
otError otPlatBleGapConnParamsSet | ( | otInstance * | aInstance, |
const otPlatBleGapConnParams * | aConnParams | ||
) |
Sets desired BLE Connection Parameters.
[in] | aInstance | The OpenThread instance structure. |
[in] | aConnParams | A pointer to connection parameters structure. |
OT_ERROR_NONE | Connection parameters have been successfully set. |
OT_ERROR_INVALID_ARGS | Invalid connection parameters have been supplied. |
otError otPlatBleGapDisconnect | ( | otInstance * | aInstance | ) |
Disconnects BLE connection.
The BLE device shall indicate the OT_BLE_HCI_REMOTE_USER_TERMINATED HCI code reason.
[in] | aInstance | The OpenThread instance structure. |
OT_ERROR_NONE | Disconnection procedure has been started. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
void otPlatBleGapOnAdvReceived | ( | otInstance * | aInstance, |
otPlatBleDeviceAddr * | aAddress, | ||
otBleRadioPacket * | aPacket | ||
) |
The BLE driver calls this method to notify OpenThread that an advertisement packet has been received.
[in] | aInstance | The OpenThread instance structure. |
[in] | aAddress | An address of the advertising device. |
[in] | aPacket | A pointer to the received packet. |
void otPlatBleGapOnConnected | ( | otInstance * | aInstance, |
uint16_t | aConnectionId | ||
) |
The BLE driver calls this method to notify OpenThread that BLE Device has been connected.
[in] | aInstance | The OpenThread instance structure. |
[in] | aConnectionId | The identifier of the open connection. |
void otPlatBleGapOnDisconnected | ( | otInstance * | aInstance, |
uint16_t | aConnectionId | ||
) |
The BLE driver calls this method to notify OpenThread that the BLE Device has been disconnected.
[in] | aInstance | The OpenThread instance structure. |
[in] | aConnectionId | The identifier of the closed connection. |
void otPlatBleGapOnScanRespReceived | ( | otInstance * | aInstance, |
otPlatBleDeviceAddr * | aAddress, | ||
otBleRadioPacket * | aPacket | ||
) |
The BLE driver calls this method to notify OpenThread that a scan response packet has been received.
[in] | aInstance | The OpenThread instance structure. |
[in] | aAddress | An address of the advertising device. |
[in] | aPacket | A pointer to the received packet. |
otError otPlatBleGapScanResponseSet | ( | otInstance * | aInstance, |
const uint8_t * | aScanResponse, | ||
uint8_t | aScanResponseLength | ||
) |
Sets BLE Scan Response packet content.
[in] | aInstance | The OpenThread instance structure. |
[in] | aScanResponse | A pointer to scan response data in raw format. |
[in] | aScanResponseLength | The size of scan response data. Shall not exceed OT_BLE_SCAN_RESPONSE_MAX_LENGTH. |
OT_ERROR_NONE | Scan response data has been successfully set. |
OT_ERROR_INVALID_ARGS | Invalid scan response data has been supplied. |
otError otPlatBleGapScanStart | ( | otInstance * | aInstance, |
uint16_t | aInterval, | ||
uint16_t | aWindow | ||
) |
Starts BLE Scanning procedure.
[in] | aInstance | The OpenThread instance structure. |
[in] | aInterval | The scanning interval in OT_BLE_SCAN_INTERVAL_UNIT units. Shall be in OT_BLE_SCAN_INTERVAL_MIN and OT_BLE_SCAN_INTERVAL_MAX range. |
[in] | aWindow | The scanning window in OT_BLE_SCAN_WINDOW_UNIT units. Shall be in OT_BLE_SCAN_WINDOW_MIN and OT_BLE_SCAN_WINDOW_MAX range. |
OT_ERROR_NONE | Scanning procedure has been started. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid interval or window value has been supplied. |
otError otPlatBleGapScanStop | ( | otInstance * | aInstance | ) |
Stops BLE Scanning procedure.
[in] | aInstance | The OpenThread instance structure. |
OT_ERROR_NONE | Scanning procedure has been stopped. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
otError otPlatBleGapServiceSet | ( | otInstance * | aInstance, |
const char * | aDeviceName, | ||
uint16_t | aAppearance | ||
) |
Sets BLE device name and appearance that is visible as GATT Based service.
The BLE Host stack should set the security mode 1, level 1 (no security) for those characteristics.
[in] | aInstance | The OpenThread instance structure. |
[in] | aDeviceName | A pointer to device name string (null terminated). Shall not exceed OT_BLE_DEV_NAME_MAX_LENGTH. |
[in] | aAppearance | The value of appearance characteristic. |
OT_ERROR_NONE | Connection parameters have been successfully set. |
OT_ERROR_INVALID_ARGS | Invalid parameters has been supplied. |
otError otPlatBleGattClientCharacteristicsDiscover | ( | otInstance * | aInstance, |
uint16_t | aStartHandle, | ||
uint16_t | aEndHandle | ||
) |
Performs GATT Characteristic Discovery of a service.
[in] | aInstance | The OpenThread instance structure. |
[in] | aStartHandle | The start handle of a service. |
[in] | aEndHandle | The end handle of a service. |
OT_ERROR_NONE | Characteristic Discovery procedure has been started. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid start or end handle has been provided. |
OT_ERROR_NO_BUFS | No available internal buffer found. |
otError otPlatBleGattClientDescriptorsDiscover | ( | otInstance * | aInstance, |
uint16_t | aStartHandle, | ||
uint16_t | aEndHandle | ||
) |
Performs GATT Descriptor Discovery.
[in] | aInstance | The OpenThread instance structure. |
[in] | aStartHandle | The start handle. |
[in] | aEndHandle | The end handle. |
OT_ERROR_NONE | Descriptor Discovery procedure has been started. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid start or end handle has been provided. |
OT_ERROR_NO_BUFS | No available internal buffer found. |
otError otPlatBleGattClientMtuExchangeRequest | ( | otInstance * | aInstance, |
uint16_t | aMtu | ||
) |
Sends Exchange MTU Request.
[in] | aInstance | The OpenThread instance structure. |
[in] | aMtu | A value of GATT Client receive MTU size. |
OT_ERROR_NONE | Exchange MTU Request has been sent. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid aMtu has been provided. |
OT_ERROR_NO_BUFS | No available internal buffer found. |
void otPlatBleGattClientOnCharacteristicsDiscoverDone | ( | otInstance * | aInstance, |
otPlatBleGattCharacteristic * | aChars, | ||
uint16_t | aCount, | ||
otError | aError | ||
) |
The BLE driver calls this method to notify OpenThread that GATT Characteristic Discovery of a service has been done.
In case of success, all elements inside aChars
should have a valid mHandleValue value.
[in] | aInstance | The OpenThread instance structure. |
[in] | aChars | A pointer to discovered characteristic list. |
[in] | aCount | Number of characteristics in aChar list. |
[in] | aError | The value of OT_ERROR_NONE indicates that at least one characteristic has been found and the total number of them is stored in aCount . OT_ERROR_NOT_FOUND error should be set if no charactertistics are found. Otherwise error indicates the reason of failure is used. |
void otPlatBleGattClientOnDescriptorsDiscoverDone | ( | otInstance * | aInstance, |
otPlatBleGattDescriptor * | aDescs, | ||
uint16_t | aCount, | ||
otError | aError | ||
) |
The BLE driver calls this method to notify OpenThread that GATT Descriptor Discovery has been done.
[in] | aInstance | The OpenThread instance structure. |
[in] | aDescs | A pointer to discovered descriptor list. |
[in] | aCount | Number of descriptors in aDescs list. |
[in] | aError | The value of OT_ERROR_NONE indicates that at least one descriptor has been found and the total number of them is stored in aCount . OT_ERROR_NOT_FOUND error should be set if no descriptors are found. Otherwise error indicates the reason of failure is used. |
void otPlatBleGattClientOnIndication | ( | otInstance * | aInstance, |
uint16_t | aHandle, | ||
otBleRadioPacket * | aPacket | ||
) |
The BLE driver calls this method to notify OpenThread that an ATT Handle Value Indication has been received.
[in] | aInstance | The OpenThread instance structure. |
[in] | aHandle | The handle on which ATT Handle Value Indication has been sent. |
[in] | aPacket | A pointer to the packet contains indicated value. |
void otPlatBleGattClientOnMtuExchangeResponse | ( | otInstance * | aInstance, |
uint16_t | aMtu, | ||
otError | aError | ||
) |
The BLE driver calls this method to notify OpenThread that Exchange MTU Response has been received.
[in] | aInstance | The OpenThread instance structure. |
[in] | aMtu | Attribute server receive MTU size. |
[in] | aError | The value of OT_ERROR_NONE indicates that valid Exchange MTU Response has been received. Otherwise error indicates the reason of failure is used. |
void otPlatBleGattClientOnReadResponse | ( | otInstance * | aInstance, |
otBleRadioPacket * | aPacket | ||
) |
The BLE driver calls this method to notify OpenThread that ATT Read Response packet has been received.
This method is called only if otPlatBleGattClientRead
was previously requested.
[in] | aInstance | The OpenThread instance structure. |
[in] | aPacket | A pointer to the packet contains read value. |
void otPlatBleGattClientOnServiceDiscovered | ( | otInstance * | aInstance, |
uint16_t | aStartHandle, | ||
uint16_t | aEndHandle, | ||
uint16_t | aServiceUuid, | ||
otError | aError | ||
) |
The BLE driver calls this method to notify OpenThread that the next entry from GATT Primary Service Discovery has been found.
[in] | aInstance | The OpenThread instance structure. |
[in] | aStartHandle | The start handle of a service. |
[in] | aEndHandle | The end handle of a service. |
[in] | aServiceUuid | The Uuid16 for the service entry. |
[in] | aError | The value of OT_ERROR_NONE indicates that service has been found and structure aStartHandle and aEndHandle contain valid handles. OT_ERROR_NOT_FOUND error should be set if service has not been found. Otherwise error indicates the reason of failure is used. |
void otPlatBleGattClientOnSubscribeResponse | ( | otInstance * | aInstance, |
uint16_t | aHandle | ||
) |
The BLE driver calls this method to notify OpenThread that subscribe response has been received.
This method is called only if otPlatBleGattClienSubscribe
was previously requested.
[in] | aInstance | The OpenThread instance structure. |
[in] | aHandle | The handle on which ATT Write Response has been sent. |
void otPlatBleGattClientOnWriteResponse | ( | otInstance * | aInstance, |
uint16_t | aHandle | ||
) |
The BLE driver calls this method to notify OpenThread that ATT Write Response packet has been received.
This method is called only if otPlatBleGattClientWrite
was previously requested.
[in] | aInstance | The OpenThread instance structure. |
[in] | aHandle | The handle on which ATT Write Response has been sent. |
otError otPlatBleGattClientRead | ( | otInstance * | aInstance, |
uint16_t | aHandle | ||
) |
Sends ATT Read Request.
[in] | aInstance | The OpenThread instance structure. |
[in] | aHandle | The handle of the attribute to be read. |
OT_ERROR_NONE | ATT Write Request has been sent. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid handle value has been supplied. |
OT_ERROR_NO_BUFS | No available internal buffer found. |
otError otPlatBleGattClientServiceDiscover | ( | otInstance * | aInstance, |
const otPlatBleUuid * | aUuid | ||
) |
Performs GATT Primary Service Discovery by UUID procedure of specific service.
[in] | aInstance | The OpenThread instance structure. |
[in] | aUuid | The UUID of a service to be registered. |
OT_ERROR_NONE | Service Discovery procedure has been started. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid service UUID has been provided. |
OT_ERROR_NO_BUFS | No available internal buffer found. |
otError otPlatBleGattClientServicesDiscover | ( | otInstance * | aInstance | ) |
Performs GATT Primary Service Discovery of all services available.
[in] | aInstance | The OpenThread instance structure. |
OT_ERROR_NONE | Service Discovery procedure has been started. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid service UUID has been provided. |
OT_ERROR_NO_BUFS | No available internal buffer found. |
otError otPlatBleGattClientSubscribeRequest | ( | otInstance * | aInstance, |
uint16_t | aHandle, | ||
bool | aSubscribing | ||
) |
Subscribes for characteristic indications.
[in] | aInstance | The OpenThread instance structure. |
[in] | aHandle | The handle of the attribute to be written. |
[in] | aSubscribing | True if subscribing, otherwise unsubscribing. |
OT_ERROR_NONE | Subscription has been sent. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid handle value, data or data length has been supplied. |
OT_ERROR_NO_BUFS | No available internal buffer found. |
otError otPlatBleGattClientWrite | ( | otInstance * | aInstance, |
uint16_t | aHandle, | ||
otBleRadioPacket * | aPacket | ||
) |
Sends ATT Write Request.
[in] | aInstance | The OpenThread instance structure. |
[in] | aHandle | The handle of the attribute to be written. |
[in] | aPacket | A pointer to the packet contains value to be written to the attribute. |
OT_ERROR_NONE | ATT Write Request has been sent. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid handle value, data or data length has been supplied. |
OT_ERROR_NO_BUFS | No available internal buffer found. |
otError otPlatBleGattMtuGet | ( | otInstance * | aInstance, |
uint16_t * | aMtu | ||
) |
Reads currently use value of ATT_MTU.
[in] | aInstance | The OpenThread instance structure. |
[out] | aMtu | A pointer contains current ATT_MTU value. |
OT_ERROR_NONE | ATT_MTU value has been placed in aMtu . |
OT_ERROR_FAILED | BLE Device cannot determine its ATT_MTU. |
otError otPlatBleGattServerCharacteristicRegister | ( | otInstance * | aInstance, |
uint16_t | aServiceHandle, | ||
otPlatBleGattCharacteristic * | aChar, | ||
bool | aCccd | ||
) |
Registers GATT Characteristic with maximum length of 128 octets.
[in] | aInstance | The OpenThread instance structure. |
[in] | aServiceHandle | The start handle of a service. |
[in,out] | aChar | As an input parameter the valid mUuid and mProperties have to be provided. In case of success, the value of mValueHandle is filled. |
[in] | aCccd | If set, method has to create Client Characteristic Configuration Descriptor and put its handle into mHandleCccd parameter of aChar . |
OT_ERROR_NONE | Characteristic has been successfully registered. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid service handle or characteristic UUID has been provided. |
OT_ERROR_NO_BUFS | No available internal buffer found. |
otError otPlatBleGattServerIndicate | ( | otInstance * | aInstance, |
uint16_t | aHandle, | ||
otBleRadioPacket * | aPacket | ||
) |
Sends ATT Handle Value Indication.
[in] | aInstance | The OpenThread instance structure. |
[in] | aHandle | The handle of the attribute to be indicated. |
[in] | aPacket | A pointer to the packet contains value to be indicated. |
OT_ERROR_NONE | ATT Handle Value Indication has been sent. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid handle value, data or data length has been supplied. |
OT_ERROR_NO_BUFS | No available internal buffer found. |
void otPlatBleGattServerOnIndicationConfirmation | ( | otInstance * | aInstance, |
uint16_t | aHandle | ||
) |
The BLE driver calls this method to notify OpenThread that an ATT Handle Value Confirmation has been received.
This method is called only if otPlatBleGattServerIndicate
was previously requested.
[in] | aInstance | The OpenThread instance structure. |
[in] | aHandle | The handle on which ATT Handle Value Confirmation has been sent. |
void otPlatBleGattServerOnSubscribeRequest | ( | otInstance * | aInstance, |
uint16_t | aHandle, | ||
bool | aSubscribing | ||
) |
The BLE driver calls this method to notify OpenThread that an ATT Subscription Request packet has been received.
[in] | aInstance | The OpenThread instance structure. |
[in] | aHandle | The handle of the attribute to be written. |
[in] | aSubscribing | True if subscribing, otherwise unsubscribing. |
void otPlatBleGattServerOnWriteRequest | ( | otInstance * | aInstance, |
uint16_t | aHandle, | ||
otBleRadioPacket * | aPacket | ||
) |
The BLE driver calls this method to notify OpenThread that an ATT Write Request packet has been received.
[in] | aInstance | The OpenThread instance structure. |
[in] | aHandle | The handle of the attribute to be written. |
[in] | aPacket | A pointer to the packet contains value to be written to the attribute. |
otError otPlatBleGattServerServiceRegister | ( | otInstance * | aInstance, |
const otPlatBleUuid * | aUuid, | ||
uint16_t * | aHandle | ||
) |
Registers GATT Service.
[in] | aInstance | The OpenThread instance structure. |
[in] | aUuid | The UUID of a service. |
[out] | aHandle | The start handle of a service. |
OT_ERROR_NONE | Service has been successfully registered. |
OT_ERROR_INVALID_STATE | BLE Device is in invalid state. |
OT_ERROR_INVALID_ARGS | Invalid service UUID has been provided. |
OT_ERROR_NO_BUFS | No available internal buffer found. |
otError otPlatBleGattVendorUuidRegister | ( | otInstance * | aInstance, |
const otPlatBleUuid * | aUuid | ||
) |
Registers vendor specific UUID Base.
[in] | aInstance | The OpenThread instance structure. |
[in] | aUuid | A pointer to vendor specific 128-bit UUID Base. |
bool otPlatBleIsEnabled | ( | otInstance * | aInstance | ) |
Check whether Bluetooth Low Energy radio is enabled or not.
[in] | aInstance | The OpenThread instance structure. |
::true | Bluetooth Low Energy radio is enabled. |
::false | Bluetooth Low Energy radio is disabled. |