Versions in this module Expand all Collapse all v0 v0.0.2 Mar 5, 2020 v0.0.1 May 13, 2019 Changes in this version + type Client struct + func NewClient(c ble.Conn) (*Client, error) + func (cln *Client) Addr() ble.Addr + func (cln *Client) CancelConnection() error + func (cln *Client) ClearSubscriptions() error + func (cln *Client) Conn() ble.Conn + func (cln *Client) Disconnected() <-chan struct{} + func (cln *Client) DiscoverCharacteristics(cs []ble.UUID, s *ble.Service) ([]*ble.Characteristic, error) + func (cln *Client) DiscoverDescriptors(ds []ble.UUID, c *ble.Characteristic) ([]*ble.Descriptor, error) + func (cln *Client) DiscoverIncludedServices(ss []ble.UUID, s *ble.Service) ([]*ble.Service, error) + func (cln *Client) DiscoverProfile(force bool) (*ble.Profile, error) + func (cln *Client) DiscoverServices(ss []ble.UUID) ([]*ble.Service, error) + func (cln *Client) ExchangeMTU(mtu int) (int, error) + func (cln *Client) Name() string + func (cln *Client) Profile() *ble.Profile + func (cln *Client) ReadCharacteristic(c *ble.Characteristic) ([]byte, error) + func (cln *Client) ReadDescriptor(d *ble.Descriptor) ([]byte, error) + func (cln *Client) ReadLongCharacteristic(c *ble.Characteristic) ([]byte, error) + func (cln *Client) ReadRSSI() int + func (cln *Client) Subscribe(c *ble.Characteristic, ind bool, fn ble.NotificationHandler) error + func (cln *Client) Unsubscribe(c *ble.Characteristic, ind bool) error + func (cln *Client) WriteCharacteristic(c *ble.Characteristic, b []byte, noRsp bool) error + func (cln *Client) WriteDescriptor(d *ble.Descriptor, b []byte) error + type Device struct + func NewDevice(opts ...ble.Option) (*Device, error) + func (d *Device) AddService(s *ble.Service) error + func (d *Device) Advertise(ctx context.Context, adv ble.Advertisement) error + func (d *Device) AdvertiseIBeacon(ctx context.Context, u ble.UUID, major, minor uint16, pwr int8) error + func (d *Device) AdvertiseIBeaconData(ctx context.Context, md []byte) error + func (d *Device) AdvertiseMfgData(ctx context.Context, id uint16, md []byte) error + func (d *Device) AdvertiseNameAndServices(ctx context.Context, name string, ss ...ble.UUID) error + func (d *Device) AdvertiseServiceData16(ctx context.Context, id uint16, b []byte) error + func (d *Device) Dial(ctx context.Context, a ble.Addr) (ble.Client, error) + func (d *Device) HandleXpcEvent(event xpc.Dict, err error) + func (d *Device) Init() error + func (d *Device) Option(opts ...ble.Option) error + func (d *Device) RemoveAllServices() error + func (d *Device) Scan(ctx context.Context, allowDup bool, h ble.AdvHandler) error + func (d *Device) SetAdvParams(param cmd.LESetAdvertisingParameters) error + func (d *Device) SetCentralRole() error + func (d *Device) SetConnParams(param cmd.LECreateConnection) error + func (d *Device) SetDeviceID(id int) error + func (d *Device) SetDialerTimeout(dur time.Duration) error + func (d *Device) SetListenerTimeout(dur time.Duration) error + func (d *Device) SetPeripheralRole() error + func (d *Device) SetScanParams(param cmd.LESetScanParameters) error + func (d *Device) SetServices(ss []*ble.Service) error + func (d *Device) Stop() error + type State int + const StatePoweredOff + const StatePoweredOn + const StateResetting + const StateUnauthorized + const StateUnknown + const StateUnsupported + func (s State) String() string