-
-
Notifications
You must be signed in to change notification settings - Fork 259
Android Auto Wifi
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.
In both Client and Hotspot modes, Crankshaft will need to use the appropriate country code for your region.
Whilst you can set the WiFi country code in the Settings
app on the BT/ WiFi
tab, you can also set it while editing the /boot/crankshaft/crankshaft_env.sh
file by adding the country code to this line:
WIFI_COUNTRY=
Once you have set your WiFi credentials by editing the /boot/crankshaft/crankshaft_env.sh
file (as described below), regeneration of the /boot/crankshaft/wpa_supplicant.conf
file Crankshaft uses for WiFi networking will be required. To force Crankshaft to regenerate this file, edit the following line in your /boot/crankshaft/crankshaft_env.sh
file from:
WIFI_UPDATE_CONFIG=0
to
WIFI_UPDATE_CONFIG=1
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 with credentials from /boot/crankshaft/crankshaft_env.sh
(only params like country are checked without changing the credential section)
Crankshaft WiFi can operate in one of two modes:
- Hotspot: Crankshaft becomes a hotspot for your mobile phone to connect to
- Client: Crankshaft connects to a WiFi network such as your mobile running as a hotspot or home router
Since Alpha1, Crankshaft can use two sets of WiFi credentials in Client Mode.
To use Client Mode you need to set up your WiFi credentials in /boot/crankshaft/crankshaft_env.sh
, most likely via SSH using a text editor such as nano
. The crankshaft_env.sh
file contains a lot of settings including default "sample"
settings for WIFI
. Since Alpha1, two sets of SSID (network name) and PSK (network password) are supported:
To connect to a WiFi router such as a home, work or public router, edit the first pair of credentials:
WIFI_SSID="sample"
WIFI_PSK="sample"
To connect to your phone's WiFi hotspot edit the second pair of credentials:
WIFI2_SSID="sample"
WIFI2_PSK="sample"
To have the option to use two Client mode WiFi networks, edit both sets of credentials.
As long as the credentials are distinctly unique, Crankshaft will automatically use the stronger network signal if both networks are available.
Alternatively, you can force which Client mode WiFi network you wish to use in the Settings
app, on the BT / WiFi
tab.
- Make sure your mobile phone's hotspot mode is active
- 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
- Push the WiFi button and Crankshaft will attempt to receive the Android Auto projection from your phone
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.
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
)
Visit Settings
-> BT / WiFi
-> Wifi Setup
and tick Enable
at Start system in Hotspot Mode
.
- Reboot or start manually like described in session.
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:
- Launch Android Auto on your phone
- Enable Android Auto developer mode
- 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
- In Android Auto:
- tap the ☰ hamburger menu
- tap Settings
- tap Info
- tap the overflow menu dots
- tap
Start head unit server
- In Crankshaft, push the WiFi button - if there is only one client the system tries to auto connect your mobile phone.
- If more than one client select the correct one and push connect.
- Home
- Roadmap
- General Changes / Changelog
- Installing / Updating
- When Issue occur
- Hardware
- Configuration
- Features
- Home
- Get started
- Hardware
- Software and Settings
- For Advanced Users
- Et Cetera