Skip to content

Conversation

@jcugat
Copy link

@jcugat jcugat commented Oct 20, 2025

I managed to get all the PIDs for the XPENG G6 from an OBD app, but there is something that is not working perfectly fine.

There are two types of PIDs, the ones that come from the VCU and the ones from the BMS. The problem is that the init commands to initialize those PIDs are different, and conflict between them.

What the original app does is this:

  • It has a global init with ATZ;ATE0;ATH1;ATSP6;ATS0;ATM0;ATAT1;ATSH7E0;
  • For the VCU PIDs, there is no specific init so I guess it relies on the global one only.
  • For the BMS PIDs, there is a custom logic:
    • Before requesting the actual PID, it sends the following "pre"-commands: ATFCSH704;ATFCSD300000;ATFCSM1;ATCRA784
    • After the PID has been requested, it send the following "post"-commands: ATFCSM0;ATAR

Since the wican firmware doesn't have this pre/post functionality, I tried to mimick that with the approach in the PR. I'm not sure it's the best approach, but at least I got some numbers that appear quite similar to the ones reported by the OBD app.

I still have to check the values while moving the car, to make sure they are reported correctly, so I wouldn't merge this PR yet. There's a couple that I think are not correct, but I wanted to share it early in case somebody else want to help me test it meanwhile.

A few random notes:

  • Is 220320 ([VCU] Fast charging voltage) actually GPS altitude? (source) No, doesn't look like it.
  • 220318 ([VCU] Rear motor speed (G6/G9)) is correct for my G6 LR with this formula: [B4:B5]-16000.0.
    • Should split the profile between RWD/AWD and also between G6G9/P5P7
  • [BMS] Vehicle speed I think is 220104 ([BMS] RES(PID_010D)) and the value is correct

@jcugat jcugat requested a review from meatpiHQ as a code owner October 20, 2025 21:27
@jcugat jcugat mentioned this pull request Oct 20, 2025
@mmornati
Copy link

Thanks just tested in my G6 and it seems working very well. I will share some strage bugs if needed, but to me we can merge this PR.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants