Skip to content

Commit

Permalink
support multiple lua versions, merged v2g libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
TGruett committed Aug 30, 2024
1 parent 34bd4e9 commit a420092
Show file tree
Hide file tree
Showing 51 changed files with 5,472 additions and 909 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,28 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Dependencies
run: choco install wireshark
- name: Install Wireshark 4.2.6
run: |
choco install wireshark --version=4.2.6 -y
- name: Build v2gLibs for Wireshark 4.2.6
shell: cmd
working-directory: ./V2G_Libraries
run: |
build_for_ws.bat "C:\Program Files\Wireshark"
- name: Install Wireshark latest
run: |
choco uninstall wireshark -y
choco install wireshark -y
- name: Build v2gLibs for Wireshark latest
shell: cmd
working-directory: ./V2G_Libraries
run: |
build_for_ws.bat "C:\Program Files\Wireshark"
- name: Build All
- name: Build Installer
run: Build_Installer.bat
shell: cmd
working-directory: ./Installer
Expand All @@ -29,8 +47,7 @@ jobs:
- name: Prepare Artifact Directory
run: |
mkdir artifact_dir
cp ./V2G_Libraries/CertificateInfos/bin/* ./artifact_dir/
cp ./V2G_Libraries/V2GDecoder/bin/* ./artifact_dir/
cp ./V2G_Libraries/v2gLib/bin/* ./artifact_dir/
mkdir artifact_dir/plugins
cp ./Wireshark/plugins/* ./artifact_dir/plugins/
cp ./LICENSE ./artifact_dir/dsV2Gshark_LICENSE.txt
Expand All @@ -56,8 +73,7 @@ jobs:
- name: Prepare Artifact Directory
run: |
mkdir artifact_dir
cp ./V2G_Libraries/CertificateInfos/bin/* ./artifact_dir/
cp ./V2G_Libraries/V2GDecoder/bin/* ./artifact_dir/
cp ./V2G_Libraries/v2gLib/bin/* ./artifact_dir/
mkdir artifact_dir/plugins
cp ./Wireshark/plugins/* ./artifact_dir/plugins/
cp ./LICENSE ./artifact_dir/dsV2Gshark_LICENSE.txt
Expand Down
39 changes: 19 additions & 20 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"tasks": [
{
"label": "Build All",
"dependsOn": ["Build v2gLib (single)", "Build Installer"],
"dependsOrder": "sequence"
},
{
"label": "Build Installer",
"detail": "",
"type": "shell",
"command": "./Build_Installer.bat",
Expand All @@ -12,6 +17,17 @@
"kind": "build",
},
},
{
"label": "Build v2gLib (single)",
"detail": "",
"type": "shell",
"command": "./build_for_ws.bat \"C:\\Program Files\\Wireshark\"",
"problemMatcher": [],
"options": {
"cwd": "V2G_Libraries",
"kind": "build",
},
},
{
"label": "Update Version (interactive)",
"detail": "",
Expand All @@ -34,7 +50,7 @@
},
},
{
"label": "WSL: Build Linux",
"label": "WSL: Build for Linux",
"detail": "",
"type": "shell",
"command": "wsl sh ./build_all_linux.sh",
Expand All @@ -45,30 +61,13 @@
},
},
{
"label": "Clean All",
"dependsOn": ["Clean Decoder", "Clean CertInfos"],
"group": {
"isDefault": true
}
},
{
"label": "Clean Decoder",
"detail": "",
"type": "shell",
"command": "make",
"args": ["clean"],
"options": {
"cwd": "V2G_Libraries/V2GDecoder",
},
},
{
"label": "Clean CertInfos",
"label": "Clean v2gLib",
"detail": "",
"type": "shell",
"command": "make",
"args": ["clean"],
"options": {
"cwd": "V2G_Libraries/CertificateInfos",
"cwd": "V2G_Libraries/v2gLib",
},
},
{
Expand Down
11 changes: 4 additions & 7 deletions Installer/Build_Installer.bat
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
:: Script to build DLLs and create Installer. Should be run in MinGW Bash (e.g. git-bash)
:: Script to create the installer. Make sure the v2gLib is built before.
:: Should be run in MinGW Bash (e.g. git-bash)
:: note: Inno Setup must be installed and added to Path

@echo off
:: create DLLs
:: copy v2gLib binaries
cd "%~dp0../V2G_Libraries/"
call build_all_win.bat
if %ERRORLEVEL% NEQ 0 goto :failed
copy "CertificateInfos\bin\v2gX509CertInfos.dll" "%~dp0..\Wireshark\"
if %ERRORLEVEL% NEQ 0 goto :failed
copy "V2GDecoder\bin\v2gLuaDecoder.dll" "%~dp0..\Wireshark\"
copy "v2gLib\bin\v2gLib*.dll" "%~dp0..\Wireshark\"
if %ERRORLEVEL% NEQ 0 goto :failed

:: prepare installer readme
Expand Down
4 changes: 3 additions & 1 deletion 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.1"
#define AppVer "1.4.2"
#define AppId "dsV2Gshark"

[Setup]
Expand Down Expand Up @@ -63,6 +63,8 @@ Source: "..\OSSAcknowledgements.txt"; DestDir: "{app}"; DestName: "dsV2Gshark_OS
Source: "dsV2Gshark_README.txt"; DestDir: "{app}"; DestName: "dsV2Gshark_README.txt"; Flags: ignoreversion;

[InstallDelete]
Type: filesandordirs; Name: "{app}\v2gLuaDecoder.dll"
Type: filesandordirs; Name: "{app}\v2gX509CertInfos.dll"
Type: filesandordirs; Name: "{app}\luaV2Gdecoder.dll"
Type: filesandordirs; Name: "{app}\X509CertInfos.dll"
Type: filesandordirs; Name: "{app}\plugins\v2gmsg_generic.lua"
Expand Down
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
[![Release](https://img.shields.io/github/v/release/dspace-group/dsV2Gshark?label=release)](https://github.com/dspace-group/dsV2Gshark/releases)
[![dSPACE](https://img.shields.io/badge/-OpenSource%20powered%20by%20dSPACE-blue)](https://www.dspace.com/)

## ❗Wireshark 4.4+ requires dsV2Gshark 1.4.2 or higher❗

## Overview
This Wireshark plugin allows to analyze and decode packets between electric vehicles (EV) and charging stations (EVSE), also known as V2G messages.

Expand Down Expand Up @@ -65,13 +67,6 @@ Click on a packet in the graph to inspect it in the Wireshark main window. Press
- No installer, see [Installation Notes](#installation-notes). Make sure you have read permissions for all files.
- Filter buttons and color filters must be added manually
- I/O graph must be configured manually
- The libraries you find in [GitHub Releases](https://github.com/dspace-group/dsV2Gshark/) are built for Lua 5.2. However, some Linux distributions (e.g. Fedora 39 and below) still use Lua 5.1. In that case, you will need to built the libaries yourself using the following commands:
```
export LUAFLAGS="-I$(pkg-config --variable=includedir lua51)"
cd V2G_Libraries
./build_all_linux.sh
```
The built libraries can then be found in `V2G_Libraries\CertificateInfos\bin` and `V2G_Libraries\V2GDecoder\bin`.

## Support
- If you encounter any problems, feel free to open an issue or contact us at [email protected]
Expand All @@ -80,7 +75,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 and tested with Wireshark 4.2.5
- This plugin was built and tested with Wireshark 4.4.0 and 4.2.6
- The EXI decoding is based on [cbExiGen](https://github.com/EVerest/cbexigen)


Expand Down
4 changes: 0 additions & 4 deletions V2G_Libraries/CertificateInfos/.gitignore

This file was deleted.

28 changes: 0 additions & 28 deletions V2G_Libraries/CertificateInfos/main.rc

This file was deleted.

42 changes: 0 additions & 42 deletions V2G_Libraries/CertificateInfos/makefile

This file was deleted.

39 changes: 0 additions & 39 deletions V2G_Libraries/CertificateInfos/makefile_linux

This file was deleted.

72 changes: 0 additions & 72 deletions V2G_Libraries/CertificateInfos/src/LuaLib_Cert.cpp

This file was deleted.

1 change: 1 addition & 0 deletions V2G_Libraries/Third_Party/lua/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Lua headers taken from https://www.lua.org/source/
6 changes: 0 additions & 6 deletions V2G_Libraries/Third_Party/lua/lua-5.2.4/LICENSE

This file was deleted.

Loading

0 comments on commit a420092

Please sign in to comment.