project
Fork of X_NUCLEO_IDB0XA1 by
BlueNRGGap
BlueNRG BLE_API GAP Adaptation. More...
Functions | |
virtual ble_error_t | setAdvertisingData (const GapAdvertisingData &, const GapAdvertisingData &) |
Sets the advertising parameters and payload for the device. Note: Some data types give error when their adv data is updated using aci_gap_update_adv_data() API. | |
virtual ble_error_t | startAdvertising (const GapAdvertisingParams &) |
Starts the BLE HW, initialising any services that were added before this function was called. | |
virtual ble_error_t | stopAdvertising (void) |
Stops the BLE HW and disconnects from any devices. | |
void | setConnectionHandle (uint16_t con_handle) |
Sets the 16-bit connection handle. | |
uint16_t | getConnectionHandle (void) |
Gets the 16-bit connection handle. | |
bool | getIsSetAddress () |
Returns boolean if the address of the device has been set or not. | |
virtual ble_error_t | getPreferredConnectionParams (ConnectionParams_t *params) |
obtains preferred connection params | |
virtual ble_error_t | setPreferredConnectionParams (const ConnectionParams_t *params) |
sets preferred connection params | |
virtual ble_error_t | updateConnectionParams (Handle_t handle, const ConnectionParams_t *params) |
updates preferred connection params | |
virtual ble_error_t | setDeviceName (const uint8_t *deviceName) |
Sets the Device Name Characteristic. | |
virtual ble_error_t | getDeviceName (uint8_t *deviceName, unsigned *lengthP) |
Gets the Device Name Characteristic. | |
virtual ble_error_t | setAppearance (GapAdvertisingData::Appearance appearance) |
Sets the Device Appearance Characteristic. | |
virtual ble_error_t | getAppearance (GapAdvertisingData::Appearance *appearanceP) |
Gets the Device Appearance Characteristic. | |
virtual uint16_t | getMaxAdvertisingInterval (void) const |
Gets the value of maximum advertising interval in ms. | |
virtual uint16_t | getMinAdvertisingInterval (void) const |
Gets the value of minimum advertising interval in ms. | |
virtual uint16_t | getMinNonConnectableAdvertisingInterval (void) const |
Gets the value of minimum non connectable advertising interval in ms. | |
virtual ble_error_t | setTxPower (int8_t txPower) |
set Tx power level | |
virtual void | getPermittedTxPowerValues (const int8_t **, size_t *) |
get permitted Tx power values |
Detailed Description
BlueNRG BLE_API GAP Adaptation.
Function Documentation
ble_error_t getAppearance | ( | GapAdvertisingData::Appearance * | appearanceP ) | [virtual, inherited] |
Gets the Device Appearance Characteristic.
- Parameters:
-
[in] appearance pointer to device appearance value
- Returns:
- ble_error_t
- Return values:
-
BLE_ERROR_NONE Everything executed properly
EXAMPLE
Definition at line 996 of file BlueNRGGap.cpp.
uint16_t getConnectionHandle | ( | void | ) | [inherited] |
Gets the 16-bit connection handle.
- Parameters:
-
[in] void
- Returns:
- uint16_t Connection Handle of the Gap Instance
Definition at line 682 of file BlueNRGGap.cpp.
ble_error_t getDeviceName | ( | uint8_t * | deviceName, |
unsigned * | lengthP | ||
) | [virtual, inherited] |
Gets the Device Name Characteristic.
- Parameters:
-
[in] deviceName pointer to device name [in] lengthP pointer to device name length
- Returns:
- ble_error_t
- Return values:
-
BLE_ERROR_NONE Everything executed properly
EXAMPLE
Definition at line 913 of file BlueNRGGap.cpp.
bool getIsSetAddress | ( | ) | [inherited] |
Returns boolean if the address of the device has been set or not.
- Returns:
- bool
EXAMPLE
Definition at line 739 of file BlueNRGGap.cpp.
uint16_t getMaxAdvertisingInterval | ( | void | ) | const [virtual, inherited] |
Gets the value of maximum advertising interval in ms.
- Returns:
- uint16_t
- Return values:
-
value of maximum advertising interval in ms
EXAMPLE
Definition at line 1021 of file BlueNRGGap.cpp.
uint16_t getMinAdvertisingInterval | ( | void | ) | const [virtual, inherited] |
Gets the value of minimum advertising interval in ms.
- Returns:
- uint16_t
- Return values:
-
value of minimum advertising interval in ms
EXAMPLE
Definition at line 1041 of file BlueNRGGap.cpp.
uint16_t getMinNonConnectableAdvertisingInterval | ( | void | ) | const [virtual, inherited] |
Gets the value of minimum non connectable advertising interval in ms.
- Returns:
- uint16_t
- Return values:
-
value of minimum non connectable advertising interval in ms
EXAMPLE
Definition at line 1060 of file BlueNRGGap.cpp.
void getPermittedTxPowerValues | ( | const int8_t ** | valueArrayPP, |
size_t * | countP | ||
) | [virtual, inherited] |
get permitted Tx power values
- Parameters:
-
[in] values pointer to pointer to permitted power values [in] num number of values
Definition at line 1236 of file BlueNRGGap.cpp.
ble_error_t getPreferredConnectionParams | ( | ConnectionParams_t * | params ) | [virtual, inherited] |
obtains preferred connection params
- Returns:
- ble_error_t
EXAMPLE
Definition at line 785 of file BlueNRGGap.cpp.
ble_error_t setAdvertisingData | ( | const GapAdvertisingData & | advData, |
const GapAdvertisingData & | scanResponse | ||
) | [virtual, inherited] |
Sets the advertising parameters and payload for the device. Note: Some data types give error when their adv data is updated using aci_gap_update_adv_data() API.
[in] advData The primary advertising data payload [in] scanResponse The optional Scan Response payload if the advertising type is set to GapAdvertisingParams::ADV_SCANNABLE_UNDIRECTED in GapAdveritinngParams
- Returns:
- ble_error_t
- Return values:
-
BLE_ERROR_NONE Everything executed properly BLE_ERROR_BUFFER_OVERFLOW The proposed action would cause a buffer overflow. All advertising payloads must be <= 31 bytes, for example. BLE_ERROR_NOT_IMPLEMENTED A feature was requested that is not yet supported in the nRF51 firmware or hardware. BLE_ERROR_PARAM_OUT_OF_RANGE One of the proposed values is outside the valid range.
EXAMPLE
< Incomplete list of 16-bit Service IDs
< Complete list of 16-bit Service IDs
< Incomplete list of 128-bit Service IDs
< Complete list of 128-bit Service IDs
< Incomplete list of 32-bit Service IDs (not relevant for Bluetooth 4.0)
< Complete list of 32-bit Service IDs (not relevant for Bluetooth 4.0)
< Shortened Local Name
< Complete Local Name
< TX Power Level (in dBm)
< Device ID
< Slave :Connection Interval Range
< Service Data
< Appearance
< Advertising Interval
< Manufacturer Specific Data
Definition at line 103 of file BlueNRGGap.cpp.
ble_error_t setAppearance | ( | GapAdvertisingData::Appearance | appearance ) | [virtual, inherited] |
Sets the Device Appearance Characteristic.
- Parameters:
-
[in] appearance device appearance
- Returns:
- ble_error_t
- Return values:
-
BLE_ERROR_NONE Everything executed properly
EXAMPLE
Definition at line 946 of file BlueNRGGap.cpp.
void setConnectionHandle | ( | uint16_t | con_handle ) | [inherited] |
Sets the 16-bit connection handle.
- Parameters:
-
[in] con_handle Connection Handle which is set in the Gap Instance
- Returns:
- void
Definition at line 667 of file BlueNRGGap.cpp.
ble_error_t setDeviceName | ( | const uint8_t * | deviceName ) | [virtual, inherited] |
Sets the Device Name Characteristic.
- Parameters:
-
[in] deviceName pointer to device name to be set
- Returns:
- ble_error_t
- Return values:
-
BLE_ERROR_NONE Everything executed properly
EXAMPLE
Definition at line 856 of file BlueNRGGap.cpp.
ble_error_t setPreferredConnectionParams | ( | const ConnectionParams_t * | params ) | [virtual, inherited] |
sets preferred connection params
- Returns:
- ble_error_t
EXAMPLE
Definition at line 807 of file BlueNRGGap.cpp.
ble_error_t setTxPower | ( | int8_t | txPower ) | [virtual, inherited] |
set Tx power level
- Parameters:
-
[in] txPower Transmission Power level
- Returns:
- ble_error_t
Definition at line 1205 of file BlueNRGGap.cpp.
ble_error_t startAdvertising | ( | const GapAdvertisingParams & | params ) | [virtual, inherited] |
Starts the BLE HW, initialising any services that were added before this function was called.
- Parameters:
-
[in] params Basic advertising details, including the advertising delay, timeout and how the device should be advertised
- Note:
- All services must be added before calling this function!
- Returns:
- ble_error_t
- Return values:
-
BLE_ERROR_NONE Everything executed properly
EXAMPLE
Definition at line 354 of file BlueNRGGap.cpp.
ble_error_t stopAdvertising | ( | void | ) | [virtual, inherited] |
Stops the BLE HW and disconnects from any devices.
- Returns:
- ble_error_t
- Return values:
-
BLE_ERROR_NONE Everything executed properly
EXAMPLE
Definition at line 532 of file BlueNRGGap.cpp.
ble_error_t updateConnectionParams | ( | Handle_t | handle, |
const ConnectionParams_t * | params | ||
) | [virtual, inherited] |
updates preferred connection params
- Returns:
- ble_error_t
EXAMPLE
Definition at line 828 of file BlueNRGGap.cpp.
Generated on Tue Jul 12 2022 19:31:15 by 1.7.2