Shop OBEX P1 Docs P2 Docs Learn Events
Serial over ethernet — Parallax Forums

Serial over ethernet

average joeaverage joe Posts: 795
edited 2013-02-16 15:19 in Accessories
I was wondering if anyone has information about using the Wiznet to do Serial over Ethernet. Any help would be greatly appreciated!

Comments

  • Mike GMike G Posts: 2,702
    edited 2013-01-23 18:58
    That's how the WizNet devices work. The SPI protocol is used to send data between the Host and WizNet chip. In turn, the WizNet chip converts the serial data to and from TCP or UPD packets.

    Can you provide an example of what you are trying to do?
  • average joeaverage joe Posts: 795
    edited 2013-01-24 01:20
    Basically I'd like to emulate a RS232 port using the WizNet. Have a program running on the PC that emulates a COM port. Then use the WizNet talk to it. Hope that makes sense. A quick search returns http://www.softpedia.com/get/Network-Tools/Misc-Networking-Tools/Com-Port-Redirector.shtml
    Looks like it uses RFC2217 Com Port control protocol?
  • Mike GMike G Posts: 2,702
    edited 2013-01-24 05:56
    Basically I'd like to emulate a RS232 port using the WizNet
    A host controller like the propeller is required as the WizNet chip does not have an RS232 port.
    Have a program running on the PC that emulates a COM port. Then use the WizNet talk to it. Hope that makes sense
    This function is already in place. For example, sending debug data to the Parallax Serial Terminal is in every demo that I'm aware exists. The only thing left is to create a dedicated Tx socket for sending data. All ya have to do is start up a COG who's job is looking for serial data received. Buffer the serial data, fire up (configure) a separate socket, send the data, close the socket - repeat. Do not leave the dedicated Tx socket open as that will allow the socket to receive data.

    You'll have to come up with a serial protocol that allows enumeration of the serial data so you know where the packets begin and end. You could easily add socket configuration data to the serial stream. Do so will allow the client, PC in this case, to configure the socket parameters like TCP or UDP, destination IP or domain, port, etc.
  • Jay KickliterJay Kickliter Posts: 446
    edited 2013-02-13 07:25
    Have you made any headway with this yet? I'm working on product which uses a commercial ethernet -> serial adapter that I need to get away from.
    Basically I'd like to emulate a RS232 port using the WizNet. Have a program running on the PC that emulates a COM port. Then use the WizNet talk to it. Hope that makes sense. A quick search returns http://www.softpedia.com/get/Network-Tools/Misc-Networking-Tools/Com-Port-Redirector.shtml
    Looks like it uses RFC2217 Com Port control protocol?
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-02-13 09:40
    Don't know if this is what you are looking for, but you might be able to use some of it

    The Propforth download contains support for spinneret and similar wiznet.

    The spinneret can serve HTTP pages and telnet sessions. This is a common way to access teh propforth command line over ether net when there is no PC connected. The Ethernet support takes a LOT of hub memory, and the spinneret uses a lot of pins. So while there are a cases to use spinneret, there might be other solutions that suitable to a wider range of applications.

    The other common way to use propforth over Ethernet is to have the PC connected to the prop do the ethernet talking, using the Go language function GoTerm and GoMuxTerm. In this configuration, we can use E.G. the Raspberry Pi to handle Ethernet communications, data storage, number crunching, and optional display and terminal serivices. At $35, the RPi delivers a lot more for less money than a spinneret. The RPi performs the workstation services that the prop cannot, and the prop provides the deterministic execution and multiple sensor & actuator interfaces that the RPi does not do so easily or well.

    Even if you don't use forth, there might be some things that trigger an idea.
  • Mike GMike G Posts: 2,702
    edited 2013-02-13 11:41
    Jay, you just need to fire up a Serial Port Driver. From there is just a matter of buffering the serial data and sending it out a socket. The receive portion already writes to the PST so Ethernet -> serial already works.
  • Mike GMike G Posts: 2,702
    edited 2013-02-14 06:59
    Working on serial over Ethernet. I have a working demo, still testing.
Sign In or Register to comment.