Versions in this module Expand all Collapse all v0 v0.1.1 Mar 17, 2026 Changes in this version + const AuthTypeOpen + const AuthTypeWPA + const AuthTypeWPA2 + const AuthTypeWPA2PSK + const AuthTypeWPAPSK + const ConnectionBackoffMultiplier + const ConnectionInitialBackoff + const ConnectionJitter + const ConnectionMaxBackoff + const ConnectionRetryTimeout + const DefaultConnectionRetries + const DefaultPassiveActivationRetries + const DefaultPollingRetries + const DiagnoseAttentionTest + const DiagnoseCommunicationTest + const DiagnoseEchoBackTest + const DiagnosePollingTest + const DiagnoseRAMTest + const DiagnoseROMTest + const DiagnoseSelfAntennaTest + const EncryptTypeAES + const EncryptTypeNone + const EncryptTypeTKIP + const EncryptTypeWEP + const MIFAREKeyA + const MIFAREKeyB + const NDEFMaxRetries + const NDEFRetryDelay1 + const NDEFRetryDelay2 + const NDEFRetryDelay3 + const NTAGBlockReadRetries + const NTAGFallbackRetries + const NTAGTimeoutRetryDelay + const TLVTypeLockControl + const TLVTypeMemoryControl + const TLVTypeNDEF + const TLVTypeNull + const TLVTypeTerminator + const TNFAbsoluteURI + const TNFEmpty + const TNFExternalType + const TNFMediaType + const TNFReserved + const TNFUnchanged + const TNFUnknown + const TNFWellKnown + const TransportACKDelay1 + const TransportACKDelay2 + const TransportACKDelay3 + const TransportACKRetries + const TransportACKTimeout + const TransportDrainRetries + const TransportI2CFrameRetries + const TransportWakeupRetries + const UARTWakeupDelay1 + const UARTWakeupDelay2 + const UARTWakeupDelay3 + const WakeupGPIOP32 + const WakeupGPIOP34 + const WakeupHSU + const WakeupI2C + const WakeupINT1 + const WakeupRF + const WakeupSPI + var ErrChecksumMismatch = errors.New("checksum mismatch") + var ErrCommandFailed = errors.New("command execution failed") + var ErrCommandNotSupported = errors.New("command not supported by device") + var ErrCommunicationFailed = errors.New("communication failed") + var ErrDataTooLarge = errors.New("data too large") + var ErrDeviceNotFound = errors.New("device not found") + var ErrDeviceNotSupported = errors.New("device not supported") + var ErrFrameCorrupted = errors.New("frame corrupted") + var ErrIncompleteRecord = errors.New("incomplete NDEF record") + var ErrInvalidChunking = errors.New("invalid chunking") + var ErrInvalidFormat = errors.New("invalid data format") + var ErrInvalidIDLength = errors.New("invalid ID length") + var ErrInvalidMBME = errors.New("invalid MB/ME flags") + var ErrInvalidNDEF = errors.New("invalid NDEF format") + var ErrInvalidParameter = errors.New("invalid parameter") + var ErrInvalidPayloadLength = errors.New("invalid PAYLOAD length") + var ErrInvalidRecordHeader = errors.New("invalid NDEF record header") + var ErrInvalidResponse = errors.New("invalid response format") + var ErrInvalidTLV = errors.New("invalid TLV structure") + var ErrInvalidTNF = errors.New("invalid TNF value") + var ErrInvalidTag = errors.New("invalid tag type") + var ErrInvalidTypeLength = errors.New("invalid TYPE length") + var ErrNACKReceived = errors.New("NACK received") + var ErrNoACK = errors.New("no ACK received") + var ErrNoNDEF = errors.New("no NDEF record found") + var ErrNoTagDetected = errors.New("no tag detected") + var ErrNotImplemented = errors.New("not implemented") + var ErrSecurityViolation = errors.New("security violation: data exceeds safety limits") + var ErrTLVDataTooShort = errors.New("TLV data too short") + var ErrTLVInvalidLength = errors.New("TLV invalid length format") + var ErrTLVNDEFNotFound = errors.New("NDEF TLV not found") + var ErrTLVTerminatorFirst = errors.New("terminator TLV before NDEF") + var ErrTagAuthFailed = errors.New("tag authentication failed") + var ErrTagDataCorrupt = errors.New("tag data appears corrupted") + var ErrTagEmptyData = errors.New("tag detected but returned empty data") + var ErrTagNotFound = errors.New("tag not found") + var ErrTagReadFailed = errors.New("tag read failed") + var ErrTagUnreliable = errors.New("tag readings are inconsistent") + var ErrTagUnsupported = errors.New("tag type not supported") + var ErrTagWriteFailed = errors.New("tag write failed") + var ErrTimeout = errors.New("operation timeout") + var ErrTooManyRecords = errors.New("too many NDEF records") + var ErrTransportClosed = errors.New("transport is closed") + var ErrTransportNotReady = errors.New("transport not ready") + var ErrTransportRead = errors.New("transport read failed") + var ErrTransportTimeout = errors.New("transport timeout") + var ErrTransportWrite = errors.New("transport write failed") + var ErrWriteVerificationFailed = errors.New("write verification failed: data mismatch") + var MaxNDEFIDLength = 255 + var MaxNDEFMessageSize = 8192 + var MaxNDEFPayloadSize = 4096 + var MaxNDEFRecordCount = 255 + var MaxNDEFTypeLength = 255 + func BuildNDEFMessageEx(records []NDEFRecord) ([]byte, error) + func BuildVCardRecord(contact *VCardContact) (*ndef.Record, error) + func BuildWiFiRecord(cred WiFiCredential) (*ndef.Record, error) + func CloseSessionLog() error + func Debugf(format string, args ...any) + func Debugln(args ...any) + func ExtractNDEFFromTLV(data []byte) ([]byte, error) + func GetClaimedSizeFromCC(ccData []byte) int + func GetSessionLogPath() string + func HasTrace(err error) bool + func InitSessionLog() (string, error) + func IsCommandNotSupported(err error) bool + func IsDeviceGoneError(err error) bool + func IsFatal(err error) bool + func IsGenuineNXP(uid []byte) bool + func IsPN532AuthenticationError(err error) bool + func IsPN532RFError(err error) bool + func IsPN532TimeoutError(err error) bool + func IsRetryable(err error) bool + func RetryWithConfig(ctx context.Context, config *RetryConfig, retryFunc RetryableFunc) error + func SetDebugEnabled(enabled bool) + func TLVDebugInfo(data []byte) string + func ValidateNDEFMessage(data []byte) error + func WriteNDEFWithRetry(ctx context.Context, writeFunc WriteNDEFFunc, maxRetries int, tagType string) error + type AccessControlConfig struct + AuthFailureLimit uint8 + ConfigLock bool + Protection bool + type Address struct + City string + Country string + PostalCode string + State string + Street string + type AutoPollResult struct + TargetData []byte + Type AutoPollTarget + func (a *AutoPollResult) ToDetectedTag() *DetectedTag + type AutoPollTarget byte + const AutoPollFeliCa212 + const AutoPollFeliCa424 + const AutoPollGeneric106kbps + const AutoPollGeneric212kbps + const AutoPollGeneric424kbps + const AutoPollISO14443A + const AutoPollISO14443B + const AutoPollISO14443B4 + const AutoPollJewel + const AutoPollMifare + type BaseTag struct + func (*BaseTag) ReadBlock(_ context.Context, _ uint8) ([]byte, error) + func (*BaseTag) ReadNDEF(_ context.Context) (*NDEFMessage, error) + func (*BaseTag) WriteBlock(_ context.Context, _ uint8, _ []byte) error + func (*BaseTag) WriteNDEF(_ context.Context, _ *NDEFMessage) error + func (t *BaseTag) DebugInfo(_ context.Context) string + func (t *BaseTag) DebugInfoWithNDEF(ctx context.Context, ndefReader interface{ ... }) string + func (t *BaseTag) IsGenuine() bool + func (t *BaseTag) IsMIFARE4K() bool + func (t *BaseTag) Manufacturer() Manufacturer + func (t *BaseTag) ReadText(ctx context.Context) (string, error) + func (t *BaseTag) Summary() string + func (t *BaseTag) Type() TagType + func (t *BaseTag) UID() string + func (t *BaseTag) UIDBytes() []byte + func (t *BaseTag) WriteText(ctx context.Context, text string) error + type ConnectOption func(*connectConfig) error + func WithAutoDetection() ConnectOption + func WithConnectTimeout(timeout time.Duration) ConnectOption + func WithConnectionRetries(maxAttempts int) ConnectOption + func WithDeviceDetector(...) ConnectOption + func WithDeviceOptions(opts ...Option) ConnectOption + func WithTransportFactory(factory TransportFactory) ConnectOption + func WithTransportFromDeviceFactory(factory TransportFromDeviceFactory) ConnectOption + type DetectedTag struct + ATQ []byte + DetectedAt time.Time + SAK byte + TargetData []byte + Type TagType + UID string + UIDBytes []byte + func (t *DetectedTag) IsGenuine() bool + func (t *DetectedTag) Manufacturer() Manufacturer + type Device struct + func ConnectDevice(ctx context.Context, path string, opts ...ConnectOption) (*Device, error) + func New(transport Transport, opts ...Option) (*Device, error) + func (d *Device) ClearTransportState() error + func (d *Device) Close() error + func (d *Device) CreateTag(detected *DetectedTag) (Tag, error) + func (d *Device) CycleRFField(ctx context.Context) error + func (d *Device) DetectTag(ctx context.Context) (*DetectedTag, error) + func (d *Device) Diagnose(ctx context.Context, testNumber byte, data []byte) (*DiagnoseResult, error) + func (d *Device) GetFirmwareVersion(ctx context.Context) (*FirmwareVersion, error) + func (d *Device) GetGeneralStatus(ctx context.Context) (*GeneralStatus, error) + func (d *Device) HardReset(ctx context.Context) error + func (d *Device) InAutoPoll(ctx context.Context, pollCount, pollPeriod byte, targetTypes []AutoPollTarget) (*AutoPollResult, error) + func (d *Device) InDeselect(ctx context.Context) error + func (d *Device) InListPassiveTarget(ctx context.Context, brTy byte) (*DetectedTag, error) + func (d *Device) InListPassiveTargetWithTimeout(ctx context.Context, brTy, mxRtyATR byte) (*DetectedTag, error) + func (d *Device) InRelease(ctx context.Context) error + func (d *Device) InSelect(ctx context.Context) error + func (d *Device) Init(ctx context.Context) error + func (d *Device) InitiatorListPassiveTargets(ctx context.Context, tagType TagType, uid []byte) (*DetectedTag, error) + func (d *Device) IsAutoPollSupported() bool + func (d *Device) PowerDown(ctx context.Context, wakeupEnable, irqEnable byte) error + func (d *Device) Reset(ctx context.Context) error + func (d *Device) SAMConfiguration(ctx context.Context, mode SAMMode, timeout, irq byte) error + func (d *Device) SendDataExchange(ctx context.Context, data []byte) ([]byte, error) + func (d *Device) SendDataExchangeWithRetry(ctx context.Context, data []byte) ([]byte, error) + func (d *Device) SendRawCommand(ctx context.Context, data []byte) ([]byte, error) + func (d *Device) SetPassiveActivationRetries(ctx context.Context, maxRetries byte) error + func (d *Device) SetPollingRetries(ctx context.Context, mxRtyATR byte) error + func (d *Device) SetRetryConfig(config *RetryConfig) + func (d *Device) SetTimeout(timeout time.Duration) error + func (d *Device) SimplePoll(ctx context.Context, interval time.Duration) (*DetectedTag, error) + func (d *Device) Transport() Transport + func (d *Device) WaitForTag(ctx context.Context) (*DetectedTag, error) + type DeviceConfig struct + MaxFastReadPages int + RetryConfig *RetryConfig + Timeout time.Duration + func DefaultDeviceConfig() *DeviceConfig + type DeviceHealthChecker interface + CheckHealth func() error + type DiagnoseResult struct + Data []byte + Success bool + TestNumber byte + type ErrorType int + const ErrorTypePermanent + const ErrorTypeTimeout + const ErrorTypeTransient + type FeliCaTag struct + func NewFeliCaTag(device *Device, targetData []byte) (*FeliCaTag, error) + func (f *FeliCaTag) DebugInfo(ctx context.Context) string + func (f *FeliCaTag) GetIDm() []byte + func (f *FeliCaTag) GetPMm() []byte + func (f *FeliCaTag) GetServiceCode() uint16 + func (f *FeliCaTag) GetSystemCode() uint16 + func (f *FeliCaTag) Polling(ctx context.Context, systemCode uint16) error + func (f *FeliCaTag) ReadBlock(ctx context.Context, block uint8) ([]byte, error) + func (f *FeliCaTag) ReadBlockExtended(ctx context.Context, block uint16) ([]byte, error) + func (f *FeliCaTag) ReadNDEF(ctx context.Context) (*NDEFMessage, error) + func (f *FeliCaTag) RequestService(ctx context.Context, serviceCodes []uint16) ([]byte, error) + func (f *FeliCaTag) SetServiceCode(serviceCode uint16) + func (f *FeliCaTag) SetSystemCode(systemCode uint16) + func (f *FeliCaTag) WriteBlock(ctx context.Context, block uint8, data []byte) error + func (f *FeliCaTag) WriteBlockExtended(ctx context.Context, block uint16, data []byte) error + func (f *FeliCaTag) WriteNDEF(ctx context.Context, message *NDEFMessage) error + func (f *FeliCaTag) WriteText(ctx context.Context, text string) error + type FirmwareVersion struct + SupportIso14443a bool + SupportIso14443b bool + SupportIso18092 bool + Version string + type GeneralStatus struct + FieldPresent bool + LastError byte + Targets byte + type IsRetryableFunc func(error) bool + type MIFAREConfig struct + HardwareDelay time.Duration + RetryConfig *RetryConfig + func DefaultMIFAREConfig() *MIFAREConfig + type MIFARETag struct + func NewMIFARETag(device *Device, uid []byte, sak byte) *MIFARETag + func (*MIFARETag) AnalyzeLastError(err error) string + func (t *MIFARETag) Authenticate(ctx context.Context, sector uint8, keyType byte, key []byte) error + func (t *MIFARETag) AuthenticateWithRetry(ctx context.Context, sector uint8, keyType byte, key []byte) error + func (t *MIFARETag) DebugInfo(ctx context.Context) string + func (t *MIFARETag) FormatForNDEF(ctx context.Context) error + func (t *MIFARETag) GetDevice() *Device + func (t *MIFARETag) GetTimingVariance() time.Duration + func (t *MIFARETag) IsAuthenticated() bool + func (t *MIFARETag) IsNDEFFormatted(ctx context.Context) bool + func (t *MIFARETag) IsTimingUnstable() bool + func (t *MIFARETag) ReadBlock(ctx context.Context, block uint8) ([]byte, error) + func (t *MIFARETag) ReadBlockAuto(ctx context.Context, block uint8) ([]byte, error) + func (t *MIFARETag) ReadBlockDirect(ctx context.Context, block uint8) ([]byte, error) + func (t *MIFARETag) ReadNDEF(ctx context.Context) (*NDEFMessage, error) + func (t *MIFARETag) ReadNDEFWithRetry(ctx context.Context) (*NDEFMessage, error) + func (t *MIFARETag) ResetAuthState(ctx context.Context) error + func (t *MIFARETag) SetConfig(config *MIFAREConfig) + func (t *MIFARETag) SetRetryConfig(config *RetryConfig) + func (t *MIFARETag) TryAuthenticate(ctx context.Context) error + func (t *MIFARETag) WriteBlock(ctx context.Context, block uint8, data []byte) error + func (t *MIFARETag) WriteBlockAuto(ctx context.Context, block uint8, data []byte) error + func (t *MIFARETag) WriteBlockAutoAlternative(ctx context.Context, block uint8, data []byte) error + func (t *MIFARETag) WriteBlockDirect(ctx context.Context, block uint8, data []byte) error + func (t *MIFARETag) WriteNDEF(ctx context.Context, message *NDEFMessage) error + func (t *MIFARETag) WriteNDEFAlternative(ctx context.Context, message *NDEFMessage) error + func (t *MIFARETag) WriteText(ctx context.Context, text string) error + type Manufacturer string + const ManufacturerFudan + const ManufacturerInfineon + const ManufacturerNXP + const ManufacturerST + const ManufacturerTI + const ManufacturerUnknown + func GetManufacturer(uid []byte) Manufacturer + type MockTransport struct + func NewMockTransport() *MockTransport + func (*MockTransport) HasCapability(capability TransportCapability) bool + func (*MockTransport) Type() TransportType + func (m *MockTransport) CheckHealth() error + func (m *MockTransport) ClearError(cmd byte) + func (m *MockTransport) Close() error + func (m *MockTransport) DeselectTarget() + func (m *MockTransport) DisableRFField() + func (m *MockTransport) EnableRFField() + func (m *MockTransport) GetCallCount(cmd byte) int + func (m *MockTransport) GetState() (powerMode PN532PowerMode, rfFieldOn, targetSelected bool) + func (m *MockTransport) IsConnected() bool + func (m *MockTransport) QueueResponse(cmd byte, response []byte) + func (m *MockTransport) QueueResponses(cmd byte, responses ...[]byte) + func (m *MockTransport) Reconnect() error + func (m *MockTransport) Reset() + func (m *MockTransport) SelectTarget() + func (m *MockTransport) SendCommand(ctx context.Context, cmd byte, data []byte) ([]byte, error) + func (m *MockTransport) SetDelay(delay time.Duration) + func (m *MockTransport) SetError(cmd byte, err error) + func (m *MockTransport) SetHealthError(err error) + func (m *MockTransport) SetPowerMode(mode PN532PowerMode) + func (m *MockTransport) SetReconnectError(err error) + func (m *MockTransport) SetResponse(cmd byte, response []byte) + func (m *MockTransport) SetTimeout(timeout time.Duration) error + type NDEFLocation struct + HeaderSize int + Length int + Offset int + func ScanForNDEFTLV(data []byte) (*NDEFLocation, error) + type NDEFMessage struct + Records []NDEFRecord + func ParseNDEFMessage(data []byte) (*NDEFMessage, error) + type NDEFRecord struct + Payload []byte + Text string + Type NDEFRecordType + URI string + VCard *VCardContact + WiFi *WiFiCredential + type NDEFRecordType string + const NDEFTypeBluetooth + const NDEFTypeSmartPoster + const NDEFTypeText + const NDEFTypeURI + const NDEFTypeVCard + const NDEFTypeWiFi + type NTAGTag struct + func NewNTAGTag(device *Device, uid []byte, sak byte) *NTAGTag + func (t *NTAGTag) DebugInfo(ctx context.Context) string + func (t *NTAGTag) DetectType(ctx context.Context) error + func (t *NTAGTag) DisablePasswordProtection(ctx context.Context) error + func (t *NTAGTag) FastRead(ctx context.Context, startAddr, endAddr uint8) ([]byte, error) + func (t *NTAGTag) GetCachedCapabilityContainer() []byte + func (t *NTAGTag) GetCachedUserDataPage() []byte + func (t *NTAGTag) GetConfigPage() uint8 + func (t *NTAGTag) GetPasswordPage() uint8 + func (t *NTAGTag) GetTotalPages() uint8 + func (t *NTAGTag) GetUserMemoryRange() (start, end uint8) + func (t *NTAGTag) GetVersion(ctx context.Context) (*NTAGVersion, error) + func (t *NTAGTag) HasNDEF() bool + func (t *NTAGTag) LockPage(ctx context.Context, page uint8) error + func (t *NTAGTag) ProbeActualMemorySize(ctx context.Context, claimedBytes int) (lastPage uint8, userMemory int) + func (t *NTAGTag) PwdAuth(ctx context.Context, password []byte) ([]byte, error) + func (t *NTAGTag) ReadBlock(ctx context.Context, block uint8) ([]byte, error) + func (t *NTAGTag) ReadCapabilityContainer(ctx context.Context) ([]byte, error) + func (t *NTAGTag) ReadNDEF(ctx context.Context) (*NDEFMessage, error) + func (t *NTAGTag) ReadNDEFWithRetry(ctx context.Context) (*NDEFMessage, error) + func (t *NTAGTag) SetAccessControl(ctx context.Context, config AccessControlConfig) error + func (t *NTAGTag) SetPasswordProtection(ctx context.Context, password, pack []byte, auth0 uint8) error + func (t *NTAGTag) WriteBlock(ctx context.Context, block uint8, data []byte) error + func (t *NTAGTag) WriteNDEF(ctx context.Context, message *NDEFMessage) error + func (t *NTAGTag) WriteText(ctx context.Context, text string) error + type NTAGType uint8 + const NTAGType213 + const NTAGType215 + const NTAGType216 + const NTAGTypeUnknown + type NTAGVersion struct + FixedHeader uint8 + MajorVersion uint8 + MinorVersion uint8 + ProductSubtype uint8 + ProductType uint8 + ProtocolType uint8 + StorageSize uint8 + VendorID uint8 + func (v *NTAGVersion) GetNTAGType() NTAGType + func (v *NTAGVersion) GetStorageSize() int + type Option func(*Device) error + type PN532Error struct + BytesSent int + Command string + Context string + ErrorCode byte + Target byte + func NewPN532Error(errorCode byte, command, context string) *PN532Error + func NewPN532ErrorWithDetails(errorCode byte, command string, bytesSent int, target byte) *PN532Error + func (e *PN532Error) Error() string + func (e *PN532Error) IsAuthenticationError() bool + func (e *PN532Error) IsCommandNotSupported() bool + func (e *PN532Error) IsRFError() bool + func (e *PN532Error) IsTimeoutError() bool + type PN532PowerMode int + const PN532PowerModeNormal + const PN532PowerModePowerDown + const PN532PowerModeSleep + type ReadNDEFFunc func() (*NDEFMessage, error) + type Reconnecter interface + Reconnect func() error + type RetryConfig struct + BackoffMultiplier float64 + InitialBackoff time.Duration + Jitter float64 + MaxAttempts int + MaxBackoff time.Duration + RetryTimeout time.Duration + func DefaultRetryConfig() *RetryConfig + type RetryableFunc func() error + type SAMMode byte + const SAMModeDualCard + const SAMModeNormal + const SAMModeVirtualCard + const SAMModeWiredCard + const SAMNormal + type Tag interface + DebugInfo func(ctx context.Context) string + ReadBlock func(ctx context.Context, block uint8) ([]byte, error) + ReadNDEF func(ctx context.Context) (*NDEFMessage, error) + ReadText func(ctx context.Context) (string, error) + Summary func() string + Type func() TagType + UID func() string + UIDBytes func() []byte + WriteBlock func(ctx context.Context, block uint8, data []byte) error + WriteNDEF func(ctx context.Context, message *NDEFMessage) error + WriteText func(ctx context.Context, text string) error + type TagType string + const TagTypeAny + const TagTypeFeliCa + const TagTypeMIFARE + const TagTypeNTAG + const TagTypeUnknown + type TraceBuffer struct + func NewTraceBuffer(transport, port string, maxSize int) *TraceBuffer + func (tb *TraceBuffer) Clear() + func (tb *TraceBuffer) RecordRX(data []byte, note string) + func (tb *TraceBuffer) RecordTX(data []byte, note string) + func (tb *TraceBuffer) RecordTimeout(note string) + func (tb *TraceBuffer) WrapError(err error) error + type TraceDirection string + const TraceRX + const TraceTX + type TraceEntry struct + Data []byte + Direction TraceDirection + Note string + Timestamp time.Time + func (e TraceEntry) String() string + type TraceableError struct + Err error + Port string + Trace []TraceEntry + Transport string + func GetTrace(err error) *TraceableError + func (e *TraceableError) Error() string + func (e *TraceableError) FormatTrace() string + func (e *TraceableError) Unwrap() error + type Transport interface + Close func() error + IsConnected func() bool + SendCommand func(ctx context.Context, cmd byte, args []byte) ([]byte, error) + SetTimeout func(timeout time.Duration) error + Type func() TransportType + type TransportCapability string + const CapabilityAutoPollNative + const CapabilityRequiresInSelect + const CapabilityUART + type TransportCapabilityChecker interface + HasCapability func(capability TransportCapability) bool + type TransportError struct + Err error + Op string + Port string + Retryable bool + Type ErrorType + func NewChecksumMismatchError(op, port string) *TransportError + func NewDataTooLargeError(op, port string) *TransportError + func NewFrameCorruptedError(op, port string) *TransportError + func NewInvalidResponseError(op, port string) *TransportError + func NewNACKReceivedError(op, port string) *TransportError + func NewNoACKError(op, port string) *TransportError + func NewTimeoutError(op, port string) *TransportError + func NewTransportError(op, port string, err error, errType ErrorType) *TransportError + func NewTransportNotReadyError(op, port string) *TransportError + func NewTransportReadError(op, port string) *TransportError + func NewTransportWriteError(op, port string) *TransportError + func (e *TransportError) Error() string + func (e *TransportError) Unwrap() error + type TransportFactory func(path string) (Transport, error) + type TransportFromDeviceFactory func(device detection.DeviceInfo) (Transport, error) + type TransportType string + const TransportI2C + const TransportMock + const TransportSPI + const TransportUART + type VCardContact struct + Addresses map[string]Address + EmailAddresses map[string]string + FirstName string + FormattedName string + LastName string + Note string + Organization string + PhoneNumbers map[string]string + Title string + URL string + Version string + type WiFiCredential struct + AuthType uint16 + EncryptionType uint16 + Hidden bool + MACAddress string + NetworkKey string + SSID string + type WriteNDEFFunc func(ctx context.Context) error