[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. 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
delayaftertsconnect Integer Specifies the time in milliseconds to wait after connecting to TunerStudio before sending the first data request. Default is 1000ms. This setting should not be changed unless you have been advised to do so by SDC development.
usbserialmanufacturer String Default value is ATMEL (this signifies a genuine arduino board instead of stm32 or similar). Note that USBSerial on clone boards is not supported so there is no equivalent for boarsd that use other USBSerial chips such as the 340g. This does not apply to devices that have onboard USBSerial support such as STM32 or Teensy.
usbserialidproduct String, 4 digits hexadecimal Defines a specific USB Product ID that should be selected for the USB Serial connection. Use this if you have multiple USB Serial devices connected and the automatic selection does not choose the correct one. You must specify both vendor and product IDs for this matching to be performed. To get the IDs, look in the SDC device log or plug the device into a desktop computer.
usbserialidvendor String, 4 digits hexadecimal. Defines a specific USB Vendor ID that should be selected for the USB Serial connection when the datasource is set to tsusbserial Use this if you have multiple USB Serial devices connected and the automatic selection does not choose the correct one. You must specify both vendor and product IDs for this matching to be performed. To get the IDs, look in the SDC device log or plug the device into a desktop computer.

Datasource specific extra configuration details

tsusbserial

Non-genuine arduino boards (clones) which use an ATMEL CPU but something like a CH340g USB Serial chip for communications DO NOT SUPPORT 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. Note that if the product id is unreadable, then you can remove this entry entirely and SDC will use the first USBSerial device it sees. If you have more than one USBSerial device connected then it may not select the right device. Selection by product id and vendor id to mitigate this will appear in a future release.

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.

tsusbserial and genuine Arduino boards

For Genuine Arduino boards, you should ensure the following settings are present in the [datasource] section:

usbserialmanufacturer=ATMEL
delayaftertsconnect=1000

This will ensure that the connection speed is as quick as possible. Note that it may take up to 5 seconds to achieve a connection, depending upon which version of Speeduino firmware you are using. Generally speaking, using USBSerial is a slower way to establish the connection than using a direct secondary serial connection or a canbus connection and a rebroadcast from another device connected using secondary serial, both of which are essentially instantaneous.