Re: Could someone help with bash scripting?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yeah, I used to do a lot of this kind of programming like 20 years ago. It used to be fairly common for devices like medical scanners and meteorological data collection instruments to be controlled via a serial port. I always used ckermit and expect. Just to be sure, I did an apt search and I see there is still a ckermit package in Ubuntu but there is also something called gkermit. And I just used expect to automate connecting to a VPN. So I second the recommendation of those 2 tools.


On 11/23/22 03:25, Willem van der Walt wrote:
Hi,
kermit I think is the easiest.
You might also look at using expect.
Just do a man expect for details.
HTH, Willem


On Tue, 22 Nov 2022, Georgina Joyce wrote:

[You don't often get email from gena@xxxxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

[The e-mail server of the sender could not be verified (SPF Record)]

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. However, I find the command structure difficult and doesn't contain some of the daily commands like nudging the frequency up in Kilohertz etc.

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. I recall some members here were a fan of screen but I have never used it myself.

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.

Anyone can offer suggestions?

Thanks,

Georgina


Call: M0EBP
DMR ID: 2346259
Allstar: 52178
Locater: IO83PS









[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]

  Powered by Linux