Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using several PIDs with one PID_INIT #349

Open
TPoi2 opened this issue Feb 12, 2025 · 2 comments
Open

Using several PIDs with one PID_INIT #349

TPoi2 opened this issue Feb 12, 2025 · 2 comments

Comments

@TPoi2
Copy link

TPoi2 commented Feb 12, 2025

Congratulation to this impressing idea of the WiCAN.

I did investigate for a json-file to read out a GWM ORA Funky Cat.
If I understand the CarScanner log correctly, then it configures the interface with AT commands for a certain controller and requests then certain PIDs.

In praticial terms, the PID_INIT command for the Battery Management System (BMSv2) is e.g.

  • always starting with "ATSH78B;" then
  • followed by instructions like "ATFCSM1;" or "ATFCSH78B;" and
  • always finishing via "ATCRA7CB;".

Afterwards it askes for:

  • PID 2221711 TotalCharge
  • PID 2221721 TotalDischarge
  • PID 2203081 TrueSoC
  • PID 2220032 HVBatteryVoltage
  • PID 2220511 SoH
  • PID 22D0031 OperatingVoltage
  • PID 22D0041 Mileage

However, in the json-file the PID_INIT is assigned to the PID. Would it make sense to have the PID subordinated to the PID_INIT? So that the PID_INIT is only sent ones and several PIDs are collected afterwards?

In addition, the PID of CarScanner is sometimes with and sometimes without the final 1 so 222171 instead of 2221711. Do you know why?

@meatpiHQ
Copy link
Owner

@TPoi2

However, in the json-file the PID_INIT is assigned to the PID. Would it make sense to have the PID subordinated to the PID_INIT? So that the PID_INIT is only sent ones and several PIDs are collected afterwards?

You can do that by setting the "init". The pid_init is useful when you are have multiple pid and you need to talk to multiple ECUs, the command ATSH78B basically sets the header to which ECU you're addressing in the OBD request.

In addition, the PID of CarScanner is sometimes with and sometimes without the final 1 so 222171 instead of 2221711. Do you know why?

The number "1" at the end is the expected number of response lines, sometime it's more than 1 and it helps to return the result as soon as the specified number of responses is received.

@TPoi2
Copy link
Author

TPoi2 commented Feb 20, 2025

Ok. Understood. I have to communicate with 3 ECUs (VCU, BMS, TMPS) and I can adress only one in the init. So I have to use the pid_init and send the same commands repeatedly for all PIDs of one ECU?

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

No branches or pull requests

2 participants