Skip to main content

Embedded Tester Protocol (ETP) Tool - etptool

NOTE: This project is still in development and is not yet ready for production use.

Setup

pip install etptool

Manual

Usage

Flash ETP firmware

See etplib README for instructions on flashing the ETP firmware.

Configure transport

etptool cfg save transport serial:COM4:115200

Replace COM4 with the serial port of the ETP device.

Verify connection & firmware version

etptool fw info

GPIO

Get GPIO information

etptool gpio info

Initialize GPIO

  • Configure GPIO pin _13 as output
etptool gpio init _13:output
  • Configure GPIO pin _3 as input
etptool gpio init _3:input

Read GPIO

  • Read GPIO pin _3
etptool gpio read _3
  • Monitor GPIO pin _3
etptool gpio read --monitor _3

Write GPIO

  • Write 1 to GPIO pin _13
etptool gpio write _13:1
  • Write 0 to GPIO pin _13
etptool gpio write _13:0

NOTE: On an Arduino board, 1 will turn OFF the LED and 0 will turn ON the LED.

ADC

Get ADC information

etptool adc info

Initialize ADC

  • Enable ADC pin a0
etptool adc init a0:en
  • Disable ADC pin a0
etptool adc init a0:dis

Read ADC

  • Read ADC pin a0
etptool adc read a0
  • Monitor ADC pin a0
etptool adc read --monitor a0

PWM

Get PWM information

etptool pwm info

Initialize PWM

etptool pwm init _3:en

Set PWM duty cycle

etptool pwm ctrl _3:50

I2C

Get I2C information

etptool i2c info

Initialize I2C bus

  • Initialize I2C bus 0 with 100 kHz speed
etptool i2c init 0 100

Alternatively, you can use --bus and --speed options

etptool i2c init --bus 0 --speed 100

Scan I2C bus

etptool i2c scan 0

or

etptool i2c scan --bus 0

I2C read

  • Read 2 bytes from I2C device 0x68
etptool i2c read 0 104 2

or

etptool i2c read --bus 0 --addr 104 --len 2

I2C Write

  • Write 2 bytes to I2C device 0x68
etptool i2c write 0 104 10 20

or

etptool i2c write --bus 0 --addr 104 --data 10 20

Register read I2C

  • Read 4 bytes from I2C device 0x68 register 0x02
etptool i2c read_reg 0 104 2 4

or

etptool i2c read_reg --bus 0 --addr 104 --reg 2 --len 4

Register write I2C

  • Write 4 bytes to I2C device 0x68 register 0x02

etptool i2c write_reg 0 104 2 10 20 30 40

or

etptool i2c write_reg --bus 0 --addr 104 --reg 2 --data 10 20 30 40

SPI

Get SPI information

etptool spi info

Initialize SPI bus

  • Initialize SPI bus 0 with 1 MHz speed and mode 0
etptool spi init 0 1000000 0

Alternatively, you can use --bus, --speed, and --mode options

etptool spi init --bus 0 --speed 1000000 --mode 0

SPI transfer

  • Transfer 2 bytes on SPI bus 0
etptool spi transfer 0 10 20

or

etptool spi transfer --bus 0 --data 10 20

Metadata

Release files for etptool 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for etptool 0.0.1
File Size Uploaded Provenance Actions
etptool-0.0.1.tar.gz 10.1 kB Without provenance Details for etptool-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for etptool 0.0.1
File Interpreter ABI Platform Actions
etptool-0.0.1-py3-none-any.whl Python 3 none any Details for etptool-0.0.1-py3-none-any.whl

Total release size: 23.9 kB

Release files / etptool-0.0.1.tar.gz

Download URL etptool-0.0.1.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fd86ca75002297df7c11a8f1704b5c138d576d92c18ba64d789e6de7b82be8f5
BLAKE2b-256 checksum
How to use checksums
e13039a39fc7fcc67a034ed06ef838263384edb7f47e6bdb25d992e1db934077
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / etptool-0.0.1-py3-none-any.whl

Download URL etptool-0.0.1-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30c01b05f548440942e96b84330037a86cbdaaf690d72886d58d35c86852ad7f
BLAKE2b-256 checksum
How to use checksums
2bd303fc00a44e9ed5deb6b942aa455cf28f131aef355ff6dfb4fc6307cd5039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Security for etptool 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page