![]() |
Serial Port Redirector
Hi all
Serial Port Redirectors for Windows create virtual COM ports which redirect to devices connected via Ethernet. Does anyone know if there is an equivalent for Mac OS X? TIA Mark |
The Mac doesn't have COM ports as far as I know. It doesn't have much in the way of serial ports either, other than USB and modem ports. What kind of service do you want to redirect to a device on the Internet?
|
Well actually it's not an incoming service on a serial port. I have a piece of hardware which connects via Ethernet, and works with a serial port redirector on Windows which sets up a virtual COM port. So you can telnet to the virtual COM port and it redirects to the Ethernet device. That's what I'm trying to do on the Mac.
|
What's wrong with telnet through ethernet? Have you read the man pages for telnet?
|
The telnet interface itself only seems to go to a configuration menu rather than allowing any control of the device. (telnet was given just as an example to demonstrate that the serial port is redirected to the Ethernet device) Also, I am writing an AppleScript to control the device so a terminal-based interface is not much good.
|
Well then a COM port would just add another layer of complexity. You need to find out what needs to be done to control the device and do that. If not telnet, perhaps ssh?
|
Mac OS X doesn't support networking over USB and it sounds like that's what you want to do.
|
Serial Port Redirection
MultiCom bridges two communication ports together. The ports may be any combination of serial, TCP (client or server) and socket file (client or server). The author also has SerialParallels. This software may not be limited for use with virtual machines, but also Mac OS itself. SerialParallels connects to a socket and binds it to a real serial port ("virtual" ports work for me, too). Mac OS ususally needs a kext to bind to a port or create dev/tty.
|
@cwtnospam
It needs to be serial, as the device actually works on RS232 data. If I knew how the RS232 data were encapsulated and sent to the device then I could look in to how to replicate this and send directly to the device, but I have no idea how I would go about that. Replacing the Serial -> Ethernet software seems a more logical way of doing it. @NovaScotian Not networking as such. Just sending RS232 data via an Ethernet port. The data would actually go via an Ethernet port, not a USB port. @dmaas MultiCom looks promising. Had a quick look but couldn't figure out how to configure it. It seems to want me to select a real serial port, but I need an emulated one. Any ideas how I could go about doing this? To clarify, this is how it works under Windows: Software <-> virtual COM port <-> COM port redirector software <-> ethernet port <-> device So the virtual COM port and the COM port redirector software are the components I need to implement on the Mac. |
I'm not clear on why you can telnet to the device through Windows, yet telnet from the terminal apparently connects but doesn't work. If you telnet to it from the terminal does the cursor change?
|
I can't use telnet to control the device, only configure it. The documentation for the device only details how to control it by sending hex bytes to a COM port. Since the device doesn't actually have a serial port, only Ethernet, the only way to control it is to send the hex bytes to a virtual com port which redirects, through software which presumably encapsulates it in TCP/IP, to the device's IP address. It is that software which captures the RS232 data, encapsulates it and re-transmits it, which we need to find for the Mac.
|
What's the device? Perhaps you can use telnet to configure the device to communicate another way.
|
It's a home automation device. I'll check telnet again and see what can be done from there.
|
Unfortunately no control over the device via telnet :-(
|
Have you tried ssh?
|
This might be of some help.
http://www.macupdate.com/info.php/id/20440/serialport-x |
It doesn't have an SSH server. Thanks for the link to SerialPort X. I am already using that to communicate with an LCD display connected to a USB serial port and it works well. I want to use it to communicate with the home automation box, but the problem is that it doesn't have a physical serial port. That's why I need a virtual one which redirects to the ethernet port.
|
Well, maybe this can help.
http://www.macupdate.com/info.php/id/16590/hd-log The problem is that PC serial com ports are so ancient that many PCs no longer even have them. |
I use some older equipment that requires the same set up. My solution was to run down to radioshack and buy a USB to Serial Port converter and use it via paralells. Works like a charm. I'm sure Boot Camp would work fine as well.
|
Here's another possibility that looks promising:
http://www.macupdate.com/info.php/id/16828/c-kermit |
Any device connected to a USB to serial port adapter could be directly communicated with using Z-Term. A very old program, but still effective.
|
Quote:
If you have Parallels installed, you should already have a virtual COM Port. Else, you'd have to create one via Terminal by following this hint http://www.macosxhints.com/article.p...30724135653825 MultiCom will then allow to Bridge the serial connection between your device and your virtual COM port Or use interceptty with a synthax like interceptty -q '@serial-server.example.com:4001' \ /dev/serial-server |
|
@dmaas
Could you explain in a bit more detail how that hint you linked to can be used to create a virtual serial port? That could solve all of our problems when combined with Multicom. |
Here is the solution :)
Install socat from Darwinports. Launch socat with the following syntax: socat GOPEN:/dev/ptyp0,ignoreeof TCP:10.0.1.93:10002 (Correct IP and port for whatever you are connecting to). Then configure application to send commands to /dev/ttyp0. |
| All times are GMT -5. The time now is 12:44 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.