Documentation
¶
Index ¶
- type HCI
- func (h *HCI) Accept() (ble.Conn, error)
- func (h *HCI) Addr() ble.Addr
- func (h *HCI) Advertise() error
- func (h *HCI) AdvertiseAdv(a ble.Advertisement) error
- func (h *HCI) AdvertiseIBeacon(u ble.UUID, major, minor uint16, pwr int8) error
- func (h *HCI) AdvertiseIBeaconData(md []byte) error
- func (h *HCI) AdvertiseMfgData(id uint16, md []byte) error
- func (h *HCI) AdvertiseNameAndServices(name string, uuids ...ble.UUID) error
- func (h *HCI) AdvertiseServiceData16(id uint16, b []byte) error
- func (h *HCI) Bytes() []byte
- func (h *HCI) Close() error
- func (h *HCI) CloseConnection(handle uint16) error
- func (h *HCI) Context() context.Context
- func (h *HCI) Dial(ctx context.Context, a ble.Addr) (ble.Client, error)
- func (h *HCI) DispatchError(e error)
- func (h *HCI) EnableSecurity(bm interface{}) error
- func (h *HCI) Error() error
- func (h *HCI) Init() error
- func (h *HCI) Option(opts ...ble.Option) error
- func (h *HCI) RequestBufferPool() hci.BufferPool
- func (h *HCI) RequestSmpManager(cfg hci.SmpConfig) (hci.SmpManager, error)
- func (h *HCI) Scan(allowDup bool) error
- func (h *HCI) Send(c hci.Command, r hci.CommandRP) error
- func (h *HCI) SetAdvHandler(ah ble.AdvHandler) error
- func (h *HCI) SetAdvHandlerSync(sync bool) error
- func (h *HCI) SetAdvParams(param cmd.LESetAdvertisingParameters) error
- func (h *HCI) SetAdvertisement(ad []byte, sr []byte) error
- func (h *HCI) SetCentralRole() error
- func (h *HCI) SetConnParams(param cmd.LECreateConnection) error
- func (h *HCI) SetDeviceID(id int) error
- func (h *HCI) SetDialerTimeout(d time.Duration) error
- func (h *HCI) SetErrorHandler(handler func(error)) error
- func (h *HCI) SetListenerTimeout(d time.Duration) error
- func (h *HCI) SetPeripheralRole() error
- func (h *HCI) SetScanParams(param cmd.LESetScanParameters) error
- func (h *HCI) SocketWrite(b []byte) (int, error)
- func (h *HCI) StopAdvertising() error
- func (h *HCI) StopScanning() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HCI ¶
HCI ...
func NewHCI ¶
func NewHCI(smp hci.SmpManagerFactory, cf hci.ConnectionFactory, opts ...ble.Option) (*HCI, error)
NewHCI returns a hci device.
func (*HCI) AdvertiseAdv ¶
func (h *HCI) AdvertiseAdv(a ble.Advertisement) error
AdvertiseAdv advertises a given Advertisement
func (*HCI) AdvertiseIBeacon ¶
AdvertiseIBeacon advertises iBeacon with specified parameters.
func (*HCI) AdvertiseIBeaconData ¶
AdvertiseIBeaconData advertise iBeacon with given manufacturer data.
func (*HCI) AdvertiseMfgData ¶
AdvertiseMfgData avertises the given manufacturer data.
func (*HCI) AdvertiseNameAndServices ¶
AdvertiseNameAndServices advertises device name, and specified service UUIDs. It tries to fit the UUIDs in the advertising data as much as possible. If name doesn't fit in the advertising data, it will be put in scan response.
func (*HCI) AdvertiseServiceData16 ¶
AdvertiseServiceData16 advertises data associated with a 16bit service uuid
func (*HCI) CloseConnection ¶
func (*HCI) DispatchError ¶
func (*HCI) EnableSecurity ¶
func (*HCI) RequestBufferPool ¶
func (h *HCI) RequestBufferPool() hci.BufferPool
func (*HCI) RequestSmpManager ¶
func (*HCI) SetAdvHandlerSync ¶
SetAdvHandlerSync overrides default advertising handler behavior (async)
func (*HCI) SetAdvParams ¶
func (h *HCI) SetAdvParams(param cmd.LESetAdvertisingParameters) error
SetAdvParams overrides default advertising parameters.
func (*HCI) SetAdvertisement ¶
SetAdvertisement sets advertising data and scanResp.
func (*HCI) SetConnParams ¶
func (h *HCI) SetConnParams(param cmd.LECreateConnection) error
SetConnParams overrides default connection parameters.
func (*HCI) SetDialerTimeout ¶
SetDialerTimeout sets dialing timeout for Dialer.
func (*HCI) SetErrorHandler ¶
SetErrorHandler ...
func (*HCI) SetListenerTimeout ¶
SetListenerTimeout sets dialing timeout for Listener.
func (*HCI) SetPeripheralRole ¶
SetPeripheralRole is not supported
func (*HCI) SetScanParams ¶
func (h *HCI) SetScanParams(param cmd.LESetScanParameters) error
SetScanParams overrides default scanning parameters.
func (*HCI) StopAdvertising ¶
StopAdvertising stops advertising.