ECO(4) — UNIX Programmer’s Manual
NAME
/dev/eco0 − Econet interface
DESCRIPTION
The Econet interface provides access to Acorn’s Econet network through the standard Econet hardware which may be fitted to Archimedes Computers.
An Econet is a bussed network; machines on the same econet are all physically connected. Econets can be connected together via bridges. The data rate is 100-200 kBit/s on-net, giving around 8-16 kByte/s station-to-station.
The Econet is used by opening one of the devices /dev/ecoX where X is 0,1,2...f or more depending on configuration. These devices are all single access for resource control purposes. All Econet operations are performed by ioctls, specified in "econet.h".
The operations are of the basic form: transmit a packet, claim and release ports, enable reception of packets (of specified type), enquire whether anything has been received yet, if so read its data or delete it, wait for a reception, disable a reception type, find the machine type of a station, and report statistics and error status.
The semantics of transmission are as follows: If the transmit call says the transmission succeeded, the recipient will certainly have received the data. BUT if a recipient has received the data, the transmitter will not necessarily know the transmission succeeded, and may try again. There are retries built into the system, enough to overcome line noise or congestion under normal circumstances. Therefore a recipient must be prepared to deal correctly with repeated packets, though they are in fact rare. Read the Acorn documentation about the four-way handshake for more details.
A machine is identified by a station number, net number pair, unique within an installation. The station number is from 1 to 254 and must be unique on each econet. Econets are joined together using bridges, and the bridge defines (via hardware links) the net numbers of the two nets it connects. Net numbers are from 1 to 127. Net number zero means "the net I am connected to", but you can specify your actual net number and it will be replaced by zero internally.
A packet has associated with it the destination station address, a port number from 1 to 255 and a control byte from 0 to 127 (not really a byte), as well as from 1 to 1280 bytes of data. A reception may specify reception on one particular port (from any station), or from one particular station (on any port), or both. It is usual to choose a port (and write it on the wall) for a particular application, and a server should enable reception on that port, any station, to receive packets initiating transactions, then use station and port (perhaps a different port) specific receptions for any packets required to complete the transaction, using the control byte for sequence numbering packets. Beware that many ports in the range 0x90 to 0xE0 are reserved for Acorn use. It is also possible to transmit a broadcast packet with up to 1024 bytes of data in it, by specifying station and net numbers of 0xFF. However, broadcasts with a data length more than 8 bytes will fail unless on an econet with only Archimedes computers (running RISC OS or Unix) on it. A broadcast is received identically to an ordinary packet, provided that the port is enabled for reception. Because there is no handshaking on a broadcast packet, it being receivable by many other machines at once, there is no returned error status, it is "launch and leave".
DIFFERENCES FROM THE BBC/RISC OS ECONET WORLD
The unix econet devices provide the functionality of the low-level network interface, not that of the (Acorn) NFS/NetFS, network printing facilities (NetPrint) etc.. Depending on your Unix configuration, you may have applications which provide this functionality and interwork with existing Acorn Econet products.
Transmission: This is synchronous in the calling process; the ioctl returns when the transmit is complete. The only immediate operation supported is the machine type call. Peek and poke and JSR and so on are not supported at all. Similarly, the only immediate operation Unix machines respond to is machine type, the others being dangerous or meaningless in Unix. Broadcasts may be bigger, but this feature will fail if there are BBC computers on the same Econet.
Reception: When you enable a reception, you don’t specify a data buffer until you come to read data which has already been buffered by the kernel. Only receptions which are enabled are thus buffered. Receptions may be grouped together, and you can then wait for activity on any of these receptions rather than polling them all repeatedly.
INITIALISATION
The Econet system is initialised, usually from /etc/rc.net, by calling /etc/econetup. The parameters are the number of small (200 byte) and large (1280 byte) reception buffers which are allocated. If no parameters are given, or zero is given, the defaults of 20 and 5 respectively are used. The station number is obtained from CMOS RAM, and is the same as that used by the Archimedes RISC OS Econet system.
DIAGNOSTICS
Econet: init stn %d.%d, %d srxb, %d lrxb
Econet: init stn 45.152, 20 srxb, 5 lrxb (example).
This is printed by econetup, and is expected when going multi-user. stn is <net number>.<station number>, srxb/lrxb are small/large reception buffers allocated.
∗∗∗ Econet: Unusual reply to bridge poll − station %d
∗∗∗ Econet: Unusual reply to bridge poll − answers %d,%d
In enquiring what net number we are on, a reply has been received from something other than an Econet bridge, or two acceptable replies are contradictory. This should not happen.
∗∗∗ Econet: station number invalid (%d), using 1 instead
You should set you station number to one unique on this network, either using cmos 0 <num> in Unix or setstation under RISC OS. See your network manager.
∗∗∗ Econet: no hardware s1:%x s2:%x
I believe there is no Econet hardware present, or it is faulty. s1 and s2 are values read from the MC68B54 ADLC status registers.
∗∗∗ Econet: NO CLOCK (is the econet connected?)
The econet is not being clocked. Plug it in and check the clock and terminators are working. See your network manager.
∗∗∗ econet allocate small buffers failed, none available!
∗∗∗ econet allocate large buffers failed, none available!
The system has started, but the kernel heap couldn’t give us the number of buffers requested. Reboot with smaller requests. Edit your /etc/rc.net to call /etc/econetup with smaller parameters.
SEE ALSO
Acorn documentation: Econet Installation Guide, Econet Advanced User Guide et al.
P.S.
1989: the year of the Econet at last!
4.2 Berkeley Distribution — Revision 1.3 of 20/10/88