Shop OBEX P1 Docs P2 Docs Learn Events
Ethernet to Serial device for MAC OSX? — Parallax Forums

Ethernet to Serial device for MAC OSX?

Timothy D. SwieterTimothy D. Swieter Posts: 1,613
edited 2011-09-24 08:19 in General Discussion
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.)

Comments

  • localrogerlocalroger Posts: 3,451
    edited 2011-07-04 05:27
    Ethernet to serial doesn't work very well. All most of these devices do is open a raw socket, which is supposedly a 'virtual serial port', and all the software driver does is map the OS serial API to the TCP/IP API so attempts to use the serial port get routed to the raw socket.

    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.
  • RDL2004RDL2004 Posts: 2,554
    edited 2011-07-04 06:22
    Shouldn't a Netburner device work? or did you mean serial to Ethernet?
  • $WMc%$WMc% Posts: 1,884
    edited 2011-07-04 08:11
    In a few weeks Parallax is do to release its WiFi to serial module. Not sure it will run on a MAC machine though
    '
    attachment.php?attachmentid=81638&d=1306868050&thumb=1attachment.php?attachmentid=81637&d=1306868048&thumb=1
  • localrogerlocalroger Posts: 3,451
    edited 2011-07-04 08:53
    $WMc% wrote: »
    In a few weeks Parallax is do to release its WiFi to serial module. Not sure it will run on a MAC machine though

    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.
  • GadgetmanGadgetman Posts: 2,436
    edited 2011-07-04 09:52
    Back in the heydays of... the 90s... we had Norsk Data ND mainframes at the office, and used terminals to access them. And serial printers for printing, of course. (We also used statistical multiplexers on leased 9600/19200 lines, but that's another mess)
    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.
  • $WMc%$WMc% Posts: 1,884
    edited 2011-07-04 13:00
    @Timothy D. Swieter, P.E.
    '
    I'm surprised the Spinneret wouldn't fit your needs.
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2011-07-04 17:08
    Thank you everyone for chiming in. I do appreciate the feedback and questioning.

    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.
  • $WMc%$WMc% Posts: 1,884
    edited 2011-07-04 17:40
    The Truth is MAC is #3. A really nice machine but you can't do much with it with-out Mr.Jobs intervention.
    '
    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.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-07-04 18:27
    Actually, you can do lots of things without any help from Mr. Jobs. The MacOS is built on Unix, so all sorts of internet connections are built-in. I use MacWise which is a terminal emulator that's very happy with Telnet connections (serial emulation via TCP/IP). A number of programming languages included with the MacOS support TCP/IP connections like Python and Perl.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-07-04 19:07
    If I am not mistaken you can install Windows on a Mac? At least a newer one? Or even run it in VirtualBox (I've done this and it's a little "if-y" on the hardware side of things).
  • Mike GreenMike Green Posts: 23,101
    edited 2011-07-04 19:17
    Yes, you can install Windows on a Mac, either as a dual boot system where you choose when you boot which system to bring up or with a virtualization system running under the MacOS like VirtualBox or Parallels Desktop or VMWare's Fusion. The latter two are commercial programs that provide a very high degree of compatibility for Windows where you can run most Windows software within the MacOS, sharing the USB devices, Ethernet connections, disk files, audio, screen, etc. This is how I run all my Windows-only Parallax software.
  • daniel dingdaniel ding Posts: 52
    edited 2011-09-24 00:31
    Hi man, Could you tell me what these codes mean in your object of LM9033A? Thanks !
    _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
  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-24 08:19
    daniel ding,
    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.
  • Heater.Heater. Posts: 21,230
    Surely one does not need any special driver for a serial to ethernet adapter? That ethernet connection is an IP network connection so the normal networking of you OS will do. These devices support many networking protocols from UDP to the web server they are running for configuration. For example the Moxa NPort, http://www.moxa.com/product/NPort_5110.htm

    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.


  • Heater.Heater. Posts: 21,230
    Ah, you mean you want a driver that creates virtual serial ports on the MAC so that software that works with serial ports can work with this serial over ethernet connection.

    Looks like this should be possible: https://discussions.apple.com/thread/5781987?tstart=0

  • You're getting carried away Heater, that post was full on spam and has now been deleted.
  • Heater.Heater. Posts: 21,230
    What post! I was replying to the OP.

    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.


  • I use my tiny IoT5500 modules as serial to Ethernet gateways as well as support FTP and HTTP. I have used Lantronix XPort modules in the past for basic serial to Ethernet and they work fine too. I know about Moxa but never had to use their stuff myself.
  • Heater.Heater. Posts: 21,230
    The IoT550 looks sweet.

    We looking at Moxa and such thanks to them coming in a box, with power supply, surge protection, etc. Plug-n-Play. Hopefully !
  • Yes, you would need "the box" and Moxas are used everywhere so it should just work and you will be sweet with the boss.

    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.
Sign In or Register to comment.