ElManu1981 Posted June 2, 2021 Posted June 2, 2021 Hello, I'm new here and I'm not really into AutoIt yet. I have a problem and I hope here's someone clever who can help me........ I have a Transceiver (Yaesu FT 911a) which is connected to my laptop via a USB Device Server to make it usable in my LAN. The Transceiver shows up in the Device Manager as a Serial Port (Com 4 (and as an USB Sound Card - but that works and it's not important here)). Everything works good but I always gotta click a button in my software to transmit. That's absolutely disturbing because I'm caught in that program and can't google something in the background, a.s.o. So I wish to press a real (physical) switch to transmit (PTT (Press To Talk) switch). For someone with the right skill's I'm sure it's not that hard to implement. The script needs to do the following: When I press the switch (CTS and GROUND on the USB-TTL Board (Com 15) is shortened) => The script gotta send "TX1" on Com 4 (to the transceiver) right away. When I leave the switch (CTS and GROUND on the USB-TTL Board (Com 15) is no more shortened) => The Script gotta send "TX0" on Com 4 right away. Is something like that possible? If "yes" how? I attached a file whoch shows the protocol. But I think I described it the right way. I appreciate any help! Best regards Manuel FT-991A_CAT_OM_ENG_1711-D(1).pdf
Danyfirex Posted June 2, 2021 Posted June 2, 2021 Hello I think you probably could use the COMPort UDF and try to implement part of this commands here. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
ElManu1981 Posted June 2, 2021 Author Posted June 2, 2021 Saludos Danyfirex, thanks for ur reply which I really appreciate! U know how/where to set the Input-/Output-Com Ports and where to define the Commands to be sent in that "hudge" file? Best regards Manuel
ElManu1981 Posted June 2, 2021 Author Posted June 2, 2021 I think u meant the function "_ComSendString" for sending the commands, right? As far as I understood the function can be saved as an .au3 file. But no matter what I enter nothing happens when I run the file. Func _ComSendString($hComPort=Com13, $string=TX1, $encoding=1) Local $charArray If $encoding<1 Or $encoding>2 Then Return SetError(1,1,-1) $charArray = StringToASCIIArray($string, 0, StringLen($string), $encoding) Return _ComSendCharArray($hComPort, $charArray) EndFunc ;==>_ComSendString Best regards Manuel
dmob Posted June 2, 2021 Posted June 2, 2021 You function declaration is incorrect. Post a runnable script or at least show how you call the function.
ElManu1981 Posted June 2, 2021 Author Posted June 2, 2021 Hello dmob, excuse me, I'm still a noob. How to declarea function? Wanted to start the function testwise to see if it works.... but obviously it doesn't work since I didn't declare it the right way. Later - if that works I would like to start the funtion only when CTS is connected to GND on the USB-TTL board which is connected to Com 8.... Thanks in advance Manuel
Danyfirex Posted June 2, 2021 Posted June 2, 2021 You should learn at least the basic of the language to know how to implement what you want. you would need to check the Port. Open the Port, send command, handle response. I think If you just will run code without knowing what you're doing, maybe your best option is to hire a freelancer in some place that help you with this task. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now