Skip to content

Guide: Quick start

This quick start guide will lead you to the initial setup of a Whitebeet. It will also show you how to setup FreeV2G in an Debian/RaspberryPi based environment using ethernet and SPI as host controller interface. Please follow allong to get started. If you are experience any issues, please have a look into the FAQ first. You can find solutions to the most common problems there. If you do not find a solution to you problem please contact us using the bug report template. Please fill in the issue template and keep the Guide: Creating log files in mind.

Use case: Ethernet

Setup Hardware

Connect your Whitebeet directly to an ethernet interface of your host system (e.g. PC), NO routers or switches in between.

WhiteBeet: Setup ethernet

Connect the UART port of your Whitebeet to a PC (please see the UART section in the Guide: Creating log files for more details).

Next, set the Whitebeet to use ethernet as host controller interface. Connect the Whitebeet pins like shown in the table below.

Whitebeet Whitebeet Carrier Board Level
PAD 85 (PC2) J4 PC2 GND
PAD 84 (PA4) J4 PA4 GND

Power up your Whitbeet by connection J12 or J14 to a powersource (e.g. external power supply, USB charger, USB port on your PC).

Setup FreeV2G

To use FreeV2G you need to install python3 and download the FreeV2G repository.

Windows

Please note: Although the environment can be set up in Windows, it is not officially supported at the moment.

Linux (Debian)

Preperation Debian and FreeV2G

Get the latest python3 installation from here or use the package manager of your distribution. On debian you can use apt-get.

  1. First install all nessecary linux packages

    sudo apt-get install git python3 python3-pip python3-venv libpcap-dev
    
  2. Open a new terminal window and navigate to the place where you have the FreeV2G repository installed.

    cd ~/dev/FreeV2G
    
  3. Create a virtual environment called .venv

    virtualenv .venv
    
  4. Activate the environment and install the required dependecies for FreeV2G

    source .venv/bin/activate
    (.venv) pip3 install -r requirements_eth.txt
    

Preperation Whitebeet

When everything is installed and setup correctly you can start FreeV2G. You need to provide the name of the interface, the MAC address of your Whitebeet and if it is EV or EVSE.

  1. get the MAC address, please refer to the knowledge base
  2. get the interface where the Whitebeet pluged in over ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> ...
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> ...
    ...
    6: eth-wb-evse: <BROADCAST,MULTICAST,UP,LOWER_UP> ....
    

The MAC address is printed on the Whitebeet itself. There are different MAC addresses in the Whitebeet, please refer to the knowledge base for more information. Thie example uses a eth-wb-evse with the MAC address c4:93:00:22:22:22 as an example.

Usage FreeV2G

Important: use .venv/bin/python3 for the python3 interpretor inside of the enviroment!

To start FreeV2G you need to run Application.py. To load a config file, use -c and the path to your configuration .json.

sudo .venv/bin/python3 Application.py eth -i eth-wb-evse -m c4:93:00:22:22:22 -r EVSE -c ./config_evse.json  # with config file

or use the default config

sudo .venv/bin/python3 Application.py eth -i eth-wb-evse -m c4:93:00:22:22:22 -r EVSE   # without config file

Use case: SPI (RaspberryPi example)

Note: This example uses a RaspberryPi as host system for the Whitebeet, but this guide also applies to other Linux based systems with userspace access to the spidev device. This setup was tested on a RaspberryPi 4 running Raspbian.

Setup Hardware

Connect the SPI interface of your Whitebeet to your host system. Please see the table below for pin assignments:

Signal Whitebeet Whitebeet Carrier Board Raspberry Pi 4 (name / wPi / BCM)
CLK PAD 24 (PD3) J8 SCK SPI0 SCLK / 14 / 11
MOSI PAD 36 (PB15) J8 MOSI SPI0 MOSI / 12 / 10
MISO PAD 35 (PB14) J8 MISO SPI0 MISO / 13 / 9
NSS PAD 77 (PB9) J8 NSS GPIO.5 / 5 / 24
RxReady PAD 37 (PD4) J1 PD4 GPIO.3 / 3 / 22
TxPending PAD 38 (PD11) J1 PD11 GPIO.2 / 2 / 27
UART RX PAD 75 RXD (near J11) TxD / 15 / 14
UART TX PAD 76 TXD (near J11) RxD / 16 / 15

Whitebeet: Setup SPI

Connect the UART port of your Whitebeet to a PC or the RaspberryPi (please see the UART section in the Guide: Creating log files for more details).

Next, set the Whitebeet to use SPI as host controller interface. Connect the Whitebeet pins like shown in the table below.

Whitebeet Whitebeet Carrier Board Level
PAD 85 (PC2) J4 PC2 3.3V
PAD 84 (PA4) J4 PA4 GND

Power up your Whitebeet by connection J12 or J14 to a powersource (e.g. external power supply, USB charger, USB port on your PC).

Setup FreeV2G

Get the latest python3 and git version from the package manager of your distribution. On RaspberryPi with raspbian you can use apt-get.

$ sudo apt-get install python3 git

Open a new terminal window and navigate to the place where you have the FreeV2G repository installed.

$ cd ~/dev/FreeV2G

Now you need to install the virtualenv package and create a virtual environment called .venv:

$ pip install virtualenv
$ virtualenv .venv

Activate the environment and install the dependecies:

$ source .venv/bin/activate
(.venv) $ pip install -r requirements_spi.txt

When everything is installed and setup correctly you can start FreeV2G. You need to provide the name of the SPI interface and if it is EV or EVSE.

The interface name can be obtained by using the ls command:

$ ls /dev/spi*
/dev/spidev0.0

Here it is /dev/spidev0.0 as an example.

This example uses a WB-EI. You need to run

.venv\Scripts\python3.exe Application.py spi -i "spidev0.0" -r EVSE