From 1a79916ceef5024893d5fc369f8caefc8107bf8b Mon Sep 17 00:00:00 2001 From: seo-amugae Date: Sun, 23 Aug 2026 19:30:53 +0900 Subject: [PATCH] Document CAN packet examples --- README.md | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/README.md b/README.md index de115bd..573575c 100644 --- a/README.md +++ b/README.md @@ -259,6 +259,107 @@ bit0..bit6 = 센터콘솔 버튼 눌림 상태 Mega가 MOSFET으로 직접 누른 버튼은 일정 시간 마스킹하여 사용자 직접 조작으로 오인하지 않습니다. +### 실제 패킷 예시 + +멀티바이트 시간값은 little-endian입니다. 예를 들어 `300ms`는 `0x012C`이므로 payload에는 `2C 01` 순서로 들어갑니다. + +주행 중 Nano heartbeat 예시: + +```text +ID : 0x100 +DLC : 8 +DATA: 01 2D 2A 05 14 00 7B 00 +``` + +해석: + +```text +byte0 = 0x01 protocol version 1 +byte1 = 0x2D IG1 ON, raw drive ON, confirmed drive ON, seat moving +byte2 = 0x2A heartbeat sequence 42 +byte3 = 0x05 useCount 5 +byte4 = 0x14 parking raw low +byte5 = 0x00 parking raw high, parkingRawValue = 20 +byte6 = 0x7B uptime seconds low +byte7 = 0x00 uptime seconds high, uptime = 123s +``` + +운전석 통풍 버튼을 300ms 클릭하라는 명령 예시: + +```text +ID : 0x101 +DLC : 8 +DATA: 01 01 00 2C 01 C2 01 31 +``` + +해석: + +```text +byte0 = 0x01 protocol version 1 +byte1 = 0x01 pulse command +byte2 = 0x00 channel 0, driver vent +byte3 = 0x2C onMs low +byte4 = 0x01 onMs high, onMs = 300 +byte5 = 0xC2 gapMs low +byte6 = 0x01 gapMs high, gapMs = 450 +byte7 = 0x31 command sequence 49 +``` + +운전석 열선을 길게 눌러 OFF 기준화하는 명령 예시: + +```text +ID : 0x101 +DLC : 8 +DATA: 01 01 01 34 08 BC 02 32 +``` + +해석: + +```text +channel = 1, driver heat +onMs = 0x0834 = 2100ms +gapMs = 0x02BC = 700ms +sequence = 0x32 +``` + +핸들 열선 20분 유지 재시작은 두 개의 pulse 명령으로 보냅니다. + +```text +ID : 0x101 +DATA: 01 01 04 2C 01 B0 04 33 + +ID : 0x101 +DATA: 01 01 04 2C 01 C2 01 34 +``` + +해석: + +```text +첫 번째 frame: channel 4를 300ms 누르고 1200ms 대기 +두 번째 frame: channel 4를 300ms 다시 누르고 450ms 대기 +``` + +Mega status 예시: + +```text +ID : 0x200 +DLC : 8 +DATA: 01 0B 83 05 01 31 02 2A +``` + +해석: + +```text +byte0 = 0x01 protocol version 1 +byte1 = 0x0B main alive, Mega busy, main IG1 ON +byte2 = 0x83 driver vent 3, driver heat 0, passenger vent 0, passenger heat 2 +byte3 = 0x05 steering heat ON, front sensor OFF, VESS ON +byte4 = 0x01 channel 0 button pressed +byte5 = 0x31 last accepted command sequence 49 +byte6 = 0x02 Mega pulse queue length 2 +byte7 = 0x2A last received Nano heartbeat sequence 42 +``` + ## Nano Serial Console Nano 시리얼은 기본적으로 조용합니다.