Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 ble_error_t | setTxPower (int8_t txPower) |
| set Tx power level | |
| virtual void | getPermittedTxPowerValues (const int8_t **, size_t *) |
| get permitted Tx power values | |
| virtual AdvertisingPolicyMode_t | getAdvertisingPolicyMode (void) const |
| Get the current advertising policy filter mode. | |
| virtual ScanningPolicyMode_t | getScanningPolicyMode (void) const |
| Get the current scanning policy filter mode. | |
| virtual ble_error_t | reset (void) |
| Clear BlueNRGGap's state. | |
Detailed Description
BlueNRG BLE_API GAP Adaptation.
Function Documentation
| Gap::AdvertisingPolicyMode_t getAdvertisingPolicyMode | ( | void | ) | const [virtual, inherited] |
Get the current advertising policy filter mode.
- Returns:
- The advertising policy filter mode.
Definition at line 1443 of file BlueNRGGap.cpp.
| 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 1039 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 715 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 956 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 779 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 1254 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 831 of file BlueNRGGap.cpp.
| Gap::ScanningPolicyMode_t getScanningPolicyMode | ( | void | ) | const [virtual, inherited] |
Get the current scanning policy filter mode.
- Returns:
- The scanning policy filter mode.
Definition at line 1456 of file BlueNRGGap.cpp.
| ble_error_t reset | ( | void | ) | [virtual, inherited] |
Clear BlueNRGGap's state.
- Returns:
- ble_error_t
- Return values:
-
BLE_ERROR_NONE Everything executed properly
Definition at line 1471 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
< Advertising Interval
< Manufacturer Specific Data
Definition at line 97 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 991 of file BlueNRGGap.cpp.
| void setConnectionHandle | ( | uint16_t | conn_handle ) | [inherited] |
Sets the 16-bit connection handle.
- Parameters:
-
[in] conn_handle Connection Handle which is set in the Gap Instance
- Returns:
- void
Definition at line 700 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 902 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 853 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 1226 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 368 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 599 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 874 of file BlueNRGGap.cpp.
Generated on Tue Jul 12 2022 16:31:46 by
1.7.2
