Skip to content

Commit

Permalink
HP-AV Extension: VS_ATTENUATION_CHARACTERISTICS, DSPACE_SCS_DIAG_IND (#…
Browse files Browse the repository at this point in the history
…25)

* added VS_ATTEN_CHAR and dSPACE SCS Diag message

* create wireshark profile in action

* Apply suggestions from code review

* update version to 1.5.0

* use ubuntu22.04 in action

---------

Co-authored-by: Andreas Döbber <[email protected]>
  • Loading branch information
TGruett and adoebber authored Jan 24, 2025
1 parent 1fad07b commit 0914449
Show file tree
Hide file tree
Showing 10 changed files with 182 additions and 63 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
path: artifact_dir/*

build-linux:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

Expand All @@ -83,4 +83,15 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: dsV2Gshark_Files_Linux_x86_64
path: artifact_dir/*
path: artifact_dir/*

- name: Zip dsV2Gshark Wireshark Profile
run: |
mkdir artifact_dir_profile
zip -qq -r artifact_dir_profile/dsV2Gshark_profile.zip ./Wireshark/profiles/dsV2Gshark/
- name: Upload WS Profile
uses: actions/upload-artifact@v4
with:
name: WS_profile_dsV2Gshark
path: artifact_dir_profile/dsV2Gshark_profile.zip
24 changes: 18 additions & 6 deletions Installer/InstallerScript.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// DO NOT CHANGE VERSION HERE! Run update_version.bat
#define AppVer "1.4.3"
#define AppVer "1.5.0"
#define AppId "dsV2Gshark"
#define Timestamp GetDateTimeString('yymmdd_hhnnss', '', '')

Expand Down Expand Up @@ -50,7 +50,7 @@ Name: "plugin/decoder/iso2"; Description: "ISO 15118-2 support"; Types: full cus
Name: "plugin/decoder/iso20"; Description: "ISO 15118-20 support (experimental)"; Types: full custom; Flags: fixed
Name: "plugin/autoschema"; Description: "Automatic schema detection"; Types: full custom; Flags: fixed
Name: "plugin/autodecrypt"; Description: "Live TLS decryption with disclosed master secret from UDP packet"; Types: full custom;
Name: "plugin/llc_diagnostic"; Description: "Additional dissector for CP-State related Homeplug AV packets"; Types: full custom;
Name: "plugin/hpav_v2g_diagnostic"; Description: "Additional dissector for V2G related Homeplug AV packets"; Types: full custom;
Name: "profile"; Description: "Add dsV2Gshark profile to Wireshark"; Types: full
Name: "profile/activate"; Description: "Activate dsV2Gshark profile after installation"; Types: full
Name: "profile/buttons"; Description: "Add filter buttons"; Types: full
Expand All @@ -63,7 +63,7 @@ Source: "..\Wireshark\plugins\v2gmsg.lua"; DestDir: "{app}\plugins"; Flags: igno
Source: "..\Wireshark\plugins\v2gtp.lua"; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs; Components: plugin/dissectors
Source: "..\Wireshark\plugins\v2gsdp.lua"; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs; Components: plugin/dissectors
Source: "..\Wireshark\plugins\v2gtlssecret.lua"; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs; Components: plugin/autodecrypt
Source: "..\Wireshark\plugins\v2gllc.lua"; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs; Components: plugin/llc_diagnostic
Source: "..\Wireshark\plugins\v2ghpscs.lua"; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs; Components: plugin/hpav_v2g_diagnostic
Source: "..\Wireshark\*.dll"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: plugin/decoder
Source: "..\Wireshark\profiles\dsV2Gshark\preferences"; DestDir: "{app}\profiles\dsV2Gshark\"; Flags: ignoreversion; Components: profile
Source: "..\Wireshark\profiles\dsV2Gshark\recent"; DestDir: "{app}\profiles\dsV2Gshark\"; Flags: ignoreversion; Components: profile
Expand All @@ -81,6 +81,7 @@ Type: filesandordirs; Name: "{app}\luaV2Gdecoder.dll"
Type: filesandordirs; Name: "{app}\X509CertInfos.dll"
Type: filesandordirs; Name: "{app}\plugins\v2gmsg_generic.lua"
Type: filesandordirs; Name: "{app}\plugins\v2gshared.lua"
Type: filesandordirs; Name: "{app}\plugins\v2gllc.lua"

[Code]
const
Expand Down Expand Up @@ -139,7 +140,7 @@ begin
ShellExec('', UninstallString, '/SILENT', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
if ResultCode <> 0 then
MsgBox('Failed to uninstall old version! Please uninstall the plugin manually before continuing.', mbError, MB_OK);
MsgBox('Failed to uninstall old version! Please uninstall the plugin manually before continuing.' + #13#10#13#10 + 'Note: This may happen if Wireshark has been updated automatically. In this case, simply continue with this installer.', mbError, MB_OK);
end;
function HasWriteAccessToApp: Boolean;
Expand Down Expand Up @@ -242,13 +243,24 @@ var
Lines: TArrayOfString;
i: Integer;
InstalledVersion: String;
ResultCode: Integer;
begin
// check for previously installed version
InstalledVersion := GetInstalledVersion;
if (InstalledVersion <> '') and (CompareStr(InstalledVersion, ExpandConstant('{#MinUpdateVersion}')) < 0) then
begin
MsgBox('To update the plugin, the previous version needs to be uninstalled. Will now start uninstaller!', mbInformation, MB_OK);
RunUninstaller;
ResultCode := MsgBox('To update the plugin, the previous version needs to be uninstalled. Should the uninstaller be started now?', mbInformation, MB_YESNOCANCEL);
case ResultCode of
IDYES:
begin
RunUninstaller;
end;
IDCANCEL:
begin
Result := False;
Exit;
end;
end;
end;
// check version of lua files
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ This Wireshark plugin allows to analyze and decode packets between electric vehi
- Validation of V2G messages according to XSD specification
- Certificate information details for Plug & Charge (PnC)
- Live TLS decryption <small>(requires secret disclosure)</small>
- LLC diagnostics via HomePlug AV packets for sniffer and debug packets
- Extended charging diagnostics via HomePlug AV packets for sniffer and debug packets
- support of dSPACE SCS diagnostic packets
- Automatic schema detection
- Detect schema automatically in case of missing SDP or SAP
- Color filter for V2G packets
Expand Down Expand Up @@ -73,6 +74,7 @@ Click on a packet in the graph to inspect it in the Wireshark main window. Press
- Linux
- No installer, see [Installation Notes](#installation-notes). Make sure you have read permissions for all files.
- dsV2Gshark profile (Filter buttons, color filters, I/O graph) must be added manually
- released libraries have been built with Ubuntu 22.04

## Support
- If you encounter any problems, feel free to open an issue or contact us at [email protected]
Expand All @@ -81,7 +83,7 @@ Click on a packet in the graph to inspect it in the Wireshark main window. Press
## Further notes
- When sniffing V2G communication, lost packets may occur, which cause corrupted TCP/TLS sessions. In that case, it may help to activate the option to ignore Message Authentication Code (MAC) check failures in the Wireshark TLS protocol settings.
This option can be found under Wireshark Preferences - Protocols - TLS
- This plugin was built with Wireshark 4.4.0 and 4.4.2
- This plugin was built with Wireshark 4.4.0 and 4.4.3
- The EXI decoding is based on [cbExiGen](https://github.com/EVerest/cbexigen)


Expand All @@ -102,5 +104,5 @@ Click on a packet in the graph to inspect it in the Wireshark main window. Press
![Plugin Preferences](Images/WS_Preferences.png)
### Wireshark I/O Graph
![I/O Graph](Images/IO_Graph.png)
### HomePlug AV LLC Diagnostics
### HomePlug AV Low-Level Communication Sniffer Dissection
![I/O Graph](Images/HPAV_LLC_AC.png)
8 changes: 4 additions & 4 deletions V2G_Libraries/v2gLib/main.rc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include <windows.h>

#define VER_FILEVERSION 1,4,3,0
#define VER_FILEVERSION_STR "1.4.3.0\0"
#define VER_FILEVERSION 1,5,0,0
#define VER_FILEVERSION_STR "1.5.0.0\0"
#define VER_COMPANYNAME_STR "dSPACE GmbH"
#define VER_PRODUCTNAME_STR "V2gLib"
#define VER_PRODUCTVERSION 1,4,3,0
#define VER_PRODUCTVERSION_STR "1.4.3.0\0"
#define VER_PRODUCTVERSION 1,5,0,0
#define VER_PRODUCTVERSION_STR "1.5.0.0\0"

VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
Expand Down
2 changes: 1 addition & 1 deletion Wireshark/plugins/v2gcommon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function v2gcommon.check_version(required_version)
end
end

v2gcommon.DS_V2GSHARK_VERSION = "1.4.3" -- DO NOT CHANGE
v2gcommon.DS_V2GSHARK_VERSION = "1.5.0" -- DO NOT CHANGE

-- extend path (where to load .lua files)
if not string.find(v2gcommon.get_plugins_file_path(), package.path) then
Expand Down
Loading

0 comments on commit 0914449

Please sign in to comment.