ble

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EVT_USER_MEM_REQUEST = EVT_BASE + 0 // User Memory request. @ref ble_evt_user_mem_request_t
	EVT_USER_MEM_RELEASE = EVT_BASE + 1 // User Memory release. @ref ble_evt_user_mem_release_t
)
View Source
const (
	CONN_CFG_GAP   = CONN_CFG_BASE + 0 // BLE GAP specific connection configuration.
	CONN_CFG_GATTC = CONN_CFG_BASE + 1 // BLE GATTC specific connection configuration.
	CONN_CFG_GATTS = CONN_CFG_BASE + 2 // BLE GATTS specific connection configuration.
	CONN_CFG_GATT  = CONN_CFG_BASE + 3 // BLE GATT specific connection configuration.
	CONN_CFG_L2CAP = CONN_CFG_BASE + 4 // BLE L2CAP specific connection configuration.
)
View Source
const (
	COMMON_OPT_PA_LNA          = OPT_BASE + 0 // PA and LNA options
	COMMON_OPT_CONN_EVT_EXT    = OPT_BASE + 1 // Extended connection events option
	COMMON_OPT_EXTENDED_RC_CAL = OPT_BASE + 2 // Extended RC calibration option
)
View Source
const (
	GAP_EVT_CONNECTED                  = GAP_EVT_BASE + iota // Connected to peer. \n See @ref ble_gap_evt_connected_t
	GAP_EVT_DISCONNECTED               = GAP_EVT_BASE + 1    // Disconnected from peer. \n See @ref ble_gap_evt_disconnected_t.
	GAP_EVT_CONN_PARAM_UPDATE          = GAP_EVT_BASE + 2    // Connection Parameters updated. \n See @ref ble_gap_evt_conn_param_update_t.
	GAP_EVT_SEC_PARAMS_REQUEST         = GAP_EVT_BASE + 3    // Request to provide security parameters. \n Reply with @ref sd_ble_gap_sec_params_reply. \n See @ref ble_gap_evt_sec_params_request_t.
	GAP_EVT_SEC_INFO_REQUEST           = GAP_EVT_BASE + 4    // Request to provide security information. \n Reply with @ref sd_ble_gap_sec_info_reply. \n See @ref ble_gap_evt_sec_info_request_t.
	GAP_EVT_PASSKEY_DISPLAY            = GAP_EVT_BASE + 5    // Request to display a passkey to the user. \n In LESC Numeric Comparison, reply with @ref sd_ble_gap_auth_key_reply. \n See @ref ble_gap_evt_passkey_display_t.
	GAP_EVT_KEY_PRESSED                = GAP_EVT_BASE + 6    // Notification of a keypress on the remote device.\n See @ref ble_gap_evt_key_pressed_t
	GAP_EVT_AUTH_KEY_REQUEST           = GAP_EVT_BASE + 7    // Request to provide an authentication key. \n Reply with @ref sd_ble_gap_auth_key_reply. \n See @ref ble_gap_evt_auth_key_request_t.
	GAP_EVT_LESC_DHKEY_REQUEST         = GAP_EVT_BASE + 8    // Request to calculate an LE Secure Connections DHKey. \n Reply with @ref sd_ble_gap_lesc_dhkey_reply. \n See @ref ble_gap_evt_lesc_dhkey_request_t
	GAP_EVT_AUTH_STATUS                = GAP_EVT_BASE + 9    // Authentication procedure completed with status. \n See @ref ble_gap_evt_auth_status_t.
	GAP_EVT_CONN_SEC_UPDATE            = GAP_EVT_BASE + 10   // Connection security updated. \n See @ref ble_gap_evt_conn_sec_update_t.
	GAP_EVT_TIMEOUT                    = GAP_EVT_BASE + 11   // Timeout expired. \n See @ref ble_gap_evt_timeout_t.
	GAP_EVT_RSSI_CHANGED               = GAP_EVT_BASE + 12   // RSSI report. \n See @ref ble_gap_evt_rssi_changed_t.
	GAP_EVT_ADV_REPORT                 = GAP_EVT_BASE + 13   // Advertising report. \n See @ref ble_gap_evt_adv_report_t.
	GAP_EVT_SEC_REQUEST                = GAP_EVT_BASE + 14   // Security Request. \n See @ref ble_gap_evt_sec_request_t.
	GAP_EVT_CONN_PARAM_UPDATE_REQUEST  = GAP_EVT_BASE + 15   // Connection Parameter Update Request. \n Reply with @ref sd_ble_gap_conn_param_update. \n See @ref ble_gap_evt_conn_param_update_request_t.
	GAP_EVT_SCAN_REQ_REPORT            = GAP_EVT_BASE + 16   // Scan request report. \n See @ref ble_gap_evt_scan_req_report_t.
	GAP_EVT_PHY_UPDATE_REQUEST         = GAP_EVT_BASE + 17   // PHY Update Request. \n Reply with @ref sd_ble_gap_phy_update. \n See @ref ble_gap_evt_phy_update_request_t.
	GAP_EVT_PHY_UPDATE                 = GAP_EVT_BASE + 18   // PHY Update Procedure is complete. \n See @ref ble_gap_evt_phy_update_t.
	GAP_EVT_DATA_LENGTH_UPDATE_REQUEST = GAP_EVT_BASE + 19   // Data Length Update Request. \n Reply with @ref sd_ble_gap_data_length_update. \n See @ref ble_gap_evt_data_length_update_request_t.
	GAP_EVT_DATA_LENGTH_UPDATE         = GAP_EVT_BASE + 20   // LL Data Channel PDU payload length updated. \n See @ref ble_gap_evt_data_length_update_t.
	GAP_EVT_QOS_CHANNEL_SURVEY_REPORT  = GAP_EVT_BASE + 21   // Channel survey report. \n See @ref ble_gap_evt_qos_channel_survey_report_t.
	GAP_EVT_ADV_SET_TERMINATED         = GAP_EVT_BASE + 22   // Advertising set terminated. \n See @ref ble_gap_evt_adv_set_terminated_t.
)
View Source
const (
	GAP_OPT_CH_MAP                = GAP_OPT_BASE + iota // Channel Map. @ref ble_gap_opt_ch_map_t
	GAP_OPT_LOCAL_CONN_LATENCY    = GAP_OPT_BASE + 1    // Local connection latency. @ref ble_gap_opt_local_conn_latency_t
	GAP_OPT_PASSKEY               = GAP_OPT_BASE + 2    // Set passkey. @ref ble_gap_opt_passkey_t
	GAP_OPT_COMPAT_MODE_1         = GAP_OPT_BASE + 3    // Compatibility mode. @ref ble_gap_opt_compat_mode_1_t
	GAP_OPT_AUTH_PAYLOAD_TIMEOUT  = GAP_OPT_BASE + 4    // Set Authenticated payload timeout. @ref ble_gap_opt_auth_payload_timeout_t
	GAP_OPT_SLAVE_LATENCY_DISABLE = GAP_OPT_BASE + 5    // Disable slave latency. @ref ble_gap_opt_slave_latency_disable_t
)
View Source
const (
	GAP_CFG_ROLE_COUNT       = GAP_CFG_BASE + iota // Role count configuration.
	GAP_CFG_DEVICE_NAME      = GAP_CFG_BASE + 1    // Device name configuration.
	GAP_CFG_PPCP_INCL_CONFIG = GAP_CFG_BASE + 2    // Peripheral Preferred Connection Parameters characteristic inclusion configuration.
	GAP_CFG_CAR_INCL_CONFIG  = GAP_CFG_BASE + 3    // Central Address Resolution characteristic inclusion configuration.
)
View Source
const (
	GAP_TX_POWER_ROLE_ADV       = 1 + iota // Advertiser role.
	GAP_TX_POWER_ROLE_SCAN_INIT = 2        // Scanner and initiator role.
	GAP_TX_POWER_ROLE_CONN      = 3        // Connection role.
)
View Source
const (
	GATTC_EVT_PRIM_SRVC_DISC_RSP        = GATTC_EVT_BASE + iota // Primary Service Discovery Response event. \n See @ref ble_gattc_evt_prim_srvc_disc_rsp_t.
	GATTC_EVT_REL_DISC_RSP                                      // Relationship Discovery Response event. \n See @ref ble_gattc_evt_rel_disc_rsp_t.
	GATTC_EVT_CHAR_DISC_RSP                                     // Characteristic Discovery Response event. \n See @ref ble_gattc_evt_char_disc_rsp_t.
	GATTC_EVT_DESC_DISC_RSP                                     // Descriptor Discovery Response event. \n See @ref ble_gattc_evt_desc_disc_rsp_t.
	GATTC_EVT_ATTR_INFO_DISC_RSP                                // Attribute Information Response event. \n See @ref ble_gattc_evt_attr_info_disc_rsp_t.
	GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP                         // Read By UUID Response event. \n See @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t.
	GATTC_EVT_READ_RSP                                          // Read Response event. \n See @ref ble_gattc_evt_read_rsp_t.
	GATTC_EVT_CHAR_VALS_READ_RSP                                // Read multiple Response event. \n See @ref ble_gattc_evt_char_vals_read_rsp_t.
	GATTC_EVT_WRITE_RSP                                         // Write Response event. \n See @ref ble_gattc_evt_write_rsp_t.
	GATTC_EVT_HVX                                               // Handle Value Notification or Indication event. \n Confirm indication with @ref sd_ble_gattc_hv_confirm. \n See @ref ble_gattc_evt_hvx_t.
	GATTC_EVT_EXCHANGE_MTU_RSP                                  // Exchange MTU Response event. \n See @ref ble_gattc_evt_exchange_mtu_rsp_t.
	GATTC_EVT_TIMEOUT                                           // Timeout event. \n See @ref ble_gattc_evt_timeout_t.
	GATTC_EVT_WRITE_CMD_TX_COMPLETE                             // Write without Response transmission complete. \n See @ref ble_gattc_evt_write_cmd_tx_complete_t.
)
View Source
const (
	GATTS_EVT_WRITE                = GATTS_EVT_BASE + iota // Write operation performed. \n See @ref ble_gatts_evt_write_t.
	GATTS_EVT_RW_AUTHORIZE_REQUEST                         // Read/Write Authorization request. \n Reply with @ref sd_ble_gatts_rw_authorize_reply. \n See @ref ble_gatts_evt_rw_authorize_request_t.
	GATTS_EVT_SYS_ATTR_MISSING                             // A persistent system attribute access is pending. \n Respond with @ref sd_ble_gatts_sys_attr_set. \n See @ref ble_gatts_evt_sys_attr_missing_t.
	GATTS_EVT_HVC                                          // Handle Value Confirmation. \n See @ref ble_gatts_evt_hvc_t.
	GATTS_EVT_SC_CONFIRM                                   // Service Changed Confirmation. \n No additional event structure applies.
	GATTS_EVT_EXCHANGE_MTU_REQUEST                         // Exchange MTU Request. \n Reply with @ref sd_ble_gatts_exchange_mtu_reply. \n See @ref ble_gatts_evt_exchange_mtu_request_t.
	GATTS_EVT_TIMEOUT                                      // Peer failed to respond to an ATT request in time. \n See @ref ble_gatts_evt_timeout_t.
	GATTS_EVT_HVN_TX_COMPLETE                              // Handle Value Notification transmission complete. \n See @ref ble_gatts_evt_hvn_tx_complete_t.
)
View Source
const (
	GATTS_CFG_SERVICE_CHANGED = GATTS_CFG_BASE + iota // Service changed configuration.
	GATTS_CFG_ATTR_TAB_SIZE                           // Attribute table size configuration.
)
View Source
const (
	L2CAP_EVT_CH_SETUP_REQUEST    = L2CAP_EVT_BASE + 0 // L2CAP Channel Setup Request event. \n See @ref ble_l2cap_evt_ch_setup_request_t.
	L2CAP_EVT_CH_SETUP_REFUSED    = L2CAP_EVT_BASE + 1 // L2CAP Channel Setup Refused event. \n See @ref ble_l2cap_evt_ch_setup_refused_t.
	L2CAP_EVT_CH_SETUP            = L2CAP_EVT_BASE + 2 // L2CAP Channel Setup Completed event. \n See @ref ble_l2cap_evt_ch_setup_t.
	L2CAP_EVT_CH_RELEASED         = L2CAP_EVT_BASE + 3 // L2CAP Channel Released event. \n No additional event structure applies.
	L2CAP_EVT_CH_SDU_BUF_RELEASED = L2CAP_EVT_BASE + 4 // L2CAP Channel SDU data buffer released event. \n See @ref ble_l2cap_evt_ch_sdu_buf_released_t.
	L2CAP_EVT_CH_CREDIT           = L2CAP_EVT_BASE + 5 // L2CAP Channel Credit received. \n See @ref ble_l2cap_evt_ch_credit_t.
	L2CAP_EVT_CH_RX               = L2CAP_EVT_BASE + 6 // L2CAP Channel SDU received. \n See @ref ble_l2cap_evt_ch_rx_t.
	L2CAP_EVT_CH_TX               = L2CAP_EVT_BASE + 7 // L2CAP Channel SDU transmitted. \n See @ref ble_l2cap_evt_ch_tx_t.
)
View Source
const APPEARANCE_BLOOD_PRESSURE_ARM = 897 // Blood Pressure: Arm.
View Source
const APPEARANCE_BLOOD_PRESSURE_WRIST = 898 // Blood Pressure: Wrist.
View Source
const APPEARANCE_CYCLING_CADENCE_SENSOR = 1155 // Cycling: Cadence Sensor.
View Source
const APPEARANCE_CYCLING_CYCLING_COMPUTER = 1153 // Cycling: Cycling Computer.
View Source
const APPEARANCE_CYCLING_POWER_SENSOR = 1156 // Cycling: Power Sensor.
View Source
const APPEARANCE_CYCLING_SPEED_CADENCE_SENSOR = 1157 // Cycling: Speed and Cadence Sensor.
View Source
const APPEARANCE_CYCLING_SPEED_SENSOR = 1154 // Cycling: Speed Sensor.
View Source
const APPEARANCE_GENERIC_BARCODE_SCANNER = 704 // Generic Barcode Scanner.
View Source
const APPEARANCE_GENERIC_BLOOD_PRESSURE = 896 // Generic Blood Pressure.
View Source
const APPEARANCE_GENERIC_CLOCK = 256 // Generic Clock.
View Source
const APPEARANCE_GENERIC_COMPUTER = 128 // Generic Computer.
View Source
const APPEARANCE_GENERIC_CYCLING = 1152 // Generic Cycling.
View Source
const APPEARANCE_GENERIC_DISPLAY = 320 // Generic Display.
View Source
const APPEARANCE_GENERIC_EYE_GLASSES = 448 // Generic Eye-glasses.
View Source
const APPEARANCE_GENERIC_GLUCOSE_METER = 1024 // Generic Glucose Meter.
View Source
const APPEARANCE_GENERIC_HEART_RATE_SENSOR = 832 // Generic Heart rate Sensor.
View Source
const APPEARANCE_GENERIC_HID = 960 // Human Interface Device (HID).
View Source
const APPEARANCE_GENERIC_KEYRING = 576 // Generic Keyring.
View Source
const APPEARANCE_GENERIC_MEDIA_PLAYER = 640 // Generic Media Player.
View Source
const APPEARANCE_GENERIC_OUTDOOR_SPORTS_ACT = 5184 // Generic Outdoor Sports Activity.
View Source
const APPEARANCE_GENERIC_PHONE = 64 // Generic Phone.
View Source
const APPEARANCE_GENERIC_PULSE_OXIMETER = 3136 // Generic Pulse Oximeter.
View Source
const APPEARANCE_GENERIC_REMOTE_CONTROL = 384 // Generic Remote Control.
View Source
const APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR = 1088 // Generic Running Walking Sensor.
View Source
const APPEARANCE_GENERIC_TAG = 512 // Generic Tag.
View Source
const APPEARANCE_GENERIC_THERMOMETER = 768 // Generic Thermometer.
View Source
const APPEARANCE_GENERIC_WATCH = 192 // Generic Watch.
View Source
const APPEARANCE_GENERIC_WEIGHT_SCALE = 3200 // Generic Weight Scale.
View Source
const APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT = 833 // Heart Rate Sensor: Heart Rate Belt.
View Source
const APPEARANCE_HID_BARCODE = 968 // Barcode Scanner (HID Subtype).
View Source
const APPEARANCE_HID_CARD_READER = 966 // Card Reader (HID Subtype).
View Source
const APPEARANCE_HID_DIGITAL_PEN = 967 // Digital Pen (HID Subtype).
View Source
const APPEARANCE_HID_DIGITIZERSUBTYPE = 965 // Digitizer Tablet (HID Subtype).
View Source
const APPEARANCE_HID_GAMEPAD = 964 // Gamepad (HID Subtype).
View Source
const APPEARANCE_HID_JOYSTICK = 963 // Joystick (HID Subtype).
View Source
const APPEARANCE_HID_KEYBOARD = 961 // Keyboard (HID Subtype).
View Source
const APPEARANCE_HID_MOUSE = 962 // Mouse (HID Subtype).
View Source
const APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_DISP = 5186 // Location and Navigation Display Device (Outdoor Sports Activity subtype).
View Source
const APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD = 5188 // Location and Navigation Pod (Outdoor Sports Activity subtype).
View Source
const APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_DISP = 5185 // Location Display Device (Outdoor Sports Activity subtype).
View Source
const APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD = 5187 // Location Pod (Outdoor Sports Activity subtype).
View Source
const APPEARANCE_PULSE_OXIMETER_FINGERTIP = 3137 // Fingertip (Pulse Oximeter subtype).
View Source
const APPEARANCE_PULSE_OXIMETER_WRIST_WORN = 3138 // Wrist Worn(Pulse Oximeter subtype).
View Source
const APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE = 1089 // Running Walking Sensor: In-Shoe.
View Source
const APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP = 1091 // Running Walking Sensor: On-Hip.
View Source
const APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE = 1090 // Running Walking Sensor: On-Shoe.
View Source
const APPEARANCE_THERMOMETER_EAR = 769 // Thermometer: Ear.
View Source
const APPEARANCE_UNKNOWN = 0 // Unknown.
View Source
const APPEARANCE_WATCH_SPORTS_WATCH = 193 // Watch: Sports Watch.
View Source
const CFG_BASE = 0x01 // Common BLE configuration base.
View Source
const CFG_INVALID = 0x00 // Invalid BLE configuration.
View Source
const CFG_LAST = 0x1F // Common BLE configuration last.
View Source
const (
	COMMON_CFG_VS_UUID = CFG_BASE + iota // Vendor specific base UUID configuration
)
View Source
const CONN_CFG_BASE = 0x20 // BLE connection configuration base.
View Source
const CONN_CFG_LAST = 0x3F // BLE connection configuration last.
View Source
const CONN_CFG_TAG_DEFAULT = 0 // Default configuration tag, SoftDevice default connection configuration.
View Source
const CONN_HANDLE_ALL = 0xFFFE // Applies to all Connection Handles.
View Source
const CONN_HANDLE_INVALID = 0xFFFF // Invalid Connection Handle.
View Source
const ERROR_BLOCKED_BY_OTHER_LINKS = (nrf.ERROR_STK_BASE_NUM + 0x006) // The attempt to change link settings failed due to the scheduling of other links.
View Source
const ERROR_GAP_DEVICE_IDENTITIES_DUPLICATE = (GAP_ERR_BASE + 0x005) // The device identity list contains entries with duplicate identity addresses.
View Source
const ERROR_GAP_DEVICE_IDENTITIES_IN_USE = (GAP_ERR_BASE + 0x004) // Attempt to modify the device identity list while already in use by another operation.
View Source
const ERROR_GAP_DISCOVERABLE_WITH_WHITELIST = (GAP_ERR_BASE + 0x001) // Use of Whitelist not permitted with discoverable advertising.
View Source
const ERROR_GAP_INVALID_BLE_ADDR = (GAP_ERR_BASE + 0x002) // The upper two bits of the address do not correspond to the specified address type.
View Source
const ERROR_GAP_UUID_LIST_MISMATCH = (GAP_ERR_BASE + 0x000) // UUID list does not contain an integral number of UUIDs.
View Source
const ERROR_GAP_WHITELIST_IN_USE = (GAP_ERR_BASE + 0x003) // Attempt to modify the whitelist while already in use by another operation.
View Source
const ERROR_GATTC_PROC_NOT_PERMITTED = (GATTC_ERR_BASE + 0x000) // Procedure not Permitted.
View Source
const ERROR_GATTS_INVALID_ATTR_TYPE = (GATTS_ERR_BASE + 0x000) // Invalid attribute type.
View Source
const ERROR_GATTS_SYS_ATTR_MISSING = (GATTS_ERR_BASE + 0x001) // System Attributes missing.
View Source
const ERROR_INVALID_ADV_HANDLE = (nrf.ERROR_STK_BASE_NUM + 0x004) // Invalid advertising handle.
View Source
const ERROR_INVALID_ATTR_HANDLE = (nrf.ERROR_STK_BASE_NUM + 0x003) // Invalid attribute handle.
View Source
const ERROR_INVALID_CONN_HANDLE = (nrf.ERROR_STK_BASE_NUM + 0x002) // Invalid connection handle.
View Source
const ERROR_INVALID_ROLE = (nrf.ERROR_STK_BASE_NUM + 0x005) // Invalid role.
View Source
const ERROR_NOT_ENABLED = (nrf.ERROR_STK_BASE_NUM + 0x001) // @ref sd_ble_enable has not been called.
View Source
const EVT_BASE = 0x01 // Common BLE Event base.
View Source
const EVT_INVALID = 0x00 // Invalid BLE Event.
View Source
const EVT_LAST = 0x0F // Common BLE Event last.
View Source
const EVT_PTR_ALIGNMENT = 4
View Source
const GAP_ADDR_LEN = (6)
View Source
const GAP_ADDR_TYPE_ANONYMOUS = 0x7F // An advertiser may advertise without its address. This type of advertising is called anonymous.
View Source
const GAP_ADDR_TYPE_PUBLIC = 0x00 // Public (identity) address.
View Source
const GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE = 0x03 // Random private non-resolvable address.
View Source
const GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE = 0x02 // Random private resolvable address.
View Source
const GAP_ADDR_TYPE_RANDOM_STATIC = 0x01 // Random static (identity) address.
View Source
const GAP_ADV_DATA_STATUS_COMPLETE = 0x00 // All data in the advertising event have been received.
View Source
const GAP_ADV_DATA_STATUS_INCOMPLETE_MISSED = 0x03 // Failed to receive the remaining data. @note This value will only be used if @ref ble_gap_adv_report_type_t::extended_pdu is set to true.
View Source
const GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA = 0x01 // More data to be received. @note This value will only be used if @ref ble_gap_scan_params_t::report_incomplete_evts and @ref ble_gap_adv_report_type_t::extended_pdu are set to true.
View Source
const GAP_ADV_DATA_STATUS_INCOMPLETE_TRUNCATED = 0x02 // Incomplete data. Buffer size insufficient to receive more. @note This value will only be used if @ref ble_gap_adv_report_type_t::extended_pdu is set to true.
View Source
const GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE = (GAP_ADV_FLAG_LE_GENERAL_DISC_MODE | GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) // LE General Discoverable Mode, BR/EDR not supported.
View Source
const GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE = (GAP_ADV_FLAG_LE_LIMITED_DISC_MODE | GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) // LE Limited Discoverable Mode, BR/EDR not supported.
View Source
const GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED = (0x04) // BR/EDR not supported.
View Source
const GAP_ADV_FLAG_LE_BR_EDR_CONTROLLER = (0x08) // Simultaneous LE and BR/EDR, Controller.
View Source
const GAP_ADV_FLAG_LE_BR_EDR_HOST = (0x10) // Simultaneous LE and BR/EDR, Host.
View Source
const GAP_ADV_FLAG_LE_GENERAL_DISC_MODE = (0x02) // LE General Discoverable Mode.
View Source
const GAP_ADV_FLAG_LE_LIMITED_DISC_MODE = (0x01) // LE Limited Discoverable Mode.
View Source
const GAP_ADV_FP_ANY = 0x00 // Allow scan requests and connect requests from any device.
View Source
const GAP_ADV_FP_FILTER_BOTH = 0x03 // Filter both scan and connect requests with whitelist.
View Source
const GAP_ADV_FP_FILTER_CONNREQ = 0x02 // Filter connect requests with whitelist.
View Source
const GAP_ADV_FP_FILTER_SCANREQ = 0x01 // Filter scan requests with whitelist.
View Source
const GAP_ADV_INTERVAL_MAX = 0x004000 // Maximum Advertising interval in 625 us units, i.e. 10.24 s.
View Source
const GAP_ADV_INTERVAL_MIN = 0x000020 // Minimum Advertising interval in 625 us units, i.e. 20 ms.
View Source
const GAP_ADV_REPORT_SET_ID_NOT_AVAILABLE = 0xFF
View Source
const GAP_ADV_SET_COUNT_DEFAULT = (1)
View Source
const GAP_ADV_SET_COUNT_MAX = (1)
View Source
const GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED = (238) // Maximum supported data length for an extended connectable advertising set.
View Source
const GAP_ADV_SET_DATA_SIZE_EXTENDED_MAX_SUPPORTED = (255) // Maximum supported data length for an extended advertising set.
View Source
const GAP_ADV_SET_DATA_SIZE_MAX = (31) // Maximum data length for an advertising set. If more advertising data is required, use extended advertising instead.
View Source
const GAP_ADV_SET_HANDLE_NOT_SET = (0xFF)
View Source
const GAP_ADV_TIMEOUT_GENERAL_UNLIMITED = (0) // Unlimited advertising in general discoverable mode. For high duty cycle advertising, this corresponds to @ref BLE_GAP_ADV_TIMEOUT_HIGH_DUTY_MAX.
View Source
const GAP_ADV_TIMEOUT_HIGH_DUTY_MAX = (128) // Maximum high duty advertising time in 10 ms units. Corresponds to 1.28 s.
View Source
const GAP_ADV_TIMEOUT_LIMITED_MAX = (18000) // Maximum advertising time in 10 ms units corresponding to TGAP(lim_adv_timeout) = 180 s in limited discoverable mode.
View Source
const GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED = 0x03 // Connectable non-scannable directed advertising events. @note Advertising data is not supported.
View Source
const GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE = 0x02 // Connectable non-scannable directed advertising events. Advertising interval is less that 3.75 ms. Use this type for fast reconnections. @note Advertising data is not supported.
View Source
const GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED = 0x01 // Connectable and scannable undirected advertising events.
View Source
const GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_DIRECTED = 0x07 // Connectable non-scannable directed advertising events using extended advertising PDUs.
View Source
const GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED = 0x06 // Connectable non-scannable undirected advertising events using extended advertising PDUs.
View Source
const GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_DIRECTED = 0x0B // Non-connectable non-scannable directed advertising events using extended advertising PDUs.
View Source
const GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED = 0x0A // Non-connectable non-scannable undirected advertising events using extended advertising PDUs.
View Source
const GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_DIRECTED = 0x09 // Non-connectable scannable directed advertising events using extended advertising PDUs. @note Only scan response data is supported.
View Source
const GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED = 0x08 // Non-connectable scannable undirected advertising events using extended advertising PDUs. @note Only scan response data is supported.
View Source
const GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED = 0x05 // Non-connectable non-scannable undirected advertising events.
View Source
const GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED = 0x04 // Non-connectable scannable undirected advertising events.
View Source
const GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE = 0x07 // Complete list of 128 bit service UUIDs.
View Source
const GAP_AD_TYPE_128BIT_SERVICE_UUID_MORE_AVAILABLE = 0x06 // Partial list of 128 bit service UUIDs.
View Source
const GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE = 0x03 // Complete list of 16 bit service UUIDs.
View Source
const GAP_AD_TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE = 0x02 // Partial list of 16 bit service UUIDs.
View Source
const GAP_AD_TYPE_32BIT_SERVICE_UUID_COMPLETE = 0x05 // Complete list of 32 bit service UUIDs.
View Source
const GAP_AD_TYPE_32BIT_SERVICE_UUID_MORE_AVAILABLE = 0x04 // Partial list of 32 bit service UUIDs.
View Source
const GAP_AD_TYPE_3D_INFORMATION_DATA = 0x3D // 3D Information Data.
View Source
const GAP_AD_TYPE_ADVERTISING_INTERVAL = 0x1A // Advertising Interval.
View Source
const GAP_AD_TYPE_APPEARANCE = 0x19 // Appearance.
View Source
const GAP_AD_TYPE_CLASS_OF_DEVICE = 0x0D // Class of device.
View Source
const GAP_AD_TYPE_COMPLETE_LOCAL_NAME = 0x09 // Complete local device name.
View Source
const GAP_AD_TYPE_FLAGS = 0x01 // Flags for discoverability.
View Source
const GAP_AD_TYPE_LESC_CONFIRMATION_VALUE = 0x22 // LE Secure Connections Confirmation Value
View Source
const GAP_AD_TYPE_LESC_RANDOM_VALUE = 0x23 // LE Secure Connections Random Value
View Source
const GAP_AD_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS = 0x1B // LE Bluetooth Device Address.
View Source
const GAP_AD_TYPE_LE_ROLE = 0x1C // LE Role.
View Source
const GAP_AD_TYPE_MANUFACTURER_SPECIFIC_DATA = 0xFF // Manufacturer Specific Data.
View Source
const GAP_AD_TYPE_PUBLIC_TARGET_ADDRESS = 0x17 // Public Target Address.
View Source
const GAP_AD_TYPE_RANDOM_TARGET_ADDRESS = 0x18 // Random Target Address.
View Source
const GAP_AD_TYPE_SECURITY_MANAGER_OOB_FLAGS = 0x11 // Security Manager Out Of Band Flags.
View Source
const GAP_AD_TYPE_SECURITY_MANAGER_TK_VALUE = 0x10 // Security Manager TK Value.
View Source
const GAP_AD_TYPE_SERVICE_DATA = 0x16 // Service Data - 16-bit UUID.
View Source
const GAP_AD_TYPE_SERVICE_DATA_128BIT_UUID = 0x21 // Service Data - 128-bit UUID.
View Source
const GAP_AD_TYPE_SERVICE_DATA_32BIT_UUID = 0x20 // Service Data - 32-bit UUID.
View Source
const GAP_AD_TYPE_SHORT_LOCAL_NAME = 0x08 // Short local device name.
View Source
const GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C = 0x0E // Simple Pairing Hash C.
View Source
const GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C256 = 0x1D // Simple Pairing Hash C-256.
View Source
const GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R = 0x0F // Simple Pairing Randomizer R.
View Source
const GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R256 = 0x1E // Simple Pairing Randomizer R-256.
View Source
const GAP_AD_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE = 0x12 // Slave Connection Interval Range.
View Source
const GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_128BIT = 0x15 // List of 128-bit Service Solicitation UUIDs.
View Source
const GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_16BIT = 0x14 // List of 16-bit Service Solicitation UUIDs.
View Source
const GAP_AD_TYPE_TX_POWER_LEVEL = 0x0A // Transmit power level.
View Source
const GAP_AD_TYPE_URI = 0x24 // URI
View Source
const GAP_AUTH_KEY_TYPE_NONE = 0x00 // No key (may be used to reject).
View Source
const GAP_AUTH_KEY_TYPE_OOB = 0x02 // Out Of Band data.
View Source
const GAP_AUTH_KEY_TYPE_PASSKEY = 0x01 // 6-digit Passkey.
View Source
const GAP_AUTH_PAYLOAD_TIMEOUT_MAX = (48000) // Maximum authenticated payload timeout in 10 ms units, i.e. 8 minutes.
View Source
const GAP_AUTH_PAYLOAD_TIMEOUT_MIN = (1) // Minimum authenticated payload timeout in 10 ms units, i.e. 10 ms.
View Source
const GAP_CAR_INCL_CONFIG_DEFAULT = (GAP_CHAR_INCL_CONFIG_INCLUDE) // Included by default.
View Source
const GAP_CFG_BASE = 0x40 // GAP BLE configuration base.
View Source
const GAP_CFG_LAST = 0x5F // GAP BLE configuration last.
View Source
const GAP_CHANNEL_COUNT = (40)
View Source
const GAP_CHAR_INCL_CONFIG_EXCLUDE_WITHOUT_SPACE = (2) // Do not include the characteristic in the Attribute table. The SoftDevice will not reserve the attribute handles which are otherwise used for this characteristic.
View Source
const GAP_CHAR_INCL_CONFIG_EXCLUDE_WITH_SPACE = (1) // Do not include the characteristic in the Attribute table. The SoftDevice will reserve the attribute handles which are otherwise used for this characteristic. By reserving the attribute handles it will be possible to upgrade the SoftDevice without changing handle of the Service Changed characteristic.
View Source
const GAP_CHAR_INCL_CONFIG_INCLUDE = (0) // Include the characteristic in the Attribute Table
View Source
const GAP_CONN_COUNT_DEFAULT = (1)
View Source
const GAP_CP_CONN_SUP_TIMEOUT_MAX = 0x0C80 // Highest supervision timeout permitted, in units of 10 ms, i.e. 32 s.
View Source
const GAP_CP_CONN_SUP_TIMEOUT_MIN = 0x000A // Lowest supervision timeout permitted, in units of 10 ms, i.e. 100 ms.
View Source
const GAP_CP_CONN_SUP_TIMEOUT_NONE = 0xFFFF // No new supervision timeout specified in connect parameters.
View Source
const GAP_CP_MAX_CONN_INTVL_MAX = 0x0C80 // Highest maximum connection interval permitted, in units of 1.25 ms, i.e. 4 s.
View Source
const GAP_CP_MAX_CONN_INTVL_MIN = 0x0006 // Lowest maximum connection interval permitted, in units of 1.25 ms, i.e. 7.5 ms.
View Source
const GAP_CP_MAX_CONN_INTVL_NONE = 0xFFFF // No new maximum connection interval specified in connect parameters.
View Source
const GAP_CP_MIN_CONN_INTVL_MAX = 0x0C80 // Highest minimum connection interval permitted, in units of 1.25 ms, i.e. 4 s.
View Source
const GAP_CP_MIN_CONN_INTVL_MIN = 0x0006 // Lowest minimum connection interval permitted, in units of 1.25 ms, i.e. 7.5 ms.
View Source
const GAP_CP_MIN_CONN_INTVL_NONE = 0xFFFF // No new minimum connection interval specified in connect parameters.
View Source
const GAP_CP_SLAVE_LATENCY_MAX = 0x01F3 // Highest slave latency permitted, in connection events.
View Source
const GAP_DATA_LENGTH_AUTO = 0
View Source
const GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S = (900) // 15 minutes.
View Source
const GAP_DEVICE_IDENTITIES_MAX_COUNT = (8)
View Source
const GAP_DEVNAME_DEFAULT = "nRF5x" // Default device name value.
View Source
const GAP_DEVNAME_DEFAULT_LEN = 31 // Default number of octets in device name.
View Source
const GAP_DEVNAME_MAX_LEN = 248 // Maximum number of octets in device name.
View Source
const GAP_DISC_MODE_GENERAL = 0x02 // General Discovery Mode.
View Source
const GAP_DISC_MODE_LIMITED = 0x01 // Limited Discovery Mode.
View Source
const GAP_DISC_MODE_NOT_DISCOVERABLE = 0x00 // Not discoverable discovery Mode.
View Source
const GAP_ERR_BASE = (nrf.ERROR_STK_BASE_NUM + 0x200) // GAP specific errors.
View Source
const GAP_EVENT_LENGTH_CODED_PHY_MIN = (6) // The shortest event length in 1.25 ms units supporting LE Coded PHY.
View Source
const GAP_EVENT_LENGTH_DEFAULT = (3) // Default event length, in 1.25 ms units.
View Source
const GAP_EVENT_LENGTH_MIN = (2) // Minimum event length, in 1.25 ms units.
View Source
const GAP_EVT_ADV_SET_TERMINATED_REASON_LIMIT_REACHED = 0x02 // @ref ble_gap_adv_params_t::max_adv_evts was reached.
View Source
const GAP_EVT_ADV_SET_TERMINATED_REASON_TIMEOUT = 0x01 // Timeout value reached.
View Source
const GAP_EVT_BASE = 0x10 // GAP BLE Event base.
View Source
const GAP_EVT_LAST = 0x2F // GAP BLE Event last.
View Source
const GAP_IO_CAPS_DISPLAY_ONLY = 0x00 // Display Only.
View Source
const GAP_IO_CAPS_DISPLAY_YESNO = 0x01 // Display and Yes/No entry.
View Source
const GAP_IO_CAPS_KEYBOARD_DISPLAY = 0x04 // Keyboard and Display.
View Source
const GAP_IO_CAPS_KEYBOARD_ONLY = 0x02 // Keyboard Only.
View Source
const GAP_IO_CAPS_NONE = 0x03 // No I/O capabilities.
View Source
const GAP_KP_NOT_TYPE_PASSKEY_CLEAR = 0x03 // Passkey cleared.
View Source
const GAP_KP_NOT_TYPE_PASSKEY_DIGIT_IN = 0x01 // Passkey digit entered.
View Source
const GAP_KP_NOT_TYPE_PASSKEY_DIGIT_OUT = 0x02 // Passkey digit erased.
View Source
const GAP_KP_NOT_TYPE_PASSKEY_END = 0x04 // Passkey entry completed.
View Source
const GAP_KP_NOT_TYPE_PASSKEY_START = 0x00 // Passkey entry started.
View Source
const GAP_LESC_DHKEY_LEN = 32
View Source
const GAP_LESC_P256_PK_LEN = 64
View Source
const GAP_MAX_PRIVATE_ADDR_CYCLE_INTERVAL_S = (41400) // 11 hours 30 minutes.
View Source
const GAP_OPT_BASE = 0x20 // GAP BLE Option base.
View Source
const GAP_OPT_LAST = 0x3F // GAP BLE Option last.
View Source
const GAP_PASSKEY_LEN = 6
View Source
const GAP_PHYS_SUPPORTED = (GAP_PHY_1MBPS | GAP_PHY_2MBPS | GAP_PHY_CODED) // All PHYs are supported.
View Source
const GAP_PHY_1MBPS = 0x01 // 1 Mbps PHY.
View Source
const GAP_PHY_2MBPS = 0x02 // 2 Mbps PHY.
View Source
const GAP_PHY_AUTO = 0x00 // Automatic PHY selection. Refer @ref sd_ble_gap_phy_update for more information.
View Source
const GAP_PHY_CODED = 0x04 // Coded PHY.
View Source
const GAP_PHY_NOT_SET = 0xFF // PHY is not configured.
View Source
const GAP_POWER_LEVEL_INVALID = 127
View Source
const GAP_PPCP_INCL_CONFIG_DEFAULT = (GAP_CHAR_INCL_CONFIG_INCLUDE) // Included by default.
View Source
const GAP_PRIVACY_MODE_DEVICE_PRIVACY = 0x01 // Device will send and accept only private addresses for its own address.
View Source
const GAP_PRIVACY_MODE_NETWORK_PRIVACY = 0x02 // Device will send and accept only private addresses for its own address, and will not accept a peer using identity address as sender address when the peer IRK is exchanged, non-zero and added to the identity list.
View Source
const GAP_PRIVACY_MODE_OFF = 0x00 // Device will send and accept its identity address for its own address.
View Source
const GAP_QOS_CHANNEL_SURVEY_INTERVAL_CONTINUOUS = (0) // Continuous channel survey.
View Source
const GAP_QOS_CHANNEL_SURVEY_INTERVAL_MAX_US = (4000000) // Maximum channel survey interval in microseconds (4 s).
View Source
const GAP_QOS_CHANNEL_SURVEY_INTERVAL_MIN_US = (7500) // Minimum channel survey interval in microseconds (7.5 ms).
View Source
const GAP_ROLE_CENTRAL = 0x2 // Central Role.
View Source
const GAP_ROLE_COUNT_CENTRAL_DEFAULT = (3) // Default maximum number of connections concurrently acting as centrals.
View Source
const GAP_ROLE_COUNT_CENTRAL_SEC_DEFAULT = (1) // Default number of SMP instances shared between all connections acting as centrals.
View Source
const GAP_ROLE_COUNT_COMBINED_MAX = (20) // Maximum supported number of concurrent connections in the peripheral and central roles combined.
View Source
const GAP_ROLE_COUNT_PERIPH_DEFAULT = (1) // Default maximum number of connections concurrently acting as peripherals.
View Source
const GAP_ROLE_INVALID = 0x0 // Invalid Role.
View Source
const GAP_ROLE_PERIPH = 0x1 // Peripheral Role.
View Source
const GAP_RSSI_THRESHOLD_INVALID = 0xFF
View Source
const GAP_SCAN_BUFFER_EXTENDED_MAX = (1650) // Maximum data length for an extended advertising set.
View Source
const GAP_SCAN_BUFFER_EXTENDED_MAX_SUPPORTED = (255) // Maximum supported data length for an extended advertising set.
View Source
const GAP_SCAN_BUFFER_EXTENDED_MIN = (255) // Minimum data length for an extended advertising set.
View Source
const GAP_SCAN_BUFFER_MAX = (31) // Maximum data length for an advertising set.
View Source
const GAP_SCAN_BUFFER_MIN = (31) // Minimum data length for an advertising set.
View Source
const GAP_SCAN_FP_ACCEPT_ALL = 0x00 // Accept all advertising packets except directed advertising packets not addressed to this device.
View Source
const GAP_SCAN_FP_ALL_NOT_RESOLVED_DIRECTED = 0x02 // Accept all advertising packets specified in @ref BLE_GAP_SCAN_FP_ACCEPT_ALL. In addition, accept directed advertising packets, where the advertiser's address is a resolvable private address that cannot be resolved.
View Source
const GAP_SCAN_FP_WHITELIST = 0x01 // Accept advertising packets from devices in the whitelist except directed packets not addressed to this device.
View Source
const GAP_SCAN_FP_WHITELIST_NOT_RESOLVED_DIRECTED = 0x03 // Accept all advertising packets specified in @ref BLE_GAP_SCAN_FP_WHITELIST. In addition, accept directed advertising packets, where the advertiser's address is a resolvable private address that cannot be resolved.
View Source
const GAP_SCAN_INTERVAL_MAX = 0xFFFF // Maximum Scan interval in 625 us units, i.e. 40,959.375 s.
View Source
const GAP_SCAN_INTERVAL_MIN = 0x0004 // Minimum Scan interval in 625 us units, i.e. 2.5 ms.
View Source
const GAP_SCAN_TIMEOUT_MIN = 0x0001 // Minimum Scan timeout in 10 ms units, i.e 10 ms.
View Source
const GAP_SCAN_TIMEOUT_UNLIMITED = 0x0000 // Continue to scan forever.
View Source
const GAP_SCAN_WINDOW_MAX = 0xFFFF // Maximum Scan window in 625 us units, i.e. 40,959.375 s.
View Source
const GAP_SCAN_WINDOW_MIN = 0x0004 // Minimum Scan window in 625 us units, i.e. 2.5 ms.
View Source
const GAP_SEC_KEY_LEN = 16
View Source
const GAP_SEC_MODE = 0x00 // No key (may be used to reject).
View Source
const GAP_SEC_RAND_LEN = 8
View Source
const GAP_SEC_STATUS_AUTH_REQ = 0x83 // Authentication requirements not met.
View Source
const GAP_SEC_STATUS_BR_EDR_IN_PROG = 0x8D // BR/EDR pairing in progress.
View Source
const GAP_SEC_STATUS_CONFIRM_VALUE = 0x84 // Confirm value failed.
View Source
const GAP_SEC_STATUS_DHKEY_FAILURE = 0x8B // DHKey check failure.
View Source
const GAP_SEC_STATUS_ENC_KEY_SIZE = 0x86 // Encryption key size.
View Source
const GAP_SEC_STATUS_INVALID_PARAMS = 0x8A // Invalid parameters.
View Source
const GAP_SEC_STATUS_NUM_COMP_FAILURE = 0x8C // Numeric Comparison failure.
View Source
const GAP_SEC_STATUS_OOB_NOT_AVAILABLE = 0x82 // Out of Band Key not available.
View Source
const GAP_SEC_STATUS_PAIRING_NOT_SUPP = 0x85 // Pairing not supported.
View Source
const GAP_SEC_STATUS_PASSKEY_ENTRY_FAILED = 0x81 // Passkey entry failed (user canceled or other).
View Source
const GAP_SEC_STATUS_PDU_INVALID = 0x02 // Invalid PDU received.
View Source
const GAP_SEC_STATUS_REPEATED_ATTEMPTS = 0x89 // Too little time elapsed since last attempt.
View Source
const GAP_SEC_STATUS_RFU_RANGE1_BEGIN = 0x03 // Reserved for Future Use range #1 begin.
View Source
const GAP_SEC_STATUS_RFU_RANGE1_END = 0x80 // Reserved for Future Use range #1 end.
View Source
const GAP_SEC_STATUS_RFU_RANGE2_BEGIN = 0x8F // Reserved for Future Use range #2 begin.
View Source
const GAP_SEC_STATUS_RFU_RANGE2_END = 0xFF // Reserved for Future Use range #2 end.
View Source
const GAP_SEC_STATUS_SMP_CMD_UNSUPPORTED = 0x87 // Unsupported SMP command.
View Source
const GAP_SEC_STATUS_SOURCE_LOCAL = 0x00 // Local failure.
View Source
const GAP_SEC_STATUS_SOURCE_REMOTE = 0x01 // Remote failure.
View Source
const GAP_SEC_STATUS_SUCCESS = 0x00 // Procedure completed with success.
View Source
const GAP_SEC_STATUS_TIMEOUT = 0x01 // Procedure timed out.
View Source
const GAP_SEC_STATUS_UNSPECIFIED = 0x88 // Unspecified reason.
View Source
const GAP_SEC_STATUS_X_TRANS_KEY_DISALLOWED = 0x8E // BR/EDR Link Key cannot be used for LE keys.
View Source
const GAP_SVC_BASE = 0x6C // GAP BLE SVC base.
View Source
const GAP_SVC_LAST = 0x9A // GAP BLE SVC last.
View Source
const GAP_TIMEOUT_SRC_AUTH_PAYLOAD = 0x03 // Authenticated payload timeout.
View Source
const GAP_TIMEOUT_SRC_CONN = 0x02 // Connection timeout.
View Source
const GAP_TIMEOUT_SRC_SCAN = 0x01 // Scanning timeout.
View Source
const GAP_WHITELIST_ADDR_MAX_COUNT = (8)
View Source
const GATTC_ATTR_INFO_FORMAT_128BIT = 2 // 128-bit Attribute Information Format.
View Source
const GATTC_ATTR_INFO_FORMAT_16BIT = 1 // 16-bit Attribute Information Format.
View Source
const GATTC_CFG_BASE = 0x80 // GATTC BLE configuration base.
View Source
const GATTC_CFG_LAST = 0x9F // GATTC BLE configuration last.
View Source
const GATTC_ERR_BASE = (nrf.ERROR_STK_BASE_NUM + 0x300) // GATT client specific errors.
View Source
const GATTC_EVT_BASE = 0x30 // GATTC BLE Event base.
View Source
const GATTC_EVT_LAST = 0x4F // GATTC BLE Event last.
View Source
const GATTC_OPT_BASE = 0x60 // GATTC BLE Option base.
View Source
const GATTC_OPT_LAST = 0x7F // GATTC BLE Option last.
View Source
const GATTC_SVC_BASE = 0x9B // GATTC BLE SVC base.
View Source
const GATTC_SVC_LAST = 0xA7 // GATTC BLE SVC last.
View Source
const GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT = 1 // Default number of Write without Response that can be queued for transmission.
View Source
const GATTS_ATTR_TAB_SIZE_DEFAULT = (1408) // Default Attribute Table size.
View Source
const GATTS_ATTR_TAB_SIZE_MIN = (248) // Minimum Attribute Table size
View Source
const GATTS_ATTR_TYPE_CHAR_DECL = 0x04 // Characteristic Declaration.
View Source
const GATTS_ATTR_TYPE_CHAR_VAL = 0x05 // Characteristic Value.
View Source
const GATTS_ATTR_TYPE_DESC = 0x06 // Descriptor.
View Source
const GATTS_ATTR_TYPE_INC_DECL = 0x03 // Include Declaration.
View Source
const GATTS_ATTR_TYPE_INVALID = 0x00 // Invalid Attribute Type.
View Source
const GATTS_ATTR_TYPE_OTHER = 0x07 // Other, non-GATT specific type.
View Source
const GATTS_ATTR_TYPE_PRIM_SRVC_DECL = 0x01 // Primary Service Declaration.
View Source
const GATTS_ATTR_TYPE_SEC_SRVC_DECL = 0x02 // Secondary Service Declaration.
View Source
const GATTS_AUTHORIZE_TYPE_INVALID = 0x00 // Invalid Type.
View Source
const GATTS_AUTHORIZE_TYPE_READ = 0x01 // Authorize a Read Operation.
View Source
const GATTS_AUTHORIZE_TYPE_WRITE = 0x02 // Authorize a Write Request Operation.
View Source
const GATTS_CFG_BASE = 0xA0 // GATTS BLE configuration base.
View Source
const GATTS_CFG_LAST = 0xBF // GATTS BLE configuration last.
View Source
const GATTS_ERR_BASE = (nrf.ERROR_STK_BASE_NUM + 0x400) // GATT server specific errors.
View Source
const GATTS_EVT_BASE = 0x50 // GATTS BLE Event base.
View Source
const GATTS_EVT_LAST = 0x6F // GATTS BLE Event last.
View Source
const GATTS_FIX_ATTR_LEN_MAX = (510) // Maximum length for fixed length Attribute Values.
View Source
const GATTS_HVN_TX_QUEUE_SIZE_DEFAULT = 1 // Default number of Handle Value Notifications that can be queued for transmission.
View Source
const GATTS_OPT_BASE = 0x80 // GATTS BLE Option base.
View Source
const GATTS_OPT_LAST = 0x9F // GATTS BLE Option last.
View Source
const GATTS_OP_EXEC_WRITE_REQ_CANCEL = 0x05 // Execute Write Request: Cancel all prepared writes.
View Source
const GATTS_OP_EXEC_WRITE_REQ_NOW = 0x06 // Execute Write Request: Immediately execute all prepared writes.
View Source
const GATTS_OP_INVALID = 0x00 // Invalid Operation.
View Source
const GATTS_OP_PREP_WRITE_REQ = 0x04 // Prepare Write Request.
View Source
const GATTS_OP_SIGN_WRITE_CMD = 0x03 // Signed Write Command.
View Source
const GATTS_OP_WRITE_CMD = 0x02 // Write Command.
View Source
const GATTS_OP_WRITE_REQ = 0x01 // Write Request.
View Source
const GATTS_SERVICE_CHANGED_DEFAULT = (1) // Default is to include the Service Changed characteristic in the Attribute Table.
View Source
const GATTS_SRVC_TYPE_INVALID = 0x00 // Invalid Service Type.
View Source
const GATTS_SRVC_TYPE_PRIMARY = 0x01 // Primary Service.
View Source
const GATTS_SRVC_TYPE_SECONDARY = 0x02 // Secondary Type.
View Source
const GATTS_SVC_BASE = 0xA8 // GATTS BLE SVC base.
View Source
const GATTS_SVC_LAST = 0xB7 // GATTS BLE SVC last.
View Source
const GATTS_SYS_ATTR_FLAG_SYS_SRVCS = (1 << 0) // Restrict system attributes to system services only.
View Source
const GATTS_SYS_ATTR_FLAG_USR_SRVCS = (1 << 1) // Restrict system attributes to user services only.
View Source
const GATTS_VAR_ATTR_LEN_MAX = (512) // Maximum length for variable length Attribute Values.
View Source
const GATTS_VLOC_INVALID = 0x00 // Invalid Location.
View Source
const GATTS_VLOC_STACK = 0x01 // Attribute Value is located in stack memory, no user memory is required.
View Source
const GATTS_VLOC_USER = 0x02 // Attribute Value is located in user memory. This requires the user to maintain a valid buffer through the lifetime of the attribute, since the stack will read and write directly to the memory using the pointer provided in the APIs. There are no alignment requirements for the buffer.
View Source
const GATT_ATT_MTU_DEFAULT = 23
View Source
const GATT_CFG_BASE = 0x60 // GATT BLE configuration base.
View Source
const GATT_CFG_LAST = 0x7F // GATT BLE configuration last.
View Source
const GATT_CPF_FORMAT_2BIT = 0x02 // Unsigned 2-bit integer.
View Source
const GATT_CPF_FORMAT_BOOLEAN = 0x01 // Boolean.
View Source
const GATT_CPF_FORMAT_DUINT16 = 0x18 // IEEE-20601 format.
View Source
const GATT_CPF_FORMAT_FLOAT = 0x17 // IEEE-11073 32-bit FLOAT.
View Source
const GATT_CPF_FORMAT_FLOAT32 = 0x14 // IEEE-754 32-bit floating point.
View Source
const GATT_CPF_FORMAT_FLOAT64 = 0x15 // IEEE-754 64-bit floating point.
View Source
const GATT_CPF_FORMAT_NIBBLE = 0x03 // Unsigned 4-bit integer.
View Source
const GATT_CPF_FORMAT_RFU = 0x00 // Reserved For Future Use.
View Source
const GATT_CPF_FORMAT_SFLOAT = 0x16 // IEEE-11073 16-bit SFLOAT.
View Source
const GATT_CPF_FORMAT_SINT12 = 0x0D // Signed 12-bit integer.
View Source
const GATT_CPF_FORMAT_SINT128 = 0x13 // Signed 128-bit integer.
View Source
const GATT_CPF_FORMAT_SINT16 = 0x0E // Signed 16-bit integer.
View Source
const GATT_CPF_FORMAT_SINT24 = 0x0F // Signed 24-bit integer.
View Source
const GATT_CPF_FORMAT_SINT32 = 0x10 // Signed 32-bit integer.
View Source
const GATT_CPF_FORMAT_SINT48 = 0x11 // Signed 48-bit integer.
View Source
const GATT_CPF_FORMAT_SINT64 = 0x12 // Signed 64-bit integer.
View Source
const GATT_CPF_FORMAT_SINT8 = 0x0C // Signed 2-bit integer.
View Source
const GATT_CPF_FORMAT_STRUCT = 0x1B // Opaque Structure.
View Source
const GATT_CPF_FORMAT_UINT12 = 0x05 // Unsigned 12-bit integer.
View Source
const GATT_CPF_FORMAT_UINT128 = 0x0B // Unsigned 128-bit integer.
View Source
const GATT_CPF_FORMAT_UINT16 = 0x06 // Unsigned 16-bit integer.
View Source
const GATT_CPF_FORMAT_UINT24 = 0x07 // Unsigned 24-bit integer.
View Source
const GATT_CPF_FORMAT_UINT32 = 0x08 // Unsigned 32-bit integer.
View Source
const GATT_CPF_FORMAT_UINT48 = 0x09 // Unsigned 48-bit integer.
View Source
const GATT_CPF_FORMAT_UINT64 = 0x0A // Unsigned 64-bit integer.
View Source
const GATT_CPF_FORMAT_UINT8 = 0x04 // Unsigned 8-bit integer.
View Source
const GATT_CPF_FORMAT_UTF16S = 0x1A // UTF-16 string.
View Source
const GATT_CPF_FORMAT_UTF8S = 0x19 // UTF-8 string.
View Source
const GATT_CPF_NAMESPACE_BTSIG = 0x01 // Bluetooth SIG defined Namespace.
View Source
const GATT_CPF_NAMESPACE_DESCRIPTION_UNKNOWN = 0x0000 // Namespace Description Unknown.
View Source
const GATT_EXEC_WRITE_FLAG_PREPARED_CANCEL = 0x00 // Cancel prepared write.
View Source
const GATT_EXEC_WRITE_FLAG_PREPARED_WRITE = 0x01 // Execute prepared write.
View Source
const GATT_HANDLE_END = 0xFFFF
View Source
const GATT_HANDLE_INVALID = 0x0000
View Source
const GATT_HANDLE_START = 0x0001
View Source
const GATT_HVX_INDICATION = 0x02 // Handle Value Indication.
View Source
const GATT_HVX_INVALID = 0x00 // Invalid Operation.
View Source
const GATT_HVX_NOTIFICATION = 0x01 // Handle Value Notification.
View Source
const GATT_OPT_BASE = 0x40 // GATT BLE Option base.
View Source
const GATT_OPT_LAST = 0x5F // GATT BLE Option last.
View Source
const GATT_OP_EXEC_WRITE_REQ = 0x05 // Execute Write Request.
View Source
const GATT_OP_INVALID = 0x00 // Invalid Operation.
View Source
const GATT_OP_PREP_WRITE_REQ = 0x04 // Prepare Write Request.
View Source
const GATT_OP_SIGN_WRITE_CMD = 0x03 // Signed Write Command.
View Source
const GATT_OP_WRITE_CMD = 0x02 // Write Command.
View Source
const GATT_OP_WRITE_REQ = 0x01 // Write Request.
View Source
const GATT_STATUS_ATTERR_APP_BEGIN = 0x0180 // ATT Error: Application range begin.
View Source
const GATT_STATUS_ATTERR_APP_END = 0x019F // ATT Error: Application range end.
View Source
const GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND = 0x010A // ATT Error: Used in ATT as Attribute not found.
View Source
const GATT_STATUS_ATTERR_ATTRIBUTE_NOT_LONG = 0x010B // ATT Error: Attribute cannot be read or written using read/write blob requests.
View Source
const GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR = 0x01FD // ATT Common Profile and Service Error: Client Characteristic Configuration Descriptor improperly configured.
View Source
const GATT_STATUS_ATTERR_CPS_OUT_OF_RANGE = 0x01FF // ATT Common Profile and Service Error: Out Of Range.
View Source
const GATT_STATUS_ATTERR_CPS_PROC_ALR_IN_PROG = 0x01FE // ATT Common Profile and Service Error: Procedure Already in Progress.
View Source
const GATT_STATUS_ATTERR_CPS_WRITE_REQ_REJECTED = 0x01FC // ATT Common Profile and Service Error: Write request rejected.
View Source
const GATT_STATUS_ATTERR_INSUF_AUTHENTICATION = 0x0105 // ATT Error: Authenticated link required.
View Source
const GATT_STATUS_ATTERR_INSUF_AUTHORIZATION = 0x0108 // ATT Error: Used in ATT as Insufficient Authorization.
View Source
const GATT_STATUS_ATTERR_INSUF_ENCRYPTION = 0x010F // ATT Error: Encrypted link required.
View Source
const GATT_STATUS_ATTERR_INSUF_ENC_KEY_SIZE = 0x010C // ATT Error: Encryption key size used is insufficient.
View Source
const GATT_STATUS_ATTERR_INSUF_RESOURCES = 0x0111 // ATT Error: Insufficient resources.
View Source
const GATT_STATUS_ATTERR_INVALID = 0x0100 // ATT Error: Invalid Error Code.
View Source
const GATT_STATUS_ATTERR_INVALID_ATT_VAL_LENGTH = 0x010D // ATT Error: Invalid value size.
View Source
const GATT_STATUS_ATTERR_INVALID_HANDLE = 0x0101 // ATT Error: Invalid Attribute Handle.
View Source
const GATT_STATUS_ATTERR_INVALID_OFFSET = 0x0107 // ATT Error: Offset specified was past the end of the attribute.
View Source
const GATT_STATUS_ATTERR_INVALID_PDU = 0x0104 // ATT Error: Used in ATT as Invalid PDU.
View Source
const GATT_STATUS_ATTERR_PREPARE_QUEUE_FULL = 0x0109 // ATT Error: Used in ATT as Prepare Queue Full.
View Source
const GATT_STATUS_ATTERR_READ_NOT_PERMITTED = 0x0102 // ATT Error: Read not permitted.
View Source
const GATT_STATUS_ATTERR_REQUEST_NOT_SUPPORTED = 0x0106 // ATT Error: Used in ATT as Request Not Supported.
View Source
const GATT_STATUS_ATTERR_RFU_RANGE1_BEGIN = 0x0112 // ATT Error: Reserved for Future Use range #1 begin.
View Source
const GATT_STATUS_ATTERR_RFU_RANGE1_END = 0x017F // ATT Error: Reserved for Future Use range #1 end.
View Source
const GATT_STATUS_ATTERR_RFU_RANGE2_BEGIN = 0x01A0 // ATT Error: Reserved for Future Use range #2 begin.
View Source
const GATT_STATUS_ATTERR_RFU_RANGE2_END = 0x01DF // ATT Error: Reserved for Future Use range #2 end.
View Source
const GATT_STATUS_ATTERR_RFU_RANGE3_BEGIN = 0x01E0 // ATT Error: Reserved for Future Use range #3 begin.
View Source
const GATT_STATUS_ATTERR_RFU_RANGE3_END = 0x01FC // ATT Error: Reserved for Future Use range #3 end.
View Source
const GATT_STATUS_ATTERR_UNLIKELY_ERROR = 0x010E // ATT Error: Very unlikely error.
View Source
const GATT_STATUS_ATTERR_UNSUPPORTED_GROUP_TYPE = 0x0110 // ATT Error: Attribute type is not a supported grouping attribute.
View Source
const GATT_STATUS_ATTERR_WRITE_NOT_PERMITTED = 0x0103 // ATT Error: Write not permitted.
View Source
const GATT_STATUS_SUCCESS = 0x0000 // Success.
View Source
const GATT_STATUS_UNKNOWN = 0x0001 // Unknown or not applicable status.
View Source
const GATT_TIMEOUT_SRC_PROTOCOL = 0x00 // ATT Protocol timeout.
View Source
const HCI_AUTHENTICATION_FAILURE = 0x05 // Authentication Failure.
View Source
const HCI_CONNECTION_TIMEOUT = 0x08 // Connection Timeout.
View Source
const HCI_CONN_FAILED_TO_BE_ESTABLISHED = 0x3E // Connection Failed to be Established.
View Source
const HCI_CONN_INTERVAL_UNACCEPTABLE = 0x3B // Connection Interval Unacceptable.
View Source
const HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE = 0x3D // Connection Terminated due to MIC Failure.
View Source
const HCI_CONTROLLER_BUSY = 0x3A // Controller Busy.
View Source
const HCI_DIFFERENT_TRANSACTION_COLLISION = 0x2A // Different Transaction Collision.
View Source
const HCI_DIRECTED_ADVERTISER_TIMEOUT = 0x3C // Directed Advertisement Timeout.
View Source
const HCI_INSTANT_PASSED = 0x28 // Instant Passed.
View Source
const HCI_LOCAL_HOST_TERMINATED_CONNECTION = 0x16 // Local Host Terminated Connection.
View Source
const HCI_MEMORY_CAPACITY_EXCEEDED = 0x07 // Memory Capacity Exceeded.
View Source
const HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED = 0x29 // Pairing with Unit Key Unsupported.
View Source
const HCI_PARAMETER_OUT_OF_MANDATORY_RANGE = 0x30 // Parameter Out Of Mandatory Range.
View Source
const HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES = 0x14 // Remote Device Terminated Connection due to low resources.
View Source
const HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF = 0x15 // Remote Device Terminated Connection due to power off.
View Source
const HCI_REMOTE_USER_TERMINATED_CONNECTION = 0x13 // Remote User Terminated Connection.
View Source
const HCI_STATUS_CODE_COMMAND_DISALLOWED = 0x0C // Command Disallowed.
View Source
const HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS = 0x12 // Invalid BLE Command Parameters.
View Source
const HCI_STATUS_CODE_INVALID_LMP_PARAMETERS = 0x1E // Invalid LMP Parameters.
View Source
const HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION = 0x23 // LMP Error Transaction Collision/LL Procedure Collision.
View Source
const HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED = 0x24 // LMP PDU Not Allowed.
View Source
const HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT = 0x22 // LMP Response Timeout.
View Source
const HCI_STATUS_CODE_PIN_OR_KEY_MISSING = 0x06 // Pin or Key missing.
View Source
const HCI_STATUS_CODE_SUCCESS = 0x00 // Success.
View Source
const HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND = 0x01 // Unknown BLE Command.
View Source
const HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER = 0x02 // Unknown Connection Identifier.
View Source
const HCI_STATUS_CODE_UNSPECIFIED_ERROR = 0x1F // Unspecified Error.
View Source
const HCI_UNSUPPORTED_REMOTE_FEATURE = 0x1A // Unsupported Remote Feature.
View Source
const L2CAP_CFG_BASE = 0xC0 // L2CAP BLE configuration base.
View Source
const L2CAP_CFG_LAST = 0xDF // L2CAP BLE configuration last.
View Source
const L2CAP_CH_COUNT_MAX = (64)
View Source
const L2CAP_CH_SETUP_REFUSED_SRC_LOCAL = (0x01) // Local.
View Source
const L2CAP_CH_SETUP_REFUSED_SRC_REMOTE = (0x02) // Remote.
View Source
const L2CAP_CH_STATUS_CODE_INSUFF_AUTHENTICATION = (0x0005) // Insufficient authentication.
View Source
const L2CAP_CH_STATUS_CODE_INSUFF_AUTHORIZATION = (0x0006) // Insufficient authorization.
View Source
const L2CAP_CH_STATUS_CODE_INSUFF_ENC = (0x0008) // Insufficient encryption.
View Source
const L2CAP_CH_STATUS_CODE_INSUFF_ENC_KEY_SIZE = (0x0007) // Insufficient encryption key size.
View Source
const L2CAP_CH_STATUS_CODE_INVALID_SCID = (0x0009) // Invalid Source CID.
View Source
const L2CAP_CH_STATUS_CODE_LE_PSM_NOT_SUPPORTED = (0x0002) // LE_PSM not supported.
View Source
const L2CAP_CH_STATUS_CODE_NOT_UNDERSTOOD = (0x8000) // Command Reject received instead of LE Credit Based Connection Response.
View Source
const L2CAP_CH_STATUS_CODE_NO_RESOURCES = (0x0004) // No resources available.
View Source
const L2CAP_CH_STATUS_CODE_SCID_ALLOCATED = (0x000A) // Source CID already allocated.
View Source
const L2CAP_CH_STATUS_CODE_SUCCESS = (0x0000) // Success.
View Source
const L2CAP_CH_STATUS_CODE_TIMEOUT = (0xC000) // Operation timed out.
View Source
const L2CAP_CH_STATUS_CODE_UNACCEPTABLE_PARAMS = (0x000B) // Unacceptable parameters.
View Source
const L2CAP_CID_INVALID = (0x0000)
View Source
const L2CAP_CREDITS_DEFAULT = (1)
View Source
const L2CAP_ERR_BASE = (nrf.ERROR_STK_BASE_NUM + 0x100) // L2CAP specific errors.
View Source
const L2CAP_EVT_BASE = 0x70 // L2CAP BLE Event base.
View Source
const L2CAP_EVT_LAST = 0x8F // L2CAP BLE Event last.
View Source
const L2CAP_MPS_MIN = (23)
View Source
const L2CAP_MTU_MIN = (23)
View Source
const L2CAP_OPT_BASE = 0xA0 // L2CAP BLE Option base.
View Source
const L2CAP_OPT_LAST = 0xBF // L2CAP BLE Option last.
View Source
const L2CAP_SVC_BASE = 0xB8 // L2CAP BLE SVC base.
View Source
const L2CAP_SVC_LAST = 0xBF // L2CAP BLE SVC last.
View Source
const OPT_BASE = 0x01 // Common BLE Option base.
View Source
const OPT_INVALID = 0x00 // Invalid BLE Option.
View Source
const OPT_LAST = 0x1F // Common BLE Option last.
View Source
const SVC_BASE = 0x60 // Common BLE SVC base.
View Source
const SVC_LAST = 0x6B // Common BLE SVC last.
View Source
const USER_MEM_TYPE_GATTS_QUEUED_WRITES = 0x01 // User Memory for GATTS queued writes.
View Source
const USER_MEM_TYPE_INVALID = 0x00 // Invalid User Memory Types.
View Source
const UUID_CHARACTERISTIC = 0x2803 // Characteristic.
View Source
const UUID_DESCRIPTOR_CHAR_AGGREGATE_FORMAT = 0x2905 // Characteristic Aggregate Format Descriptor.
View Source
const UUID_DESCRIPTOR_CHAR_EXT_PROP = 0x2900 // Characteristic Extended Properties Descriptor.
View Source
const UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT = 0x2904 // Characteristic Presentation Format Descriptor.
View Source
const UUID_DESCRIPTOR_CHAR_USER_DESC = 0x2901 // Characteristic User Description Descriptor.
View Source
const UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG = 0x2902 // Client Characteristic Configuration Descriptor.
View Source
const UUID_DESCRIPTOR_SERVER_CHAR_CONFIG = 0x2903 // Server Characteristic Configuration Descriptor.
View Source
const UUID_GAP = 0x1800 // Generic Access Profile.
View Source
const UUID_GAP_CHARACTERISTIC_APPEARANCE = 0x2A01 // Appearance Characteristic.
View Source
const UUID_GAP_CHARACTERISTIC_CAR = 0x2AA6 // Central Address Resolution Characteristic.
View Source
const UUID_GAP_CHARACTERISTIC_DEVICE_NAME = 0x2A00 // Device Name Characteristic.
View Source
const UUID_GAP_CHARACTERISTIC_PPCP = 0x2A04 // Peripheral Preferred Connection Parameters Characteristic.
View Source
const UUID_GAP_CHARACTERISTIC_RECONN_ADDR = 0x2A03 // Reconnection Address Characteristic.
View Source
const UUID_GAP_CHARACTERISTIC_RPA_ONLY = 0x2AC9 // Resolvable Private Address Only Characteristic.
View Source
const UUID_GATT = 0x1801 // Generic Attribute Profile.
View Source
const UUID_GATT_CHARACTERISTIC_SERVICE_CHANGED = 0x2A05 // Service Changed Characteristic.
View Source
const UUID_SERVICE_INCLUDE = 0x2802 // Include.
View Source
const UUID_SERVICE_PRIMARY = 0x2800 // Primary Service.
View Source
const UUID_SERVICE_SECONDARY = 0x2801 // Secondary Service.
View Source
const UUID_TYPE_BLE = 0x01 // Bluetooth SIG UUID (16-bit).
View Source
const UUID_TYPE_UNKNOWN = 0x00 // Invalid UUID type.
View Source
const UUID_TYPE_VENDOR_BEGIN = 0x02 // Vendor UUID types start at this index (128-bit).
View Source
const UUID_UNKNOWN = 0x0000 // Reserved UUID.
View Source
const UUID_VS_COUNT_DEFAULT = 10 // Default VS UUID count.
View Source
const UUID_VS_COUNT_MAX = 254 // Maximum VS UUID count.

Variables

This section is empty.

Functions

func AddGATTSCharacteristic

func AddGATTSCharacteristic(service_handle uint16, char_md *GATTSCharMd, attr_char_value *GATTSAttr, handles *GATTSCharHandles) uint32

Add a characteristic.

func AddGATTSDescriptor

func AddGATTSDescriptor(char_handle uint16, attr *GATTSAttr, handle *uint16) uint32

Add a generic attribute.

func AddGATTSInclude

func AddGATTSInclude(service_handle uint16, inc_srvc_handle uint16, include_handle *uint16) uint32

Add an included service.

func AddGATTSService

func AddGATTSService(typ uint8, uuid *UUID, handle *uint16) uint32

Add a service.

func AddUUIDVS

func AddUUIDVS(vs_uuid *UUID128, uuid_type *uint8) uint32

Add a Vendor Specific base UUID.

func AuthenticateGAP

func AuthenticateGAP(conn_handle uint16, sec_params *GAPSecParams) uint32

Initiate Pairing/Bonding.

func CancelGAPConnect

func CancelGAPConnect() uint32

Cancel ongoing connection procedure.

func ChangedGATTSService

func ChangedGATTSService(conn_handle uint16, start_handle uint16, end_handle uint16) uint32

Perform a Service Changed Indication to one or more peers.

func ConfigureGAPAdvSet

func ConfigureGAPAdvSet(adv_handle *uint8, adv_data *GAPAdvData, adv_params *GAPAdvParams) uint32

Configure an advertising set.

func ConfirmGATTCHv

func ConfirmGATTCHv(conn_handle uint16, handle uint16) uint32

Handle Value Confirmation.

func ConnectGAP

func ConnectGAP(peer_addr *GAPAddr, scan_params *GAPScanParams, conn_params *GAPConnParams, conn_cfg_tag uint8) uint32

Connect.

func ControlL2capChFlow

func ControlL2capChFlow(conn_handle uint16, local_cid uint16, credits uint16, credits *uint16) uint32

Advanced SDU reception flow control.

func DecodeUUID

func DecodeUUID(uuid_le_len uint8, uuid_le *uint8, uuid *UUID) uint32

Decode UUID bytes.

func DisconnectGAP

func DisconnectGAP(conn_handle uint16, hci_status_code uint8) uint32

Disconnect.

func DiscoverGATTCAttrInfo

func DiscoverGATTCAttrInfo(conn_handle uint16, handle_range *GATTCHandleRange) uint32

Attribute Information Discovery.

func DiscoverGATTCCharacteristics

func DiscoverGATTCCharacteristics(conn_handle uint16, handle_range *GATTCHandleRange) uint32

Characteristic Discovery.

func DiscoverGATTCDescriptors

func DiscoverGATTCDescriptors(conn_handle uint16, handle_range *GATTCHandleRange) uint32

Characteristic Descriptor Discovery.

func DiscoverGATTCPrimaryServices

func DiscoverGATTCPrimaryServices(conn_handle uint16, start_handle uint16, srvc_uuid *UUID) uint32

Primary Service Discovery.

func DiscoverGATTCRelationships

func DiscoverGATTCRelationships(conn_handle uint16, handle_range *GATTCHandleRange) uint32

Relationship Discovery.

func Enable

func Enable(app_ram_base *uint32) uint32

Enable and initialize the BLE stack

func EncodeUUID

func EncodeUUID(uuid *UUID, uuid_le_len *uint8, uuid_le *uint8) uint32

Encode UUID bytes.

func EncryptGAP

func EncryptGAP(conn_handle uint16, master_id *GAPMasterId, enc_info *GAPEncInfo) uint32

Initiate encryption procedure.

func GetEvt

func GetEvt(dest *uint8, len *uint16) uint32

Get an event from the pending events queue.

func GetGAPAddr

func GetGAPAddr(addr *GAPAddr) uint32

Get own Bluetooth Address.

func GetGAPAdvAddr

func GetGAPAdvAddr(adv_handle uint8, addr *GAPAddr) uint32

Get the Address used on air while Advertising.

func GetGAPAppearance

func GetGAPAppearance(appearance *uint16) uint32

Get Appearance.

func GetGAPConnSec

func GetGAPConnSec(conn_handle uint16, conn_sec *GAPConnSec) uint32

Obtain connection security level.

func GetGAPDeviceName

func GetGAPDeviceName(dev_name *uint8, len *uint16) uint32

Get Device Name.

func GetGAPLescOobData

func GetGAPLescOobData(conn_handle uint16, pk_own *GAPLescP256Pk, oobd_own *GAPLescOobData) uint32

Get the local LE Secure Connections OOB data.

func GetGAPNextConnEvtCounter

func GetGAPNextConnEvtCounter(conn_handle uint16, counter *uint16) uint32

Get the next connection event counter.

func GetGAPPpcp

func GetGAPPpcp(conn_params *GAPConnParams) uint32

Get PPCP.

func GetGAPPrivacy

func GetGAPPrivacy(privacy_params *GAPPrivacyParams) uint32

Get Privacy settings

func GetGAPRssi

func GetGAPRssi(conn_handle uint16, rssi *int8, ch_index *uint8) uint32

Get the last RSSI sample.

func GetGATTSAttr

func GetGATTSAttr(handle uint16, uuid *UUID, md *GATTSAttrMd) uint32

Retrieve the UUID and/or metadata of an attribute.

func GetGATTSInitialUserHandle

func GetGATTSInitialUserHandle(handle *uint16) uint32

Retrieve the first valid user handle.

func GetGATTSSysAttr

func GetGATTSSysAttr(conn_handle uint16, sys_attr_data *uint8, len *uint16, flags uint32) uint32

Retrieve the persistent system attributes.

func GetGATTSValue

func GetGATTSValue(conn_handle uint16, handle uint16, value *GATTSValue) uint32

Get an attribute value.

func GetOpt

func GetOpt(opt_id uint32, opt *Opt) uint32

Get a BLE option.

func GetVersion

func GetVersion(version *Version) uint32

Get the local version information (company ID, Link Layer Version, Link Layer Subversion).

func HvxGATTS

func HvxGATTS(conn_handle uint16, hvx_params *GATTSHvxParams) uint32

Handle Value Notification or Indication.

func NotifyGAPKeypress

func NotifyGAPKeypress(conn_handle uint16, kp_not uint8) uint32

Notify of a keypress during an authentication procedure.

func ReadGATTC

func ReadGATTC(conn_handle uint16, handle uint16, offset uint16) uint32

Generic read.

func ReadGATTCCharValueByUUID

func ReadGATTCCharValueByUUID(conn_handle uint16, uuid *UUID, handle_range *GATTCHandleRange) uint32

Read Characteristic Value by UUID.

func ReadGATTCCharValues

func ReadGATTCCharValues(conn_handle uint16, handles *uint16, handle_count uint16) uint32

Read multiple Characteristic Values.

func ReleaseL2capCh

func ReleaseL2capCh(conn_handle uint16, local_cid uint16) uint32

Release an L2CAP channel.

func RemoveUUIDVS

func RemoveUUIDVS(uuid_type *uint8) uint32

Remove a Vendor Specific base UUID.

func ReplyGAPAuthKey

func ReplyGAPAuthKey(conn_handle uint16, key_type uint8, key *uint8) uint32

Reply with an authentication key.

func ReplyGAPLescDhkey

func ReplyGAPLescDhkey(conn_handle uint16, dhkey *GAPLescDhkey) uint32

Reply with an LE Secure Connections DHKey.

func ReplyGAPSecInfo

func ReplyGAPSecInfo(conn_handle uint16, enc_info *GAPEncInfo, id_info *GAPIrk, sign_info *GAPSignInfo) uint32

Reply with Security Information.

func ReplyGAPSecParams

func ReplyGAPSecParams(conn_handle uint16, sec_status uint8, sec_params *GAPSecParams, sec_keyset *GAPSecKeyset) uint32

Reply with Security Parameters.

func ReplyGATTSExchangeMtu

func ReplyGATTSExchangeMtu(conn_handle uint16, server_rx_mtu uint16) uint32

Reply to Exchange MTU Request.

func ReplyGATTSRwAuthorize

func ReplyGATTSRwAuthorize(conn_handle uint16, rw_authorize_reply_params *GATTSRwAuthorizeReplyParams) uint32

Reply to an authorization request for a read or write operation on one or more attributes.

func ReplyUserMem

func ReplyUserMem(conn_handle uint16, block *UserMemBlock) uint32

User Memory Reply.

func RequestGATTCExchangeMtu

func RequestGATTCExchangeMtu(conn_handle uint16, client_rx_mtu uint16) uint32

Exchange MTU Request.

func RxL2capCh

func RxL2capCh(conn_handle uint16, local_cid uint16, sdu_buf *Data) uint32

Receive an SDU on an L2CAP channel.

func SetCfg

func SetCfg(cfg_id uint32, cfg *Cfg, app_ram_base uint32) uint32

Add a configuration to the BLE stack.

func SetGAPAddr

func SetGAPAddr(addr *GAPAddr) uint32

Set own Bluetooth Address.

func SetGAPAppearance

func SetGAPAppearance(appearance uint16) uint32

Set Appearance.

func SetGAPDeviceIdentities

func SetGAPDeviceIdentities(pp_id_keys **GAPIdKey, pp_local_irks **GAPIrk, len uint8) uint32

Set device identity list.

func SetGAPDeviceName

func SetGAPDeviceName(write_perm *GAPConnSecMode, dev_name *uint8, len uint16) uint32

Set Device Name.

func SetGAPLescOobData

func SetGAPLescOobData(conn_handle uint16, oobd_own *GAPLescOobData, oobd_peer *GAPLescOobData) uint32

Set the remote LE Secure Connections OOB data.

func SetGAPPpcp

func SetGAPPpcp(conn_params *GAPConnParams) uint32

Set PPCP.

func SetGAPPrivacy

func SetGAPPrivacy(privacy_params *GAPPrivacyParams) uint32

Set Privacy settings

func SetGAPTxPower

func SetGAPTxPower(role uint8, handle uint16, tx_power int8) uint32

Set TX Power.

func SetGAPWhitelist

func SetGAPWhitelist(pp_wl_addrs **GAPAddr, len uint8) uint32

Set active whitelist.

func SetGATTSSysAttr

func SetGATTSSysAttr(conn_handle uint16, sys_attr_data *uint8, len uint16, flags uint32) uint32

Set the persistent system attributes for a connection.

func SetGATTSValue

func SetGATTSValue(conn_handle uint16, handle uint16, value *GATTSValue) uint32

Set an attribute value.

func SetOpt

func SetOpt(opt_id uint32, opt *Opt) uint32

Set a BLE option.

func SetupL2capCh

func SetupL2capCh(conn_handle uint16, local_cid *uint16, params *L2capChSetupParams) uint32

Set up an L2CAP channel.

func StartGAPAdv

func StartGAPAdv(adv_handle uint8, conn_cfg_tag uint8) uint32

Start Advertising.

func StartGAPConnEvtTrigger

func StartGAPConnEvtTrigger(conn_handle uint16, params *GAPConnEventTrigger) uint32

Start triggering a given task on connection event start.

func StartGAPQosChannelSurvey

func StartGAPQosChannelSurvey(interval_us uint32) uint32

Start Quality of Service (QoS) channel survey module.

func StartGAPRssi

func StartGAPRssi(conn_handle uint16, threshold_dbm uint8, skip_count uint8) uint32

Start reporting of changes in RSSI.

func StartGAPScan

func StartGAPScan(scan_params *GAPScanParams, adv_report_buffer *Data) uint32

Start Scanning.

func StopGAPAdv

func StopGAPAdv(adv_handle uint8) uint32

Stop Advertising.

func StopGAPConnEvtTrigger

func StopGAPConnEvtTrigger(conn_handle uint16) uint32

Stop triggering the task configured using @ref sd_ble_gap_conn_evt_trigger_start.

func StopGAPQosChannelSurvey

func StopGAPQosChannelSurvey() uint32

Stop Quality of Service (QoS) channel survey module.

func StopGAPRssi

func StopGAPRssi(conn_handle uint16) uint32

Stop reporting of changes in RSSI.

func StopGAPScan

func StopGAPScan() uint32

Stop Scanning.

func TxL2capCh

func TxL2capCh(conn_handle uint16, local_cid uint16, sdu_buf *Data) uint32

Transmit an SDU on an L2CAP channel.

func UpdateGAPConnParam

func UpdateGAPConnParam(conn_handle uint16, conn_params *GAPConnParams) uint32

Connection Parameter Update.

func UpdateGAPDataLength

func UpdateGAPDataLength(conn_handle uint16, dl_params *GAPDataLengthParams, dl_limitation *GAPDataLengthLimitation) uint32

Initiate or respond to a Data Length Update Procedure.

func UpdateGAPPhy

func UpdateGAPPhy(conn_handle uint16, gap_phys *GAPPhys) uint32

Initiate or respond to a PHY Update Procedure.

func WriteGATTC

func WriteGATTC(conn_handle uint16, write_params *GATTCWriteParams) uint32

Generic write.

Types

type CommonCfgVSUUID

type CommonCfgVSUUID struct {
	VSUUIDCount uint8 // Number of 128-bit Vendor Specific base UUID bases to allocate memory for. Default value is @ref BLE_UUID_VS_COUNT_DEFAULT. Maximum value is @ref BLE_UUID_VS_COUNT_MAX.
}

type CommonOptPALNA

type CommonOptPALNA struct {
	PACfg      PALNACfg // Power Amplifier configuration
	LNACfg     PALNACfg // Low Noise Amplifier configuration
	PPIChIdSet uint8    // PPI channel used for radio pin setting
	PPIChIdClr uint8    // PPI channel used for radio pin clearing
	GPIOTEChId uint8    // GPIOTE channel used for radio pin toggling
}

type Data

type Data struct {
	Data *uint8 // Pointer to the data buffer provided to/from the application.
	Len  uint16 // Length of the data buffer, in bytes.
}

type EvtHdr

type EvtHdr struct {
	EvtId  uint16 // Value from a BLE_<module>_EVT series.
	EvtLen uint16 // Length in octets including this header.
}

type EvtUserMemRelease

type EvtUserMemRelease struct {
	Typ      uint8        // User memory type, see @ref BLE_USER_MEM_TYPES.
	MemBlock UserMemBlock // User memory block
}

type EvtUserMemRequest

type EvtUserMemRequest struct {
	Typ uint8 // User memory type, see @ref BLE_USER_MEM_TYPES.
}

type GAPAdvData

type GAPAdvData struct {
	AdvData     Data // Advertising data. @note Advertising data can only be specified for a @ref ble_gap_adv_properties_t::type that is allowed to contain advertising data.
	ScanRspData Data // Scan response data. @note Scan response data can only be specified for a @ref ble_gap_adv_properties_t::type that is scannable.
}

type GAPAuxPointer

type GAPAuxPointer struct {
	AuxOffset uint16 // Time offset from the beginning of advertising packet to the auxiliary packet in 100 us units.
	AuxPhy    uint8  // Indicates the PHY on which the auxiliary advertising packet is sent. See @ref BLE_GAP_PHYS.
}

type GAPCfgCarInclCfg

type GAPCfgCarInclCfg struct {
	IncludeCfg uint8 // Inclusion configuration of the Central Address Resolution characteristic. See @ref BLE_GAP_CHAR_INCL_CONFIG. Default is @ref BLE_GAP_CAR_INCL_CONFIG_DEFAULT.
}

type GAPCfgPpcpInclCfg

type GAPCfgPpcpInclCfg struct {
	IncludeCfg uint8 // Inclusion configuration of the Peripheral Preferred Connection Parameters characteristic. See @ref BLE_GAP_CHAR_INCL_CONFIG. Default is @ref BLE_GAP_PPCP_INCL_CONFIG_DEFAULT.
}

type GAPChMask

type GAPChMask [5]uint8

type GAPConnCfg

type GAPConnCfg struct {
	ConnCount   uint8  // The number of concurrent connections the application can create with this configuration. The default and minimum value is @ref BLE_GAP_CONN_COUNT_DEFAULT.
	EventLength uint16 // The time set aside for this connection on every connection interval in 1.25 ms units. The default value is @ref BLE_GAP_EVENT_LENGTH_DEFAULT, the minimum value is @ref BLE_GAP_EVENT_LENGTH_MIN. The event length and the connection interval are the primary parameters for setting the throughput of a connection. See the SoftDevice Specification for details on throughput.
}

type GAPConnEventTrigger

type GAPConnEventTrigger struct {
	PPIChId             uint8  // PPI channel to use. This channel should be regarded as reserved until connection event PPI task triggering is stopped. The PPI channel ID can not be one of the PPI channels reserved by the SoftDevice. See @ref NRF_SOC_SD_PPI_CHANNELS_SD_ENABLED_MSK.
	TaskEndpoint        uint32 // Task Endpoint to trigger.
	ConnEvtCounterStart uint16 // The connection event on which the task triggering should start.
	PeriodInEvents      uint16 // Trigger period. Valid range is [1, 32767]. If the device is in slave role and slave latency is enabled, this parameter should be set to a multiple of (slave latency + 1) to ensure low power operation.
}

type GAPConnParams

type GAPConnParams struct {
	MinConnInterval uint16 // Minimum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.
	MaxConnInterval uint16 // Maximum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.
	SlaveLatency    uint16 // Slave Latency in number of connection events, see @ref BLE_GAP_CP_LIMITS.
	ConnSupTimeout  uint16 // Connection Supervision Timeout in 10 ms units, see @ref BLE_GAP_CP_LIMITS.
}

type GAPConnSec

type GAPConnSec struct {
	SecMode     GAPConnSecMode // Currently active security mode for this connection.
	EncrKeySize uint8          // Length of currently active encryption key, 7 to 16 octets (only applicable for bonding procedures).
}

type GAPDataLengthLimitation

type GAPDataLengthLimitation struct {
	TxPayloadLimitedOctets uint16 // If > 0, the requested TX packet length is too long by this many octets.
	RxPayloadLimitedOctets uint16 // If > 0, the requested RX packet length is too long by this many octets.
	TxRxTimeLimitedUs      uint16 // If > 0, the requested combination of TX and RX packet lengths is too long by this many microseconds.
}

type GAPDataLengthParams

type GAPDataLengthParams struct {
	MaxTxOctets uint16 // Maximum number of payload octets that a Controller supports for transmission of a single Link Layer Data Channel PDU.
	MaxRxOctets uint16 // Maximum number of payload octets that a Controller supports for reception of a single Link Layer Data Channel PDU.
	MaxTxTimeUs uint16 // Maximum time, in microseconds, that a Controller supports for transmission of a single Link Layer Data Channel PDU.
	MaxRxTimeUs uint16 // Maximum time, in microseconds, that a Controller supports for reception of a single Link Layer Data Channel PDU.
}

type GAPEncKey

type GAPEncKey struct {
	EncInfo  GAPEncInfo  // Encryption Information.
	MasterId GAPMasterId // Master Identification.
}

type GAPEvtAdvSetTerminated

type GAPEvtAdvSetTerminated struct {
	Reason                uint8      // Reason for why the advertising set terminated. See @ref BLE_GAP_EVT_ADV_SET_TERMINATED_REASON.
	AdvHandle             uint8      // Advertising handle in which advertising has ended.
	NumCompletedAdvEvents uint8      // If @ref ble_gap_adv_params_t::max_adv_evts was not set to 0, this field indicates the number of completed advertising events.
	AdvData               GAPAdvData // Advertising buffers corresponding to the terminated advertising set. The advertising buffers provided in @ref sd_ble_gap_adv_set_configure are now released.
}

type GAPEvtAuthKeyRequest

type GAPEvtAuthKeyRequest struct {
	KeyType uint8 // See @ref BLE_GAP_AUTH_KEY_TYPES.
}

type GAPEvtConnParamUpdate

type GAPEvtConnParamUpdate struct {
	ConnParams GAPConnParams // GAP Connection Parameters.
}

type GAPEvtConnParamUpdateRequest

type GAPEvtConnParamUpdateRequest struct {
	ConnParams GAPConnParams // GAP Connection Parameters.
}

type GAPEvtConnSecUpdate

type GAPEvtConnSecUpdate struct {
	ConnSec GAPConnSec // Connection security level.
}

type GAPEvtConnected

type GAPEvtConnected struct {
	PeerAddr   GAPAddr       // Bluetooth address of the peer device. If the peer_addr resolved: @ref ble_gap_addr_t::addr_id_peer is set to 1 and the address is the device's identity address.
	Role       uint8         // BLE role for this connection, see @ref BLE_GAP_ROLES
	ConnParams GAPConnParams // GAP Connection Parameters.
	AdvHandle  uint8         // Advertising handle in which advertising has ended. This variable is only set if role is set to @ref BLE_GAP_ROLE_PERIPH.
	AdvData    GAPAdvData    // Advertising buffers corresponding to the terminated advertising set. The advertising buffers provided in @ref sd_ble_gap_adv_set_configure are now released. This variable is only set if role is set to @ref BLE_GAP_ROLE_PERIPH.
}

type GAPEvtDataLengthUpdate

type GAPEvtDataLengthUpdate struct {
	EffectiveParams GAPDataLengthParams // The effective data length parameters.
}

type GAPEvtDataLengthUpdateRequest

type GAPEvtDataLengthUpdateRequest struct {
	PeerParams GAPDataLengthParams // Peer data length parameters.
}

type GAPEvtDisconnected

type GAPEvtDisconnected struct {
	Reason uint8 // HCI error code, see @ref BLE_HCI_STATUS_CODES.
}

type GAPEvtKeyPressed

type GAPEvtKeyPressed struct {
	KpNot uint8 // Keypress notification type, see @ref BLE_GAP_KP_NOT_TYPES.
}

type GAPEvtPhyUpdate

type GAPEvtPhyUpdate struct {
	Status uint8 // Status of the procedure, see @ref BLE_HCI_STATUS_CODES.
	TxPhy  uint8 // TX PHY for this connection, see @ref BLE_GAP_PHYS.
	RxPhy  uint8 // RX PHY for this connection, see @ref BLE_GAP_PHYS.
}

type GAPEvtPhyUpdateRequest

type GAPEvtPhyUpdateRequest struct {
	PeerPreferredPhys GAPPhys // The PHYs the peer prefers to use.
}

type GAPEvtQosChannelSurveyReport

type GAPEvtQosChannelSurveyReport struct {
	ChannelEnergy [GAP_CHANNEL_COUNT]int8 // The measured energy on the Bluetooth Low Energy channels, in dBm, indexed by Channel Index. If no measurement is available for the given channel, channel_energy is set to @ref BLE_GAP_POWER_LEVEL_INVALID.
}

type GAPEvtRssiChanged

type GAPEvtRssiChanged struct {
	Rssi    int8  // Received Signal Strength Indication in dBm. @note ERRATA-153 requires the rssi sample to be compensated based on a temperature measurement.
	ChIndex uint8 // Data Channel Index on which the Signal Strength is measured (0-36).
}

type GAPEvtScanReqReport

type GAPEvtScanReqReport struct {
	AdvHandle uint8   // Advertising handle for the advertising set which received the Scan Request
	Rssi      int8    // Received Signal Strength Indication in dBm. @note ERRATA-153 requires the rssi sample to be compensated based on a temperature measurement.
	PeerAddr  GAPAddr // Bluetooth address of the peer device. If the peer_addr resolved: @ref ble_gap_addr_t::addr_id_peer is set to 1 and the address is the device's identity address.
}

type GAPEvtSecParamsRequest

type GAPEvtSecParamsRequest struct {
	PeerParams GAPSecParams // Initiator Security Parameters.
}

type GAPIdKey

type GAPIdKey struct {
	IdInfo     GAPIrk  // Identity Resolving Key.
	IdAddrInfo GAPAddr // Identity Address.
}

type GAPIrk

type GAPIrk struct {
	Irk [GAP_SEC_KEY_LEN]uint8 // Array containing IRK.
}

type GAPLescDhkey

type GAPLescDhkey struct {
	Key [GAP_LESC_DHKEY_LEN]uint8 // LE Secure Connections Elliptic Curve Diffie-Hellman Key. Stored in little-endian.
}

type GAPLescOobData

type GAPLescOobData struct {
	Addr GAPAddr                // Bluetooth address of the device.
	R    [GAP_SEC_KEY_LEN]uint8 // Random Number.
	C    [GAP_SEC_KEY_LEN]uint8 // Confirm Value.
}

type GAPLescP256Pk

type GAPLescP256Pk struct {
	Pk [GAP_LESC_P256_PK_LEN]uint8 // LE Secure Connections Elliptic Curve Diffie-Hellman P-256 Public Key. Stored in the standard SMP protocol format: {X,Y} both in little-endian.
}

type GAPMasterId

type GAPMasterId struct {
	Ediv uint16                  // Encrypted Diversifier.
	Rand [GAP_SEC_RAND_LEN]uint8 // Random Number.
}

type GAPOptAuthPayloadTimeout

type GAPOptAuthPayloadTimeout struct {
	ConnHandle         uint16 // Connection Handle
	AuthPayloadTimeout uint16 // Requested timeout in 10 ms unit, see @ref BLE_GAP_AUTH_PAYLOAD_TIMEOUT.
}

type GAPOptChMap

type GAPOptChMap struct {
	ConnHandle uint16   // Connection Handle (only applicable for get)
	ChMap      [5]uint8 // Channel Map (37-bit).
}

type GAPOptLocalConnLatency

type GAPOptLocalConnLatency struct {
	ConnHandle       uint16  // Connection Handle
	RequestedLatency uint16  // Requested local connection latency.
	ActualLatency    *uint16 // Pointer to storage for the actual local connection latency (can be set to NULL to skip return value).
}

type GAPOptPasskey

type GAPOptPasskey struct {
	Passkey *uint8 // Pointer to 6-digit ASCII string (digit 0..9 only, no NULL termination) passkey to be used during pairing. If this is NULL, the SoftDevice will generate a random passkey if required.
}

type GAPPhys

type GAPPhys struct {
	TxPhys uint8 // Preferred transmit PHYs, see @ref BLE_GAP_PHYS.
	RxPhys uint8 // Preferred receive PHYs, see @ref BLE_GAP_PHYS.
}

type GAPPrivacyParams

type GAPPrivacyParams struct {
	PrivacyMode       uint8   // Privacy mode, see @ref BLE_GAP_PRIVACY_MODES. Default is @ref BLE_GAP_PRIVACY_MODE_OFF.
	PrivateAddrType   uint8   // The private address type must be either @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE or @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE.
	PrivateAddrCycleS uint16  // Private address cycle interval in seconds. Providing an address cycle value of 0 will use the default value defined by @ref BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S.
	DeviceIrk         *GAPIrk // When used as input, pointer to IRK structure that will be used as the default IRK. If NULL, the device default IRK will be used. When used as output, pointer to IRK structure where the current default IRK will be written to. If NULL, this argument is ignored. By default, the default IRK is used to generate random private resolvable addresses for the local device unless instructed otherwise.
}

type GAPSecKeys

type GAPSecKeys struct {
	EncKey  *GAPEncKey     // Encryption Key, or NULL.
	IdKey   *GAPIdKey      // Identity Key, or NULL.
	SignKey *GAPSignInfo   // Signing Key, or NULL.
	Pk      *GAPLescP256Pk // LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1
}

type GAPSecKeyset

type GAPSecKeyset struct {
	KeysOwn  GAPSecKeys // Keys distributed by the local device. For LE Secure Connections the encryption key will be generated locally and will always be stored if bonding.
	KeysPeer GAPSecKeys // Keys distributed by the remote device. For LE Secure Connections, p_enc_key must always be NULL.
}

type GAPSignInfo

type GAPSignInfo struct {
	Csrk [GAP_SEC_KEY_LEN]uint8 // Connection Signature Resolving Key.
}

type GATTCAttrInfo128

type GATTCAttrInfo128 struct {
	Handle uint16  // Attribute handle.
	UUID   UUID128 // 128-bit Attribute UUID.
}

type GATTCAttrInfo16

type GATTCAttrInfo16 struct {
	Handle uint16 // Attribute handle.
	UUID   UUID   // 16-bit Attribute UUID.
}

type GATTCConnCfg

type GATTCConnCfg struct {
	WriteCmdTxQueueSize uint8 // The guaranteed minimum number of Write without Response that can be queued for transmission. The default value is @ref BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT
}

type GATTCDesc

type GATTCDesc struct {
	Handle uint16 // Descriptor Handle.
	UUID   UUID   // Descriptor UUID.
}

type GATTCEvtCharDiscRsp

type GATTCEvtCharDiscRsp struct {
	Count uint16       // Characteristic count.
	Chars [1]GATTCChar // Characteristic data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members.
}

type GATTCEvtCharValByUUIDReadRsp

type GATTCEvtCharValByUUIDReadRsp struct {
	Count       uint16   // Handle-Value Pair Count.
	ValueLen    uint16   // Length of the value in Handle-Value(s) list.
	HandleValue [1]uint8 // Handle-Value(s) list. To iterate through the list use @ref sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members.
}

type GATTCEvtCharValsReadRsp

type GATTCEvtCharValsReadRsp struct {
	Len    uint16   // Concatenated Attribute values length.
	Values [1]uint8 // Attribute values. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members.
}

type GATTCEvtDescDiscRsp

type GATTCEvtDescDiscRsp struct {
	Count uint16       // Descriptor count.
	Descs [1]GATTCDesc // Descriptor data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members.
}

type GATTCEvtExchangeMtuRsp

type GATTCEvtExchangeMtuRsp struct {
	ServerRxMtu uint16 // Server RX MTU size.
}

type GATTCEvtHvx

type GATTCEvtHvx struct {
	Handle uint16   // Handle to which the HVx operation applies.
	Typ    uint8    // Indication or Notification, see @ref BLE_GATT_HVX_TYPES.
	Len    uint16   // Attribute data length.
	Data   [1]uint8 // Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members.
}

type GATTCEvtPrimSrvcDiscRsp

type GATTCEvtPrimSrvcDiscRsp struct {
	Count    uint16          // Service count.
	Services [1]GATTCService // Service data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members.
}

type GATTCEvtReadRsp

type GATTCEvtReadRsp struct {
	Handle uint16   // Attribute Handle.
	Offset uint16   // Offset of the attribute data.
	Len    uint16   // Attribute data length.
	Data   [1]uint8 // Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members.
}

type GATTCEvtRelDiscRsp

type GATTCEvtRelDiscRsp struct {
	Count    uint16          // Include count.
	Includes [1]GATTCInclude // Include data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members.
}

type GATTCEvtTimeout

type GATTCEvtTimeout struct {
	Src uint8 // Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES.
}

type GATTCEvtWriteCmdTxComplete

type GATTCEvtWriteCmdTxComplete struct {
	Count uint8 // Number of write without response transmissions completed.
}

type GATTCEvtWriteRsp

type GATTCEvtWriteRsp struct {
	Handle  uint16   // Attribute Handle.
	WriteOp uint8    // Type of write operation, see @ref BLE_GATT_WRITE_OPS.
	Offset  uint16   // Data offset.
	Len     uint16   // Data length.
	Data    [1]uint8 // Data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members.
}

type GATTCHandleRange

type GATTCHandleRange struct {
	StartHandle uint16 // Start Handle.
	EndHandle   uint16 // End Handle.
}

type GATTCHandleValue

type GATTCHandleValue struct {
	Handle uint16 // Attribute Handle.
	Value  *uint8 // Pointer to the Attribute Value, length is available in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t::value_len.
}

type GATTCInclude

type GATTCInclude struct {
	Handle       uint16       // Include Handle.
	IncludedSrvc GATTCService // Handle of the included service.
}

type GATTCService

type GATTCService struct {
	UUID        UUID             // Service UUID.
	HandleRange GATTCHandleRange // Service Handle Range.
}

type GATTCWriteParams

type GATTCWriteParams struct {
	WriteOp uint8  // Write Operation to be performed, see @ref BLE_GATT_WRITE_OPS.
	Flags   uint8  // Flags, see @ref BLE_GATT_EXEC_WRITE_FLAGS.
	Handle  uint16 // Handle to the attribute to be written.
	Offset  uint16 // Offset in bytes. @note For WRITE_CMD and WRITE_REQ, offset must be 0.
	Len     uint16 // Length of data in bytes.
	Value   *uint8 // Pointer to the value data.
}

type GATTConnCfg

type GATTConnCfg struct {
	AttMtu uint16 // Maximum size of ATT packet the SoftDevice can send or receive. The default and minimum value is @ref BLE_GATT_ATT_MTU_DEFAULT. @mscs @mmsc{@ref BLE_GATTC_MTU_EXCHANGE} @mmsc{@ref BLE_GATTS_MTU_EXCHANGE} @endmscs
}

type GATTSAttr

type GATTSAttr struct {
	UUID     *UUID        // Pointer to the attribute UUID.
	AttrMd   *GATTSAttrMd // Pointer to the attribute metadata structure.
	InitLen  uint16       // Initial attribute value length in bytes.
	InitOffs uint16       // Initial attribute value offset in bytes. If different from zero, the first init_offs bytes of the attribute value will be left uninitialized.
	MaxLen   uint16       // Maximum attribute value length in bytes, see @ref BLE_GATTS_ATTR_LENS_MAX for maximum values.
	Value    *uint8       // Pointer to the attribute data. Please note that if the @ref BLE_GATTS_VLOC_USER value location is selected in the attribute metadata, this will have to point to a buffer that remains valid through the lifetime of the attribute. This excludes usage of automatic variables that may go out of scope or any other temporary location. The stack may access that memory directly without the application's knowledge. For writable characteristics, this value must not be a location in flash memory.
}

type GATTSCfgAttrTabSize

type GATTSCfgAttrTabSize struct {
	AttrTabSize uint32 // Attribute table size. Default is @ref BLE_GATTS_ATTR_TAB_SIZE_DEFAULT, minimum is @ref BLE_GATTS_ATTR_TAB_SIZE_MIN.
}

type GATTSCharHandles

type GATTSCharHandles struct {
	ValueHandle    uint16 // Handle to the characteristic value.
	UserDescHandle uint16 // Handle to the User Description descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present.
	CccdHandle     uint16 // Handle to the Client Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present.
	SccdHandle     uint16 // Handle to the Server Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present.
}

type GATTSCharMd

type GATTSCharMd struct {
	CharProps           GATTCharProps    // Characteristic Properties.
	CharExtProps        GATTCharExtProps // Characteristic Extended Properties.
	CharUserDesc        *uint8           // Pointer to a UTF-8 encoded string (non-NULL terminated), NULL if the descriptor is not required.
	CharUserDescMaxSize uint16           // The maximum size in bytes of the user description descriptor.
	CharUserDescSize    uint16           // The size of the user description, must be smaller or equal to char_user_desc_max_size.
	CharPf              *GATTSCharPf     // Pointer to a presentation format structure or NULL if the CPF descriptor is not required.
	UserDescMd          *GATTSAttrMd     // Attribute metadata for the User Description descriptor, or NULL for default values.
	CccdMd              *GATTSAttrMd     // Attribute metadata for the Client Characteristic Configuration Descriptor, or NULL for default values.
	SccdMd              *GATTSAttrMd     // Attribute metadata for the Server Characteristic Configuration Descriptor, or NULL for default values.
}

type GATTSCharPf

type GATTSCharPf struct {
	Format    uint8  // Format of the value, see @ref BLE_GATT_CPF_FORMATS.
	Exponent  int8   // Exponent for integer data types.
	Unit      uint16 // Unit from Bluetooth Assigned Numbers.
	NameSpace uint8  // Namespace from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES.
	Desc      uint16 // Namespace description from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES.
}

type GATTSConnCfg

type GATTSConnCfg struct {
	HvnTxQueueSize uint8 // Minimum guaranteed number of Handle Value Notifications that can be queued for transmission. The default value is @ref BLE_GATTS_HVN_TX_QUEUE_SIZE_DEFAULT
}

type GATTSEvtExchangeMtuRequest

type GATTSEvtExchangeMtuRequest struct {
	ClientRxMtu uint16 // Client RX MTU size.
}

type GATTSEvtHvc

type GATTSEvtHvc struct {
	Handle uint16 // Attribute Handle.
}

type GATTSEvtHvnTxComplete

type GATTSEvtHvnTxComplete struct {
	Count uint8 // Number of notification transmissions completed.
}

type GATTSEvtRead

type GATTSEvtRead struct {
	Handle uint16 // Attribute Handle.
	UUID   UUID   // Attribute UUID.
	Offset uint16 // Offset for the read operation.
}

type GATTSEvtSysAttrMissing

type GATTSEvtSysAttrMissing struct {
	Hint uint8 // Hint (currently unused).
}

type GATTSEvtTimeout

type GATTSEvtTimeout struct {
	Src uint8 // Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES.
}

type GATTSEvtWrite

type GATTSEvtWrite struct {
	Handle       uint16   // Attribute Handle.
	UUID         UUID     // Attribute UUID.
	Op           uint8    // Type of write operation, see @ref BLE_GATTS_OPS.
	AuthRequired uint8    // Writing operation deferred due to authorization requirement. Application may use @ref sd_ble_gatts_value_set to finalize the writing operation.
	Offset       uint16   // Offset for the write operation.
	Len          uint16   // Length of the received data.
	Data         [1]uint8 // Received data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members.
}

type GATTSHvxParams

type GATTSHvxParams struct {
	Handle uint16  // Characteristic Value Handle.
	Typ    uint8   // Indication or Notification, see @ref BLE_GATT_HVX_TYPES.
	Offset uint16  // Offset within the attribute value.
	Len    *uint16 // Length in bytes to be written, length in bytes written after return.
	Data   *uint8  // Actual data content, use NULL to use the current attribute value.
}

type GATTSValue

type GATTSValue struct {
	Len    uint16 // Length in bytes to be written or read. Length in bytes written or read after successful return.
	Offset uint16 // Attribute value offset.
	Value  *uint8 // Pointer to where value is stored or will be stored. If value is stored in user memory, only the attribute length is updated when p_value == NULL. Set to NULL when reading to obtain the complete length of the attribute value
}

type L2capChRxParams

type L2capChRxParams struct {
	RxMtu  uint16 // The maximum L2CAP SDU size, in bytes, that L2CAP shall be able to receive on this L2CAP channel. - Must be equal to or greater than @ref BLE_L2CAP_MTU_MIN.
	RxMps  uint16 // The maximum L2CAP PDU payload size, in bytes, that L2CAP shall be able to receive on this L2CAP channel. - Must be equal to or greater than @ref BLE_L2CAP_MPS_MIN. - Must be equal to or less than @ref ble_l2cap_conn_cfg_t::rx_mps.
	SduBuf Data   // SDU data buffer for reception. - If @ref ble_data_t::p_data is non-NULL, initial credits are issued to the peer. - If @ref ble_data_t::p_data is NULL, no initial credits are issued to the peer.
}

type L2capChSetupParams

type L2capChSetupParams struct {
	RxParams L2capChRxParams // L2CAP channel RX parameters.
	LePsm    uint16          // LE Protocol/Service Multiplexer. Used when requesting setup of an L2CAP channel, ignored otherwise.
	Status   uint16          // Status code, see @ref BLE_L2CAP_CH_STATUS_CODES. Used when replying to a setup request of an L2CAP channel, ignored otherwise.
}

type L2capChTxParams

type L2capChTxParams struct {
	TxMtu   uint16 // The maximum L2CAP SDU size, in bytes, that L2CAP is able to transmit on this L2CAP channel.
	PeerMps uint16 // The maximum L2CAP PDU payload size, in bytes, that the peer is able to receive on this L2CAP channel.
	TxMps   uint16 // The maximum L2CAP PDU payload size, in bytes, that L2CAP is able to transmit on this L2CAP channel. This is effective tx_mps, selected by the SoftDevice as MIN( @ref ble_l2cap_ch_tx_params_t::peer_mps, @ref ble_l2cap_conn_cfg_t::tx_mps )
	Credits uint16 // Initial credits given by the peer.
}

type L2capConnCfg

type L2capConnCfg struct {
	RxMps       uint16 // The maximum L2CAP PDU payload size, in bytes, that L2CAP shall be able to receive on L2CAP channels on connections with this configuration. The minimum value is @ref BLE_L2CAP_MPS_MIN.
	TxMps       uint16 // The maximum L2CAP PDU payload size, in bytes, that L2CAP shall be able to transmit on L2CAP channels on connections with this configuration. The minimum value is @ref BLE_L2CAP_MPS_MIN.
	RxQueueSize uint8  // Number of SDU data buffers that can be queued for reception per L2CAP channel. The minimum value is one.
	TxQueueSize uint8  // Number of SDU data buffers that can be queued for transmission per L2CAP channel. The minimum value is one.
	ChCount     uint8  // Number of L2CAP channels the application can create per connection with this configuration. The default value is zero, the maximum value is @ref BLE_L2CAP_CH_COUNT_MAX. @note if this parameter is set to zero, all other parameters in @ref ble_l2cap_conn_cfg_t are ignored.
}

type L2capEvtChCredit

type L2capEvtChCredit struct {
	Credits uint16 // Additional credits given by the peer.
}

type L2capEvtChRx

type L2capEvtChRx struct {
	SduLen uint16 // Total SDU length, in bytes.
	SduBuf Data   // SDU data buffer. @note If there is not enough space in the buffer (sdu_buf.len < sdu_len) then the rest of the SDU will be silently discarded by the SoftDevice.
}

type L2capEvtChSduBufReleased

type L2capEvtChSduBufReleased struct {
	SduBuf Data // Returned reception or transmission SDU data buffer. The SoftDevice returns SDU data buffers supplied by the application, which have not yet been returned previously via a @ref BLE_L2CAP_EVT_CH_RX or @ref BLE_L2CAP_EVT_CH_TX event.
}

type L2capEvtChSetup

type L2capEvtChSetup struct {
	TxParams L2capChTxParams // L2CAP channel TX parameters.
}

type L2capEvtChSetupRefused

type L2capEvtChSetupRefused struct {
	Source uint8  // Source, see @ref BLE_L2CAP_CH_SETUP_REFUSED_SRCS
	Status uint16 // Status code, see @ref BLE_L2CAP_CH_STATUS_CODES
}

type L2capEvtChSetupRequest

type L2capEvtChSetupRequest struct {
	TxParams L2capChTxParams // L2CAP channel TX parameters.
	LePsm    uint16          // LE Protocol/Service Multiplexer.
}

type L2capEvtChTx

type L2capEvtChTx struct {
	SduBuf Data // SDU data buffer.
}

type UUID

type UUID struct {
	UUID uint16 // 16-bit UUID value or octets 12-13 of 128-bit UUID.
	Typ  uint8  // UUID type, see @ref BLE_UUID_TYPES. If type is @ref BLE_UUID_TYPE_UNKNOWN, the value of uuid is undefined.
}

type UUID128

type UUID128 struct {
	UUID128 [16]uint8 // Little-Endian UUID bytes.
}

type UserMemBlock

type UserMemBlock struct {
	Mem *uint8 // Pointer to the start of the user memory block.
	Len uint16 // Length in bytes of the user memory block.
}

type Version

type Version struct {
	VersionNumber    uint8  // Link Layer Version number. See https://www.bluetooth.org/en-us/specification/assigned-numbers/link-layer for assigned values.
	CompanyId        uint16 // Company ID, Nordic Semiconductor's company ID is 89 (0x0059) (https://www.bluetooth.org/apps/content/Default.aspx?doc_id=49708).
	SubversionNumber uint16 // Link Layer Sub Version number, corresponds to the SoftDevice Config ID or Firmware ID (FWID).
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL