Archived
fix(obd): read the Accent transmission with mode 22, not mode 21
Removing these sensors was the wrong call. The header was right and the app
parsed the reply correctly — the service mode was wrong.
21 A0 at 7E1 answers on this car, but only ever with 61A0FFFF0000: four data
bytes, FF FF 00 00, identical across all 115 responses in the logs. The
awesomeit profile reads bytes 13, 20 and 21 from this block, all past the end
of that stub, so nothing could ever be published.
The Carnival YP diagnostic log shows what that stub is a truncation of. On the
same 7E1:
21 A0 -> 7F 21 11 (serviceNotSupported)
22 01A0 -> 6201A0 FF FF 84 00 00 00 00 13 ... (42-byte multi-frame)
Both replies open with FF FF, so the Accent's mode 21 answer looks like an
abbreviated form of the same block, with the real contents behind mode 22.
The awesomeit profile's 21 A0 is likely written for an older TCU generation.
Restore the three sensors with mode 22 and DID 01A0, keeping awesomeit's byte
positions unchanged so only the mode differs. Flow control is set the way the
Carnival log sets it before querying 7E1, since the full reply is multi-frame.
If this car answers short or negatively, decode returns null and the sensors
stay empty rather than reporting nonsense, and the log will say which.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d8ca528a99
commit
f86de06da4
1 file changed
+71
-6
+71
-6
@@ -322,12 +322,77 @@ templates:
|
|||||||
# 7F 22 22로 거부하므로 다른 DID를 더 뒤져볼 이유가 약하고, 표준 01A6은
|
# 7F 22 22로 거부하므로 다른 DID를 더 뒤져볼 이유가 약하고, 표준 01A6은
|
||||||
# mode 01 지원 목록에 없어 예상대로였다. 위 offset_value 보정을 계속 쓴다.
|
# mode 01 지원 목록에 없어 예상대로였다. 위 offset_value 보정을 계속 쓴다.
|
||||||
|
|
||||||
# 변속기(TCU) 21A0 @ 7E1 은 응답은 하지만 내용이 없다. 실차 확인 결과
|
# ── 변속기(TCU) @ 7E1 — mode 22 로 재시도 ──────────────────────────
|
||||||
# 응답이 61A0FFFF0000 — 에코를 뺀 데이터가 4바이트(FF FF 00 00)뿐이고
|
# awesomeit 프로필의 21 A0 (mode 21)은 이 차에서 스텁만 돌려준다.
|
||||||
# 값도 고정이다. awesomeit 프로필이 이 블록에서 읽는 미션오일온도(byte 13),
|
# 실측 115건이 전부 61A0FFFF0000 — 에코를 뺀 데이터가 4바이트(FF FF 00 00)
|
||||||
# 기어위치(byte 20), 기어단수(byte 21)는 전부 이 범위 밖이라 셋 다
|
# 고정이라, 프로필이 읽는 byte 13/20/21 은 전부 범위 밖이었다.
|
||||||
# 영구히 값이 없다. 프로필이 이 차의 다른 트림/사양 기준이었던 것으로 보인다.
|
# 헤더(7E1)도 파싱도 문제가 아니었고, 서비스 모드가 달랐던 것이다.
|
||||||
# decode 가 범위 밖에서 null 을 돌려주는 덕에 엉뚱한 값이 올라오진 않았다.
|
#
|
||||||
|
# 카니발(YP F/L 2018) 진단 로그에서 같은 7E1 에 대해:
|
||||||
|
# 21 A0 → 7F 21 11 (serviceNotSupported)
|
||||||
|
# 22 01A0 → 6201A0 FF FF 84 00 00 00 00 13 … (42바이트 멀티프레임)
|
||||||
|
# 엑센트의 21A0 응답도 FF FF 로 시작하는 걸 보면 같은 블록의 축약본이고,
|
||||||
|
# 실제 내용은 mode 22 쪽에 있는 것으로 보인다. awesomeit 의 21A0 은
|
||||||
|
# 더 구형 TCU 세대 기준이었을 가능성이 크다.
|
||||||
|
#
|
||||||
|
# 바이트 위치는 awesomeit 프로필 그대로 두고 모드만 바꿔 확인한다.
|
||||||
|
# 응답이 짧으면 decode 가 null 을 돌려주므로 값이 안 올라올 뿐 안전하다.
|
||||||
|
# 흐름제어는 카니발 로그가 7E1 조회 전에 설정한 것과 동일하게 맞췄다.
|
||||||
|
# raw=6201A0FFFF84… → 성공. 세 값이 맞는지 기어를 바꿔가며 확인할 것
|
||||||
|
# NO DATA / 7F → 이 차 TCU 에는 없는 것으로 확정하고 셋 다 지운다
|
||||||
|
- key: trans_oil_temp
|
||||||
|
mode: "22"
|
||||||
|
pid: "01A0"
|
||||||
|
pre_commands: ["ATSH7E1", "ATFCSH7E1", "ATFCSD300000", "ATFCSM1"]
|
||||||
|
decode: { offset: 13, length: 1, type: uint8, offset_value: -40 }
|
||||||
|
unit: "°C"
|
||||||
|
device_class: temperature
|
||||||
|
state_class: measurement
|
||||||
|
accuracy_decimals: 1
|
||||||
|
icon: mdi:oil-temperature
|
||||||
|
entity_category: diagnostic
|
||||||
|
update_interval: 20s
|
||||||
|
- key: gear_position
|
||||||
|
mode: "22"
|
||||||
|
pid: "01A0"
|
||||||
|
pre_commands: ["ATSH7E1", "ATFCSH7E1", "ATFCSD300000", "ATFCSM1"]
|
||||||
|
platform: text_sensor
|
||||||
|
icon: mdi:car-shift-pattern
|
||||||
|
entity_category: diagnostic
|
||||||
|
decode:
|
||||||
|
offset: 20
|
||||||
|
length: 1
|
||||||
|
type: uint8
|
||||||
|
map:
|
||||||
|
"8": "D"
|
||||||
|
"9": "N"
|
||||||
|
"10": "R"
|
||||||
|
"11": "P"
|
||||||
|
"12": "Sport"
|
||||||
|
"16": "E Mode"
|
||||||
|
update_interval: 2s
|
||||||
|
- key: gear
|
||||||
|
mode: "22"
|
||||||
|
pid: "01A0"
|
||||||
|
pre_commands: ["ATSH7E1", "ATFCSH7E1", "ATFCSD300000", "ATFCSM1"]
|
||||||
|
platform: text_sensor
|
||||||
|
icon: mdi:numeric
|
||||||
|
entity_category: diagnostic
|
||||||
|
decode:
|
||||||
|
offset: 21
|
||||||
|
length: 1
|
||||||
|
type: uint8
|
||||||
|
map:
|
||||||
|
"0": "P/N"
|
||||||
|
"1": "1"
|
||||||
|
"2": "2"
|
||||||
|
"3": "3"
|
||||||
|
"4": "4"
|
||||||
|
"5": "5"
|
||||||
|
"6": "6"
|
||||||
|
"7": "7"
|
||||||
|
"8": "8"
|
||||||
|
update_interval: 2s
|
||||||
|
|
||||||
- id: gatt_meter_relay
|
- id: gatt_meter_relay
|
||||||
name: "GATT power meter + relay"
|
name: "GATT power meter + relay"
|
||||||
|
|||||||
Reference in new issue
Block a user