| Author |
Message |
|
pgershon
Joined: Jul 10, 2004 Posts: 195
|
 Serial over IP
I am trying to use Serial Bridge with my Jandy Pool system. I have my serial port on the Jandy connected to an AbleLink Serial over IP device, so my serial data comes from 192.168.1.55 port 4660. I have access to the port on the PC side but am not sure how to tell my Mac that this is the serial port. Must be a way. Any thoughts?
|
| Sun Aug 01, 2010 5:53 am |
|
 |
|
anode
Joined: May 27, 2007 Posts: 689 Location: NC
|
 Re: Serial over IP
Typically, (at least from what I've seen) the Serial over IP winds up being a telnet service at the PC. You can have AS 'read' the telnet session looking for the key info and proceed from there.
I did very little with this a year or so ago, so its all fuzzy.
|
| Sun Aug 01, 2010 8:19 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
 Re: Serial over IP
I believe someone here has tried socat before - can't remember who and I haven't tried it though.
_________________ Jay (Indigo Support)
|
| Sun Aug 01, 2010 8:23 am |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1720 Location: Berkeley, CA
|
 Re: Serial over IP
pgershon wrote:I am trying to use Serial Bridge with my Jandy Pool system. I have my serial port on the Jandy connected to an AbleLink Serial over IP device, so my serial data comes from 192.168.1.55 port 4660. I have access to the port on the PC side but am not sure how to tell my Mac that this is the serial port. Must be a way. Any thoughts?
Serial Bridge can only "talk" to serial devices that appear in /dev. For example /dev/ttyt0 or tty.usbserial-6B4E0BB4. It cannot directly communicate with IP sockets. Based on your post, it looks like your data is available over IP. and then Jay wrote:I believe someone here has tried socat before - can't remember who and I haven't tried it though.
[that was me] socat is software that will listen to one data source (stream, file, tty, etc.) and make it available in some other form. With socat it is possible to have it listen to an IP port and then present that data as a virtual serial device in /dev. This would then allow you to use Serial Bridge to communicate with your pool equipment. However, socat is fairly convoluted to configure and is not available in binary form for MacOS - you will need to download the source and then compile it. See http://www.dest-unreach.org/socat/ for more information. As far at using AS to do this, I do not believe AS can manage an ongoing two way connection over telnet. All-in-all, If you can code, your best bet is probably to avoid Serial Bridge and write something in Perl, or better yet, Python. Since Python will be the basis for Indigo 5.0 plug-ins, you would be a step ahead of the game.
|
| Sun Aug 01, 2010 3:15 pm |
|
 |
|
pgershon
Joined: Jul 10, 2004 Posts: 195
|
 Re: Serial over IP
Thanks and your point makes sense, though I have nevr used Python and am reluctant to spend the time trying. I may run a wire from pool control to Computer (3 floors up) and never mind the serial over IP.
In the meantime, I found an application called MultiCast that purports to link two ports so they mirror eachother. I am thinking I could link the IP port with the Serial port. Might this work?
|
| Sun Aug 01, 2010 9:30 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1720 Location: Berkeley, CA
|
 Re: Serial over IP
pgershon wrote:...In the meantime, I found an application called MultiCast that purports to link two ports so they mirror eachother. I am thinking I could link the IP port with the Serial port. Might this work?
I think you mean MultiCom. That is similar to socat. Less powerful, but with a nice GUI. It may do what you want. You'd set port A to IP Client and then your server IP address and port, and then set port B to Pseudo Terminal. But, when I have tried this software I had problems with characters being echoed back to the IP server. Good luck.
|
| Sun Aug 01, 2010 10:34 pm |
|
 |
|
pgershon
Joined: Jul 10, 2004 Posts: 195
|
 Re: Serial over IP
I apologize as I am showing some ignorance of terminology. I did indeed mean multicom and I now have Port B set to pseudo terminal (I had been using a Serial Port, and I had a USB-Serial adaptor connected to the Mac). I am not sure how to communicate with the "pseudoterminal" however. Question applies to both just TTY type communication (Terminal, zterm, etc?) and also SerialBridge. Neither pseudoterminal nor dev/ttyt0 appear in the scroll box as I/O sources.
|
| Mon Aug 02, 2010 5:50 am |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1720 Location: Berkeley, CA
|
 Re: Serial over IP
pgershon wrote:...I did indeed mean multicom and I now have Port B set to pseudo terminal (I had been using a Serial Port, and I had a USB-Serial adaptor connected to the Mac). I am not sure how to communicate with the "pseudoterminal" however. Question applies to both just TTY type communication (Terminal, zterm, etc?) and also SerialBridge. Neither pseudoterminal nor dev/ttyt0 appear in the scroll box as I/O sources.
On the right-hand [ B] side of the MultiCom window, just below the controls it should say something like: Connected: /dev/ttys000Use that device in Serial Bridge or your serial comms program.
|
| Mon Aug 02, 2010 10:25 am |
|
 |
|
pgershon
Joined: Jul 10, 2004 Posts: 195
|
 Re: Serial over IP
I do see "Connected: /dev/ttys000" in MultiCom, but I do not see it in SerialBridge. SerialBridge offers only USBSerial devices.
Maybe I am dense.
|
| Mon Aug 02, 2010 12:19 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1720 Location: Berkeley, CA
|
 Re: Serial over IP
I think you need the advice of someone with more Serial Bridge knowledge than me. Jay, Matt?
|
| Mon Aug 02, 2010 12:46 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
 Re: Serial over IP
Matt might need to jump in here, but I believe the port needs to be named tty.YOURNAMEHERE and cu.YOURNAMEHERE. Just guessing though...
_________________ Jay (Indigo Support)
|
| Mon Aug 02, 2010 2:59 pm |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11682 Location: Texas
|
 Re: Serial over IP
jay wrote:Matt might need to jump in here, but I believe the port needs to be named tty.YOURNAMEHERE and cu.YOURNAMEHERE. Just guessing though...
That may be the case. Serial Bridge doesn't directly enumerate the /dev/ tree, but instead relies on OS X kernel calls to enumerate all of the RS232 devices. Off the top of my head, I don't know how or what pattern it uses to match RS232 names, but copying a name similar to what a physical USB to serial adapter uses might work.
_________________
|
| Mon Aug 02, 2010 3:18 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1720 Location: Berkeley, CA
|
 Re: Serial over IP
Hmmm. Since it appears Serial Bridge is somewhat inflexible about what it will look for, and MultiCom is totally inflexible about naming its output port... I'd suggest trying to link the tty name used by MultiCom to a name supported by Serial Bridge. Something like:
sudo ln /dev/ttys0 /dev/tty.usbserial-123456AB
might work?
|
| Mon Aug 02, 2010 3:36 pm |
|
 |
|
hamw
Joined: Mar 31, 2008 Posts: 738
|
 Re: Serial over IP
FWIW I was looking to control my Jandy but due to the cost decided to wait. In the process I ran across this device: http://www.omniinstruments.net/products ... id133.htmlWhich will transmit RS232 over distance. Would eliminate need for wires.
|
| Mon Aug 02, 2010 10:02 pm |
|
 |
|
pgershon
Joined: Jul 10, 2004 Posts: 195
|
 Re: Serial over IP
berkinet wrote:Hmmm. Since it appears Serial Bridge is somewhat inflexible about what it will look for, and MultiCom is totally inflexible about naming its output port... I'd suggest trying to link the tty name used by MultiCom to a name supported by Serial Bridge. Something like:
sudo ln /dev/ttys0 /dev/tty.usbserial-123456AB
might work?
Tried it but did not work. Still not listed in Serial Bridge. From /Dev directory, all of the following are present, tty.ANTUSBStick.slabvcp, tty.Bluetooth-Modem, tty.Bluetooth-PDA-Sync, tty.usbserial, tty.usbserial-123456ABC, and tty.usbserial-A60089QH. All but tty.usbserial-123456ABC come up as options on Serial Bridge. Matt, any other ideas?
|
| Tue Aug 03, 2010 6:37 am |
|
|