Source

servo / servo-query

Full commit
#!/usr/bin/perl
use Device::SerialPort;

my $dev_file = shift;

my $dev = Device::SerialPort->new($dev_file)
	or die "$dev_file: Unable to open: $!\n";

my $rc = $dev->write("?c\r")
	or die "$dev_file: write failed: $!\n";

while (1)
{
	my $s = $dev->input
		or next;

	print "READ: $s\n";
}