Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TCP/IP
#1
Hopefully this is possible with QM!!


Setting up Inovonics 730 RDS encoder that uses TCP/IP communication.

I want to communicate directly with it using QM so I can format text data and upload to the hardware.

http://msdn.microsoft.com/en-us/library/...lient.aspx

I'm not really sure how TCP/IP communication works, so please put in notes.

I have the Assigned IP, Gateway, Subnet, DNS, and port information...just will need to know what is necessary and where to put it. I can set a password in the hardware, but right now it is blank. Perhaps I will be setting a password, so if it's not a trouble, show how that works too.

Thanks,
Jimmy Vig
#2
WSAStartup
WSACleanup
WSAGetLastError
closesocket
inet_addr
gethostbyname
gethostbyaddr
htons
connect
send
recv

These functions can be used to create TCP/IP client. All documented in MSDN. You also have to know protocol used by Inovonics 730 RDS encoder.
#3
HyperTerminal works when I configure the program for TCP/IP and put in the correct information. I have no idea where to find out what protocol the machine uses.

To communicate with the Inovonics 730 using HyperTerminal just send commands like:
TEXT=Hello World
RT=More Text

Being that I haven't figured out how to use QM and TCP/IP Right, I am using "SendKey" function to send each individual character to the HyperTerminal window...no way to use setwintext or anything that I could figure out. It works, but I don't feel like it is as stable as I would like it to be, occasionally it will miss a character. Is there anyway to send command line messages through QM to hyperterminal to control a specific connection?

How does QM net work? I also would like to see if the automation program could communicate directly with QM using it's built in TCP/IP connection.

Thanks,
Jimmy Vig
#4
net and the related QM TCP/IP server cannot be used by other software. Specific protocol, passwords, etc.

------------------

Try this TCP/IP client class.

Macro TcpIpClient help
Code:
Copy      Help
;Sends and receives data using TCP/IP.
;A variable of TcpIpClient type also can be used with Winsock functions as SOCKET variable.
;When a function fails, it returns 0. To get error code, call WSAGetLastError.

;EXAMPLE

;Connects to http server and downloads file.

out
#compile "__TcpIpClient"
TcpIpClient x

str server="en.wikipedia.org"
str getfile="/wiki/Hypertext_Transfer_Protocol"
str receivedData

out "---- connecting ----"

if(!x.Connect(server 80)) end "failed"

out "---- sending request ----"

str request.format("GET %s HTTP/1.0[]User-Agent: Quick Macros[]Host: %s[][]" getfile server)
if(!x.Send(request)) end "failed"

out "---- receiving ----"

if(!x.Receive(receivedData)) end "failed"

out "---- received: ----"
out receivedData


Attached Files
.qml   Winsock TCP IP client.qml (Size: 3.75 KB / Downloads: 420)
#5
do you have any 'server side' TCP/IP class/example?
#6
tomorrow will post
#7
TCP/IP server and client
#8
what can i say... You're the man Tongue

Thanks


Forum Jump:


Users browsing this thread: 1 Guest(s)