Page 1 of 1

Recieving data via TCPIP (probably)

Posted: Fri Oct 23, 2015 7:28 am
by Ultravibe
Hello!
I need to figure out how to "listen" specific port from some device.
Problem is: some guys says that it should be binary data, some says that is UDP.
Well, i don't worry much of UDP because it can be readed using:

Code: Select all

accept connections on port 5403 with message "GotData"
or something like that)))))
But what am do if it's NOT UDP messages? And generally, CAN it be readed in LiveCode and how?

Re: Recieving data via TCPIP (probably)

Posted: Wed Nov 11, 2015 10:26 am
by MaxV
Talking with devices is using USB ports or something like thate, so code depends on the machine it works, however on Windows is:

Code: Select all

open driver "COM2:" for binary update
read from driver usbSerial for 1 line in 100 milliseconds
put it into theInput
to send data something like:

Code: Select all

write "run lsd,500" & return to driver usbSerial
Probably you need to set some parameters like:

Code: Select all

set the serialControlString to "BAUD=9600 DATA=8 STOP=1 PARITY=N xon=off to=off dtr=off rts=off "

Re: Recieving data via TCPIP (probably)

Posted: Wed Nov 11, 2015 10:31 am
by MaxV

Re: Recieving data via TCPIP (probably)

Posted: Wed Nov 11, 2015 4:54 pm
by FourthWorld
"accept connections" uses sockets and will allow connections via TCPIP. What issues have you found using that?