Recieving data via TCPIP (probably)

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Ultravibe
Posts: 62
Joined: Sat Jan 17, 2015 12:06 pm

Recieving data via TCPIP (probably)

Post by Ultravibe » Fri Oct 23, 2015 7:28 am

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?

MaxV
Posts: 1577
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Recieving data via TCPIP (probably)

Post by MaxV » Wed Nov 11, 2015 10:26 am

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 "
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

MaxV
Posts: 1577
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Recieving data via TCPIP (probably)

Post by MaxV » Wed Nov 11, 2015 10:31 am

Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8413
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Recieving data via TCPIP (probably)

Post by FourthWorld » Wed Nov 11, 2015 4:54 pm

"accept connections" uses sockets and will allow connections via TCPIP. What issues have you found using that?
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Windows”