Documentation
¶
Index ¶
- type CommandExecutionError
- type Host
- func (h *Host) Deinit()
- func (h *Host) Init() error
- func (h *Host) SetAdvertisingData(data []*hci.AdStructure) error
- func (h *Host) SetAdvertisingParams(advParams hci.AdvertisingParameters) error
- func (h *Host) SetRandomAddress(addr hci.BtAddress) error
- func (h *Host) SetScanResponse(data []*hci.AdStructure) error
- func (h *Host) StartAdvertising() error
- func (h *Host) StartScanning(active bool, filters []filter.AdFilter) (chan *ScanReport, error)
- func (h *Host) StopAdvertising() error
- func (h *Host) StopScanning() error
- type ScanReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandExecutionError ¶
type CommandExecutionError struct {
// contains filtered or unexported fields
}
CommandExecutionError is returned when HCI command could not be executed.
func (*CommandExecutionError) Error ¶
func (e *CommandExecutionError) Error() string
func (*CommandExecutionError) ErrorCode ¶
func (e *CommandExecutionError) ErrorCode() hci.ErrorCode
ErrorCode returns the error code indicating reason for command execution failure
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host implements the host side of Bluetooth Host - Controller interface
func (*Host) SetAdvertisingData ¶
func (h *Host) SetAdvertisingData(data []*hci.AdStructure) error
SetAdvertisingData sets the advertising data that will be sent when advertising is enabled
func (*Host) SetAdvertisingParams ¶
func (h *Host) SetAdvertisingParams(advParams hci.AdvertisingParameters) error
SetAdvertisingParams set advertising params to the controller. hci.DefaultAdvParameters() can be used to get default set of parameters.
func (*Host) SetRandomAddress ¶
SetRandomAddress sets LE Random Device Address to the Controller
func (*Host) SetScanResponse ¶
func (h *Host) SetScanResponse(data []*hci.AdStructure) error
SetScanResponse sets the scan response data which will be sent when advertising and the mode allows it.
func (*Host) StartAdvertising ¶
StartAdvertising directs the controller to start sending advertisments
func (*Host) StartScanning ¶
StartScanning will start scanning for Bluetooth LE Advertisements Active defines if active or passive scanning should be done The returned channel can be used to receive all scan reports matching _any_ of the filters on list. The returned cannel should _not_ be closed.
func (*Host) StopAdvertising ¶
StopAdvertising directs the controller to stop sending advertisments
func (*Host) StopScanning ¶
StopScanning stops scanning for advertising LE devices
type ScanReport ¶
ScanReport contains information about a device found on scanning See Bluetooth 5.0, vol 2, part E, ch 7.7.65.2