Serial-to-UDP/IP Network Adapter

Written by Pascal Stang | Updated: Tuesday September 27, 2005

What does the Serial-to-UDP adapter do?

The Serial-to-UDP adapter (or just Serial-UDP) translates serial port data into UDP/IP network packets and sends them over any standard ethernet network. It also receives UDP/IP packets from the net and routes the data through the serial port. In essence, the board allows an ordinary serial device to communicate via ethernet. Two boards together can create a virtual serial link where all the data passes over an ethernet network, instead of the usual serial cable.

Serial-UDP uses standard UDP/IP packets to pass all data and control signals. Therefore, the adapter can be used with almost all standard networking equipment including routers, bridges, switches, wireless LAN devices, etc.

Common uses of Serial-UDP include:

The Serial-UDP adapter uses the following ports:

Port
Description
4950/UDP
Control commands are sent over this port
4951/UDP

Serial data is sent over this port

The Serial-UDP Hardware:

Serial-UDP is built from a modified EasyEthernet/AVR board from EDTP Electronics. It uses an Atmel AVR ATmega16 processor to handle the ethernet interface, network protocols, and serial I/O.

Interface/Indicator
Description and Specs
Power In
Accepts 7-12VDC @ 150mA to power the Serial-UDP board.
Using 9VDC is preferred to keep regulator from getting hot.
RS-232 Serial Port

RS-232 DB9 Female Connector (DTE wiring)
Supports communication baud rates: 300-115200 bps
Boot-up reporting baud rate: 115200bps

Ethernet
Autonegotiating 10/100BaseT Ethernet
ACT LED
  • Activity LED
  • Solid RED: Device is booting
  • Flashing RED: Device is transmitting data from serial port to network
  • Flashing GREEN: Device is receiving data from network and transmitting to serial port
AVR-ISP Connector
AVR In-System Programming port (used for firmware upgrades)

Configuring the Serial-UDP Adapter:

There are several configurable network and serial port settings in the Serial-UDP adapter. Follow this procedure to get to the configuration menu:

  1. Connect the Serial-UDP Adapter to a computer serial port via serial cable
  2. Open a terminal program to the COM port used in step 1. (Terminal programs such as Hyperterm or TeraTerm will work fine)
  3. Set the terminal program to 115200 baud, 8 bits data, No parity, 1 stop bit (115200,8,N,1).
  4. Power-on or reset the Serial-UDP adapter
  5. You should see the boot-up messages appear.
  6. Press [ESC] key three times when prompted.
  7. Type '?' and [ENTER] to see available commands.
  8. Enter commands to change configuration (see table below)
  9. Use the 'x' command to save settings and exit config mode.
  10. Serial-UDP will reboot with new settings.
Configuration
Description
IP Address
This is the IP address assigned to the Serial-UDP adapter. It must be a valid IP address for the network on which the adapter operates. For private/isolated networks, use IP addresses in the range 192.168.x.x.
Netmask
The netmask for the network on which the adapter operates. Often this is 255.255.255.0.
Gateway IP Address
The IP address of the router or gateway on the local network.
Dest IP Address
The IP address where serial data should be sent. This may be another Serial-UDP adapter that forms a complete serial-to-ethernet-to-serial bridge, or a computer that will process the serial data itself.
Serial Baud Rate
The baud rate used for general operation.
Note: Boot-up messages are always sent at 115200bps.
Serial Packet Size-Out
If this many characters are received over the serial port, they are immediately sent over the network. This will override the timeout.
Serial Packet Time-Out
If this amount of time goes by with no new characters received over the serial port, then the data already received is sent over the network.

Using the Serial-UDP Adapter to program a BasicStamp remotely:

Since Parallax BasicStamps are programmed via a serial port, you can use a pair of Serial-UDP adapters to program a Stamp remotely over the network. To do this, follow this procedure:

  1. Configure two Serial-UDP adapters with valid IP/Netmask/Gateway for your network.
    Each adapter should have it's own IP address.
  2. Set the "DestIP" of each adapter to be the IP address of the other unit.
  3. Set the baud rate of both adapters to the speed used to communicate with the BasicStamp (usually 9600bps)
  4. Connect one Serial-UDP adapter to your computer with a standard 9-pin serial cable.
    Also connect this adapter to your network.
  5. Connect the other Serial-UDP adapter to your BasicStamp hardware.
    You will need a 9-pin male-male null-modem cable or null-modem block to make the connection (such as shown in photo above).
    Also connect this Serial-UDP adapter to your network.
  6. Open the BasicStamp Editor on the computer.
  7. Click the icon to ID the connected BasicStamp. The Serial-UDP adapters will blink a few times and your Stamp should appear connected.
  8. If the ID succeeds, proceed as you would if the Stamp were directly connected to your computer.
  9. If the ID fails:
    1. Try limiting the number of COM ports that are searched in the ID process (select just one).
    2. Make sure the COM port is free (no other programs are using it, like HyperTerm)
    3. Make sure the Serial-UDP adapters are configured for the correct baud rate (usually 9600bps for most Stamps)
    4. Try connecting the BasicStamp directly to the computer. Does that work?

Written by Pascal Stang | Updated: Tuesday September 27, 2005