Packet flows for the CASIOLINK protocol¶
The CASIOLINK protocol involves a sender and a receiver. Both sides are defined in advance, and do not exchange roles during transfer. In no cases can the receiver request a resource from the sender, as it must only respond to requests and receive what the sender chooses to send.
Initiate the connection using the CAS40 or CAS50 variant¶
In order to initiate the connection with the CAS40 and CAS50 variants, the communication schema is the following:
See Packet format for the CASIOLINK protocol for more information.
Initiate the connection using the CAS100 variant¶
The CAS100 initiation flow is more complete than the CAS40 and CAS50 variants:
Note
On cross-variant CASIOLINK reception, since the MDL1 header is received in the place any other data would be received in the CAS40 and CAS50 variants, the MDL1 header and acknowledgement reactions must be managed in the data reception utilities rather than in the communication initialization.
However, when the CAS100 variant is selected explicitely by the user, the MDL1 header can and should be managed in the communication initialization directly, so that device information can be exploited.
See the following for more information:
Send or receive data using the CAS40 or CAS50 variant¶
For the Data or screen reception rationale or Data or screen sending rationale using the CAS40 or CAS50 variants, the flow is the following:
The number of data parts, and the size of each of them, is determined using on the header, and is not communicated using the protocol itself.
Note
This is the opposite approach from Protocol 7.00, where the interpretation can be done entirely after the file has been sent, even for unknown data types. Here, you need to make at least a partial interpretation of the header.
On CAS40 headers, the interpretation must be done per data type, whereas on CAS50 headers, with a few exceptions, you can generally rely on the 3-letter format instead (with exceptions), which is easier to support as it has fewer values.
Every data type can either be final, i.e. be the last one to be transmitted on a given communication before the sender considers the communication as completed, or not.
When only non-final data types are used, the sender can end the communication manually by sending a sentinel header, in the form of a \x17\xFF CAS40 End or END\xFF CAS50 End data type.
CAS40 AL Mode¶
When a sender using CAS40 wants to transmit all of its data, it can use an AL mode, which causes the following flow:
In this mode, all data types that are normally final become non-final. This includes \x17\xFF CAS40 End, which does not end the communication anymore, as once this mode is enabled, only \x17\x17 CAS40 AL End is able to do this.
See the following for more information:
Request data using the CAS50 variant¶
Todo
Write this!
Send or receive data using the CAS100 variant¶
Todo
Write this!