Difference between revisions of "Data link layer"
From Zenitel Wiki
(→Datalinks between AlphaComs in AlphaNet) |
(→Datalinks between AlphaCom nodes in AlphaNet) |
||
Line 72: | Line 72: | ||
* For old style serial links (RS232) Stentofon Data Link Layer (Sliding Window Protocol) is always used. | * For old style serial links (RS232) Stentofon Data Link Layer (Sliding Window Protocol) is always used. | ||
* For data over IP until AMCD version 10.31, Stentofon Data Link Layer (Sliding Window Protocol) over UDP is used. AlphaNet data messages are received on '''UDP port 50000''' | * For data over IP until AMCD version 10.31, Stentofon Data Link Layer (Sliding Window Protocol) over UDP is used. AlphaNet data messages are received on '''UDP port 50000''' | ||
− | * From AMCD version 10.31, it is possible to run Stentofon Simple Link Layer over TCP instead. '''This is now the preferred method, and we will most likely make this the autoloaded default | + | * From AMCD version 10.31, it is possible to run '''Stentofon Simple Link Layer over TCP''' instead. '''This is now the preferred method, and we will most likely soon make this the autoloaded default.''' |
* An intermediate variant in X-versions of 10.31 can use Stentofon Data Link Layer (Sliding Window Protocol) over TCP. This method is discouraged. | * An intermediate variant in X-versions of 10.31 can use Stentofon Data Link Layer (Sliding Window Protocol) over TCP. This method is discouraged. | ||
− | When TCP is used for AlphaNet data between AlphaCom nodes, the node with the higher node number connects to the node with the lower node number at ''' | + | When TCP is used for AlphaNet data between AlphaCom nodes, the node with the higher node number connects to the node with the lower node number at '''TCP port 50000'''. |
+ | |||
+ | ==Selecting data link layer between nodes== | ||
+ | This is presently not programmable from the Alphacom | ||
[[Category:AlphaCom E Software]] | [[Category:AlphaCom E Software]] | ||
[[Category:AlphaNet]] | [[Category:AlphaNet]] |
Revision as of 11:43, 13 March 2008
The data link layer transports data between two “boxes”. It’s not addressed as there is only one box at the other end (except when a RS485 bus is used). Most of the data link layers offered has reliable transmission, i.e. either a message is delivered error-free, or the system reports a device error.
Message Format
Note that all link layers are capable both to connect local devices, and exchanges in AlphaNet. The “payload” messages going between applications have traditional headers and trailers added by link layers. This means that the byte stream observed with a data monitor on the physical wires in principle looks like this:
- <Network header> <Application message>
<Network header> : See Network layer
<Application message> : See AlphaNet Data Protocol
Data Link Layers
ISO 1745 Link Layer
Further information: ISO Data Link Layer
This is an old multi-drop protocol also used e.g. by the wireless pager protocol ESPA 4.4.4 A master polls one device at a time, and messages are transmitted one at a time with checksum and timer supervision, and possibly one or more re-transmissions.
The AlphaCom have two alternative physical connections:
- Point-to-point, typically short range via RS232 to a single external device (RIO or PC).
- Multidrop, up to 1 km on RS485 to 1 to 10 devices (RIO).
The ISO protocol uses a number of reserved control characters, so the message payload is always ASCII HEX. The polled, half-duplex nature of the protocol plus the HEX coding makes it fairly slow. On point-to-point the exchange polls for input messages only once per second!
Stentofon Data Link Layer
Further information: Stentofon Data Link Layer
The Stentofon Data Link Layer (also called Sliding Window Protocol) is a AlphaCom proprietary protocol with so-called sliding window. It’s used both internally in a multi-module exchange (called Inter Card Cage Link, ICCL), and between exchanges in AlphaNet.
Sliding window means that the transmitting box can send up to 7 messages before receiving acknowledge to the first one. If a message is lost, the lost message plus all following it in the window must be retransmitted.
The messages are normally binary coded (but if you send HEX to the exchange, it will also answer back in HEX). The full-duplex sliding-window operation means that the application can send messages very rapidly in both directions.
Note: It’s allowed for an external device to hook up to this link layer using window size 1, i.e. send only one message to the exchange and wait for response. OK messages are ACKed, else error handling can simply be timeout and re-transmission.
No window over TCP variant
A variant of the protocol is used over TCP connections. The data frames is identical to the sliding window protocol, but the transmitter does not wait for acknowledgements, and there are no retransmissions. The reliability is taken care of by the underlying TCP protocol.
This is used for the ICC Protocol.
Stentofon Simple Link Layer
Further information: Stentofon Simple Link Layer
There is always someone who wants to do things simple. Binary data, timing and re-transmissions are awkward to handle in a simple near-sequential PC program. Also, testing the exchange simply by typing data commands on a terminal can be very useful.
The solution is the “simple” link layer. It’s ASCI HEX, optional checksum only, and there is a number of user friendly shortcuts which means that just the most important fields need to be typed. You can even define yourself as a device type which is not pinged (else you have to type pong every 40 seconds…)
This link layer is medium speed, as it’s full duplex, and there is no acknowledge to wait for, but quite a lot of characters to send.
It’s possible to build a fairly reliable link with this protocol also. Your PC can attach a checksum to messages to the exchange, and messages from the exchange always have checksum (but the only thing it can be used to is to ignore faulty messages). A lot of the data commands to the exchange has functional acknowledge, i.e. explicit messages reporting success or failure of the attempted operation, and these can be used to re-transmit on a the application level.
From AMCD version 10.32, Simple Link Layer over TCP can be used between AlphaNet IP nodes.
Idle frames
When Simple Link Layer over TCP is used between AlphaNet IP nodes, the nodes transmitt Idle Frames every 5 seconds, in the same way as with the Stentofon Data Link Layer.
The format of the Idle frame is
#!AMCD sn sd > dn dd> VER:ver(date)
where sn, sd, dn, dd are source node, source device, destinatin node and destination device; ver is AMCD SW version, and date is the date for X-versions.
Stentofon Multidrop Master/Slave
Further information: Stentofon Multidrop protocol
The frequent AlphaPro user will notice that it’s possible to select Multidrop master/slave as link layer. It’s a 4-wire RS422/485 low-trafic bus concept developed for an engineering project. The audio network must still be point-to-point. If you have a special application which could use such a concept, please contact Product Support for Stentofon.
Datalinks between AlphaCom nodes in AlphaNet
- For old style serial links (RS232) Stentofon Data Link Layer (Sliding Window Protocol) is always used.
- For data over IP until AMCD version 10.31, Stentofon Data Link Layer (Sliding Window Protocol) over UDP is used. AlphaNet data messages are received on UDP port 50000
- From AMCD version 10.31, it is possible to run Stentofon Simple Link Layer over TCP instead. This is now the preferred method, and we will most likely soon make this the autoloaded default.
- An intermediate variant in X-versions of 10.31 can use Stentofon Data Link Layer (Sliding Window Protocol) over TCP. This method is discouraged.
When TCP is used for AlphaNet data between AlphaCom nodes, the node with the higher node number connects to the node with the lower node number at TCP port 50000.
Selecting data link layer between nodes
This is presently not programmable from the Alphacom