#!/usr/local/bin/perl use strict; # Computer: iMac 2017;, USB to Serial Adapter: TRENDnet TU-S9; # Just showing the Locations of the 'SerialPort' Files. #use lib "/usr/local/lib/perl5/site_perl/5.36.0/darwin-2level/auto/Device/SerialPort/SerialPort.bundle"; #use lib "/usr/local/lib/perl5/site_perl/5.36.0/darwin-2level/Device/SerialPort/SerialPort.pm"; use Device::SerialPort; # I tried each of the below my $port = Device::SericalPort->new ...Lines of Code. #my $port = Device::SerialPort->new("/dev/cu.usbserial"); #my $port = Device::SerialPort->new("/dev/tty.usbserial"); #my $port = Device::SerialPort->new("/dev/ttys0"); my $port = Device::SerialPort->new("/dev/ttys1"); # Like the three (3) Lines above, this Driver produces the same Result. # The below Parameters are from my AppleScript and Python Code , which both work flawlessly via the TRENDnet TU-S9. $port->databits(8); $port->baudrate(4800); $port->handshake("rts"); $port->parity("none"); $port->stopbits(1); #$port->write_settings || undef $port; print "01"; print "\n"; $port->write("FA21050000;"); # Write "FA21050000;" Hz to Yaesu FTdx-1200 Transceiver to set VFO-A Frequency. # The VFO-A Frequency is NOT changed. print "02"; print "\n"; $port->write("FB;"); # Write "FB;" to FTdx-1200 to have Transceiver place Frequency of VFO-B into its Buffer. my $byte=$port->read(11); # Read the VFO-B Frequency, in "FBXXXXXXXX;" Format print "$byte"; # Print expected returned Frequency, in "FBXXXXXXXX;" Format, where XXXXXXXX is Freq. in Hz. print "\n"; #The VFO-B Frequency is NOT retreived from the FTdx-1200 Transceiver. print "03"; print "\n"; $port->close();