Skip to content

Commit d9385a6

Browse files
authored
Merge pull request #1 from dspace-group/feature/ioGraph
Added I/O Graph support
2 parents a88de19 + 76cd7e1 commit d9385a6

7 files changed

Lines changed: 527 additions & 446 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
settings.json

Images/IO_Graph.png

106 KB
Loading

Installer/InstallerScript.iss

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// DO NOT CHANGE VERSION HERE! Run update_version.bat
2-
#define AppVer "1.1.0"
2+
#define AppVer "1.2.0"
33
#define AppId "dsV2Gshark"
44

55
[Setup]
@@ -33,6 +33,9 @@ Name: "dsV2Gshark_strings"; MessagesFile: "strings.isl"
3333
Name: "full"; Description: "Full installation"
3434
Name: "custom"; Description: "Custom installation"; Flags: iscustom
3535

36+
[CustomMessages]
37+
Linebreak=%n
38+
3639
[Components]
3740
Name: "plugin"; Description: "Plugin files"; Types: full custom; Flags: fixed
3841
Name: "plugin/dissectors"; Description: "V2G dissectors"; Types: full custom; Flags: fixed
@@ -44,6 +47,7 @@ Name: "plugin/autoschema"; Description: "Automatic schema detection"; Types: ful
4447
Name: "plugin/autodecrypt"; Description: "Live TLS decryption with disclosed master secret from UDP packet"; Types: full custom;
4548
Name: "buttons"; Description: "Add filter buttons to Wireshark (current user only)"; Types: full
4649
Name: "colorfilters"; Description: "Highlight V2G messages in Wireshark (current user only)"; Types: full
50+
Name: "iograph"; Description: "Prepare Wireshark I/O Graphs for V2G messages{cm:Linebreak}(current user only, may override I/O Graph preferences)"; Types: full
4751

4852
[Files]
4953
Source: "..\Wireshark\plugins\v2gmsg.lua"; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs; Components: plugin/dissectors
@@ -256,6 +260,10 @@ begin
256260
'"TRUE","[V2G ext]","v2gtp or v2gtlssecret or tls.handshake or tls.alert_message or tls.change_cipher_spec or tcp.flags.syn == 1 or tcp.flags.fin == 1 or homeplug or homeplug-av ","Filter V2G messages, SLAC messages and additional TCP packets"',
257261
'"TRUE","[V2G]","v2gtp or v2gtlssecret","Filter V2G messages"'];
258262
RemoveFromFile(FileName, LinesToRemove);
263+
264+
FileName := GetWiresharkConfigPath + 'io_graphs'
265+
LinesToRemove := ['v2gtp', 'v2gmsg', 'CP State']
266+
RemoveFromFile(FileName, LinesToRemove);
259267
end;
260268
261269
procedure CurStepChanged(CurStep: TSetupStep);
@@ -304,6 +312,42 @@ begin
304312
if not PrependStringsToFile(FileName, StringsToAdd) then
305313
MsgBox('Failed to add colorfilters to Wireshark!', mbError, MB_OK);
306314
end;
315+
316+
if WizardIsComponentSelected('iograph') then
317+
begin
318+
// add graph io presets after installation
319+
FileName := GetWiresharkConfigPath + 'io_graphs'
320+
StringsToAdd := [ '"Enabled","#V2G-Packets/Interval","v2gtp","#D3D3D3","Square","Packets","v2gtp","None","1"',
321+
'"Enabled","Target Voltage EV","","#AA0000","Cross","AVG(Y Field)","v2gmsg.xml.iograph.EVTargetVoltage","None","1"',
322+
'"Enabled","Present Voltage EVSE","","#AA0000","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVSEPresentVoltage","None","1"',
323+
'"Enabled","[ISO20] Present Voltage EV","","#AA6262","Circle","AVG(Y Field)","v2gmsg.xml.iograph.EVPresentVoltage","None","1"',
324+
'"Enabled","Target Current EV","","#0000FF","Cross","AVG(Y Field)","v2gmsg.xml.iograph.EVTargetCurrent","None","1"',
325+
'"Enabled","Present Current EVSE","","#0000FF","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVSEPresentCurrent","None","1"',
326+
'"Enabled","[ISO20] Present SOC","","#AAFF00","Line","AVG(Y Field)","v2gmsg.xml.iograph.PresentSOC","None","1"',
327+
'"Enabled","[DIN/ISO2] Present SOC","","#AAFF00","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVRESSSOC","None","1"',
328+
'"Disabled","[DIN/ISO2] Max Voltage EV","","#2E3436","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVMaximumVoltageLimit","None","1"',
329+
'"Disabled","[DIN/ISO2] Max Voltage EVSE","","#2E3436","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVSEMaximumVoltageLimit","None","1"',
330+
'"Disabled","[DIN/ISO2] Max Current EV","","#2E3436","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVMaximumCurrentLimit","None","1"',
331+
'"Disabled","[DIN/ISO2] Max Current EVSE","","#2E3436","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVSEMaximumCurrentLimit","None","1"',
332+
'"Disabled","[ISO20] Max Voltage EV","","#2E3436","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVMaximumVoltage","None","1"',
333+
'"Disabled","[ISO20] Min Voltage EV","","#2E3436","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVMinimumVoltage","None","1"',
334+
'"Disabled","[ISO20] Max Current EV","","#2E3436","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVMaximumChargeCurrent","None","1"',
335+
'"Disabled","[ISO20] Max Voltage EVSE","","#2E3436","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVSEMaximumVoltage","None","1"',
336+
'"Disabled","[ISO20] Max Current EVSE","","#2E3436","Line","AVG(Y Field)","v2gmsg.xml.iograph.EVSEMaximumChargeCurrent","None","1"',
337+
'"Disabled","CP State","","#2E3436","Dot","AVG(Y Field)","homeplug_av.st_iotecha.cpstate.state","None","20"'];
338+
if FileExists(FileName) then
339+
begin
340+
if not PrependStringsToFile(FileName, StringsToAdd) then
341+
MsgBox('Failed to add I/O Graph presets to Wireshark!', mbError, MB_OK);
342+
end
343+
else
344+
begin
345+
if not SaveStringsToFile(FileName, StringsToAdd, True) then
346+
begin
347+
MsgBox('Failed to add I/O Graph presets to Wireshark!', mbError, MB_OK);
348+
end;
349+
end;
350+
end;
307351
end;
308352
end;
309353

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ This Wireshark plugin allows to analyze and decode packets between electric vehi
88
![ISO 15118-2 Overview](Images/WS_ISO15118_2_Overview.png)
99

1010
## Features
11+
12+
### Overview
1113
- Supports decoding of:
1214
- V2GTP layer (Vehicle to Grid Transport Protocol)
1315
- SAP messages (Supported App Protocol)
@@ -18,11 +20,22 @@ This Wireshark plugin allows to analyze and decode packets between electric vehi
1820
- Additional analysis features:
1921
- Validation of V2G messages according to XSD specification
2022
- Certificate information details for Plug & Charge (PnC)
21-
- Live TLS decryption (see [below](#live-tls-decryption))
23+
- Live TLS decryption
2224
- Automatic schema detection
2325
- Detect schema automatically in case of missing SDP or SAP
2426
- Color filter for V2G packets
2527
- Filter buttons for V2G packets
28+
- Wireshark I/O Graph support for V2G packets
29+
30+
### Live TLS Decryption
31+
The plugin processes a TLS master secret disclosure packet after handshake to decode the following V2G session.
32+
The disclosure message is a UDP packet within the source port range 49152-65535 (see Wireshark protocol settings) containing the ASCII string "CLIENT_RANDOM <32-byte client random> <48-byte master secret>" as payload data. This disclosure message has to be sent from one of the communication partners in a testing environment.
33+
34+
### Wireshark I/O Graph
35+
This optional feature updates the Wireshark I/O Graph preferences to display a V2G session. The graph can be accessed via 'Statistics' -> 'I/O Graphs' (shortcut: Alt + S + I).
36+
The graph displays the data in 1 second intervals. This can be changed using the drop down menu at the bottom.
37+
To simplify the visualisation, some V2G related signals (e.g., MaxVoltage) are disabled by default. They can be enabled using the check boxes in the selection view.
38+
Click on a packet in the graph to inspect it in the Wireshark main window. Press the SPACE key to activate a helper line on the graph if you need more precision.
2639

2740
## Requirements
2841
- Wireshark (64 bit) 3.5.0 or higher
@@ -41,10 +54,6 @@ This Wireshark plugin allows to analyze and decode packets between electric vehi
4154
- Supports normal and portable version of Wireshark
4255
- Filter buttons and color filters will be installed for the current user only. In multi-user environments, the plugin must be installed for each user to enable these two optional features.
4356

44-
## Live TLS Decryption
45-
The plugin processes a TLS master secret disclosure packet after handshake to decode the following V2G session.
46-
The disclosure message is a UDP packet within the source port range 49152-65535 (see Wireshark protocol settings) containing the ASCII string "CLIENT_RANDOM <32-byte client random> <48-byte master secret>" as payload data. This disclosure message has to be sent from one of the communication partners in a testing environment.
47-
4857
## Limitations
4958
- ISO 15118-20 is not fully supported yet
5059
- some BPT messages are not fully decoded
@@ -77,3 +86,5 @@ The disclosure message is a UDP packet within the source port range 49152-65535
7786
![Filter Buttons](Images/WS_FilterButtons.png)
7887
### Plugin Preferences
7988
![Plugin Preferences](Images/WS_Preferences.png)
89+
### Wireshark I/O Graph
90+
![I/O Graph](Images/IO_Graph.png)

V2G_Libraries/CertificateInfos/main.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#include <windows.h>
22

3-
#define VER_FILEVERSION 1,1,0,0
4-
#define VER_FILEVERSION_STR "1.1.0.0\0"
3+
#define VER_FILEVERSION 1,2,0,0
4+
#define VER_FILEVERSION_STR "1.2.0.0\0"
55
#define VER_COMPANYNAME_STR "dSPACE GmbH"
66
#define VER_PRODUCTNAME_STR "V2gCertificateInfos"
7-
#define VER_PRODUCTVERSION 1,1,0,0
8-
#define VER_PRODUCTVERSION_STR "1.1.0.0\0"
7+
#define VER_PRODUCTVERSION 1,2,0,0
8+
#define VER_PRODUCTVERSION_STR "1.2.0.0\0"
99

1010
VS_VERSION_INFO VERSIONINFO
1111
FILEVERSION VER_FILEVERSION

V2G_Libraries/V2GDecoder/main.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#include <windows.h>
22

3-
#define VER_FILEVERSION 1,1,0,0
4-
#define VER_FILEVERSION_STR "1.1.0.0\0"
3+
#define VER_FILEVERSION 1,2,0,0
4+
#define VER_FILEVERSION_STR "1.2.0.0\0"
55
#define VER_COMPANYNAME_STR "dSPACE GmbH"
66
#define VER_PRODUCTNAME_STR "V2gDecoder"
7-
#define VER_PRODUCTVERSION 1,1,0,0
8-
#define VER_PRODUCTVERSION_STR "1.1.0.0\0"
7+
#define VER_PRODUCTVERSION 1,2,0,0
8+
#define VER_PRODUCTVERSION_STR "1.2.0.0\0"
99

1010
VS_VERSION_INFO VERSIONINFO
1111
FILEVERSION VER_FILEVERSION

0 commit comments

Comments
 (0)