Ethernet to Serial device for MAC OSX?
Timothy D. Swieter
Posts: 1,613
Boy - I haven't been to the forums in a while. There used to be a sandbox thread, but this appears to be it now.
One of the first industrial automation devices I learned about many years ago was ethernet to serial devices. I suspect this was the first item I encountered because I was in a group of primarily windows software developers dealing with scanners for bar codes. These devices have been primarily for Windows/PCs. I've used these in many industrial applications and even a few home applications when doing data collection. There are several products out there, some of the better known ones include products from Digi. There are usually two parts to the product. One is a physical ethernet device itself which also has one or more serial ports and the other part of the product is software that runs on the PC and makes this ethernet device appear as a serial port to the PC. Then any software that uses a serial port on the PC can access and control the device just as it was connected to the serial port.
Recently I've been doing some research into devices to see what the latest devices are on the market and wondering why there isn't such a device for Apple/Mac based computers. Plenty of devices/drivers for Windows and Linux, but I don't see references to Mac. I'm guessing it might have something to do with the way the operating system is or how it handles I/O such as serial ports or maybe it is because there isn't enough demand. I figured the gurus on the forum could shed light on this and educate me.
(as a side note, I see there are plenty of USB to serial port devices for Mac, I'd imagine a ethernet to serial device would use some similar OS mechanisms, but perhaps there just hasn't been enough of a need for Mac based ethernet to serial devices.)
One of the first industrial automation devices I learned about many years ago was ethernet to serial devices. I suspect this was the first item I encountered because I was in a group of primarily windows software developers dealing with scanners for bar codes. These devices have been primarily for Windows/PCs. I've used these in many industrial applications and even a few home applications when doing data collection. There are several products out there, some of the better known ones include products from Digi. There are usually two parts to the product. One is a physical ethernet device itself which also has one or more serial ports and the other part of the product is software that runs on the PC and makes this ethernet device appear as a serial port to the PC. Then any software that uses a serial port on the PC can access and control the device just as it was connected to the serial port.
Recently I've been doing some research into devices to see what the latest devices are on the market and wondering why there isn't such a device for Apple/Mac based computers. Plenty of devices/drivers for Windows and Linux, but I don't see references to Mac. I'm guessing it might have something to do with the way the operating system is or how it handles I/O such as serial ports or maybe it is because there isn't enough demand. I figured the gurus on the forum could shed light on this and educate me.
(as a side note, I see there are plenty of USB to serial port devices for Mac, I'd imagine a ethernet to serial device would use some similar OS mechanisms, but perhaps there just hasn't been enough of a need for Mac based ethernet to serial devices.)
Comments
The problem with this is that if a packet gets lost, the TCP/IP timeouts are horrendous -- it can take many seconds for the channel to unfreeze. I have put several of these things in service over the years and in the end I've taken every one of them out.
It is possible to get better performance for specific applications. I've abused the web and email servers in an AnyBus-S card to get much better turnaround on a continuous data stream, but that requires significant custom software at the PC to make use of the data. You could also use UDP or a non-transportable raw ethernet protocol to get much better timeouts performance.
The basic problem is that serial is a character based medium where reception is either instantaneous or fails completely, and some serial protocols (including some I've written) depend on this behavior, but ethernet is a block medium where many characters are sent at once, there is significant overhead for sending a block so you want to collect enough of them before sending a block to make the block worthwhile, and you might not start to realize until hundreds of milliseconds later that something might be wrong.
USB to serial works much better mainly because it's assumed to be a mostly dedicated channel so there is less overhead to build a block and it's not shy about building blocks around individual characters, and it is much quicker to detect that an error occurred.
'
That will be so useful if it works I will probably have to hold my nose and order one to test despite my previous unpleasant experience. Having it go straight to wifi at least eliminates the second and equally bothersome failure point of the ethernet to wifi bridge.
back then we used networking gear from Ungermann Bass.(19" cabinet that slotted in at the bottom of our racks) and in these we inserted all kinds of fun cards.
BRI(bridges), routers, ETH(Ethernet cards, 12 or 24 ports) and TRM(Terminal servers).
The terminal server cards had 8 serial ports, and we could program them to set up a permanent link between two ports on cards in different locations. As long as we made certain that they had the same parameters at both ends the stuff worked flawlessly, even on 64Kbps leased lines with bridging instead of routing... (We were barely getting started on setting up a PC network back then... )
Anyway, what you really want to do is get ahold of some decent terminal servers, or dedicated 'serial over ethernet transducers'(or whatever they're called these days) and hook up one to a serial port on your Mac and the other to the serial device. Let the boxes handle the handshaking and error corrections. There's no need to 'bother' a computer with the details.
'
I'm surprised the Spinneret wouldn't fit your needs.
Right now, it isn't so much that I have a particular application and need hardware or software. Rather my question is a little more theory based in that, "Why aren't there drivers for ethernet to serial devices on Mac OSX?" (instead of ethernet to serial, one could also say serial over IP, comms over IP, RS-232 to ethernet, etc)
For instance, here are a couple links to products that I have used or seen in the past. There are Windows drivers and Linux drivers, but no reference to OSX. I am curious if there are technical reason why this doesn't exist (I don't know much about OSX) or if it is a market reason (not enough demand) or if it is something else.
http://www.digi.com/products/serialservers/
http://soi.tibbo.com/ds.html
http://www.moxa.com/product/Serial-to-Ethernet_Modules.htm
If a project does come up, I'd probably use something like Spinneret or Tibbo or Lantronix to do simple communication over TCP or UDP. But I'm still curious for why there is a lack of serial to ethernet support for Macs.
'
I think the more creative bunch uses Windows!
'
Hence theres more code for Windows and not so much for MAC,
'
Linux user's try hard to keep pace with Windows, So theirs more Linux code than MAC code.
'
Try a Windows machine and you will not have to post here about something so simple!
'
P.S. I really liked your work with the Spinneret.
_reset = 1 << 16
_initLCD = 2 << 16
_screenUpdate = 3 << 16
_setGrayLevel = 4 << 16
_powerSave = 5 << 16
_dispForce = 6 << 16
_disp = 7 << 16
_dispInv = 8 << 16
_Contrast = 9 << 16
_backLight = 10 << 16
Please see the new forum guidelines, particularly the section on Content on the Forums. Rather than hijacking a thread, start your own with enough of an explanation so people will understand what information you're looking for and we'll be glad to help.
Last year I even made my own using a cheap little industrial PC box. RS485 in TCP/IP out, well HTTP really as I was using an encrypted websocket connection to a cloud server. Continuous data stream at 115200 baud. Not so small and cheap I guess but that box had other work to do as well.
Looks like this should be possible: https://discussions.apple.com/thread/5781987?tstart=0
Now that I'm awake and had the first couple of coffees of the day I see this thread was started many years ago! It's hard to see those little blue posting dates when my eyeballs are all furred up.
Opps,
Anyway. Whilst we are here. I'd love to hear of anyone's experiences with those Moxa NPorts. Looks like I might be having to deal with a bunch of them soon.
localroger said "Ethernet to serial doesn't work very well." So I start to worry.
We looking at Moxa and such thanks to them coming in a box, with power supply, surge protection, etc. Plug-n-Play. Hopefully !
I do have similar looking product that has all the 5+3 RS232 signals on a DB9 as well as dual RS-485 (or single RS422) that can be loaded with Lantronix modules or another version with the WIznet W5500 and all powered by a Propeller. Switch-mode supply of course and standard USB and SD card for logging, metal case, DIN rail mount option etc Basically an all-purpose serial data widget. I once had a requirement for 5 RS-232 serial inputs to 3 RS-232 outputs and thanks to the Propeller where every I/O pin is "programmable" I was able to use the single RS-232 port for this.