jueves, 18 de septiembre de 2025

TI83 - TI-83+ Link Protocol Guide v1.0 - Packet formats

https://merthsoft.com/linkguide/ti83+/packet.html

TI-83+ Link Protocol Guide v1.0 - Packet formats

TI-83+ Link Protocol Guide v1.0 - Packet formats


Packet Formats

Texas Instruments calculators always send data and responses in self-contained "packets."
Packets have the following format:
Note - all 2-byte integers are transmitted little-endian Intel-style (least significant byte first).

OffsetLengthDescription
01 byteMachine ID byte
11 byteCommand ID byte
22 bytesLength of data (see note below)
4n bytesData (if attached)
4+n2 bytesChecksum (if data is attached)

Note - The "Length of data" element may not be equal to zero if the packet contains no data. In this case, the Command ID byte will indicate that the packet contains no data.

The Machine ID Byte

The Machine ID byte identifies the machine that is sending the packet. It can have one of the following values:

ValueDescription
02hComputer sending TI-82 data
03hComputer sending TI-83 data
23hComputer sending TI-83+/TI-84+ data
73hTI-83+ or TI-84+
82hTI-82
83hTI-83

Note: The TI-83 accepts TI-82 and TI-83 Machine ID bytes in order to transfer data between a TI-82/83 and a TI-83+.

The Command ID Byte

The Command ID byte identifies the request or response that the machine is sending. It can have one of the following values:

ValueDescriptionData Included
06hVariable Header (VAR)A fixed-length, NUL padded variable header
09hClear to send (CTS)None
15hData packet (DATA)Screenshot/variable/backup data
2Dh
Silent - Request Versions (VER)None
36hSkip/Exit (SKIP/EXIT)A five-byte rejection code (see codes below)
56hAcknowledge (ACK)None
5AhChecksum Error (ERR)
The previous packet must be sent again.
None
68hCheck ready (RDY)None
6DhSilent - Request Screenshot (SCR)None
88h
Silent - Delete Variable (DEL)A fixed-length, NUL padded variable header
92hEnd of Transmission (EOT)None
A2hSilent - Request Variable (REQ)A fixed-length, NUL padded variable header
C9hSilent - Request to Send Variable (RTS)A fixed-length, NUL padded variable header

Rejection codes (used with Command ID 36h) can have one of the following values:

ValueDescription
01hEXIT - The entire transmission has been cancelled.
02hSKIP - The current variable has been skipped.
03hOUT OF MEMORY (silent transmissions only) - The receiving calculator is out of memory.

The Checksum

The checksum is a 16-bit value used to verify the integrity of the data in the packet. It only present if data is present.
The checksum is calculated by taking the lower 16 bits of the sum of the data bytes, as shown below:

int calculateChecksum(unsigned char* data, unsigned short datalength) {
unsigned short x, checksum;
for(x=0; x<datalength; x++) {
checksum+=data[x]; //overflow automatically limits to 16 bits
}
return checksum;
}


Variable Headers

A Variable header contains information about one variable in the calculator.

OffsetLengthDescription
02 bytesSize of actual variable data, in bytes
21 byteType ID Byte (see type ID's below)
38 bytesVariable name, padded on the right with NULL characters (0h). This field is always tokenized. Not used for ID list.
111 byteVersion - Always has a value of 0h.
121 byteType ID Byte 2 - Always has a value of 0h. Note: bit 7 is set if archived. Not used for getting certificates.

Note: These bytes only make up the "data" section of the packet.
Note2:
- for lists (L1..L6), the first token is a 5D byte followed by another byte: 00 for L1 to 05 for L6.
- for equations: there are 31 equations (Y1..Y0 in func mode, X1t..X6t and Y1t..Y6t in param mode, r1..r6 in polar mode and FnOn/FnOff in On/Off mode). The varname is 5E10 for Y1 to 5E19 for Y0. The varname is 5E20 for X1t, 5E21 for Y1t to 5E2A for X6t, 5E2B for Y6t. The varname is 5E40 for r1 to 5E45 for r6. The varname is 5E80 for u to 5E82 for w.
- for strings: there are 10 strings (Str1..Str9). The varname is AA00 for Str1 to AA09 for Str0.
- for pictures: there are 10 pictures (Pic1..Pic0). The varname is 6000 for Pic1 to 6009 for Pic0.
- for gdbs: there are 10 gdbs (GDB1..GDB0). The varname is 6100 for GDB1 to 6109 for GDB9.

The Type ID Byte

The type ID byte specifies the type of variable that is being transmitted. It can have one of the following values:

ValueDescription (click for variable format)
00hReal Number
01hReal List
02hMatrix
03hY-Variable
04hString
05hProgram
06hEdit-locked Program
07hPicture
08hGDB
0BhWindow Settings (See note below)
0ChComplex Number
0DhComplex List
0FhWindow Settings (See note below)
10hSaved Window Settings (See note below)
11hTable Setup (See note below)
13hBackup
14h
Used to delete a FLASH application
15hApplication Variable
17hGroup Variable (only found on TI83+)
19hDirectory (See note below) - only used when requesting a directory
23hFLASH Operating System
24hFLASH Application
26hID list
27hGet Certificate
29h
Clock

Note - If the Type ID is in the range 0Fh - 12h or 19h, then the contents of the name field of the header do not matter.

Backup Header Format

If the type ID byte specifies a backup, the variable header takes the following 9-byte format :

OffsetLengthDescription
02 bytesSize of first backup section (flags area), in bytes
21 byteType ID Byte (13h in this case)
32 bytesSize of second backup section (data area), in bytes
52 bytesSize of third backup section (symbol area), in bytes
72 bytesStart User Area Address

FLASH Header Format

If the type ID byte is in the range 22...28h, the variable header takes the following 10-byte format :

OffsetLengthDescription
02 bytesSize of actual data, in bytes (LSB).
21 byteType ID Byte (see type ID's below)
32 bytesSize of actual data, in bytes (MSB). Usually 128/256 bytes.
51 byteFlag - Always has a value of 0h but bit 7 is set if archived (*).
62 bytesFLASH offset
82 bytesFLASH page

When sending FLASH OS:
- first and last page have flag set;
- others have flag clear.
When sending FLASH app: flag is always set.

[previous page]
Link Cables

[home]
Table of Contents

[next page]
Screenshots


Site maintained by Romain Liévin (roms@lpg.ticalc.org) and Tim Singer (tsinger@gladstone.uoregon.edu)

No hay comentarios:

Publicar un comentario