Jump to content

Recommended Posts

Posted (edited)

I have found a great program for reading and even sending data over serial. The program is called Terminal.exe

I made a au3 script that reads and decodes the log file that I set the program to log to.

so program logs to the desktop and the script reads the GPS data that it saw in the log.

you must have a GPS, terminal.exe and the script.

now this is modded just for my stuff but it is very easy to write something that works for you.

Attached is my log reading script and Terminal.exe

GPS.au3

http://zerocool60544.t35.com/Terminal.exe

Edited by CyberZeroCool
Check out ConsultingJoe.com
Posted

Terminal comes bundled with Windows for over a decade. Make sure you are not infringing copyright by distributing the one from Microsoft.

Have you tried the program EDLIN? :whistle: It has the GUI stripped out of it, is tiny, and can communicate with your COM: port directly. It has been out for over twenty years, and widely distributed. As a bonus, the bugs have probably been ironed out by now.

Posted

Terminal comes bundled with Windows for over a decade. Make sure you are not infringing copyright by distributing the one from Microsoft.

Have you tried the program EDLIN? :whistle: It has the GUI stripped out of it, is tiny, and can communicate with your COM: port directly. It has been out for over twenty years, and widely distributed. As a bonus, the bugs have probably been ironed out by now.

this is not the windows terminal
Check out ConsultingJoe.com
Posted

Have you tried the program EDLIN? :whistle: It has the GUI stripped out of it, is tiny, and can communicate with your COM: port directly. It has been out for over twenty years, and widely distributed. As a bonus, the bugs have probably been ironed out by now.

how do you access a COM port with edlin?

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

  • 6 months later...
Posted

Hope someone finds this useful or interesting

CODE

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.2.2.0

Author: metaborn

Script Function:

Modular use of NETComm, Find GPS comm port

Function List:

Install_NETComm()

getGPS_port()

_CheckCommError()

MsgBoxGPS_Port()

#ce ----------------------------------------------------------------------------

#NoTrayIcon

main()

Func main()

MsgBoxGPS_Port()

EndFunc ;main()

Func Install_NETComm()

Dim $ExtractDest = "C:\WINDOWS\SYSTEM32\NETComm\"

DirRemove("C:\WINDOWS\SYSTEM32\NETComm\", 1)

DirCreate("C:\WINDOWS\SYSTEM32\NETComm\")

FileInstall("C:\metaborn\apps\NETCommOCX\DeIsL1.isu", $ExtractDest & "DeIsL1.isu", 1)

FileInstall("C:\metaborn\apps\NETCommOCX\install.txt", $ExtractDest & "install.txt", 1)

FileInstall("C:\metaborn\apps\NETCommOCX\NETComm.ocx", $ExtractDest & "NETComm.ocx", 1)

FileInstall("C:\metaborn\apps\NETCommOCX\NETCommOCXSourceCode.zip", $ExtractDest & "NETCommOCXSourceCode.zip", 1)

FileInstall("C:\metaborn\apps\NETCommOCX\VB6.zip", $ExtractDest & "VB6.zip", 1)

FileInstall("C:\metaborn\apps\NETCommOCX\VBNET.zip", $ExtractDest & "VBNET.zip", 1)

FileInstall("C:\metaborn\apps\NETCommOCX\_DEISREG.ISR", $ExtractDest & "_DEISREG.ISR", 1)

FileInstall("C:\metaborn\apps\NETCommOCX\_ISREG32.DLL", $ExtractDest & "_ISREG32.DLL", 1)

$results = RunWait(@ComSpec & " /c C:\WINDOWS\SYSTEM32\REGSVR32.EXE /s C:\WINDOWS\SYSTEM32\NETComm\NETComm.ocx", "C:\WINDOWS\SYSTEM32\", @SW_HIDE)

EndFunc ;Install_NETComm()

Func getGPS_port()

Install_NETComm()

$ComPort = ObjCreate("NETCommOCX.NETComm");Create NETComm.ocx object

Dim $cnt = 1

Dim $GPS_port

While $cnt <= 15

$ComPort.CommPort = string($cnt)

$ComPort.Settings = "4800,N,8,1"

$ComPort.InputLen = 0

$ComPort.InputMode = 0

$ComPort.HandShaking = 0

$ComPort.PortOpen = "True"

If @error > 0 then

$ComPort.PortOpen = "False"

Else

Sleep(3000)

If $ComPort.InBufferCount > 0 Then

if( StringInStr($ComPort.InputData, "$GP") ) Then

$GPS_port = $ComPort.CommPort

Else

$GPS_port = "False"

EndIf

If $GPS_port <> "False" Then

$ComPort.PortOpen = "False"

$ComPort = 0

Return $GPS_port

EndIf

EndIf

Endif

$cnt = $cnt + 1

WEnd

$ComPort.PortOpen = "False"

$ComPort = 0

Return "False"

EndFunc ;getGPS_port()

Func _CheckCommError()

setError(1)

EndFunc ;_CheckCommError

Func MsgBoxGPS_Port()

Dim $port = getGPS_port()

If $port = "False" Then

BlockInput(0)

MsgBox(0, "Error", "No GPS data. Please verify that your GPS Receiver is plugged into the correct port or contact your system administrator.")

Exit(1)

EndIf

MsgBox(0,"GPS Port", "GPS Port: " & $port)

EndFunc ;MsgBoxGPS_Port()

  • 1 month later...
  • 3 years later...
Posted

Hello!

What must be installed to get the script to work?

(Or can I read the information from my GPS on another way?)

I first installed AutoIt then found that I have to installing "NETCommOCX"

Now I have installed this version: NetCommOCX (Don't know if this was the correct version).

Now I get the following error message:

Line 51

$ComPort.PortOpen = "True"

$ComPort.PortOpen = "True"^ERROR

Error: The requested action with this object has failed.

What's wrong?

What can I do?

(My GPS(USB) is now on COM-port 6)

//Jan

Posted

Hello!

What must be installed to get the script to work?

(Or can I read the information from my GPS on another way?)

I first installed AutoIt then found that I have to installing "NETCommOCX"

Now I have installed this version: NetCommOCX (Don't know if this was the correct version).

Now I get the following error message:

Line 51

$ComPort.PortOpen = "True"

$ComPort.PortOpen = "True"^ERROR

Error: The requested action with this object has failed.

What's wrong?

What can I do?

(My GPS(USB) is now on COM-port 6)

//Jan

I don't know anything about CyberZeroColl'2 script or terminal.exe, but if you want serial communication and 32 bit is ok then maybe my udf and dll in the link in my signature could help you.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...