/dev/eth0 Equivalent in OS X?

Discussion in 'macOS' started by jebug29, Feb 10, 2016.

  1. jebug29 macrumors newbie

    jebug29

    Joined:
    Feb 10, 2016
    Location:
    Somewhere Over the Rainbow
    #1
    Okay, so I'm trying to see if there's some sort of way that I can use picocom to emulate a terminal over Ethernet. I'm buying a Lear Siegler ADM-5 terminal and bought two adapters - a USB to DB25 and an RJ45 (ethernet) to DB25 cable. I don't think the ethernet one will really work correctly, but I'd still like to experiment with putty until I can get the actual terminal. (Please no comments that say just use the USB adapter. I plan on it, but it's irrelevant to my actual question)

    The general syntax of picocom goes like this:
    picocom -b (baud rate) /dev/(device name)

    In some Linux distributions, each ethernet device is listed in the /dev directory as eth0, eth1, etc. However, this does not appear to be the case with Mac OS X.

    On my iMac, the ethernet port is listed as en0 when I run the "networksetup -listallhardwareports" command. However, there is no "/dev/en0", and I'm wondering if there is some way to create it or if there's some equivalent to it that I could use with picocom.

    Thanks!
    Jesse (jebug29)
     
  2. cerberusss macrumors 6502a

    cerberusss

    Joined:
    Aug 25, 2013
    Location:
    The Netherlands
    #2
    Weird, I don't understand why en0 doesn't exist. It could be the Ethernet port, and maybe you use wifi which then becomes /dev/en1.

    If you type ifconfig, all adapters should be listed.
     
  3. jebug29 thread starter macrumors newbie

    jebug29

    Joined:
    Feb 10, 2016
    Location:
    Somewhere Over the Rainbow
    #3
    The wifi connection doesn't show up as /dev/en1 either, although that's what it's listed as under ifconfig and also the networksetup command. The only actual network device of any kind I see in the dev folder is tty.Bluetooth-Incoming-Port, despite the fact that ifconfig shows lo0, gif0, stf0, en0, en1, utun0, fw0, en2, p2p0, bridge0, and bridge100.
     
  4. chrfr macrumors 603

    Joined:
    Jul 11, 2009
    #4
    Just because the cable looks like ethernet cable, it doesn't mean it is an ethernet cable. You can't convert the ethernet port on your computer into a serial port unless you're using a remote serial device that sends serial commands over the network to another remote serial device. In that case, however, the connection between the two physical remote serial devices is the network, not serial.
     
  5. jebug29 thread starter macrumors newbie

    jebug29

    Joined:
    Feb 10, 2016
    Location:
    Somewhere Over the Rainbow
    #5
    I figured as much, which is why I bought the USB adapter too. My real question though is if there's a way to create a device in /dev/ linked with the ethernet interface (en0).
     
  6. chrfr macrumors 603

    Joined:
    Jul 11, 2009
    #6
    What are you looking to do?
     
  7. mfram macrumors 65816

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #7
    The short answer is there's no way to directly connect that terminal to your ethernet port and somehow communicate with it. It's not going to happen. Serial and Ethernet are not electrically compatible with one another to speak over the same cable. You'd need to have some kind of bridge (that is, a computer) to connect them together. If you have a DB-25 serial port on the terminal, then you will want a USB/Serial converter on your Mac and an appropriate serial cable wired up to convert between DB-25 and whatever port is on your USB/Serial converter. If you have a supported USB/Serial converter, it will show up as a /dev/tty.* device on your Mac.
     

Share This Page