provisioningprotocol

package
v0.0.0-...-83a780d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command byte

Command indicates the command that should be executed on the board to be provisioned.

const (
	SketchInfo Command = iota + 1
	CSR
	Locked
	GetLocked
	WriteCrypto
	BeginStorage
	SetDeviceID
	SetYear
	SetMonth
	SetDay
	SetHour
	SetValidity
	SetCertSerial
	SetAuthKey
	SetSignature
	EndStorage
	ReconstructCert
)

type ProvisioningProtocol

type ProvisioningProtocol struct {
	// contains filtered or unexported fields
}

func NewProvisioningProtocol

func NewProvisioningProtocol(transport *transport.TransportInterface) *ProvisioningProtocol

func (*ProvisioningProtocol) Send

func (p *ProvisioningProtocol) Send(ctx context.Context, cmd Command, payload []byte) error

Send allows to send a provisioning command to a connected arduino device.

func (*ProvisioningProtocol) SendReceive

func (p *ProvisioningProtocol) SendReceive(ctx context.Context, cmd Command, payload []byte) ([]byte, error)

SendReceive allows to send a provisioning command to a connected arduino device. Then, it waits for a response from the device and, if any, returns it. If no response is received after 2 seconds, an error is returned.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL