Custom Software Development
for an Electronics Measurement Device
A Slovenian company came up with an idea of a device that could replace a testing laboratory. They developed a test and measurement tool that can read signals from devices under test and analyze the data. The analysis results can be viewed from any web browser.
The device suits electronics enthusiasts who do not want to spend a lot of money on professional testing equipment and tools.
It is an open-source solution that allows users to use custom applications to measure various parameters and characteristics. Unlike many similar solutions, the device does not require downloading and installing software on your PC or tablet. Most applications that users may need are installed on the device itself. Users can access them through a web application.
Initially, the company asked Integra Sources to improve their existing data transmission mechanism which was too slow for the tasks the device was supposed to perform.
Later, the company also asked the team to develop a software licensing mechanism. While the entire ecosystem was open source, some of the test and measurement applications were supposed to be paid. Our job was to make sure that paid applications could not be distributed without a license.
After these two projects were finished, the customer decided to continue our partnership. Together we completed more than a few tasks. We improved the firm’s existing oscilloscope application and developed a number of new data analyzing apps. The team also created a calibration application and a network manager app for the device. We also helped the company develop an SCPI-server, a streaming application for the new versions of the device, and a client/server application for the multichannel function of the device. Lastly, the team performed kernel and distribution updates and helped to implement a variety of new features into the ecosystem’s software.
Data Transmission Mechanism
One of the features of the device is that it can be accessed from any browser via a web interface. The applications that process the input signals are installed on the device. The processed data is then transmitted to the web interface (GUI) where the user can see them.
Initially, the device used an HTTP connection to exchange data with the GUI part. However, this is a technically unfeasible solution. The web interface had to periodically establish a connection with the hardware, send an HTTP-request message to the board, and close the connection after receiving a response message. The data transmission was slow and unstable.
Our team improved the oscilloscope application so that it could exchange data via a Web Socket connection. Unlike HTTP, this communications protocol can establish a persistent connection. It improved the channel’s carrying capacity and made the connection stable.
The team also developed a client/server system with a backend based on customized Nginx. It accepts requests from the client and sends back the HTML page (web interface). Nginx also starts up the corresponding measurement application on the device.
Software Licensing Mechanism
Certain applications used with the device were supposed to be sold in a marketplace. Some of them allowed users to make in-app purchases. Our job was to develop a licensing mechanism that would grant access to paid applications. Many of them were already installed on the device, and users had direct access to the file system. It made hacking the device easier.
The team used an approach similar to digital signature technology. We designed a license generator app for the server of the marketplace. Now, to buy software, users need to access the marketplace via their devices. During the purchase, the device sends all the necessary information about itself to the application which generates a signature using the private key with the RSA cryptographic algorithm. Then, it sends a license back to the device. Users can decrypt this key but cannot generate one themselves.
The license is saved on the device. Licensed applications on the device have unique signatures and check them before starting up. If a user makes changes to any of them, their licenses become invalid, and the applications will not work.
Data Analyzing Applications Development
We developed a few measurement applications for the device and improved a few existing ones.
- Oscilloscope Application
The team improved the app’s data processing algorithms so that it could measure the input signals correctly, read the data in time, and display it without errors. We also improved the calibration of the app and fixed some hanging-up problems.
- Spectrum Analyzer App
Our team designed a new spectrum analyzer application for the device. The application can construct graphs that display spectrums in time. This is a very resource-intensive process, so we did a lot of work to improve the performance of the app.
- Logic Analyzer App
This application saves extremely large volumes of data, so a lot of work was done to reach maximum performance. Initially, the app was able to analyze three bus protocols: I2C, SPI, and UART. Later, we also designed a decoder for the CAN-bus, so now the app can analyze four bus protocols.
- Bode Analyzer App
We also helped the customer to integrate this application designed by an enthusiast into their ecosystem. We redesigned its data analysis algorithm, added new functions, and fixed bugs.
Calibration Application Development
The company’s device had an application for factory calibration. It allowed the manufacturer to configure the board before sending it to buyers. Users could calibrate the device too. However, the app could be accessed only via a console. After the customer’s team and Integra Sources designed new analyzing apps, we were supposed to rewrite this code for each of them. We suggested developing a new calibration app.
Network Manager Development
Aside from measurement software, our team designed an application for configuring the network interfaces of the device. It allows users to connect to networks, configure Wi-Fi, see the IP address of the device, etc.
Our team helped the customer develop a server that allows third-party programs to connect to the device and collect data through the SCPI protocol. This allows the device to integrate with third-party software such as MATLAB or LabVIEW. In this case, the data captured by the device is analyzed by these programs instead of the device’s own applications.
Streaming Software Development
When the customer introduced new versions of their device, our team worked on improving the software part. Among other things, our goal was to develop a streaming application for the new versions.
Previously, the devices could not transmit data continuously. They could only display the data captured at a certain point, and some information would always be lost. Our team developed a server app for the device and a client app to be installed on a PC.
This software runs a service on the device similar to an SCPI-server but faster. Unlike an SCPI-server, our solution runs fewer intermediate processes. The program was written in pure C++. Additionally, its architecture was designed in such a way as to minimize data exchange between buffers. Due to these factors, the app achieved good performance.
Also, unlike an SCPI-server, it can detect data loss. Even if data is lost, it can define the time of the event and the signal length. The software allows the device to continuously record the input data locally to a file or transmit it to the client app.
Another task was to design a multistreaming (or multichannel) system for a new version of the device. The device has only 2 input and 2 output channels, which may not be enough for certain tasks. Multichanneling allows users to connect several devices into a single system, thus extending their capabilities. This system synchronizes the work of multiple boards when they capture data.
The core functionality of the system was developed by the customer’s team. Our job was to design a client/server application that could run the devices and process data simultaneously. The server apps are installed on the devices, while the client apps are installed on a PC and can connect to the servers.
When connected, one of the FPGAs (marked as the main device) sends a timing signal to the other boards, which synchronizes their work. The software part checks the process to define if data loss takes place and when: during data capture, transmission via the network, or file saving. The application was developed in C++ with the use of the Asio C++ library.
We also programmed the application to save data in a range of formats: WAV, TDMS, BIN, and CSV.
Linux kernel and distribution update
As the customer introduced new versions of the device, our team updated the existing software. A few times, we also updated the kernel and distribution. The device works on Ubuntu Linux.
Scope of work
- Data transmission mechanism development
- Software licensing mechanism development
- Test and measurement applications development and improvement: oscilloscope, spectrum analyzer, logic analyzer, bode analyzer.
- Calibration application development
- SCPI-server development
- Streaming application development
- Client/server application development for the multichannel function
- Linux kernel and distribution update
- The low-level part of these projects was implemented using C/C++.
- The device has 2 options for networking: Ethernet and Wi-Fi.
- Some utilities were implemented using Python.
- Web Socket is used to stream data from the device to the GUI part.
- All software except GUI works on the Xilinx SoC platform.
- We participated in custom Linux image building for the device.
- We designed the client/server system based on customized Nginx.
- The licensing mechanism uses the RSA cryptographic algorithm.
- The client/server app responsible for multichanneling was written in C++ with the use of the Asio C++ library.
During our work with the customer and his project which took over 7 years we faced a lot of issues. These are some of the major challenges we successfully solved.
Minimized dead-time. When processing data, the oscilloscope could not capture and display signals. The dead-time or delay between the acquired signal and the displayed signal was about two seconds. We dug into the library and optimized rendering signals. We also optimized the web user interface to reduce the amount of data it needed to process. As a result, we reduced the dead-time to less than a second.
Improved performance. The logic analyzer uses eight channels to capture multiple signals. Our main goal was to reach maximum performance at a maximum sample rate. The team managed to achieve the max ACQ speed of 125 MS/s per channel and up to five seconds per signal at a frequency of 125 MS/s.
Incorrect data display. When we worked on the bode analyzer app, one of the challenges was to teach the app to properly display incorrect data. The device could analyze only a limited range of frequencies. At the band limits, the input data got distorted by filters, and the app showed inadequate characteristics. The team improved the user interface so that it could display such characteristics with adequate graphs. Additionally, the application could display inadequate data due to noise or incorrect calibration. This problem was solved algorithmically.
Improved application speed. The FPGA in the device uses four parameters for configuring its signal filter. They need to be set up simultaneously and have large value ranges, which makes the calibration application very slow. Our team improved the algorithms used in the app to enhance its speed.Implemented 2 functions in 1 app. According to the customer’s request, the device was supposed to be able to stream data via the TCP and UDP protocols, as well as save data on memory cards. Instead of developing two separate apps, we managed to program the streaming application to perform both of these functions. Also, the app can save data in three formats: WAV, TDMS, and CSV.
We helped the test and measurement company integrate a software licensing mechanism that allows users to buy applications and make in-app purchases. We also developed a client-server system with a backend based on customized Nginx.
The team developed and helped develop a number of measurement applications for the device. We designed a calibration app to ease up configuration. We also participated in implementing the streaming and multichanneling functions, upgraded the kernel and distribution used in the device, and did lots of minor changes and bug fixes.
You might also like...
IoT Messaging Library for Electric Scooter Ecosystem
This messaging library can fit IoT systems and smart networks of varying scalability that require stable and effective communication between the system components. This is a developer-friendly solution with easy implementation.
Medical Alert Bracelet That Delivers Assistance at the Touch of a Button
The device is a plastic bracelet designed for patients at military hospitals and clinics in the USA. It notifies hospital staff about an emergency with the patient's condition.