Install Otii Server on a Raspberry Pi
Otii hardware: Otii Arc Pro or Otii Ace Pro
Raspberry Pi 4B rev 1.2 8 GB or Raspberry Pi 5 8GB
USB SSD disk
External DC power supply
Device under test (DUT)
Jumper wires
Otii server will run on a Raspberry Pi 4/5 with less than 8 GB RAM, but it is not recommended.
Running the system on an SD card will degrade performance, and the memory card will likely quickly wear out. Use the USB SSD disk instead, as recommended.
Otii Automation Toolbox License
Raspberry Pi OS (64-bit)
Otii 3 Server is a 64-bit application. Therefore, the 64-bit version of the Raspberry Pi OS is a must.
Plug the SSD disk to the computer via USB.
Download, install, and run Raspberry Pi Imager.
Click on the different options listed in the Raspberry Pi Imager, and select the following options:
Raspberry Pi Device: Raspberry Pi 4 or 5
Operating System: Raspberry Pi OS (64-bit)
Storage: The one assigned to the SSD disk
Once everything is selected, it should look like below:
Click the "NEXT" button.
In the following window, “Use OS customization”, click on “EDIT SETTINGS”.
In the GENERAL tab, define the hostname, username, password, SSID, and password of the network you intend to connect to, the country of the Wireless LAN, and local settings such as time zone and keyboard layout.
In the SERVICE tab, toggle the "Enable SSH" option to enable it, and click on "Use password authentication".
Click the "SAVE" button to save the changes made.
Once it takes you to the previous window, click on the “YES” option to apply the custom settings to the OS.
As a final warning, a warning window will pop up to confirm if you are sure to continue, as it will overwrite the existing data on the disk. Click “YES", then the system will ask for the computer password to proceed – the system will take a few minutes to download the OS and write it into the SSD disk.
Once completed, a message will be displayed indicating that the disk can now be removed from the reader. Now, it is time to connect it to the Raspberry Pi, turn it on, wait a couple of seconds, and access it via SSH.
To wire up the system, all the hardware requirements mentioned above must be on hand.
Take the Raspberry Pi, without powering it up, connect the SSD Disk to the bottom USB 3 port of the Raspberry Pi.
With the USB cable provided in the Otii hardware box, plug the USB output into the Otii hardware box and the USB type A output into the top USB 3 port of the Raspberry Pi.
Supply power to the Otii hardware with an external DC power supply, fulfilling the essential requirements for proper operation. Read in more detail here. After powering up, the LED on the front of the Otii hardware must be turned on.
Lastly, power the Raspberry Pi through the USB C power supply port, ensuring that it is powered with the optimal parameters: 5V and a current capacity of at least 3A (5A for Raspberry Pi 5).
Once the entire system is connected, it should look like the following:
You must also connect the desired DUT to be analyzed and optimized, which must be set up under the UART configuration, allowing to debug the incoming messages, to automate processes based on these received messages.
Once the Raspberry Pi has been properly powered up, you can access it via SSH. To do so, use SSH clients such as Putty or Termius.
If you do not have it installed, download, install, and open the SSH client of your preference.
In the connection configuration, assign:
Hostname: assigned in the Raspberry Pi Imager (in my case raspberry.local), or you could also assign the IP address allocated to the Raspberry Pi; to find out the IP address, use tools to scan the network you are connected to to identify the different devices connected, as Fing.
Port: 22.
Connection type: SSH
Based on the SSH client used, proceed with the following steps to establish the connection.
Once connected, the username and password previously assigned must be entered, in my case, pi.qoitech
as the username.
Once accessed, observe you are now interacting from the Raspberry Pi.
The Otii server will enable the automated test setup for the Otii Product suite tools through scripting, supporting popular languages like Python and Java.
Visit the Qoitech User Management portal, and access your account. In case of not having one already, create it by simply clicking on "Create an account" – once created, the account must be verified with the associated email address to activate it.
Within the User Management portal, navigate to the Download page.
To download it, the EULA terms must be accepted by clicking the check box.
Select the Raspberry Pi version.
Once downloaded, the .deb
file must be transferred to the Raspberry Pi. This can be done in two ways:
If you have access to the Raspberry Pi interface, you can surf in the browser and then repeat the previously mentioned steps to download the file directly on the Raspberry Pi.
Copy the file using scp
, a command that manages the copy of files or directories between a local and remote system or between two remote systems. In this case, the local system would be the computer, and the remote system would be the Raspberry Pi. Note that this option will be explained below.
To copy files from the computer to the Raspberry Pi, run the following command on the computer's terminal and assign the required information:
Once the information has been assigned, it should look like:
In remote access to the Raspberry Pi, we go to the directory where we copied/downloaded our .deb package.
Then, execute the installation with:
Once installed, a scalable, low-power, functional testing of IoT and embedded systems can now be easily started.
For the purpose of the example below, two SSH connections must be established to run and interact with the Otii server: one to run the Otii server and another for user management and scripting. However, note that the Otii server can be activated directly from the scripting if required.
On one of the connections, run the following command to run the Otii Server. The connection should stay established in the background:
On other connection, run the following command to enable the user management capability within the command line interface (CLI):
Now, you can either operate User Management (UM) using Python, or by scripting. See the Automation Toolbox documentation for full details.
For a practical use case, let's run a Python example that shows how to log in, list licenses, reserve and return a license, and log out.
On the Raspberry Pi, create a Python file. You can use the nano
command, assign the name and type of the file:
Copy and paste in the code below:
Create a file within the same folder as the script above with the name credentials.json
Copy the JSON file below, assign the username and password of your Qoitech User Management account, as well as the Automation Toolbox license ID, which can be easily found in the UM either from the Otii 3 Desktop App or the web. Then, save it.
Run the user_management.py
script, by running the following command:
Upon running the code, the following logs will be shown:
Remember you must have the Otii 3 Desktop App closed, no session logged in, and no license reserved to run the script above successfully.
The next step is to fully explore the Otii TCP Client's functionalities and create custom Python scripts to automate the tests required throughout your hardware development cycles. Refer to Qoitech's Github to explore TCP clients for Python or Java, which contain ready-to-use examples.