BLE Host
This module includes the platform abstraction for BLE Host communication.
Summary
The platform needs to implement Bluetooth LE 4.2 or higher.
Typedefs |
|
---|---|
otBleRadioPacket
|
typedefstruct otBleRadioPacket
This structure represents an BLE packet. |
otPlatBleAddressType
|
typedefenum otPlatBleAddressType
This enum represents BLE Device Address types. |
otPlatBleAdvMode
|
typedefenum otPlatBleAdvMode
This enumeration defines flags for BLE advertisement mode. |
otPlatBleCccdFlags
|
typedefenum otPlatBleCccdFlags
This enumeration defines the characterstic properties flags for a Client Characteristic Configuration Descriptor (CCCD). |
otPlatBleDeviceAddr
|
typedefstruct otPlatBleDeviceAddr
This structure represents BLE Device Address. |
otPlatBleGapConnParams
|
typedefstruct otPlatBleGapConnParams
This structure represents BLE connection parameters. |
otPlatBleGattCharacteristic
|
typedefstruct otPlatBleGattCharacteristic
This structure represents GATT Characteristic. |
otPlatBleGattDescriptor
|
typedefstruct otPlatBleGattDescriptor
This structure represents GATT Descriptor. |
otPlatBleGattService
|
typedefstruct otPlatBleGattService
Registration descriptor for a GATT service. |
otPlatBleL2capError
|
typedefenum otPlatBleL2capError
The enum indicates the outcome of the L2CAP connection request procedure. |
otPlatBleUuid
|
typedefstruct otPlatBleUuid
This structure represents BLE UUID. |
otPlatBleUuidType
|
typedefenum otPlatBleUuidType
This enumeration represents BLE UUID value. |
otPlatBleUuidValue
|
typedefunion otPlatBleUuidValue
This structure represents BLE UUID value. |
Functions |
|
---|---|
otPlatBleDisable(otInstance *aInstance)
|
Disable the Bluetooth Low Energy radio.
|
otPlatBleEnable(otInstance *aInstance)
|
Enable the Bluetooth Low Energy radio.
|
otPlatBleGapAddressGet(otInstance *aInstance, otPlatBleDeviceAddr *aAddress)
|
Gets Bluetooth Device Address.
|
otPlatBleGapAddressSet(otInstance *aInstance, const otPlatBleDeviceAddr *aAddress)
|
Sets Bluetooth Device Address.
|
otPlatBleGapAdvDataSet(otInstance *aInstance, const uint8_t *aAdvData, uint8_t aAdvDataLength)
|
Sets BLE Advertising packet content.
|
otPlatBleGapAdvStart(otInstance *aInstance, uint16_t aInterval, uint8_t aType)
|
Starts BLE Advertising procedure.
|
otPlatBleGapAdvStop(otInstance *aInstance)
|
Stops BLE Advertising procedure.
|
otPlatBleGapConnParamsSet(otInstance *aInstance, const otPlatBleGapConnParams *aConnParams)
|
Sets desired BLE Connection Parameters.
|
otPlatBleGapConnect(otInstance *aInstance, otPlatBleDeviceAddr *aAddress, uint16_t aInterval, uint16_t aWindow)
|
Starts BLE Connection procedure.
|
otPlatBleGapDisconnect(otInstance *aInstance)
|
Disconnects BLE connection.
|
otPlatBleGapOnAdvReceived(otInstance *aInstance, otPlatBleDeviceAddr *aAddress, otBleRadioPacket *aPacket)
|
void
The BLE driver calls this method to notify OpenThread that an advertisement packet has been received.
|
otPlatBleGapOnConnected(otInstance *aInstance, uint16_t aConnectionId)
|
void
The BLE driver calls this method to notify OpenThread that BLE Device has been connected.
|
otPlatBleGapOnDisconnected(otInstance *aInstance, uint16_t aConnectionId)
|
void
The BLE driver calls this method to notify OpenThread that the BLE Device has been disconnected.
|
otPlatBleGapOnScanRespReceived(otInstance *aInstance, otPlatBleDeviceAddr *aAddress, otBleRadioPacket *aPacket)
|
void
The BLE driver calls this method to notify OpenThread that a scan response packet has been received.
|
otPlatBleGapScanResponseSet(otInstance *aInstance, const uint8_t *aScanResponse, uint8_t aScanResponseLength)
|
Sets BLE Scan Response packet content.
|
otPlatBleGapScanStart(otInstance *aInstance, uint16_t aInterval, uint16_t aWindow)
|
Starts BLE Scanning procedure.
|
otPlatBleGapScanStop(otInstance *aInstance)
|
Stops BLE Scanning procedure.
|
otPlatBleGapServiceSet(otInstance *aInstance, const char *aDeviceName, uint16_t aAppearance)
|
Sets BLE device name and appearance that is visible as GATT Based service.
|
otPlatBleGattClientCharacteristicsDiscover(otInstance *aInstance, uint16_t aStartHandle, uint16_t aEndHandle)
|
Performs GATT Characteristic Discovery of a service.
|
otPlatBleGattClientDescriptorsDiscover(otInstance *aInstance, uint16_t aStartHandle, uint16_t aEndHandle)
|
Performs GATT Descriptor Discovery.
|
otPlatBleGattClientMtuExchangeRequest(otInstance *aInstance, uint16_t aMtu)
|
Sends Exchange MTU Request.
|
otPlatBleGattClientOnCharacteristicsDiscoverDone(otInstance *aInstance, otPlatBleGattCharacteristic *aChars, uint16_t aCount, otError aError)
|
void
The BLE driver calls this method to notify OpenThread that GATT Characteristic Discovery of a service has been done.
|
otPlatBleGattClientOnDescriptorsDiscoverDone(otInstance *aInstance, otPlatBleGattDescriptor *aDescs, uint16_t aCount, otError aError)
|
void
The BLE driver calls this method to notify OpenThread that GATT Descriptor Discovery has been done.
|
otPlatBleGattClientOnIndication(otInstance *aInstance, uint16_t aHandle, otBleRadioPacket *aPacket)
|
void
The BLE driver calls this method to notify OpenThread that an ATT Handle Value Indication has been received.
|
otPlatBleGattClientOnMtuExchangeResponse(otInstance *aInstance, uint16_t aMtu, otError aError)
|
void
The BLE driver calls this method to notify OpenThread that Exchange MTU Response has been received.
|
otPlatBleGattClientOnReadResponse(otInstance *aInstance, otBleRadioPacket *aPacket)
|
void
The BLE driver calls this method to notify OpenThread that ATT Read Response packet has been received.
|
otPlatBleGattClientOnServiceDiscovered(otInstance *aInstance, uint16_t aStartHandle, uint16_t aEndHandle, uint16_t aServiceUuid, otError aError)
|
void
The BLE driver calls this method to notify OpenThread that the next entry from GATT Primary Service Discovery has been found.
|
otPlatBleGattClientOnSubscribeResponse(otInstance *aInstance, uint16_t aHandle)
|
void
The BLE driver calls this method to notify OpenThread that subscribe response has been received.
|
otPlatBleGattClientOnWriteResponse(otInstance *aInstance, uint16_t aHandle)
|
void
The BLE driver calls this method to notify OpenThread that ATT Write Response packet has been received.
|
otPlatBleGattClientRead(otInstance *aInstance, uint16_t aHandle)
|
Sends ATT Read Request.
|
otPlatBleGattClientServiceDiscover(otInstance *aInstance, const otPlatBleUuid *aUuid)
|
Performs GATT Primary Service Discovery by UUID procedure of specific service.
|
otPlatBleGattClientServicesDiscover(otInstance *aInstance)
|
Performs GATT Primary Service Discovery of all services available.
|
otPlatBleGattClientSubscribeRequest(otInstance *aInstance, uint16_t aHandle, bool aSubscribing)
|
Subscribes for characteristic indications.
|
otPlatBleGattClientWrite(otInstance *aInstance, uint16_t aHandle, otBleRadioPacket *aPacket)
|
Sends ATT Write Request.
|
otPlatBleGattMtuGet(otInstance *aInstance, uint16_t *aMtu)
|
Reads currently use value of ATT_MTU.
|
otPlatBleGattServerIndicate(otInstance *aInstance, uint16_t aHandle, otBleRadioPacket *aPacket)
|
Sends ATT Handle Value Indication.
|
otPlatBleGattServerOnIndicationConfirmation(otInstance *aInstance, uint16_t aHandle)
|
void
The BLE driver calls this method to notify OpenThread that an ATT Handle Value Confirmation has been received.
|
otPlatBleGattServerOnReadRequest(otInstance *aInstance, uint16_t aHandle, otBleRadioPacket *aPacket)
|
void
The BLE driver calls this method to notify OpenThread that an ATT Read Request packet has been received.
|
otPlatBleGattServerOnSubscribeRequest(otInstance *aInstance, uint16_t aHandle, bool aSubscribing)
|
void
The BLE driver calls this method to notify OpenThread that an ATT Subscription Request packet has been received.
|
otPlatBleGattServerOnWriteRequest(otInstance *aInstance, uint16_t aHandle, otBleRadioPacket *aPacket)
|
void
The BLE driver calls this method to notify OpenThread that an ATT Write Request packet has been received.
|
otPlatBleGattServerServicesRegister(otInstance *aInstance, otPlatBleGattService *aServices)
|
Registers a list of GATT Services and their enclosed Characteristics.
|
otPlatBleGattVendorUuidRegister(otInstance *aInstance, const otPlatBleUuid *aUuid)
|
Registers vendor specific UUID Base.
|
otPlatBleIsEnabled(otInstance *aInstance)
|
bool
Check whether Bluetooth Low Energy radio is enabled or not.
|
otPlatBleL2capConnectionRequest(otInstance *aInstance, uint16_t aPsm, uint16_t aMtu, uint16_t *aCid)
|
Sends LE Credit Based Connection Request.
|
otPlatBleL2capConnectionResponse(otInstance *aInstance, otPlatBleL2capError aError, uint16_t aMtu, uint16_t *aCid)
|
Sends LE Credit Based Connection Response.
|
otPlatBleL2capDisconnect(otInstance *aInstance, uint16_t aLocalCid, uint16_t aPeerCid)
|
Sends an L2CAP Disconnection Request.
|
otPlatBleL2capOnConnectionRequest(otInstance *aInstance, uint16_t aPsm, uint16_t aMtu, uint16_t aPeerCid)
|
void
The BLE driver calls this method to notify OpenThread that an LE Credit Based Connection Request packet has been received.
|
otPlatBleL2capOnConnectionResponse(otInstance *aInstance, otPlatBleL2capError aError, uint16_t aMtu, uint16_t aPeerCid)
|
void
The BLE driver calls this method to notify OpenThread that an LE Credit Based Connection Response packet has been received.
|
otPlatBleL2capOnDisconnect(otInstance *aInstance, uint16_t aLocalCid, uint16_t aPeerCid)
|
void
The BLE driver calls this method to notify OpenThread that an L2CAP Disconnection Request has been received.
|
otPlatBleL2capOnSduReceived(otInstance *aInstance, uint16_t aLocalCid, uint16_t aPeerCid, otBleRadioPacket *aPacket)
|
void
The BLE driver calls this method to notify OpenThread that an L2CAP SDU has been received.
|
otPlatBleL2capOnSduSent(otInstance *aInstance)
|
void
The BLE driver calls this method to notify OpenThread that an L2CAP SDU has been sent.
|
otPlatBleL2capSduSend(otInstance *aInstance, uint16_t aLocalCid, uint16_t aPeerCid, otBleRadioPacket *aPacket)
|
Sends an SDU on an L2CAP channel.
|
otPlatBleOnEnabled(otInstance *aInstance)
|
void
Callback sent when Bluetooth Low Energy is ready after being enabled.
|
otPlatBleReset(otInstance *aInstance)
|
Reset the Bluetooth Low Energy subsystem.
|
Structs |
|
---|---|
otBleRadioPacket |
This structure represents an BLE packet. |
otPlatBleDeviceAddr |
This structure represents BLE Device Address. |
otPlatBleGapConnParams |
This structure represents BLE connection parameters. |
otPlatBleGattCharacteristic |
This structure represents GATT Characteristic. |
otPlatBleGattDescriptor |
This structure represents GATT Descriptor. |
otPlatBleGattService |
Registration descriptor for a GATT service. |
otPlatBleUuid |
This structure represents BLE UUID. |
Unions |
|
---|---|
otPlatBleUuidValue |
This structure represents BLE UUID value. |
Enumerations
anonymous enum
anonymous enum
otPlatBleAddressType
otPlatBleAddressType
This enum represents BLE Device Address types.
otPlatBleAdvMode
otPlatBleAdvMode
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
otPlatBleL2capError
otPlatBleL2capError
The enum indicates the outcome of the L2CAP connection request procedure.
See Bluetooth v5.0 | Vol 3, Part A, 4.23, Table 4.20.
otPlatBleUuidType
otPlatBleUuidType
Typedefs
otPlatBleAddressType
enum otPlatBleAddressType otPlatBleAddressType
This enum represents BLE Device Address types.
otPlatBleAdvMode
enum otPlatBleAdvMode otPlatBleAdvMode
This enumeration defines flags for BLE advertisement mode.
otPlatBleCccdFlags
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
otPlatBleDeviceAddr
struct otPlatBleDeviceAddr otPlatBleDeviceAddr
This structure represents BLE Device Address.
otPlatBleGapConnParams
struct otPlatBleGapConnParams otPlatBleGapConnParams
This structure represents BLE connection parameters.
otPlatBleGattCharacteristic
struct otPlatBleGattCharacteristic otPlatBleGattCharacteristic
This structure represents GATT Characteristic.
otPlatBleGattDescriptor
struct otPlatBleGattDescriptor otPlatBleGattDescriptor
This structure represents GATT Descriptor.
otPlatBleGattService
struct otPlatBleGattService otPlatBleGattService
Registration descriptor for a GATT service.
otPlatBleL2capError
enum otPlatBleL2capError otPlatBleL2capError
The enum indicates the outcome of the L2CAP connection request procedure.
See Bluetooth v5.0 | Vol 3, Part A, 4.23, Table 4.20.
otPlatBleUuidType
enum otPlatBleUuidType otPlatBleUuidType
This enumeration represents BLE UUID value.
otPlatBleUuidValue
union otPlatBleUuidValue otPlatBleUuidValue
This structure represents BLE UUID value.
Functions
otPlatBleDisable
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.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatBleEnable
otError otPlatBleEnable( otInstance *aInstance )
Enable the Bluetooth Low Energy radio.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatBleGapAddressGet
otError otPlatBleGapAddressGet( otInstance *aInstance, otPlatBleDeviceAddr *aAddress )
Gets Bluetooth Device Address.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatBleGapAddressSet
otError otPlatBleGapAddressSet( otInstance *aInstance, const otPlatBleDeviceAddr *aAddress )
Sets Bluetooth Device Address.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatBleGapAdvDataSet
otError otPlatBleGapAdvDataSet( otInstance *aInstance, const uint8_t *aAdvData, uint8_t aAdvDataLength )
Sets BLE Advertising packet content.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatBleGapAdvStart
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).
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatBleGapAdvStop
otError otPlatBleGapAdvStop( otInstance *aInstance )
Stops BLE Advertising procedure.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatBleGapConnParamsSet
otError otPlatBleGapConnParamsSet( otInstance *aInstance, const otPlatBleGapConnParams *aConnParams )
Sets desired BLE Connection Parameters.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatBleGapConnect
otError otPlatBleGapConnect( otInstance *aInstance, otPlatBleDeviceAddr *aAddress, uint16_t aInterval, uint16_t aWindow )
Starts BLE Connection procedure.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleGapDisconnect
otError otPlatBleGapDisconnect( otInstance *aInstance )
Disconnects BLE connection.
The BLE device shall indicate the OT_BLE_HCI_REMOTE_USER_TERMINATED HCI code reason.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatBleGapOnAdvReceived
void otPlatBleGapOnAdvReceived( otInstance *aInstance, otPlatBleDeviceAddr *aAddress, otBleRadioPacket *aPacket )
The BLE driver calls this method to notify OpenThread that an advertisement packet has been received.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleGapOnConnected
void otPlatBleGapOnConnected( otInstance *aInstance, uint16_t aConnectionId )
The BLE driver calls this method to notify OpenThread that BLE Device has been connected.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatBleGapOnDisconnected
void otPlatBleGapOnDisconnected( otInstance *aInstance, uint16_t aConnectionId )
The BLE driver calls this method to notify OpenThread that the BLE Device has been disconnected.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatBleGapOnScanRespReceived
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.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleGapScanResponseSet
otError otPlatBleGapScanResponseSet( otInstance *aInstance, const uint8_t *aScanResponse, uint8_t aScanResponseLength )
Sets BLE Scan Response packet content.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatBleGapScanStart
otError otPlatBleGapScanStart( otInstance *aInstance, uint16_t aInterval, uint16_t aWindow )
Starts BLE Scanning procedure.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatBleGapScanStop
otError otPlatBleGapScanStop( otInstance *aInstance )
Stops BLE Scanning procedure.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatBleGapServiceSet
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.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatBleGattClientCharacteristicsDiscover
otError otPlatBleGattClientCharacteristicsDiscover( otInstance *aInstance, uint16_t aStartHandle, uint16_t aEndHandle )
Performs GATT Characteristic Discovery of a service.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleGattClientDescriptorsDiscover
otError otPlatBleGattClientDescriptorsDiscover( otInstance *aInstance, uint16_t aStartHandle, uint16_t aEndHandle )
Performs GATT Descriptor Discovery.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleGattClientMtuExchangeRequest
otError otPlatBleGattClientMtuExchangeRequest( otInstance *aInstance, uint16_t aMtu )
Sends Exchange MTU Request.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleGattClientOnCharacteristicsDiscoverDone
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.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleGattClientOnDescriptorsDiscoverDone
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.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleGattClientOnIndication
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.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleGattClientOnMtuExchangeResponse
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.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleGattClientOnReadResponse
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.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatBleGattClientOnServiceDiscovered
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.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleGattClientOnSubscribeResponse
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.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatBleGattClientOnWriteResponse
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.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatBleGattClientRead
otError otPlatBleGattClientRead( otInstance *aInstance, uint16_t aHandle )
Sends ATT Read Request.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleGattClientServiceDiscover
otError otPlatBleGattClientServiceDiscover( otInstance *aInstance, const otPlatBleUuid *aUuid )
Performs GATT Primary Service Discovery by UUID procedure of specific service.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleGattClientServicesDiscover
otError otPlatBleGattClientServicesDiscover( otInstance *aInstance )
Performs GATT Primary Service Discovery of all services available.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleGattClientSubscribeRequest
otError otPlatBleGattClientSubscribeRequest( otInstance *aInstance, uint16_t aHandle, bool aSubscribing )
Subscribes for characteristic indications.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleGattClientWrite
otError otPlatBleGattClientWrite( otInstance *aInstance, uint16_t aHandle, otBleRadioPacket *aPacket )
Sends ATT Write Request.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleGattMtuGet
otError otPlatBleGattMtuGet( otInstance *aInstance, uint16_t *aMtu )
Reads currently use value of ATT_MTU.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatBleGattServerIndicate
otError otPlatBleGattServerIndicate( otInstance *aInstance, uint16_t aHandle, otBleRadioPacket *aPacket )
Sends ATT Handle Value Indication.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleGattServerOnIndicationConfirmation
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.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatBleGattServerOnReadRequest
void otPlatBleGattServerOnReadRequest( otInstance *aInstance, uint16_t aHandle, otBleRadioPacket *aPacket )
The BLE driver calls this method to notify OpenThread that an ATT Read Request packet has been received.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleGattServerOnSubscribeRequest
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.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleGattServerOnWriteRequest
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.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleGattServerServicesRegister
otError otPlatBleGattServerServicesRegister( otInstance *aInstance, otPlatBleGattService *aServices )
Registers a list of GATT Services and their enclosed Characteristics.
The generated handles will be written back into this structure when the BLE stack is enabled.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleGattVendorUuidRegister
otError otPlatBleGattVendorUuidRegister( otInstance *aInstance, const otPlatBleUuid *aUuid )
Registers vendor specific UUID Base.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatBleIsEnabled
bool otPlatBleIsEnabled( otInstance *aInstance )
Check whether Bluetooth Low Energy radio is enabled or not.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatBleL2capConnectionRequest
otError otPlatBleL2capConnectionRequest( otInstance *aInstance, uint16_t aPsm, uint16_t aMtu, uint16_t *aCid )
Sends LE Credit Based Connection Request.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleL2capConnectionResponse
otError otPlatBleL2capConnectionResponse( otInstance *aInstance, otPlatBleL2capError aError, uint16_t aMtu, uint16_t *aCid )
Sends LE Credit Based Connection Response.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleL2capDisconnect
otError otPlatBleL2capDisconnect( otInstance *aInstance, uint16_t aLocalCid, uint16_t aPeerCid )
Sends an L2CAP Disconnection Request.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleL2capOnConnectionRequest
void otPlatBleL2capOnConnectionRequest( otInstance *aInstance, uint16_t aPsm, uint16_t aMtu, uint16_t aPeerCid )
The BLE driver calls this method to notify OpenThread that an LE Credit Based Connection Request packet has been received.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleL2capOnConnectionResponse
void otPlatBleL2capOnConnectionResponse( otInstance *aInstance, otPlatBleL2capError aError, uint16_t aMtu, uint16_t aPeerCid )
The BLE driver calls this method to notify OpenThread that an LE Credit Based Connection Response packet has been received.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleL2capOnDisconnect
void otPlatBleL2capOnDisconnect( otInstance *aInstance, uint16_t aLocalCid, uint16_t aPeerCid )
The BLE driver calls this method to notify OpenThread that an L2CAP Disconnection Request has been received.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleL2capOnSduReceived
void otPlatBleL2capOnSduReceived( otInstance *aInstance, uint16_t aLocalCid, uint16_t aPeerCid, otBleRadioPacket *aPacket )
The BLE driver calls this method to notify OpenThread that an L2CAP SDU has been received.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otPlatBleL2capOnSduSent
void otPlatBleL2capOnSduSent( otInstance *aInstance )
The BLE driver calls this method to notify OpenThread that an L2CAP SDU has been sent.
Details | |||
---|---|---|---|
Parameters |
|
otPlatBleL2capSduSend
otError otPlatBleL2capSduSend( otInstance *aInstance, uint16_t aLocalCid, uint16_t aPeerCid, otBleRadioPacket *aPacket )
Sends an SDU on an L2CAP channel.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatBleOnEnabled
void otPlatBleOnEnabled( otInstance *aInstance )
Callback sent when Bluetooth Low Energy is ready after being enabled.
Details | |||
---|---|---|---|
Parameters |
|
otPlatBleReset
otError otPlatBleReset( otInstance *aInstance )
Reset the Bluetooth Low Energy subsystem.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
Macros
OT_BLE_MS_TO_TICKS
OT_BLE_MS_TO_TICKS (((x)*1000) / OT_BLE_ADV_INTERVAL_UNIT)
Convert the advertising interval from [ms] to [ble symbol times].