Skip to content
inspector71 edited this page Jan 19, 2019 · 50 revisions

NOTE: This page is being re-written. GitHub does not provide a drafting tool so re-writes are done on-the-fly. This note will be removed when the re-write is finished (at least, by me!).

Starting with the Pre9 version, a Crankshaft head unit has been able to receive the Android Auto projection, from your phone, over WiFi instead of a USB cable.

However, the practicality of using Crankshaft over WiFi was limited to phones that allowed concurrent WiFi and Mobile Data. The Android Auto projection would be broadcast from phone to Crankshaft and the phone's Mobile Data used for supplying internet connectivity to provide mapping, streaming downloads, etc.

In addition, prior to Crankshaft Alpha1, only one set of WiFi credentials was usable at a time. This made switching WiFi modes difficult if, for example, a user would like to use one set of credentials for Client Mode to connect to a home or public WiFi router whilst parked, and to their phone's hotspot mode to use Mobile Data whilst driving.

Since Alpha1, Crankshaft now allows two sets of WiFi credentials.

Crankshaft WiFi can operate in one of two modes:

  1. Hotspot: Crankshaft becomes a hotspot for your mobile phone to connect to
  2. Client: Crankshaft connects to a WiFi network such as your mobile running as a hotspot or home router

Client Mode

To use Client Mode you need to set up your WiFi credentials in /boot/crankshaft/crankshaft_env.sh

You will notice two sets of SSID and PSK:

  • If you only want to use your home network to get SSH and internet access use WIFI_SSID= and WIFI_PSK=
  • If you want to use your phone's hotspot use WIFI2_SSID= and WIFI2_PSK= (this is needed to let the system know that this is your phone's hotspot)
  • If you want to use both enter both but make sue they are not identical! (the system will use the available network. Optional you can force one of both inside the settings menu)
  • Don't forget to enter your wifi country code at WIFI_COUNTRY=
  • If credentials are entered set WIFI_UPDATE_CONFIG=1: this will force Crankshaft to regenerate your /boot/crankshaft/wpa_supplicant.conf, the file Crankshaft uses to handle WiFi connections

Special note: If you have an existing, functional wpa_supplicant.conf file you can use it within /boot/crankshaft/. If the wpa_supplicant.conf file is detected it will not be overwritten wtih credentials from /boot/crankshaft/crankshaft_env.sh (only params like country are checked without changing the credential section)

Enabling Android Auto over WiFi with Crankshaft in Client mode

  1. Make sure your mobile phone's hotspot mode is active
  2. Crankshaft will attempt to automatically connect to your phone's hotspot network (via SSID) and, if successful, display a WiFi button on the home screen
  3. Push the WiFi button and Crankshaft will attempt to receive the Android Auto projection from your phone

Hotspot Mode

The hotspot mode can be enabled inside the settings menu of your system. You can decide if only running in the current session or on every system start.

Running in current session:

Visit Settings -> BT / WiFi -> Wifi Mode and select Run Hotspot. This will start the hotspot and you can connect with your mobile phone (SSID and password is shown inside Network Information)

Start hotspot on every system start:

Visit Settings -> BT / WiFi -> Wifi Setup and tick Enable at Start system in Hotspot Mode.

  • Reboot or start manually like described in session.

Enabling Android Auto over WiFi with Crankshaft in Hotspot mode

After connecting your phone to the CRANKSAFT-NG WiFi network, there's one last step required to receive the Android Auto projection on your Crankshaft head unit:

  1. Launch Android Auto on your phone
  2. Enable Android Auto developer mode
  3. Delete all known cars (a once-off requirement) via:
  • tap the hamburger menu
  • tap Settings
  • tap Connected cars
  • tap overflow menu dots
  • tap Forget all cars
  1. In Android Auto:
  • tap the hamburger menu
  • tap Settings
  • tap Info
  • tap the overflow menu dots
  • tap Start head unit server

  1. In Crankshaft, push the WiFi button - if there is only one client the system tries to auto connect your mobile phone.
  2. If more than one client select the correct one and push connect.
Clone this wiki locally