Infotainment System - Technical Overview

Architecture

The core of the Infotainment system is written in Node.js. It establishes an Express web server, then uses Socket.IO to manage connections to different control and/or display surfaces. Because display, audio and control surfaces are coded as web pages served up by the Express server, the Infotainment system creates a device-agnostic ecosystem, where any number of devices on any combination of platforms can participate (assuming they support a semi-modern browser).

In general, the Infotainment System can be logically broken down into three parts: the host script, the audio handler(s), and skins (display/input pages).

Host script

The host script operates as the beating heart of the Infotainment system. It manages the services for the display/input interface pages, listens to variable stream information from a miniSim, coordinates interface input, and broadcasts system state data back to the miniSim.
For it's real time interface to a miniSim, the Infotainment system leverages the Route Table to supply miniSim variable data streams (speed, position, ...) as well as write it's own back to the miniSim's shared memory.

Audio handler(s)

By default, a single audio page (infotainment_audio.htm) is included. This page can handle 3 channels of stereo playback:
  • Media playback
  • Alert (temporarily mutes media playback on play)
  • Notify
Media playback handles the general audio playback for the media store (defined in the infotainment_config.txt file) and "radio" media streams.
The alert channel is meant for driver alerts. Playback from this channel automatically lowers the volume of the media playback channel while alerts are in progress.
The notify channel is used primarily for audio cues within the vehicle. Its playback does not alter the other two channels' volume.

Skins


Individual web pages serve up visual interfaces/control surfaces, depending on the desired output. This includes (but is by no means limited to):
  • Standard OEM-like infotainment interfaces
  • Reconfigurable instrument cluster displays
  • General touch and/or voice interfaces
  • Head-up displays (HUDs)
  • "Alert" devices
By default, the Infotainment System includes an interface for an approximation of the Toyota Entune center stack system (main infotainment and researcher "mirror").
Infotainment Skins

Configuration

Editing Albums/Streaming Options

Albums/Streaming options are configured by editing the contents of the directory defined by the BASE_MP3_JUKEBOX_STORE variable in the infotainment_config.txt file:

var BASE_MP3_JUKEBOX_STORE = 'C:/NADS/infotainment_MP3';

In that directory, all directories are treated as "albums", organized in alphabetical order. "Album" directories should be labeled as "ARTIST - ALBUM_NAME", substituting ARTIST for the artist's name, and the album name for ALBUM_NAME.

Each "album" directory should contain:

  • A group of MP3 files (these will serve as the album tracks)
  • A single image JPG. This is treated as the album cover graphic. The filename can be anything.
  • "favorite.fav" (Optional) (This file is used as a marker for albums that would appear in a skin's "Favorites" listing.)

These files are sorted alphabetically. In general, album track files here should have a naming convention like the following:

TRACK_NUMBER - TRACK_NAME.mp3

...where TRACK_NUMBER is a number representing the track order, and TRACK_NAME is the track name. Note: for albums with more than 9 tracks, you will want to zerofill your TRACK_NUMBERs (ie, "01 - Can't Stand It.mp3", "02 - She's a Jar.mp3"... )

The infotainment server must be restarted after modifying the album store for the changes to take effect.

Editing Phone Call History and Contact List

Text message selections are defined in the phone_config.csv file located in the infotainment installation directory. The object is organized as follows:

// Infotainment - Phone app configuration
//
// CALL_HISTORY
// Defines a predefined call history menu (#CALL_HISTORY_container contents) in the order defined below
// (Maximum 100 entries)
Michael K., 45 min ago
Shelby F., 1 hour ago
Julia W., Yesterday
Erika M., 4 days ago
 
...
 
// CONTACTS
// Defines call history menu (#CALL_CONTACTS_container contents) in the order defined below
// (Maximum 100 entries)
Aaron G.
Alec L.
Ashley B.
...

The // CALL_HISTORY and // CONTACTS lines are required to delineate between the two groups. A Call History line is the CONTACT_NAME,TIME_OF_CALL (note the separating comma). Both are treated as string values, so can either be a number (319-123-3345) or a text value , as long as that text value doesn't include a comma.

Contacts lines are simpler, only containing one value (CONTACT_NAME). Again, this can be any value, as long as it doesn't include commas.

The infotainment server must be restarted after modifying the phone app configuration for the changes to take effect.


Editing Text Messages

Text message selections are defined in the messages_config.json file located in the infotainment installation directory. The JSON object is organized as follows:

{
    "messaging_history" : {
        "entry_list" : [{
            "message_date" : "32 min ago",
            "contact_name" : "Ashley",
            "contact_number" : "3035559999",
            "message" : "What time will you be done with work today?"
        },
        {
            "message_date" : "2 hours ago",
            "contact_name" : "Sarah",
            "contact_number" : "3035559999",
            "message" : "Thank you for sending me those notes!"
        }, ...
}

The infotainment server must be restarted after modifying the list of text messages for the changes to take effect.



Input

Touch

The main user interface(s) can register touch position and button presses on any given configured skin. These interactions are logged into the AUX_Info_Cursor and AUX_Info_Button cells respectively.

By default, single touches are recorded automatically.

New buttons can be configured by adding HTML elements with a class of "button" (generally visually reactive buttons) or "buttonI" ("invisible" buttons) while having a unique button ID data element (ie, data-bid="4032").

UDP

The infotainment system has the ability to listen for a network stream on a user-defined UDP port(s) defined in the infotainment_config.txt file, and fed by the miniSim's route rable. By default, this is a single port on a given network interface, defined by the CAB_HOST_IP and RT_PORT_INCOMING variables.

// Local IP address of the infotainment server
var CAB_HOST_IP = '192.168.0.105';
...
var RT_PORT_INCOMING = 8901;

In the above example code snippet (from the config file), the incoming UDP control port is configured to listen on port 8901 (default) on the interface using the IP address 192.168.0.105.

The RT (realtime) stream assumes the following packet configuration:

Cell name Length, type Description Default value
SimFrame 1 int The current simulation frame
SCC_Info_Screen 2 shorts The screen/menu/pane ID of the interface to be highlighted/engaged on a given skin/interface, and a requested state ID of that screen/menu/pane 0,0 (no effect, default state)
CFS_TRANS_Igntn 1 int Ignition state of the vehicle 0


For advanced miniSim use, a second route is also used to supply vehicle state and positioning information. The required configuration variables are as follows:

// ... port of miniSim auxiliary UDP packets
var RT_MS_PORT_INCOMING = 8035;
var RT_MS_PORT_OUTGOING = 8036;
var RT_MS_IP = '192.168.0.105';

Other

Although touch and network streams are the main input components of the core infotainment system, it can be extended to offer other inputs such as gesture and /or voice control.

Please contact us if you have any questions about extending the infotainment system for other forms of input.


Output

UDP

If enabled, the host script outputs a UDP stream to an IP and port defined in the infotainment_config.txt file in the root directory of the Infotainment System install.

var RT_STREAM_ENABLED = true;
var RT_HOST_IP = '192.168.0.200';
var RT_PORT_OUTGOING = 8902;

In the above example code snippet (from the config file), the outgoing data stream is configured to broadcast to the device at IP address 192.168.0.200 on port 8902 (default).

By default, four variables are shared from the infotainment system and fed back into the miniSim's shared memory:

Cell name Length, type Description Default value
AUX_Info_Screen 1 short The screen ID of the current active screen/menu of an attached page/skin 0
AUX_Info_Button 1 short The button ID of the last button pushed on an attached page/skin 0
AUX_Info_Cursor 2 shorts The relative X,Y position of a detected touch event on an attached page/skin. When no touch is detected, these two values default to -9999, -9999 -9999, -9999
AUX_MID_Screen 1 short If using an attached multi-information display (MID), this variable returns the given "screen ID" of the MID. -1

Note: For a miniSim to be able to read/record these cells, they must be defined in three places: the miniSim CEC definition file, the route table, and the miniSim collect file.