[Hamlib-developer] Scripting to a device a radio is attached linux
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Georgina J. <ge...@ge...> - 2022-11-22 18:45:22
|
Hello All, I would like to write a bash script to control a Yaesu FT-991A transceiver. I have been using rigctl a part of the hamlib libraries. I have looked and researched that I can change the tty device baud rate by using stty with the -speed switch but can't really get my head around the stty syntax. I see from a unix stack exchange listing that I can crudely use echo and cat to the device using 2 console windows. The answer on Stack Exchange suggests using screen. According to the CAT reference manual. If I send "FA145500000;" as a set command The transceiver will respond with the same as a read command. So I want to clean up the responses and put them in human form. You might note that the radio deals with integers in this case. But us humans like decimals, so there is some cleaning up the output. I think I might be able to do that. But it is this issue of sending commands to the tty device and reading the responses that I haven't a clue. I see that there is a serial.h in hamlib and I will try to see if that gives me an example to work from. Perhaps there is another file I can review from hamlib? But my C skills are very limited. I have already started the script to see if the device exists on the system and bails out if not found in /dev. If so, the script echos the set baud. I then intend on attempting to take a frequency as a final check. Can anyone offer suggestions? Georgina Call: M0EBP DMR ID: 2346259 Allstar: 52178 Locater: IO83PS |