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 hotspot is running and CS has connected.
  2. CS detect's (by it's SSID) your mobile's hotspot and shows the WiFi button to connect your mobile.
  3. Push the wifi button and the system attempts to connect.

That's it!

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 via hamburger menu -> Settings -> Connected cars -> overflow menu dots -> Forget all cars (once-off requirement)
  4. In Android Auto, open hamburger menu -> Settings -> Info -> overflow menu dots -> Start head unit server
  5. In Crankshaft, push the WiFi button - if there is only one client the system tries to auto connect your mobile phone.
  6. If more than one client select the correct one and push connect.

That's it!

Clone this wiki locally