I am currently working on a solution that reads data from a Barcode Scanner through a serial port on an Ubuntu 22.04 machine.
Is there a way for me to check in my software(Golang) that the Scanner is correctly connected, and data is properly transferred through the port?
I am currently just checking if a scan comes through the port or not after a certain amount of time. Unfortunately this does not tell the user what exactly is desired, as I would like to be able to actively check the connection, independent of the scanner actually scanning anything.
EDIT: I am using a Honeywell 1911i Scanner using RS232(though planning to support other scanners), and reading from the serial port using this library: https://github.com/bugst/go-serial.