Skip to main content Link Menu Expand (external link) Document Search Copy Copied

[datasource]

The datasource section is used to configure the source(s) from which all data to be displayed will be taken from. There are numerous different datasources including secondary serial, canbus, serial and canbus combined, and TunerStudio USB.

For additional instructions on configuring datasource=tsusbserial Jump to the end of this page

Settings

Setting Type Explanation
datasource string Valid values “serial”, “playback”, “tsusbserial” plus other values As specified in the Canbus section. Identifies the source of the data to be displayed.
datasource=serial will expect a Speeduino ECU to be connected to the serial port for live data.
datasource=playback will play back data from a previously recorded log file.
datasource=tsusbserial will expect a Speeduino ECU to be connected to the USB port for live data. This enables the USB connection that is normally used for tuning to be used as the data source for your dashboard. Note that you must be using a genuine arduino or an STM32 for this to work, and if using an Arduino you must have reset control enabled to prevent the engine from stalling whenever SDC connects to the USB port. Any other processor that presents as a CDC(ACM) device should also work although nothing else has been tested at this time (Teensy not tested for example, although a quick google search suggests it ought to work. If you try it, let me know!).
usbserialname string This entry specifies the string to search for when determining which usb serial device to connect to in order to get data, when datasource=tsusbserial is set (see above). The serial device string can be found in the log file if you are not sure what it is, under the “Product” entry which is part of the serial enumeration process. This string is a search string based on a ‘starts with’ search, so for example the product string of “BLACK_F407VE CDC in FS Mode” will be matched by the entry usbserialname=BLACK_F407. This example is what is required to connect to the primary tunerstudio usb serial port on many STM 32 development boards.
playbackfile string Path and filename of a file to play back data from. This is only really intended for testing and demonstration purposes. The file name should be specified as a full path, with C: being the drive that the SD card is inserted in. Example: playbackfile=c:\playbackfiles\playback1.log
rebroadcastattributes String Comma separated list of attributes to be rebroadcast when the datasource is configured for one of the canbus rebroadcast modes. If set, this configuration replaces the default rebroadcast set that are defined within the binary. If you just want to add to the default set, then use ‘extrarebroadcastattributes’ below. See the Canbus Section for further information
extrarebroadcastattributes String Comma separated list of attributes to be added on top of either the default set or the set defined by rebroadcastattributes. See the Canbus Section for further information
secondaryecuenabled Integer 1 or 0 Indicates whether secondary ECU support is enabled. This option can only be enabled in cetain limited circumstances. See the Secondary ECU section for further details

Datasource specific extra configuration details

tsusbserial

This datasource requires a speeduino.ini file to be present in order for SDC to understand the format of the messages that are coming from your Speeduino device. This file is specific to the version of Speeduino firmware that you are running. You will have selected it within Tunerstudio when creating your tune but if you do not have the file then it can be downloaded from the Speeduino github in the relases section. Be sure to pick the release version that matches what you have installed otherwise the extracted data may be incorrect. In the assets of the release, download the source code and extract it. The speeduino.ini file can be found in the reference folder.

Copy the speeduino.ini file to the root folder of the SD card that contains SDC. To do this you will need to remove the SD card from the device and put it in your computer’s SD card slot, as there is no remote upload procedure for this at present.

In addition to copying this file over, you must make sure that the usbserialname entry is populated. See the details on the usbserialname entry in the table above. In order to determine the correct name, boot the device and use SDC Tools to connect to it and open the application log, and look for the following sequence of messages:

[Log] : 30-12-99 00:01:17: TSInterface: Enumerating serial devices
[Log] : 30-12-99 00:01:17: Serial device enum [Serial1] [USB CDC ACM Serial] 018C0124 Product BLACK_F407VE CDC in FS Mode

Note that these messages will only appear after you have configured datasource=tsusbserial and rebooted the device.

The part of the message following the word “Product” in the second line is the value to use for the usbserialname value. As this value uses a ‘starts with’ comparison, you could enter usberserial=BLACK_ to select it.

Boot the Raspberry Pi with the SD card reinserted and SDC will read the tune file during initialisation and connect to the speeduino by USB when it is plugged in.