Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
9 views4 pages

Sbhack Uart Protocol

Uploaded by

Amine GRADA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

Sbhack Uart Protocol

Uploaded by

Amine GRADA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Modified Chrysler CCD/SCI Scanner UART protocol

for SBHACK
Last update: 2020.02.27

1. Frame format

Start of End of
Data length Data description Data
frame frame
LENGTH LENGTH DATA SUB-DATA
SYNC PAYLOAD CHECKSUM
HB LB CODE CODE
$00 $3D
$3D $00 $06 $05 $01 $0D
$14 $B0
Table 1. Frame format.

1.1 SYNC byte: fixed value at the beginning of every message ($3D).

1.2 LENGTH bytes: number of bytes following (not including these two) until
CHECKSUM byte is reached. Maximum frame length is limited to 1024
bytes. Size: 2 bytes.

1.3 DATA CODE byte: describes the source, target and command. Size: 1 byte.

1.4 SUB-DATA CODE byte: command extension if the command alone is not
enough to describe the purpose of the message. Size: 1 byte

1.5 PAYLOAD byte(s): optional. Arbitrary data can be stored here.


Size: limited to a maximum of 1024-6=1018 bytes.

1.6 CHECKSUM byte: all bytes, except SYNC, summed up, lower byte of the
result is placed here for error detection. Size: 1 byte.

2. Frame bytes in detail


2.1 DATA CODE byte description

DATA CODE byte


Sourc Target Command
e
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0

0 0 0 0 0 1 1 0
Table 2. DATA CODE byte description.

Bit 7 source of the frame: - 4b0000 ($00): Reset


- 1b0 ($00): COMPUTER - 4b0001 ($01): Handshake
- 1b1 ($80): ARDUINO - 4b0010 ($02): Status
- 4b0011 ($03): Settings
Bit 6:4 | target of the frame: - 4b0100 ($04): Read data
- ALWAYS 3b000 - 4b0101 ($05): Write data
- 4b0110-4b1101 ($06-$0E): RESERVED
Bit 3:0 | command - 4b1111 ($0F): OK/Error

2.2 SUB-DATA CODE byte description

SUB-DATA CODE byte

PAGE4
Table 3. SUB-DATA CODE byte description.

Individual bits have no special meaning. Different commands have different


SUB-DATA CODE bytes.

Related command: $00 (Reset)


- $00-$FF: RESERVED

Related command: $01 (Handshake)


- $00: Request scanner to send handshake over USB connection
- $01: Send handshake, hardware/firmware information and status too
- $02-$FF: RESERVED

Related command: $02 (Status)


- $00 RESERVED
- $01 Timestamp
- $02 Scan smbus
- $03 Smbus dump
- $04-$FF: RESERVED

Related command: $03 (Settings)


- $00: RESERVED
- $01: Current Settings
- $02: Set smbus address
- $03: Set R/W byte order
- $04-$FF: RESERVED

Related command: $04 (Read Data)


- $00: RESERVED
- $01: Read byte
- $02: Read word
- $03: Read block
- $04: Read ROM byte
- $05: Read ROM block
- $06-$FF: RESERVED

Related command: $05 (Write Data)


- $00: RESERVED
- $01: Write byte
- $02: Write word
- $03: Write block
- $04-$FF: RESERVED

Related command: $0F (OK/ERROR)


- $00: OK: general acknowledgement
- $01: ERROR: LENGTH, invalid value
- $02: ERROR: DATA CODE, invalid command
- $03: ERROR: SUB-DATA CODE, invalid value
- $04: ERROR: PAYLOAD, invalid value
- $05: ERROR: CHECKSUM, invalid value
- $06: ERROR: PACKET, timeout occurred
- $07-$FD: RESERVED
- $FE: ERROR: internal error
- $FF: ERROR: FATAL

3. Example packets

LENGTH LENGTH DATA SUB-DATA


SYNC PAYLOAD CHECKSUM
HB LB CODE CODE

$3D $00 $02 $00 $00 $02

Table 4. Reboot scanner.

PAGE4
LENGTH LENGTH DATA SUB-DATA
SYNC PAYLOAD CHECKSUM
HB LB CODE CODE

$01
0:TX
$3D $00 $02 $00 $03
1:handsh
ake
Table 5. Handshake request.

LENGTH LENGTH DATA SUB-DATA


SYNC PAYLOAD CHECKSUM
HB LB CODE CODE

$81
$53 $42
8:RX
$3D $00 $08 $00 $48 $41 $35
1:handsh
$43 $4B
ake

Table 6. Handshake response.

In the PAYLOAD section the scanner responds with an ASCII encoded text:

$53 $42 $48 $41 $43 $4B = SBHACK

LENGTH LENGTH DATA SUB-DATA


SYNC PAYLOAD CHECKSUM
HB LB CODE CODE

$04
$03 $20
$3D $00 $03 0:TX $2A
3:Block Reg 20
4:Read
Table 7. Read block reg 0x20.

LENGTH LENGTH DATA SUB-DATA


SYNC PAYLOAD CHECKSUM
HB LB CODE CODE

$20 $45
$84
$03 $43 $53
$3D $00 $07 8:RX $8C
3:Block Reg 20
4:Read
ESC

Table 8. Echo of Read block reg 0x20.

LENGTH LENGTH DATA SUB-DATA


SYNC PAYLOAD CHECKSUM
HB LB CODE CODE

PAGE4
$00 $00
$05 $02 $01
$3D $00 $05 $0D
TX,write word Reg 00,
data0001

Table 9. Write word 0001 to reg 0x00.

LENGTH LENGTH DATA SUB-DATA


SYNC PAYLOAD CHECKSUM
HB LB CODE CODE

$00 $00
$01 $02
Reg
$85 $02
$3D $00 $06 00,Data $90
RX,write word
0001,02
bytes
written

Table 10. Echo write word 0001 to reg 0x00

PAGE4

You might also like