Versions in this module Expand all Collapse all v1 v1.0.2 Oct 3, 2023 v1.0.1 Oct 3, 2023 Changes in this version + const BLE_ADDR_TYPE_PUBLIC + const BLE_ADDR_TYPE_RANDOM + const BLE_ADDR_TYPE_RPA_PUB + const BLE_ADDR_TYPE_RPA_RND + const BLE_ADV_EVENT_DIRECT_IND_HD + const BLE_ADV_EVENT_DIRECT_IND_LD + const BLE_ADV_EVENT_IND + const BLE_ADV_EVENT_NONCONN_IND + const BLE_ADV_EVENT_SCAN_IND + const BLE_ATT_ATTR_MAX_LEN + const BLE_ATT_F_READ + const BLE_ATT_F_READ_AUTHEN + const BLE_ATT_F_READ_AUTHOR + const BLE_ATT_F_READ_ENC + const BLE_ATT_F_WRITE + const BLE_ATT_F_WRITE_AUTHEN + const BLE_ATT_F_WRITE_AUTHOR + const BLE_ATT_F_WRITE_ENC + const BLE_ATT_MTU_DFLT + const BLE_DISC_CHR_PROP_AUTH_SIGN_WRITE + const BLE_DISC_CHR_PROP_BROADCAST + const BLE_DISC_CHR_PROP_EXTENDED + const BLE_DISC_CHR_PROP_INDICATE + const BLE_DISC_CHR_PROP_NOTIFY + const BLE_DISC_CHR_PROP_READ + const BLE_DISC_CHR_PROP_WRITE + const BLE_DISC_CHR_PROP_WRITE_NO_RSP + const BLE_GATT_ACCESS_OP_READ_CHR + const BLE_GATT_ACCESS_OP_READ_DSC + const BLE_GATT_ACCESS_OP_WRITE_CHR + const BLE_GATT_ACCESS_OP_WRITE_DSC + const BLE_GATT_F_AUTH_SIGN_WRITE + const BLE_GATT_F_AUX_WRITE + const BLE_GATT_F_BROADCAST + const BLE_GATT_F_INDICATE + const BLE_GATT_F_NOTIFY + const BLE_GATT_F_READ + const BLE_GATT_F_READ_AUTHEN + const BLE_GATT_F_READ_AUTHOR + const BLE_GATT_F_READ_ENC + const BLE_GATT_F_RELIABLE_WRITE + const BLE_GATT_F_WRITE + const BLE_GATT_F_WRITE_AUTHEN + const BLE_GATT_F_WRITE_AUTHOR + const BLE_GATT_F_WRITE_ENC + const BLE_GATT_F_WRITE_NO_RSP + const BLE_SCAN_FILT_NO_WL + const BLE_SCAN_FILT_NO_WL_INITA + const BLE_SCAN_FILT_USE_WL + const BLE_SCAN_FILT_USE_WL_INITA + const CccdUuid + const IotivityReqChrUuid + const IotivityRspChrUuid + const IotivitySvcUuid + const NmpPlainChrUuid + const NmpPlainSvcUuid + const OmpSecReqChrUuid + const OmpSecRspChrUuid + const OmpSecSvcUuid + const OmpUnsecReqChrUuid + const OmpUnsecRspChrUuid + const OmpUnsecSvcUuid + const SecureReqChrUuid + const SecureRspChrUuid + const SecureSvcUuid + const UnauthReqChrUuid + const UnauthRspChrUuid + const UnauthSvcUuid + var BleAddrTypeStringMap = map[BleAddrType]string + var BleAdvConnModeStringMap = map[BleAdvConnMode]string + var BleAdvDiscModeStringMap = map[BleAdvDiscMode]string + var BleAdvEventTypeStringMap = map[BleAdvEventType]string + var BleAdvFilterPolicyStringMap = map[BleAdvFilterPolicy]string + var BleGattOpStringMap = map[BleGattOp]string + var BleScanFilterPolicyStringMap = map[BleScanFilterPolicy]string + var BleSmActionStringMap = map[BleSmAction]string + var BleSmAuthReqStringMap = map[BleSmAuthReq]string + var BleSmIoCapStringMap = map[BleSmIoCap]string + var BleSmKeyDistStringMap = map[BleSmKeyDist]string + var BleSvcTypeStringMap = map[BleSvcType]string + func BleAddrTypeToString(addrType BleAddrType) string + func BleAdvConnModeToString(connMode BleAdvConnMode) string + func BleAdvDiscModeToString(discMode BleAdvDiscMode) string + func BleAdvEventTypeToString(advEventType BleAdvEventType) string + func BleAdvFilterPolicyToString(discMode BleAdvFilterPolicy) string + func BleGattOpToString(op BleGattOp) string + func BleScanFilterPolicyToString(filtPolicy BleScanFilterPolicy) string + func BleSmActionToString(smAction BleSmAction) string + func BleSmAuthReqToString(smAction BleSmAuthReq) string + func BleSmIoCapToString(smAction BleSmIoCap) string + func BleSmKeyDistToString(smAction BleSmKeyDist) string + func BleSvcTypeToString(svcType BleSvcType) string + func CompareChrIds(a BleChrId, b BleChrId) int + func CompareUuids(a BleUuid, b BleUuid) int + type BleAddr struct + Bytes [6]byte + func ParseBleAddr(s string) (BleAddr, error) + func (ba *BleAddr) MarshalJSON() ([]byte, error) + func (ba *BleAddr) String() string + func (ba *BleAddr) UnmarshalJSON(data []byte) error + type BleAddrType int + func BleAddrTypeFromString(s string) (BleAddrType, error) + func (a *BleAddrType) UnmarshalJSON(data []byte) error + func (a BleAddrType) MarshalJSON() ([]byte, error) + type BleAdvConnMode int + const BLE_ADV_CONN_MODE_DIR + const BLE_ADV_CONN_MODE_NON + const BLE_ADV_CONN_MODE_UND + func BleAdvConnModeFromString(s string) (BleAdvConnMode, error) + func (a *BleAdvConnMode) UnmarshalJSON(data []byte) error + func (a BleAdvConnMode) MarshalJSON() ([]byte, error) + type BleAdvDiscMode int + const BLE_ADV_DISC_MODE_GEN + const BLE_ADV_DISC_MODE_LTD + const BLE_ADV_DISC_MODE_NON + func BleAdvDiscModeFromString(s string) (BleAdvDiscMode, error) + func (a *BleAdvDiscMode) UnmarshalJSON(data []byte) error + func (a BleAdvDiscMode) MarshalJSON() ([]byte, error) + type BleAdvEventType int + func BleAdvEventTypeFromString(s string) (BleAdvEventType, error) + func (a *BleAdvEventType) UnmarshalJSON(data []byte) error + func (a BleAdvEventType) MarshalJSON() ([]byte, error) + type BleAdvFields struct + AdvItvl *uint16 + Appearance *uint16 + Data []byte + Flags *uint8 + MfgData []byte + Name *string + NameIsComplete bool + PublicTgtAddrs []BleAddr + SlaveItvlMax *uint16 + SlaveItvlMin *uint16 + SvcDataUuid128 []byte + SvcDataUuid16 []byte + SvcDataUuid32 []byte + TxPwrLvl *int8 + Uri *string + Uuids128 []BleUuid128 + Uuids128IsComplete bool + Uuids16 []BleUuid16 + Uuids16IsComplete bool + Uuids32 []uint32 + Uuids32IsComplete bool + type BleAdvFilterPolicy int + const BLE_ADV_FILTER_POLICY_BOTH + const BLE_ADV_FILTER_POLICY_CONN + const BLE_ADV_FILTER_POLICY_NONE + const BLE_ADV_FILTER_POLICY_SCAN + func BleAdvFilterPolicyFromString(s string) (BleAdvFilterPolicy, error) + func (a *BleAdvFilterPolicy) UnmarshalJSON(data []byte) error + func (a BleAdvFilterPolicy) MarshalJSON() ([]byte, error) + type BleAdvPredicate func(adv BleAdvReport) bool + type BleAdvReport struct + EventType BleAdvEventType + Fields BleAdvFields + Rssi int8 + Sender BleDev + type BleAdvRptFn func(r BleAdvReport) + type BleAttFlags int + type BleChr struct + AccessCb BleGattAccessFn + Dscs []BleDsc + Flags BleChrFlags + MinKeySize int + Uuid BleUuid + type BleChrFlags int + type BleChrId struct + ChrUuid BleUuid + SvcUuid BleUuid + func (b *BleChrId) String() string + type BleConnDesc struct + Authenticated bool + Bonded bool + ConnHandle uint16 + Encrypted bool + KeySize int + OwnIdAddr BleAddr + OwnIdAddrType BleAddrType + OwnOtaAddr BleAddr + OwnOtaAddrType BleAddrType + PeerIdAddr BleAddr + PeerIdAddrType BleAddrType + PeerOtaAddr BleAddr + PeerOtaAddrType BleAddrType + Role BleRole + func (d *BleConnDesc) String() string + type BleDev struct + Addr BleAddr + AddrType BleAddrType + func (bd *BleDev) String() string + type BleDiscChrProperties int + type BleDsc struct + AttFlags BleAttFlags + MinKeySize int + Uuid BleUuid + type BleEncryptWhen int + const BLE_ENCRYPT_ALWAYS + const BLE_ENCRYPT_AS_REQD + const BLE_ENCRYPT_NEVER + type BleGattAccess struct + ChrUuid BleUuid + ConnHandle uint16 + Data []byte + Op BleGattOp + SvcUuid BleUuid + type BleGattAccessFn func(access BleGattAccess) (uint8, []byte) + type BleGattOp int + func BleGattOpFromString(s string) (BleGattOp, error) + type BleMgmtChrs struct + NmpReqChr *BleChrId + NmpRspChr *BleChrId + ResReqChr *BleChrId + ResRspChr *BleChrId + type BlePairCfg struct + Bonding bool + IoCap BleSmIoCap + Keypress bool + Mitm bool + Oob bool + OurKeyDist BleSmKeyDist + Sc bool + TheirKeyDist BleSmKeyDist + type BleRole int + const BLE_ROLE_MASTER + const BLE_ROLE_SLAVE + type BleScanFilterPolicy int + func BleScanFilterPolicyFromString(s string) (BleScanFilterPolicy, error) + func (a *BleScanFilterPolicy) UnmarshalJSON(data []byte) error + func (a BleScanFilterPolicy) MarshalJSON() ([]byte, error) + type BleSmAction int + const BLE_SM_ACTION_DISP + const BLE_SM_ACTION_INPUT + const BLE_SM_ACTION_NUMCMP + const BLE_SM_ACTION_OOB + func BleSmActionFromString(s string) (BleSmAction, error) + func (a *BleSmAction) UnmarshalJSON(data []byte) error + func (a BleSmAction) MarshalJSON() ([]byte, error) + func (io BleSmAction) String() string + type BleSmAuthReq int + const BLE_SM_AUTHREQ_BOND + const BLE_SM_AUTHREQ_KEYPRESS + const BLE_SM_AUTHREQ_MITM + const BLE_SM_AUTHREQ_SC + func BleSmAuthReqFromString(s string) (BleSmAuthReq, error) + func (a *BleSmAuthReq) UnmarshalJSON(data []byte) error + func (a BleSmAuthReq) MarshalJSON() ([]byte, error) + func (io BleSmAuthReq) String() string + type BleSmIoCap int + const BLE_SM_IO_CAP_DISP_ONLY + const BLE_SM_IO_CAP_DISP_YES_NO + const BLE_SM_IO_CAP_KEYBOARD_DISP + const BLE_SM_IO_CAP_KEYBOARD_ONLY + const BLE_SM_IO_CAP_NO_IO + func BleSmIoCapFromString(s string) (BleSmIoCap, error) + func (a *BleSmIoCap) UnmarshalJSON(data []byte) error + func (a BleSmIoCap) MarshalJSON() ([]byte, error) + func (io BleSmIoCap) String() string + type BleSmKeyDist int + const BLE_SM_KEY_DIST_ENC + const BLE_SM_KEY_DIST_ID + const BLE_SM_KEY_DIST_LINK + const BLE_SM_KEY_DIST_SIGN + func BleSmKeyDistFromString(s string) (BleSmKeyDist, error) + func (a *BleSmKeyDist) UnmarshalJSON(data []byte) error + func (a BleSmKeyDist) MarshalJSON() ([]byte, error) + func (io BleSmKeyDist) String() string + type BleSvc struct + Chrs []BleChr + SvcType BleSvcType + Uuid BleUuid + type BleSvcType int + const BLE_SVC_TYPE_PRIMARY + const BLE_SVC_TYPE_SECONDARY + func BleSvcTypeFromString(s string) (BleSvcType, error) + func (a *BleSvcType) UnmarshalJSON(data []byte) error + func (a BleSvcType) MarshalJSON() ([]byte, error) + type BleUuid struct + U128 BleUuid128 + U16 BleUuid16 + func NewBleUuid16(uuid16 uint16) BleUuid + func ParseUuid(uuidStr string) (BleUuid, error) + func (bu *BleUuid) MarshalJSON() ([]byte, error) + func (bu *BleUuid) String() string + func (bu *BleUuid) UnmarshalJSON(data []byte) error + type BleUuid128 [16]byte + func ParseUuid128(s string) (BleUuid128, error) + func (bu128 *BleUuid128) MarshalJSON() ([]byte, error) + func (bu128 *BleUuid128) String() string + func (bu128 *BleUuid128) UnmarshalJSON(data []byte) error + type BleUuid16 uint16 + func ParseUuid16(s string) (BleUuid16, error) + func (bu16 *BleUuid16) String() string