View Source API Reference blue_heron v0.5.1

Modules

BLE

HCI ACL Data packets are used to exchange data between the Host and Controller

simple fifo buffer implementation that handles sending ACL packets synchronously without blocking

Functions for serializing and deserializing ATT data

The ATT_ERROR_RSP PDU is used to state that a given request cannot be performed, and to provide the reason.

The ATT_EXCHANGE_MTU_REQ PDU is used by the client to inform the server of the client’s maximum receive MTU size and request the server to respond with its maximum receive MTU size.

The ATT_EXCHANGE_MTU_RSP PDU is sent in reply to a received ATT_EXCHANGE_MTU_REQ PDU.

The ATT_EXECUTE_WRITE_REQ PDU is used to request the server to write or cancel the write of all the prepared values currently held in the prepare queue from this client. This request shall be handled by the server as an atomic operation

The ATT_EXECUTE_WRITE_RSP PDU is sent in response to a received ATT_EXECUTE_WRITE_REQ PDU.

The ATT_FIND_BY_TYPE_VALUE_RSP PDU is sent in reply to a received ATT_FIND_BY_TYPE_VALUE_REQ PDU and contains information about this server.

The ATT_FIND_BY_TYPE_VALUE_RSP PDU is sent in reply to a received ATT_FIND_BY_TYPE_VALUE_REQ PDU and contains information about this server.

Strucutured HandleInformation encoder/decoder.

The ATT_FIND_INFORMATION_REQ PDU is used to obtain the mapping of attribute handles with their associated types. This allows a client to discover the list of attributes and their types on a server.

The ATT_FIND_INFORMATION_RSP PDU is sent in reply to a received ATT_FIND_INFORMATION_REQ PDU and contains information about this server.

Strucutured InformationData encoder/decoder.

The ATT_HANDLE_VALUE_CFM PDU is sent in response to a received ATT_HANDLE_VALUE_IND PDU and confirms that the client has received an indication of the given attribute.

A server can send a notification of an attribute’s value at any time.

A server can send a notification of an attribute’s value at any time.

The ATT_PREPARE_WRITE_REQ PDU is used to request the server to prepare to write the value of an attribute.

The ATT_PREPARE_WRITE_RSP PDU is sent in response to a received ATT_PREPARE_WRITE_REQ PDU and acknowledges that the value has been successfully received and placed in the prepare write queue.

The ATT_READ_BLOB_REQ PDU is used to request the server to read part of the value of an attribute at a given offset and return a specific part of the value in an ATT_READ_BLOB_RSP PDU.

The ATT_READ_BLOB_RSP PDU is sent in reply to a received ATT_READ_BLOB_REQ PDU and contains part of the value of the attribute that has been read

The ATT_READ_BY_GROUP_TYPE_REQ PDU is used to obtain the values of attributes where the attribute type is known, the type of a grouping attribute as defined by a higher layer specification, but the handle is not known.

The ATT_READ_BY_GROUP_TYPE_RSP PDU is sent in reply to a received ATT_READ_BY_GROUP_TYPE_REQ PDU and contains the handles and values of the attributes that have been read

Strucutured AttributeData encoder/decoder.

The ATT_READ_BY_TYPE_REQ PDU is used to obtain the values of attributes where the attribute type is known but the handle is not known.

The ATT_READ_BY_TYPE_RSP PDU is sent in reply to a received ATT_READ_BY_TYPE_REQ PDU and contains the handles and values of the attributes that have been read.

Structure containing decoders and encoders for the Attribute Data

The ATT_READ_REQ PDU is used to request the server to read the value of an attribute and return its value in an ATT_READ_RSP PDU.

The ATT_READ_RSP PDU is sent in reply to a received Read Request and contains the value of the attribute that has been read.

The ATT_WRITE_CMD PDU is used to request the server to write the value of an attribute, typically into a control-point attribute.

The ATT_WRITE_REQ PDU is used to request the server to write the value of an attribute and acknowledge that this has been achieved in an ATT_WRITE_RSP PDU.

The ATT_WRITE_RSP PDU is sent in reply to a valid ATT_WRITE_REQ PDU and acknowledges that the attribute has been successfully written.

Helper struct for working with BLE Addresses.

Handles building AD structures for AdvertiseingData and ScanResponseData

Handles creating Apple IBeacon packets

Company identifiers are unique numbers assigned by the Bluetooth SIG to member companies requesting one.

Assigned numbers are used in GAP for inquiry response, EIR data type values, manufacturer-specific data, advertising data, low energy UUIDs and appearance characteristics, and class of device.

Handles Advertisement and Broadcasting

The Manufacturer Specific data type is used for manufacturer specific data.

Serialization module for Apple.

The Service Data data type consists of a service UUID with the data associated with that service.

Defines all error codes and functions to map between error code and name.

Struct that represents a GATT characteristic.

Struct that represents a GATT characteristic descriptor.

A behaviour module for implementing a GATT server.

Struct that represents a GATT service.

Volume 4 of the Bluetooth Spec

Serialization functions for arrayed data.

The Link Control commands allow a Controller to control connections to other BR/EDR Controllers. Some Link Control commands are used only with a BR/EDR Controller whereas other Link Control commands are also used with an LE Controller.

HCI commands for working with the controller and baseband.

The HCI_Host_Buffer_Size command is used by the Host to notify the Controller about the maximum size of the data portion of HCI ACL and Synchronous Data packets sent from the Controller to the Host.

The HCI_Read_Local_Name command provides the ability to read the stored user- friendly name for the BR/EDR Controller.

The HCI_Reset command will reset the Controller and the Link Manager on the BR/EDR Controller or the Link Layer on an LE Controller.

This command is used by the Host to turn flow control on or off for data and/or voice sent in the direction from the Controller to the Host.

The HCI_Set_Event_Mask command is used to control which events are generated by the HCI for the Host. If the bit in the Event_Mask is set to a one, then the event associated with that bit will be enabled

This command writes the value for the Class_Of_Device parameter.

This command writes the Erroneous_Data_Reporting parameter.

The HCI_Write_Extended_Inquiry_Response command writes the extended inquiry response to be sent during the extended inquiry response procedure.

This command writes the Inquiry_Mode configuration parameter of the local BR/EDR Controller

The HCI_Write_LE_Host_Support command is used to set the LE Supported (Host) Link Manager Protocol feature bi

he HCI_Write_Local_Name command provides the ability to modify the user-friendly name for the BR/EDR Controller.

This command writes the value for the Page_Timeout configuration parameter

The Scan_Enable parameter controls whether or not the BR/EDR Controller will periodically scan for page attempts and/or inquiry requests from other BR/EDR Controllers.

This command writes the Secure_Connections_Host_Support parameter in the BR/EDR Controller.

This command enables Simple Pairing mode in the BR/EDR Controller.

This command provides the ability to write the Synchronous_Flow_Control_Enable parameter.

HCI commands for working with the informational parameters.

On a BR/EDR Controller, this command reads the Bluetooth Controller address (BD_ADDR).

The HCI_Read_Buffer_Size command is used to read the maximum size of the data portion of HCI ACL and Synchronous Data packets sent from the Host to the Controller.

This command reads the list of HCI commands supported for the local Controller.

This command reads the values for the version information for the local Controller.

HCI commands for working with the LE Controller.

The HCI_LE_Create_Connection command is used to create an ACL connection to a connectable advertiser

The HCI_LE_Create_Connection_Cancel command is used to cancel the HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection commands. If no HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection command is pending, then the Controller shall return the error code Command Disallowed (0x0C).

The HCI_LE_Long_Term_Key_Request_Negative_Reply command is used to reply to an HCI_LE_Long_Term_Key_Request event from the Controller if the Host cannot provide a Long Term Key for this Connection_Handle. This command shall only be used when the local device’s role is Peripheral.

The HCI_LE_Long_Term_Key_Request_Reply command is used to reply to an HCI_LE_Long_Term_Key_Request event from the Controller, and specifies the Long_Term_Key parameter that shall be used for this Connection_Handle. This command shall only be used when the local device’s role is Peripheral.

This command is used to read the maximum size of the data portion of ACL data packets and isochronous data packets sent from the Host to the Controller. The Host shall fragment the data transmitted to the Controller according to these values so that the HCI ACL Data packets and HCI ISO Data packets will contain data up to this size (“data” includes optional fields in the HCI ISO Data packet, such as ISO_SDU_Length).

This command requests page 0 of the list of the supported LE features for the Controller.

The HCI_LE_Read_Filter_Accept_List_Size command is used to read the total number of Filter Accept List entries that can be stored in the Controller. Note: The number of entries that can be stored is not fixed and the Controller can change it at any time (e.g. because the memory used to store the Filter Accept List can also be used for other purposes).

The HCI_LE_Set_Advertising_Data command is used to set the data used in advertising packets that have a data field.

The HCI_LE_Set_Advertising_Enable command is used to request the Controller to start or stop advertising. The Controller manages the timing of advertisements as per the advertising parameters given in the HCI_LE_Set_Advertising_Parameters command.

The HCI_LE_Set_Scan_Parameters command is used to set the scan parameters.

The HCI_LE_Set_Event_Mask command is used to control which LE events are generated by the HCI for the Host. If the bit in the LE_Event_Mask is set to a one, then the event associated with that bit will be enabled. The event mask allows the Host to control which events will interrupt it.

The HCI_LE_Set_Random_Address command is used by the Host to set the LE Random Device Address in the Controller

The HCI_LE_Set_Scan_Enable command is used to start and stop scanning for legacy PDUs (but not extended PDUs, even if the device supports extended advertising). Scanning is used to discover advertising devices nearby.

The HCI_LE_Set_Scan_Parameters command is used to set the scan parameters.

This command is used to provide data used in Scanning Packets that have a data field.

HCI commands for working with Link Control.

This command is used to try to authenticate the remote device associated with the specified Connection_Handle.

The HCI_Disconnect command is used to terminate an existing connection. The Connection_Handle parameter indicates which connection is to be disconnected

This command is used to try to authenticate the remote device associated with the specified Connection_Handle.

HCI commands for working with the Link Policy.

This command writes the Default Link Policy configuration value.

Handles parsing of HCI Events (opcode 0x04).

The Command Complete event is used by the Controller for most commands to transmit return status of a command and the other event parameters that are specified for the issued HCI command.

The HCI_Command_Status event is used to indicate that the command described by the Command_Opcode parameter has been received, and that the Controller is currently performing the task for this command.

The HCI_Disconnection_Complete event occurs when a connection is terminated.

The HCI_Encryption_Change event is used to indicate that the change of the encryption mode has been completed. The Connection_Handle event parameter will be a Connection_Handle for an ACL connection and is used to identify the remote device.

The Inquiry Complete event indicates that the Inquiry is finished. This event contains a Status parameter, which is used to indicate if the Inquiry completed successfully or if the Inquiry was not completed.

The LE Meta Event is used to encapsulate all LE Controller specific events.

The LE Advertising Report event indicates that one or more Bluetooth devices have responded to an active scan or have broadcast advertisements that were received during a passive scan. The Controller may queue these advertising reports and send information from multiple devices in one LE Advertising Report event.

A struct representing a single device within a LE Advertising Report.

The HCI_LE_Connection_Complete event indicates to both of the Hosts forming the connection that a new connection has been created.

The HCI_LE_Connection_Update_Complete event is used to indicate that the Connection Update procedure has completed.

The HCI_LE_Enhanced_Connection_Complete event indicates to both of the Hosts forming the connection that a new connection has been created. Upon the creation of the connection a Connection_Handle shall be assigned by the Controller, and passed to the Host in this event.

The HCI_LE_Long_Term_Key_Request event indicates that the peer device, in the Central role, is attempting to encrypt or re-encrypt the link and is requesting the Long Term Key from the Host. (See [Vol 6] Part B, Section 5.1.3).

The HCINumber_Of_Completed_Packets event is used by the Controller to indicate to the Host how many HCI Data packets have been completed for each Connection_Handle since the previous HCI_Number_Of_Completed- Packets event was sent to the Host.

Handles sending and receiving HCI Packets

The objective of this HCI UART Transport Layer is to make it possible to use the Bluetooth HCI over a serial interface between two UARTs on the same PCB. The HCI UART Transport Layer assumes that the UART communication is free from line errors.

A framer module that defines a frame as a HCI packet.

Logical Link Control and Adaptation Protocol Specification.

Defines a behaviour that manufacturer data modules should implement.

Handles management of advertising and GATT server

Handles internal message passing of BlueHeron's components

A behaviour module for implementing BLE Security Manager Protocol.

Default IO Handler for SMP

Callback behavior for handling SMP IO requests

Handles storage of keys for SMP