This is a simulator for DTU1 device.
The simulator will generate message and send it to TCP server
Forward tcp server message to a virtual com port using socat:
Using Qt5.13.2 to Build and Run
- need to install Qt5.13.2: Example: ${HOME}/Qt/5.13.2
mkdir build && cd build
- run cmd
${HOME}/Qt/Tools/CMake/bin/cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${HOME}/Qt/5.13.2/gcc_64
- run make to build
make -j4
- open terminal and run cmd
socat -d -d tcp-listen:8888 pty,link=/tmp/COM2,raw,echo=0
if you don't have socat please install it:
sudo apt-get install socat
- go to the build directory and run
./DeviceSimulator
- you can change the tcp-listen from file settings.ini in the build directory