The c!n tester is a dedicated hardware and software solution designed for automated functional testing of ProMicro-like microcontrollers (MCUs). Its primary goal is to provide a fast and reliable way to verify basic pin connectivity and functionality before deployment.
The core testing logic and fundamental functionality are fully operational. However, active development is focused on improving the GUI and enhancing the overall user experience.
The hardware consists of a custom Printed Circuit Board (PCB) housing two microcontrollers:
-
Master MCU: Controls the entire testing process, communicates with the host application, and manages test sequences.
-
Target MCU: This is the ProMicro-like microcontroller under test.
Essentially, the PCB represents a direct connection of the pins of the two microcontrollers; the same setup can be achieved using regular wires.
Technology Stack:
- Python 3.10+
- PySide6 β used to create the graphical user interface (GUI).
- Nuitka β used to compile Python code into standalone executable files.
- platformio β used to compile MCU firmware.
- adafruit-nrfutil β used for flashing firmware onto microcontrollers.
- pyserial β provides communication between the computer and microcontrollers via COM ports.
All communication between the host application (software) and the MCUs is conducted via serial ports (COM ports).
Currently, there is no fully developed CLI application, but since both the Target and Master microcontrollers are connected to the computer via COM ports, you can interact with them directly using standard terminal commands.
The system is designed for quick, repeatable functional checks. The Master MCU and the Target MCU communicate over dedicated lines to perform the tests.
The system uses an orchestrated handshake process to ensure reliable communication. On power-up, both MCUs send discovery messages. Once the application identifies and initializes the ports, the following sequence is performed under direct application control:
-
Handshake & Initialization: The application scans all COM ports (via Auto Search or manual selection), identifies the Master and Target, and sends an
INITcommand to synchronize them. -
All Pins HIGH: The application commands both MCUs to enter the
ALL_HIGHstage. The Target drives all pins HIGH, and the Master verifies the connectivity. -
All Pins LOW: The application commands both MCUs to enter the
ALL_LOWstage. The Target drives all pins LOW, and the Master verifies the state. -
Individual Pin Sequence: The application orchestrates a per-pin sequence. It commands the Target to toggle a specific pin and then commands the Master to verify that specific pin's state. This step-by-step approach ensures maximum reliability and clear diagnostic feedback.
- GUI Indicators: The application provides real-time feedback for each test stage (All High, All Low, Sequence).
- Pinout View: A dynamic visualization shows exactly which pins passed or failed the test.
- Master Hardware Button: You can start the test by pressing the physical button on the Master MCU after it has been initialized by the application.
- Connect the Master MCU to the host computer.
- Open the c!n tester application.
- Connect the new Target MCU.
- Click "Auto Search" to automatically find and initialize both MCUs.
- Click "Run Test" in the app OR press the physical Button on the Master MCU.
- Wait for the test completion and observe the results in the Pinout View.
- Insert a new Target MCU and repeat.
For now, the Master MCU is flashed manually using a uf2 file. Put the MCU into bootloader mode and copy the file to it.
The recommended and simplest way to use the application is by using the pre-compiled binaries available in the project's Releases section.
-
Download the executable file for your operating system from the project's Releases page.
-
For Linux/macOS: You must grant execution permissions before launching the binary:
chmod +x cn_tester_app
-
For Linux: To allow the application to access /dev/ttyACM*, you need to add the current user to the dialout group:
sudo usermod -a -G dialout $USERΓ -
Flashing Feature Dependency: If you plan to use the target MCU flashing function, you must have the adafruit-nrfutil utility available on your system. You can ensure this in two ways:
- Install via Pip :
pip install adafruit-nrfutil. - Local Binary: Download a pre-compiled binary of adafruit-nrfutil from its project releases and place it alongside the C!N tester app executable.
- Install via Pip :
-
Launch the application:
- For Linux:
./cn_tester_app_linux_x64 - macOS:
./cn_tester_app_macos_aarch64 - Windows:
cn_tester_win_x64.exe
- For Linux:
You can view the logs by clicking on the image of the USB port.
This method is recommended only for development or if you wish to modify the source code.
Python 3.10 or newer.
git clone https://github.com/aroum/cn_tester.git
pip install -r requirements.txt
if you use conda:
conda install libpython-static
python main.py
To compile the application into a standalone executable that does not require a local Python 3.10+ environment, use the Nuitka compiler. For details, see the nuitka documentation.
git clone https://github.com/aroum/cn_tester.git
pip install -r requirements_build.txt
brew install python@3.10 nuitka
python3.10 -m venv /tmp/cleanenv
source /tmp/cleanenv/bin/activate
# source /tmp/cleanenv/bin/activate.fish #for fish
pip install -r requirements_build.txtnuitka \
--onefile \
--macos-create-app-bundle \
--macos-app-icon=ICON_PATH \
--macos-app-name=MACOS_APP_NAME \
--macos-app-icon=icon/icon.png=icon/icon.png
--enable-plugin=pyside6 \
--include-data-files=icon/icon.png=icon/icon.png \
--include-data-dir=mcu_firmware=mcu_firmware \
--include-data-files=mcu_firmware/firmware_target.hex=mcu_firmware/firmware_target.hex \
--output-dir=build \
--product-name="C!N Tester GUI" \
--clean-cache=all \
--output-filename=cn_tester_app.app \
main.py- Visual Studio C++ build tools
call "C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
nuitka ^
--onefile ^
--windows-console-mode=disable ^
--enable-plugin=pyside6 ^
--windows-icon-from-ico=icon/icon.ico ^
--include-data-files=icon/icon.png=icon/icon.png ^
--include-data-dir=mcu_firmware=mcu_firmware ^
--include-data-files=mcu_firmware/firmware_target.hex=mcu_firmware/firmware_target.hex ^
--output-dir=build ^
--product-name="C!N Tester GUI" ^
--file-version=0.1.0 ^
--clean-cache=all ^
--output-filename=cn_tester_app.exe ^
main.py- python3-dev package
- GCC
- patchelf
nuitka \
--onefile \
--enable-plugin=pyside6 \
--include-data-files=icon/icon.png=icon/icon.png \
--include-data-dir=mcu_firmware=mcu_firmware \
--include-data-files=mcu_firmware/firmware_target.hex=mcu_firmware/firmware_target.hex \
--output-dir=build \
--product-name="C!N Tester GUI" \
--clean-cache=all \
--output-filename=cn_tester_app.bin \
main.pyWe have several improvements planned for the upcoming sprints:
- Bluetooth Functionality Testing: Planning and implementation of test sequences to verify the basic operation of the Target MCU's Bluetooth features.
- Setup CI/CD with GitHub Actions: Implement GitHub Actions workflows for automated cross-platform compilation of the application binaries and firmware flashing.
- Add some renders of the PCB and case, as well as screenshots of the app.
- Work on the documentation.
A special thank you to the following community members:
Compilation & Testing: @Rowb, @turtle-bazon