ICS Setup
Once all prerequisites have been satisfied, you can set up the Intermediate Computing Subsystem (ICS). This document covers the process for setting up the Data Aggregator and Server (DAS) API, and associated components on a Raspberry Pi 5.
Raspberry Pi Setup
- Image the USB mass storage device with the Ubuntu Server 24.04 installation media.
- Visit Raspberry Pi's official Imager documentation for additional information on this process.
- Connect the Raspberry Pi to power, a keyboard, and an external display.
- Insert the microSD Card into the Raspberry Pi.
- Connect the USB mass storage device to the Raspberry Pi.
- Run the OS installation.
- Visit Canonical's official installation tutorial for additional information on this process.
After the base OS installation is completed, additional software is required in order to run the ICS subsystem.
Additional Software Setup
-
Install Python 3.12
- Visit the Python Foundation's official Beginner's Guide for additional information on this process.
-
Configure Python 3.12
- A virtual environment will be required. Visit the Python 3.12 documentation for additional information.
-
Install Apache
- Visit Canonical's official Apache installation tutorial for additional information on this process.
-
Configure Apache
-
Visit Canonical's official manpage on Apache for additional information on this process.
-
The following configuration must be applied and enabled:
<VirtualHost *:80>ProxyPreserveHost OnProxyPass / http://127.0.0.1:3000/ProxyPassReverse / http://127.0.0.1:3000/ErrorLog ${APACHE_LOG_DIR}/error.logCustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost><Proxy />Require host localhostRequire ip 127.0.0.1Require ip 192.168.2Require ip 192.168.3</Proxy>
-
-
Configure Git
- Not required, if the source code is fetched directly from the repository.
- Visit GitHub's official Git Basics documentation for more information on this process.
DAS API Deployment
-
Verify that the Raspberry Pi is connected to the Internet via an ethernet connection. This will allow direct access to the Raspberry Pi after the WiFi configuration is changed.
-
Either through direct access or over a remote interface (i.e. SSH, VNC, etc.), clone the DashAR repository onto the device.
-
Navigate to DashAR/Source/Miscellaneous
-
Run the Bash shell script entitled "Setup-DashAR.sh". This will:
- Set up the necessary directories and populate them.
- Establish an ad-hoc network connection, by configuring the Wi-Fi to be an access point (AP). This is how the Augmented Reality Subsystem (ARS) connects to the ICS.
-
Schedule the Bash shell script "Start-DashAR.sh" to run at every reboot of the device.
-
It is recommended to utilize crontab for this, as cron is built into most common Linux distributions.
-
If using crontab, use this configuration as a template:
# Add this to the bottom of your crontab file.# To edit, use "crontab -e".@reboot [Replace this with the path to the DashAR Project]/Source/Miscellaneous/Start-DashAR.sh
-
-
Active the Python virtual environment.
-
Install all Python requirements.
-
A requirements.txt is included in the source, in the Miscellaneous directory:
# Not required, but useful for testing, as this package can emulate the ELM327 adapter.# Usage: python -m elm -s carELM327-emulator==3.0.3pyserial==3.5# The following modules are specifically for das_service.py and files in das_core.obd==0.7.2 # Enables OBDII access.tornado==6.4.1 # The HTTP server for the app.pythongping==1.1.4 # Not used, but reserved for future use, especially with Extensions.lockfile==0.12.2Pint==0.20.1python-daemon==3.1.2PyYAML==6.0.2
-
Wi-Fi setup
Before the DashAR system can be used, it is important to verify the Raspberry Pi’s IPv4 address, so the ARS will function correctly.
- Using a secondary, Wi-Fi enabled device, connect to the SSID emitted by the Raspberry Pi, named “DashAR-Network”.
- The default password is “ConnectToDashAR”.
- Once connected, check the assigned gateway’s IPv4 address (i.e. the Raspberry Pi's assigned IPv4 address).
- The subnet mask applied, by default, is 255.255.255.0.
- Most likely, the gateway IPv4 address will be 192.168.3.1.
- Once the server’s IPv4 address is retrieved, remember it when building and configuring the ARS.
- It is planned for a future release of the DashAR system to have autoconfigure functionality once the ARS connects to the network and the app is opened.
Final Touches
- Connect the OBDII-to-USB interface device to the Raspberry Pi.
- Run the command
ls /dev/ttyUSB*. This will be the access path for the OBDII interface. - Edit the config.json file in the DAS data directory, updating the key “OBDII_ELM327_DEVICE_PATH” with the device path retrieved.
- The path most likely will be /dev/ttyUSB0 or /dev/ttyUSB1.
With the ICS now configured, this portion of the DashAR System is now ready for use!