A
A
AlexSer2020-02-05 14:41:14
Qt
AlexSer, 2020-02-05 14:41:14

How to work with character encodings and com port?

I receive data on the com port from the device. The device transmits data using a specific protocol.
A signal is requested from the device in ASCII ENQ, in the terminal it is displayed in HEX as 05.
To start the exchange, the program must answer the ACK to the device, in HEX 06.
The protocol describes that the device accepts a response only in ASCII.
How can I send a reply?
sport->write("x06")?
Explain plz. who understands coding.
QString str=port->readAll();
In QT debugging, the symbol "?" when there is a request from the device.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shurshur, 2020-02-05
@AlexSer

"\x06"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question