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 for two sets of WiFi credentials.

Regardless of WiFi mode (Client or Hotspot), Crankshaft requires manual editing of the /boot/crankshaft/crankshaft_env.sh text file to enter WiFi credentials, from which the required /boot/crankshaft/wpa_supplicant.conf WiFi configuration file is generated (unless you have a wpa_supplicant.conf file in place that you prepared earlier).

Crankshaft WiFi can operate in one of two different modes:

  1. Hotspot: Crankshaft opens a hotspot for your mobile phone to connect to

  2. Client: Crankshaft connects to an available WiFi network such as your mobile running in as a hotspot

Client Mode:

To use the Client Mode you need to setup 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 wpa_supplicant.conf, the file Crankshaft uses to authenticate 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)

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.

How to use Android Auto over WiFi with CS as Hotspot?

  1. Check section Hotspot Mode and decide how to run.
  2. Connect your phone to the CRANKSHAFT-NG (Crankshaft's hotspot SSID) network
  3. Make sure your phone allows mobile data to be active while WiFi is on
  4. Launch Android Auto on your phone
  5. Enable Android Auto developer mode
  6. Delete all known cars via hamburger menu -> Settings -> Connected cars -> overflow menu dots -> Forget all cars (once-off requirement)
  7. In Android Auto, open hamburger menu -> Settings -> Info -> overflow menu dots -> Start head unit server
  8. In Crankshaft, push the WiFi button - if there is only one client the system tries to auto connect your mobile phone.
  9. If more than one client select the correct one and push connect.
  10. That's it

How to use Android Auto over WiFi with CS as Client (Your mobile as Hotspot)?

  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.
  4. That's it
Clone this wiki locally