Answer the question
In order to leave comments, you need to log in
How to make friends with ASTM E1381 protocol in QT C++ serialport?
There is a device that connects via serial and works through the ASTM protocol.
Here is a description of the protocol (Yandex.Drive).
I don't know much yet, so I'm asking for help.
If you connect through the terminal program, the character 05 is displayed in the logs;
in the protocol itself, after signal 05, the host must send signal 06 to the device.
There is a lot I don't understand. but here is the code:
void MainWindow::ReadDataSerialCom(){
QString byte; QByteArray arr; QString str;
byte=sPort->serialPort->readAll();
ui->terminal->append("Принятые данные:" +byte+ "\r\n");
sPort->serialPort->write("\x06"); /// Отправляю сигнал <ACK> правильно лия делаю?
ui->terminal->append(str);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question