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

Is this just a partial decode of V2G packet, what's the rest ? #20

Open
beadon opened this issue Nov 14, 2024 · 4 comments
Open

Is this just a partial decode of V2G packet, what's the rest ? #20

beadon opened this issue Nov 14, 2024 · 4 comments

Comments

@beadon
Copy link

beadon commented Nov 14, 2024

Hi ! I am examining packets and finding that the V2G message for CableCheckRes seems to be only partially decoded.

Notice the difference in these 2 packets in their binary formats. I am seeing different behavior in my system when the message on the left ( nonprintable characters ) versus the right, which has printable characters "PMuX" it may be a coincidence that these are printable, but I can't see what this part of the message is signalling.

Can anyone decode the rest of the message ?

image
*updated image

@barsnick
Copy link

which has printable characters "PMuX" it may be a coincidence that these are printable

This is usually a coincidence, as in V2G's EXI, the data isn't byte-aligned. String objects aren't compressed though, so there's a 1 in 8 chance that they can be seen in clear text. 😉

the V2G message for CableCheckRes seems to be only partially decoded

Could you show us what both messages actually decode to in the plugin? You didn't capture that part of the display, so it's hard to understand the issue.

It would be helpful if you provided the actual PCAP, I don't know if someone can quickly inject this data into a new trace to test the plugin's behavior.

I took my time to at least extract the two EXI messages:
Left:

80980209cecac7942fbe999040000000010100

Right:

80980204c8504d7558be1b5040000000010100

The left side should decode to something like this:

MsgDef.Header.SessionID: 273b2b1e50befa66
MsgDef.Header.Signature: (not given)
CableCheckRes.ResponseCode: iso2_responseCodeType_OK
CableCheckRes.DC_EVSEStatus.NotificationMaxDelay: 0
CableCheckRes.DC_EVSEStatus.EVSENotification: iso2_EVSENotificationType_None
CableCheckRes.DC_EVSEStatus.EVSEIsolationStatus: iso2_isolationLevelType_Invalid
CableCheckRes.DC_EVSEStatus.EVSEStatusCode: iso2_DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive
CableCheckRes.EVSEProcessing: iso2_EVSEProcessingType_Ongoing

The right side should decode to something like this:

MsgDef.Header.SessionID: 13214135d562f86d
MsgDef.Header.Signature: (not given)
CableCheckRes.ResponseCode: iso2_responseCodeType_OK
CableCheckRes.DC_EVSEStatus.NotificationMaxDelay: 0
CableCheckRes.DC_EVSEStatus.EVSENotification: iso2_EVSENotificationType_None
CableCheckRes.DC_EVSEStatus.EVSEIsolationStatus: iso2_isolationLevelType_Invalid
CableCheckRes.DC_EVSEStatus.EVSEStatusCode: iso2_DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive
CableCheckRes.EVSEProcessing: iso2_EVSEProcessingType_Ongoing

The difference seems to be only in the SessionIDs.

@TGruett
Copy link
Contributor

TGruett commented Nov 14, 2024

Hi,
i have injected it into a pcap an everything looks fine to me:

left packet:
image

right packet
image

Seems like only the SessionID is different, as barsnick already mentioned.

Which dsV2Gshark version are you using?

@beadon
Copy link
Author

beadon commented Nov 14, 2024

You are awesome. I am trying to figure out why of these captures succeeds in EV charging, and other other fails. The difference in session ID makes sense, and the coincidence with the printable / non-printable characters also makes sense.

From the traces below -
It looks like the CableCheck fails while in CPState C(2) according to the emulator. And the traces I believe confirm this, but I can't see a difference in these traces in the CableCheckRes messages to troubleshoot further, I was hopeful I was just missing something in the CableCheck.

Attached is the pair of captures :

Cablecheck errors --
CableCheck_errors_emulationMode_2024-11-13_18.09.11_eth1.ev.zip

Working EV Charging Session
working---emulationMode_2024-11-13_14.48.52_eth1.ev.zip

Plugin version ( 1.4.3 ) accoridng to Wireshark -> About
image

@TGruett
Copy link
Contributor

TGruett commented Nov 15, 2024

I checked the messages again and they still look fine to me. The only difference I noticed between the two traces is the timing of the CableCheckRequests and -Responses. Maybe there is a timing problem on your EV side?

In the error case, the first two responses follow the request within 25-30ms, the third response takes ~100ms and afterwards the EV stops immediatly. In the good case trace, the third response takes 'only' ~80ms

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

3 participants