Iso15118InternetVas

This module provides ISO15118 internet value-added services (VAS).

Handwritten Documentation

Warning

This module and its helper scripts are examples and not intended for production use without modification. The provided vas-internet-setup.sh script is a starting point and may not cover all edge cases for your specific hardware and network environment. It is the user’s responsibility to ensure the configuration is secure and robust.

This module implements the ISO 15118-2 Value Added Service (VAS) for providing internet access to a connected electric vehicle (EV). When an EV requests this service, the module configures the charger’s networking to share its internet connection with the EV over the power line communication (PLC) interface.

How it works

  1. Service Announcement: The module advertises the availability of the Internet Access service (Service ID 3) to the EV, offering HTTP and/or HTTPS access based on the module’s configuration.

  2. Service Selection: If the EV selects this service, the module initiates the network setup once the EV is authorized, as the ISO 15118 stack only reports the selection then ([V2G2-774] for ISO 15118-2).

  3. Network Setup: The module executes a helper script, vas-internet-setup.sh, to configure all necessary networking components. The script’s behavior depends on the configuration and the services selected by the EV:

    • It enables IPv6 forwarding and sets up NAT using ip6tables.

    • If IPv4 support is enabled in the configuration, it also:

      • Starts a DHCPv4 server (udhcpd) on the EV-facing network interface (ev_interface). This DHCP server provides the EV with an IPv4 address and DNS server information.

      • Enables IPv4 forwarding and NAT using iptables.

    • It starts a Router Advertisement Daemon (radvd) on the ev_interface to enable the EV to configure an IPv6 address using SLAAC. This also includes advertising Recursive DNS Servers (RDNSS) for IPv6.

    • The module determines which ports to open based on the parameter sets (HTTP, HTTPS) selected by the EV. The EV may only reach public addresses via the modem_interface, with TCP on the selected ports (80 for HTTP, 443 for HTTPS) and DNS to the announced resolvers; everything else it sends through the charger is dropped. Private, link-local and multicast ranges and the on-link prefixes of the modem_interface at session start are always blocked; other backend networks reachable via the modem_interface with public addresses are added with EXTRA_BLOCKED_DESTINATIONS_V4 and EXTRA_BLOCKED_DESTINATIONS_V6 in /etc/default/vas-internet.

    • The example script uses public DNS servers (Google’s 8.8.8.8 for IPv4 and 2001:4860:4860::8888 for IPv6). They are set with DNS_SERVERS_V4 and DNS_SERVERS_V6 in /etc/default/vas-internet; DNS to them is forwarded even when they are on a blocked network.

  4. Session Teardown: When the charging session ends (signaled by the evse_manager), the module calls the same script to automatically tear down the network configuration, stopping the services, removing all forwarding and NAT rules and restoring the previous forwarding setting.

Requirements

Software

The module relies on the vas-internet-setup.sh script, which requires the following external tools to be available in the system’s PATH:

  • radvd: For IPv6 Router Advertisements.

  • ip6tables: For setting up IPv6 NAT and forwarding rules.

  • ip (from the iproute2 package): For network interface configuration.

  • iptables (optional, for IPv4): For IPv4 NAT and forwarding rules.

  • udhcpd (optional, for IPv4): For the DHCPv4 server (typically provided by BusyBox).

The EVerest framework must be run with sufficient privileges to allow these tools to modify network settings. This typically means running as the root user.

Hardware

  • A working internet connection on the charging station.

  • A network interface that is connected to the internet (e.g., eth0, wwan0).

  • A network interface for the Power Line Communication (PLC) modem that communicates with the EV (e.g., a HomePlug Green PHY modem connected via Ethernet).

Configuration

Key

Description

ev_interface

The name of the network interface connected to the EV via the PLC modem.

modem_interface

The name of the network interface connected to the internet.

http_support

(boolean) Whether to announce support for HTTP (Port 80). Defaults to true.

https_support

(boolean) Whether to announce support for HTTPS (Port 443). Defaults to true.

Example Configuration

- module: Iso15118InternetVas
  config:
    ev_interface: eth1
    modem_interface: eth0
    http_support: true
    https_support: true

Provided Interfaces

  • iso15118_vas: Implements the ISO15118_vas interface to handle service discovery and selection from the EV.

Required Interfaces

  • evse_manager: The module optionally connects to an evse_manager to monitor the charging session. When the session finishes, it triggers the teardown of the internet connection for the EV.

Auto-Generated Reference

Module Configuration

ev_interface: string <required>
Name of the interface which is connected to the EV.
modem_interface: string <required>
Name of the interface which is connected to the internet.
http_support: boolean <required>
Boolean dictating whether we should let the EV know we support HTTP
https_support: boolean <required>
Boolean dictating whether we should let the EV know we support HTTPS
vas_setup_script: string <optional>
default: “vas-internet-setup.sh”
Filepath of the script, which is executed to setup the VaS network. A relative filepath is appended to the module directory: /usr/libexec/everest/modules/Iso15118InternetVas/. That means in the default case, it expands to: /usr/libexec/everest/modules/Iso15118InternetVas/vas-internet-setup.sh. An absolute filepath is directly executed.

Provides

iso15118_vas: ISO15118_vas
The internet VAS

Requirements

evse_manager: evse_manager 0..1

Metadata

Authors

Martin Litre, Pionix GmbH

License