A Made IT project
BiSync or BSC is a half-duplex point-to-point contension type protocol, mostly used in IBM 3780 or 2780 applications. A derivative version is known as MSV from Siemens. All these data-link protocols are a subset of the standard 'Basic Mode Control Protocol'.
The BSC protocol is used in a point-to-point connection between 2 block-oriented synchronous terminals. The basic transmission unit is a screen, where a special 'send' key is used to send the information of a complete terminal screen.
The transmission is based on the sending of special characters to control the data link. Below you'll find the table for both ASCII and EBCDIC Transmission Control Characters.
The connection can be described in 5 phases. Of which this document only describes 2, 3, and 4. The first phase is the one in which the modems connect. As soon as the connection is established (DCE Ready on a RS232 interface) phase 2 starts and after phase 4 the last phase (5) is tearing down the connection.
The beginning of a transmission can be started with a leading PAD (a couple of 0's and 1's: 010101), which is used to sync the modems. They are not always used. What must follow are at least 2 SYN characters.
The trailing PAD that has to follow every transmission action consists of seven or eight consecutive 1's (FF or 7F).
Leading pad characters (could be sync characters, while trailing pad characters assure that the transmission is held long enough for the last critical character to have been received (usually an "FF" character).
Phase 2: Building the logical connection
The initiazing station sends a ENQ, which is answered by an ACK0, when the other station is ready to receive characters.
If the receiving station is not able to receive data, it will send a NAK. Another option is that the slave knows it can't recieve data now, but it will be in a short notice. Some slaves have the WACK character for this. It should be send within 2 seconds after the ENQ is received. The requesting station will reply with another ENQ. This can be repeated several times, dependend on the 'retry-counter' (0, 3, or 6 times).
After a NAK or the end of the 'retry-counter' the stations will continue with phase 4.
A last possible occurance in the reply scheme is the no-reply option. If this happens the sending station will send a ENQ after the 'receive time-out' has ended. Again the 'retry-counter' is responsible for if and how many times this is repeated.
But what happens if both stations send an ENQ at the same time? This is called 'contention'. The solution for this is that one of the stations has a higher priority then the other and is thus called the 'primary-station' which leaves the other as a 'secondary-station'. The difference between the two is that a primary-station has a shorter 'receive time-out.
The result of this is that the primary station resends its ENQ while the secondary station is still waiting on its response on a ENQ. So a ENQ response on an ENQ means that the station is secondary and it has to decide weather it is able to receive data (send ACK0, NAK, or WACK)
Phase 3: The transport phase
This is the phase in which the actual data transport is taking place. The sending station is called the master, and the receiving slave. A slave always listens to the master, and it is the master that decides when a connection needs to be broken down.
Every package that is transmitted is packed between an STX and an ETX character, followed by one (LRC-check) or two (CRC-check) BCCs (Block Check Character). After this (and the check on the receiving side) the slave will send an ACK.
The response on a received package (when everything is okay) is based Affermative Acknowledgement. Which means that the first package is replied with an ACK1 and the second with ACK0, and so on. This way missing packages can be detected easily.
On an BCC error a NAK is send.
Phase 4: Breaking up the logical connection
If no more data is to be send the master will initiate the breaking up of the logical connection by sending an EOT. The slave has now the possibility to send a ENQ, if it has also something to send and everything starts in the opposite direction starting at phase 2.
For leased line connection phase 4 ends here. For dial-up connections however there will also be send an DLE, EOT (after some time to give the slave a possibility to become master). This last character sequence will disconnect the modem connection.
A last security mechanism also disconnects the modem connection when there is no line activity for more then 20 seconds.
|Control Function||ASCII Code||EBCDIC Code|
|ACK 0||DLE, 0||10, 30||DLE, '70'||10, 70|
|ACK 1||DLE, 1||10, 31||DLE, /||10, 61|
|DLE, EOT||DLE, EOT||10, 04||DLE, EOT||10, 37|
|RVI||DLE, <||10, 3C||DLE, @||10, 7C|
|TTD||STX, ENQ||02, 05||STX, ENQ||02, 2D|
|WACK||DLE, ;||10, 3B||DLE, ,||10, 6B|