A tool automating UART and ADB interaction
Project description
Quick Start
pyAutoPort is a BASH/ZSH toolset for communicating with a Device Under Test (DUT) connected via UART and/or ADB. Embedded system engineers can use this toolset for automating tests.
These commands can be executed directly from the terminal as system commands.
Installation
Install pyAutoPort-related commands using:
/bin/pip install .
Run this command INSIDE JUPYTER if you want to use this in a Jupyter notebook or Jupyter Lab.
Sending UART Commands
Send UART commands and receive replies with:
uart_send ${MESSAGE}
For example, you should be able to see "connected" in the output after running:
uart_send "echo connected"
To specify the UART port and baudrate, define them in environment variables like this:
- Linux/MacOS
export TESTER_UART_PORT="/dev/ttyACM0"
export TESTER_UART_BAUDRATE=1250000
- Windows
set TESTER_UART_PORT="/dev/ttyACM0"
set TESTER_UART_BAUDRATE=1250000
You don't need to send other commands to get output; uart_send
will return the output.
Interacting with ADB
While adb shell xxx
is widely used to run shell commands from scripts without user interaction, direct interaction via the command-line interface (CLI) is necessary sometimes, especially when running an interactive app behind ADB.
This package provides tools for keeping an ADB session open and interacting with it directly from a script without being trapped by adb shell
.
Open A Persistent ADB Session
adb_open&
Send Commands to ADB Session
adb_send some command
adb_send another command
Close ADB Sessions
adb_close
These commands simplify the process of sending and receiving data to and from your DUT using UART and ADB in various testing scenarios.
How to Contribute
See contributing guidelines for details. commit guidelines may also be helpful.
LICENSE
This project is under BSD-3 license.
Credits
We express our gratitude to all contributors for their valuable contributions to pyAutoPort!
Maintainers
- Yu GU Yu.Gu@sony.com
- Shuang LIANG Shuang.Liang@sony.com
Contributors
Happy coding!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyAutoPort-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca41cfde57e95397b36f6795afa54986960d75eb5e10c6d32061ca2c74a9b7f5 |
|
MD5 | 3cbc5f4aa7f83b63b10863e4fea7356e |
|
BLAKE2b-256 | 8c058c765e548dcddefb340008cdf33dc547c0e403e0e0ead3c57a61b78315c5 |