ENet
ENet is a custom networking stack that allows IP/UDP-like networking through point to point serial ports. Typically, RS422 wiring is used. Other physical interfaces are also possible to use such as serial TTL or even optical.
User Interface
The networking stack is properly integrated with the kernel and is therefore available through standard berkeley sockets, emulating regular UDP.
Translation to IP/UDP
The program util/tun-enet
is used for translating packets to and from an IP
network. Similar to a VPN it creates a virtual networking interface where
packets are instead translated and output/received on a serial port.
It is then possible to write generic programs that work transparently across both networking types, and use regular IP/UDP tools for development. See the Limitations section below for restrictions that apply.
Packet Format
Link Speed
Interfaces are always started up with 19200 baud and will start transmitting discovery packets at regular intervals. The devices at each end will then start negotiating a different link speed, typically 2 MBaud.
Limitations
- Device addresses are 16-bit instead of the 32-bits of IPv4.
- Port numbers are 8-bit instead of 16.
- No flow control in the networking layer
- Performance low compared to theoretical maximum
- Trouble with unstable links