RaceCapture Dashboard Tablet Automation

Guide to Automating your RaceCapture Dashboard Tablets (and phones)

For Android devices only currently. Verified on Nvidia Shield K1 and Samsung Galaxy Tab A 10.1 tablets, but theoretically possibly any on Android tablets as long as rooting of the device is possible.

Written by John Freund (https://www.facebook.com/john.freund.209)

https://www.facebook.com/johnfreundracing/

Dashboard Automation - Example Dash.JPG

What's this about?

Many RaceCapture owners use phones and tablets as display devices in their vehicles. I use them in my own race car. As displays they're great, but there are definitely some challenges:

  • Have to turn on the screen every time I want to start using them which can be as simple as a home button press but often an unlock process.
  • Have to make sure Bluetooth or Wifi is enabled AND has connected successfully to the RaceCapture device
  • Have to open the RaceCapture App
  • Have to manage the power of the devices, to make sure there's enough power and that they don't run out between sessions/races or even during one.
  • Have to do all this AFTER the vehicle is running so the RaceCapture device is powered
  • Often we're scrambling to prep other things like getting our safety gear on, steering wheels into place, etc.
  • Touch screens aren't so easy to operate with safety gear on like racing gloves


We typically have to deal with the above every time we go out on track, and with every single device. Arguably manageable with one, but what if you have multiple? Time is critical moments before going out and saving every little bit gives you time to focus on the race ahead.

This page is for walking you through automating as much as possible the use of tablet/phone devices for use as RaceCapture dashboards.

Revision History

2020-06-09 Updated Tasker settings to include killing of RaceCapture app during shutoff. This was necessary because later versions of the app keep the screen on even when in the background.


Demonstration Video: (warning, it's pretty long!)

{{#evu:https://www.youtube.com/watch?v=ul9FW9I9Exs}}

What do I get after doing everything here?

Glad you asked! Here's the end result of following this guide:

* Start your car and your dashboards start working automatically. When the vehicle power is enabled your devices will within a few seconds automatically turn on their displays, start RaceCapture, and display their configured dashboards (i.e. you're ready to go!)

* You won't really have to worry about how much charge your devices have. Devices should be charged at least a little (say 10%) before the start of the day, but otherwise you will not have to worry about power during the day as the devices will either be charging while driving or massively conserving power when not. Fully charged devices should be able to sit without charging for up to 30 days (this is how long my Nvidia Shield K1 lasts with the tweaks below. My Samsung Tab A 10.1 can last about 100 days on a full charge!).

Automation Guide

Hardwiring Power For Your Devices

The automation in this guide assumes there is a switched USB power source for each device in the vehicle. This is used as a signal to the devices for all automation actions. While it's not critical that you provide hardwired power for your devices to use them as dashboards (you'll really need to the monitor their power levels), you'll have to manually trigger different behaviors like coming out of sleep, disabling airplane mode, and other things, and this guide will not cover such scenarios and you'll need to be a bit creative.

In order to minimize how much we have to worry about the charge in your devices it's a great idea to add some hardwired power lines in your car. This provides charging power while operating your vehicle which all but guarantees they won't die on you mid-session, but also means you likely won't have to take your devices out of your vehicle and charge them between sessions. Also it covers a worst case scenario where your devices aren't charged for an event as you can just turn on your vehicle's ACC and charge your devices for a short time before going out.

Most, if not all, tablets and phones take some form of USB input for a power supply. These are DC devices but the operating voltage varies (5V for most, but USB-C can be as high as 20V). As such you need some sort of electrical converter to take your vehicle's operating voltage and step it to the voltage required by your device.

DC 12V to 5V Micro USB Converter

Good news! Ebay has tons of options for such converters. My devices are all Micro-USB devices and take 5V inputs. My car has an operating voltage from around 12-14.5V (typically referred to as a 12V system, as that's the minimum operating voltage for the electronics). I went to ebay and searched with these keywords: "DC Converter 12V to 5V Micro USB" and this pulled up many great options. I opted for one like the below picture with a 90-degree connector so that the micro-usb cable routed more nicely with my dashboards.

Now I am going to assume if you have a RaceCapture, you don't really need much guidance as far as wiring devices into your vehicle. Keep in mind though to make sure wherever you draw your power for the converter that it is:

  • Fused appropriately (suggest the maximum current rating of your converter)
  • Is connected to a switched source (so you're not draining your vehicle's battery if you forget one of your devices in your vehicle).


Setting up your Android Device

1. Rooting your device This is probably the hardest part and absolutely required as subsequent software is dependent on this. The processes vary between most devices, and can be fairly easy to tricky. Don't be scared though! Once you get past this it's smooth sailing!

With that said I then must add this guide can't really walk you through specifically how to root your device (unless you have a Samsung Galaxy Tab A 10.1 as I documented it while creating this page), since the procedures do vary. However, very intelligent and giving folks out there have figured out how to root just about every single Android device and documented how somewhere on the web. So you need to find a guide for doing this. Here are some tips:

* Search the web for the words "root", your phone model, and "xda-developers". You can find your phone's model number under Settings->About. The last key word is a forum where lots of rooting discussion takes place and is a great place to look for clear guides (though be warned, not all are perfect so make sure if you find a thread on rooting your phone you read the ENTIRE thread before starting!). However if you don't find what you're looking for there, remove that keyword and expand your search as that can uncover other pages.

* Enable Developer Mode and then the "OEM Unlock" option. Pretty much every root procedure requires this to start, even though some guides can forget to mention it. To enable Developer Mode, in your device go Settings->About, and then tap "Build number" repeatedly until you see a message on your screen that tells you Developer Mode is enabled. Now a new menu Settings->Developer Mode will appear, and within there is an option for "OEM Unlock" which you will need to enable.

* Disable Factory Reset Protection. This is critical as after parts of the rooting process your system can detect firmware tampering and reset itself. This is automatically enabled whenever you add a Google account, or some other account, that provides backup services. To disable it go to Settings->Accounts (I've seen it as "Clouds and Accounts" as well) and simply remove any accounts you've added. Don't worry, you can add them back later (you'll need to in order to download apps from the Google Play store).

* Samsung Galaxy Tab A 10.1 Root Guide: On this page https://forum.xda-developers.com/galaxy-tab-a/how-to/root-t3674409 in the opening post's DOWNLOADS section download the files for the OS version and your model number (Setting->About to see this), and uncompress. Make sure you have the USB drivers installed which can be found here for Windows http://developer.samsung.com/galaxy/others/android-usb-driver-for-windows. You must have the above steps done, after which you will put your tablet into Odin mode by first powering completely off, then when off holding the Home, Volume Down, and Power buttons all at once until a screen prompt comes up warning you about some... stuff. Release the buttons then press Volume Up to bypass the warning, in which point you're now in Odin download mode (this might not be the exact name, I forget). Plug your tablet into your USB cable and your PC. Now from the first archive run the odin executable and make sure in the upper left a COM port is listed in blue (if it's all grey something's wrong, either you're not in Odin mode, the USB drivers aren't working, or perhaps your USB cable's not plugged in or broken). Click the AP button, find/select the tar.md5 also from this archive, then click Start. This will root your device, installing SuperSU. The process will show lots of text and eventually reboot your device. After rebooted you can go about adding back your Google account so you can download apps from the Play Store and then proceeding with this guide.

2. Additional Root access. The app "SuperSU' that provides you root access has changed over the years and due to some changes the apps we're going to be using for automation can "think" your system isn't rooted. We need to trick them so they work properly. In order to do so we need to do some things:

* Download and install USB drivers for your device. Chances are for the rooting process you've already done this on your PC/laptop. If somehow you didn't, you'll need to do so for your particular OS. You should be able to web search for keywords including "USB drivers" and your phone's model designation (Settings->About). This enables your PC to communicate with your device which is needed for a later step.

* Download and Install Android SDK Platform Tools. Found here: https://developer.android.com/studio/releases/platform-tools.html. This gives us a utility called "adb" that lets us connect to your device in a command line shell and then execute the necessary commands. Note for Windows Systems: You may need to right click the installation file and select "Run as Administrator" to get the installation to run properly (really doesn't hurt to do this so I would just go ahead and do so).

* Execute shell commands so apps know your device's OS is rooted. Make sure your laptop is connected to your device via a USB cable. On your PC, navigate in a shell or command prompt (on Windows hold the Windows key and press R, then type "cmd" and OK) then navigate to the installation path of the SDK. Hopefully you know how to move about your file system from a command prompt. In the SDK's directory run the following commands:

adb shell
 su
 mount -o rw,remount /system
 touch /system/bin/su /system/xbin/su
 mount -o ro,remount /system
 exit
 reboot

Alternatively it's possible to do the above from a shell on the device itself but if you wish to do that you're likely tech savvy and I don't need to walk you through it :)

3. Install the following apps from the Google Play Store: Deep Sleep Battery Saver, Secure Settings, Tasker, SecureTask,RaceCapture

Deep Sleep Battery Saver and Tasker require a small purchase, but last I checked it was only a few dollars each.

IMPORTANT: Secure Settings broke critical operations in the 1.3.6u1 release in Jan 2019. For full functionality you must use the older 1.3.6 release. You can find a copy here: [1]. If this link is dead try googling for "Secure Settings Android apk" and finding this specific version. To install an apk on your android device you'll need to navigate to the source website on your tablet then download, and in your settings enable installation of apps from unknown sources (which varies from OS version to version, so google how to do it on your particular device and OS version).

4. Android settings.

* Disable the lock screen. In Settings->Security set the Screen Lock to "none". Theoretically you probably can have this enabled to something, and have the Tasker app still unlock it automatically, but I instructions below assume you've disabled the lock so if you deviate you'll need to play around with the Tasker tasks (like adding a command to do the unlock before anything else on power/boot).

* Disable Auto Brightness. I find auto brightness to often enough leave the screen not so easily readable, so I choose to disable this, and set my brightness manually to max. You can obviously adjust the brightness level to adjust your vehicle's and the weather's conditions any time you like.

* Set up automatic connection to the RaceCapture. Before we configure the apps to handle the automation make sure either Bluetooth or WiFi, whichever you'll be using to connect to your RaceCapture, is ON. This is because the automation assumes it's on and doesn't enable it for you (we just toggle Airplane mode when when disables restores whatever was enabled before Airplane mode was enabled).

- Bluetooth:, go through the pairing process with your device and the RaceCapture (refer to RaceCapture documentation for this procedure). I suggest unpairing all other devices so that your tablet/phone only knows of the RaceCapture, and thus will only ever connect to it when it becomes available.

- WiFi: go through the process of enabling WiFi on the RaceCapture and connecting your device to its network (refer to RaceCapture documentation for this procedure). However when you do so pay immediate attention to the screen as you should see a pop up warning there is no internet connection (which is normal, the RaceCapture provides no internet connectivity through its WiFi network). When you see this you MUST click on the pop-up which will bring up a screen that gives you the option to ignore this "issue". Also make sure to leave auto-connection for the network enabled. If you miss this dialogue your tablet/phone will NOT automatically connect to the RaceCapture device, kind of breaking our whole automation theme here. If you miss the pop-up, simply go into your WiFi settings on the tablet/phone and forget the RaceCapture's WiFi network, and start the process of connecting to it again (watching for that pop-up). There might be a way to adjust this setting outside the pop-up but I've not found it. Lastly, forget all other WiFi networks on your device. This prevents your device from connecting to anything other than the RaceCapture unexpectedly. Don't worry, you can always reconnect to a WiFi network manually later, like if you need to update the RaceCapture app.

Edit - If you want to keep your WiFi networks configured on your device you might be able to get away with opening their advanced settings and disabling auto connection. Should work, I just haven't tested it. I personally just played it safe by forgetting all but the RaceCapture network to avoid unexpected connections.

5. SuperSU settings

This should be installed through your rooting process. I'm unaware of any Android rooting method that doesn't use it, so I'm assuming you have it, and if not you should stop here (sorry!). In the app in Settings in the Access section set the Default Access to "Grant". This simply lets the other apps use root access without you being prompted all the time, which will get rather annoying during this setup process.

6. Secure Settings settings

  • SYSTEM+ Tab: click "Disabled" to enable the feature (this opens some unique actions for use by the Tasker automation app).
  • Options Tab: Expand the "System+" section and make sure all options are enabled with a green check mark on the right (not all of these are needed, but this is the fastest way for me to explain to you). Also expand the "Root" section and enable "Airplane Mode".


7. DS Battery Saver settings

Set the Profile to "Slumberer".

8. Tasker settings This is where we really configure the automation. You can get pretty fancy with this application but I'll be only covering what it takes to accomplish our goals outlined earlier.

* Create Tasks: A task is a series of actions to take, which we'll assign to events later. They consist of one or many actions, and those actions have associated parameters. I think creating them is fairly simple and straightforward, requiring being in the Tasks tab, clicking the + symbol in the bottom right, and then entering the information provided below, so I'm going to just outline each task's values here. One tip though is when selecting Actions use the "Filter" option to just type the action name provided here to quickly search as it can be quite confusing to click around the categories to find what you're after.

Name: "Start RC"

 Action 1:  App -> Launch App
   Target:  RaceCapture app

Name: "Screen On and Start RC"

 Action 1:  Plugin -> Secure Settings
   Configuration:  Actions->WakeDevice, leave defaults for "Screen & Keyboard Lights On" and "1 second"
 Action2:  Plugin -> Secure Settings
   Configuration:  Root Actions-> Airplane mode, select "Off"
 Action 3: App-> Launch App
   Configuration:  App:  Race Capture app

Name: "Go to Sleep"

 Action 1:  Plugin -> Secure Settings
   Configuration:  Root Actions-> Airplane mode, select "On"

 Action 2:  Go Home (type it in the Filter to find it)
   Configuration:  Page 0
 Action 3:  Plugin -> SecureTask -> Manage Apps
   Configuration:  Type:  Soft kill, App: com.autosportlabs.racecapture
 Action 4:  Plugin -> DS Battery Saver
   Configuration:  ON (Slumberer)

 Action 5:  Display Timeout  (type it in the Filter to find it) (Optional:  I like the screen to go black quickly when the car isn't on so as to save battery)
   Configuration: 8 seconds, 0 minutes, 0 hours (this is the lowest screen timeout value we can set.  If you want to let the screens stay on for a little while longer, you can set this to whatever you like)

* Create Profiles: A profile defines when to execute tasks. Always click the + button in the Profiles tab to start creating a new Profile. Below are the profiles we'll be creating and how to do so.

Device Boot - This profile executes whenever the device has booted up, like when you power up your tablet getting ready to race.  All it does is start up the RaceCapture app so that when we switch to it later it's ready to go rather than having to go through its bootup process.
After clicking the + button to create a new profile click on Event, then Filter for "Device Boot" and select it.  Next, click on the back arrow in the upper left to get back to the Profiles tab, and once back select the "Start RC" task.
Power Any - When any external power source is supplied, such as USB power from a line in the car, we light up the display immediately, then we disable Airplane mode and make sure to start the RaceCapture app.  Using only disabling of Airplane mode assumes Wifi or Bluetooth are enabled and set to automatically connect to the RaceCapture.  The RaceCapture App keeps the screen on regardless of timeout settings.
After clicking the + button to create a new profile click on State, then Filter for "Power".  Next, leave Source set to "Any" and hit the back arrow in the upper left to get back to the Profiles tab.  Once back select the "Screen On and Start RC" task.
Not Power Any - When external power is not provided (like when the vehicle is off), we enable Airplane mode to save battery, go to the Home screen so the RaceCapture app doesn't keep the screen awake, force the Slumberer profile in the DS Battery Saver app so the tablet goes into deep sleep immediately rather than delayed to save max battery, and then reduce screen timeout to 7 seconds to also, surprise, save battery.
After clicking the + button to create a new profile click on State, then Filter for "Power".  Next, leave Source set to "Any", click the checkbox for "Invert", and hit the back arrow in the upper left to get back to the Profiles tab.  Once back select the "Go to Sleep" task.
Battery Full - I added this because some Android tablets stop charging when at 100% and this prevents triggering via the Power Any profile above.  There may be a more elegant way to merge the two but this was my quick fix.  When the battery is at full charge, we light up the display immediately, then we disable Airplane mode and make sure to start the RaceCapture app.  Using only disabling of Airplane mode assumes Wifi or Bluetooth are enabled and set to automatically connect to the RaceCapture.  The RaceCapture App keeps the screen on regardless of timeout settings.
After clicking the + button to create a new profile click on Event, then select Power, and then "Battery Full".  Next, hit the back arrow in the upper left to get back to the Profiles tab.  Once back select the "Screen On and Start RC" task.

9. RaceCapture app settings This needs to be done separately on each device you'll be using. In the RaceCapture app itself you need to configure some settings and you should do so while connected to the RaceCapture device. While the above settings have now made your device turn off the screen quickly, if you just open the RaceCapture app the screen will stay on and you can execute the below steps.

  • Skip any setup guides or anything you may be prompted. This usually happens if this is the first time opening the app.
  • Click the three bars in the upper left to open the menu, then select Preferences.
  • Set your "Startup screen" to "Dashboard".
  • Click the three bars in the upper left again and now select Dashboard.
  • On the Dashboard screen in the upper left below the three bars is a Gear icon. Click that to bring up Dashboard configuration.
  • You'll be on the Behavior tab. Click on the Screens tab. On this screen you can select the dashboard layout(s) you wish to use. I typically pick one layout but also leave the Raw Channels enabled for troubleshooting. I'm pretty sure the Dashboard that is opened upon starting up the app will be the highest one you have selected in this list, so keep that in mind when choosing. Tap outside the configuration window to close it and go back to the dashboards.
  • For each Dashboard you'll need to configure each gauge. Reference RaceCapture documentation for this.


10. Disable Auto-Updating of Apps (Optional)

I highly recommend doing this because app updates can unexpectedly break things. You might decide to use your tablet or phone to connect to a local WiFi hotspot for internet access, and suddenly your device is pulling updates for the apps here and bam, something stops working but you need to be on track soon. I've had it happen to me. The most common is losing RaceCapture settings before.

Go into Google Play Store-> Settings and in the General section find "Auto-update apps" and set it to "Do not auto-update apps". This will mean any time you need to update anything you can do so by simply finding that app and clicking the Update button for it. Be VERY judicious with this, only update when you're absolutely sure it's necessary!

11. Enabling Auto Boot when connected to power

For the future as I don't have my notes on this right now. The idea is that even if your device is dead, if you connect it to USB power like in your vehicle when it has sufficient charge it will automatically turn itself on, and then the rest of the automation will take effect. Helps cover when you forget to charge things but want your Dashboards working as fast as possible.


That's IT! Go plug your tablet or phone into your vehicle and get started!!!

Extras

Tips & Tricks for Dashboard Devices

* Use Cheap Cases for Mounts: For about any device, be it tablet or phone, you can likely find a very cheap snap-in plastic case that you can use as a mount for your device. I like to use cases like the one pictured to the right (which only cost me $7!), cut off the faux-leather cover, and attach them to my dash with self tapping screws, 3M Exterior Tape, etc. Voila, I have a super simple mount that is very sturdy, holds my device quite securely, let's me remove my device easily whenever I want, and cost me almost nothing. You can find many such cases on Amazon.com

* Use any gloves by sewing conductive thread: Most touch-screens require electrical contact with your skin in order to work. This means when you have your racing gloves on, like we are prone to do when in our racing vehicles, we have to yank them off to mess with our dashboard tablet displays. You can fix this by using conductive thread to sew a connection from inside your glove to the outside providing an electrical connection from your fingertips to your screen. You can find conductive thread rather cheaply on Amazon.com.

* Use Screen Protectors: Tablets and phones aren't cheap, and we are putting these devices in race environments where our hands (and gloves if you used the conductive thread!) can get dirty. Why scratch up your displays when for about $10 you can install a clear yet replaceable screen surface? It's cheap insurance for a device that you already spend a decent amount of money and time (this guide isn't short!) on.