I need to communicate with a serial port inside a Perl script. I need to send characters and read the input and search for strings.
What is the simplest way to achieve this? By using “expect” or by opening the /dev/ttys0 device in Perl itself ? Or some other method ?
I prefer to use perl but I don’t know if it is simple and featured as expect.
1 Answer