I have a device that accepts RS232 connection. It's used with QR code readers such as "Access IS".
This scanner has begin and end values and set to 02 for begin, 03 for end. If I scanned using the barcode the letter "a", the device debug successfully prints:
- 2022.02.02T18:27:21.426; DEBUG; RS232; RX; 026103;
- 2022.02.02T18:27:21.433; INFO; EVENT; IO.BarcodeRead; a;
Now I want to mimic the same behavior and send similar data to the device but using the a chip such as the ESP32. I used this code:
void setup()
{
Serial.begin(19200);
}
void loop() // run over and over
{
delay(2000);
byte message[] = {0x02, 0x61, 0x03 };
Serial.write(message, sizeof(message));
}
But the device is receiving this instead:
- 2022.02.03T12:54:40.195; DEBUG; RS232; RX; bf;
- 2022.02.03T12:54:40.202; DEBUG; RS232; RX; 4f7e00;
I'm new to this and I really appreciate all the help I can get to find a solution.