NAME
Ham::Device::FT950 - Functions to Communicate with Yaesu FT-950
SYNOPSIS
use Ham::Device::FT950;
Constructors
my $ft950 = new Ham::Device::FT950(
portname => "/dev/ttyS0",
baudrate => 4800,
databits => 8,
parity => "none",
handshake => "rts",
lockfile => 1,
read_char_time => 0,
read_const_time => 20
);
DESCRIPTION
Set of functions used to talk to a Yaesu FT-950 HF Radio. Not all functions of the radio are implimented. The communications is based on Device::SerialPort as the underlying process to communicate with the radio. View "perldoc Device::SerialPort" for more infomation on serial port operation and options.
Included is a demonstration program pRigctl.plx that can be used to test most of the functionality of Ham::Device::FT950.
Configuration Parameter Methods
Below is a list of supported option that can be passed to set up serial port:
- $ft950->portname($portname)
-
Usually a name like /dev/ttyS0 or /dev/ttyUSB0, default is /dev/ttyS0.
- $ft950->databits($databits)
-
Number of bits in the serial steam excluding start, stop and parity. Legal values integer 5 to 8, default is 8.
- $ft950->parity($parity)
-
One of the following: "none", "odd", "even". If you select anything except "none", you will need to set parity_enable (not implmented yet). Default is "none".
- $ft950->stopbits($stopbits)
-
Number of stopbits. Legal valus are 1 and 2, default is 1.
- $ft950->handshake($handshake)
-
One of the following: "none", "rts", and "xoff". Default is "rts". Note the FT-950 needs to be set "rts"; make sure all serial lines are connected.
- $ft950->alias($alias)
-
Use alias to convert the name used by "built-in" messages. Default is "FT-950".
- $ft950->user_msg($bool)
-
Use Device::SerialPort's built-in messages, "ON" or "OFF". Default is "OFF".
- $ft950->lockfile($lock)
-
Flag to use or not use a lockfile. The Device::SerialPort package has support for lockfiles but support is experimental. So by setting this attribute to "0" turns off the usage of lockfiles. Options are "0" for no lockfile and "1" to enable lockfile, default is "1". Note lockfile location is hard coded to /var/lock/. If you see a messages like:
Unable to open /dev/ttyUSB0: File exists
Then delete the file "/var/lock/LCK..USB0" and try again. If still no sucess try setting lockfile equal to "0".
- $ft950->read_char_time($time)
-
Average time between read characters. Default is 0.
- $ft950->read_const_time($time)
-
Read time for serial port. See "perldoc Device::Serial". Default is 20ms.
Instance Methods
- $ft950->playBack($mem)
-
This method plays back one of the 5 voice memories. $mem is required to be a string "01" to "05". Returns number of characters sent or undef on failure.
- $ft950->getPower()
-
Gets the current output power setting of radio. Returns power between 5-100 or undef on failure.
- $ft950->swapVfo()
-
Swaps the frequency of VFO A and VFO B. Returns the number of characters sent or undef on failure.
- $ft950->vfoSelect($vfo)
-
Selects VFO A or B. $vfo = "A" or "B". If you send the same VFO twice the rig will mute. Returns the number of characters sent or undef on failure.
- $ft950->getActVfo()
-
Returns which VFO is currently active. Returns "A" or "B" or undef on failure.
- $ft950->bandSelect($band)
-
Selects active band, $band equal to one of the following: 1.8, 3.5, 7, 10, 14, 18, 21, 28.5, 29, 50. Returns number of characters sent on undef on failure.
- $ft950->getFreq($vfo)
-
Gets the current frequency and returns the value in Mhz. Set $vfo to "a" or "b". Returns undef on failure.
- $ft950->setFreq($vfo, $freq)
-
Sets frequency in the requested VFO. $vfo must be "a" or "b" and frequency must be in Mhz. Returns undef on failure.
- $ft950->setMode($mode)
-
Sets the operating mode, valid modes are: LSB, USB, CW, FM, AM, FSK-L, CW-R, PKT-L, FSK-R, PKT-FM, FM-N, PKT-U and AM-N. Returns undef on failure.
- $ft950->getMode()
-
Gets the current operating mode or undef on failure. Modes are LSB, USB, CW, FM, AM, FSK-L, CW-R, PKT-L, FSK-R, PKT-FM, FM-N, PKT-U and AM-N.
- $ft950->setPower($power)
-
Sets the rigs output power. $power must be "005" to "100". Returns number of characters sent or undef on failure.
- $ft950->readOpt($option)
-
Reads an option from the radio. $option neets to be a string between "001" and "118". Returns the value of the option or undef on failure.
- $ft950->readSMeter()
-
Reads the current value of the S meter. Returns a result between "000" and "255" or undef on failure.
- $ft950->statBSY()
-
Status the "BUSY" indicator of the radio. Returns 1 if ON or 0 if OFF. Returns undef on failure.
- $ft950->setMOX($mox)
-
Sets the MOX (Manual Operated Transmit) on or off, or gets the status of the MOX . $mox equal 1 to set, 0 unsets and 2 returns status: 1 = ON, 0 = OFF. Returns undef on failure.
- $ft950->setVOX($vox)
-
Sets the VOX (Voice Operated Transmit) on or off, or get the status of the VOX. $vox equal 1 to set, 0 to unset, and 2 returns status: 1 = ON, 0 = OFF. Returns undef on failure.
- $ft950->statTX()
-
Returns the transmit status of the rig:
Returns 0 if Radio TX OFF CAT TX OFF Returns 1 if Radio TX OFF CAT TX ON Returns 2 if Radio TX ON CAT TX OFF Returns undef on failure.
- $ft950->statFastStep()
-
Get the status of the Fast Step mode. Returns 0 for OFF, 1 for ON and undef for failure.
- $ft950->setFastStep($fsmode)
-
Set Fast step mode on or off. $fsmode = 0 for OFF and 1 for ON. Returns number of characters sent or undef on failure.
- $ft950->writeOpt($filename)
-
Writes all of the rigs options to a file. $filename contains the filename to write out the options. Default filename is FT950-options, returns 1 on success and undef on failure.
BUGS
This is a very ealy version using object oriented Perl, so expect a few. Hope to complete full implemtation in the next year or so.
SEE ALSO
FT-950 CAT Operation Reference book, Vertex Standard Co., Ltd. Avaiable at www.yaesu.com, Device::Serial
Updates will be posted to http://www.cpan.org as they become avaiable.
AUTHOR
Tim Gimmel, <ky4j@arrl.net>
COPYRIGHT AND LICENSE
Copyright (C) 2008-2010 by Tim Gimmel
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.