-
-
Notifications
You must be signed in to change notification settings - Fork 262
Android Auto Wifi
Since the 9th Pre-Alpha version, Crankshaft can receive an 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. As some Android phone OEMs choose to limit or block concurrent WiFi and Mobile Data, Android Auto over WiFi was not practical for users of these phones.
In addition, prior to Crankshaft Alpha1, only one set of WiFi credentials was usable at a time. Therefore Crankshaft could not connect to your phone's WiFi hotspot, to use Mobile Data whilst on the move, and connect to your home, work or a public WiFi router when parked to potentially save on expensive Mobile Data fees.
Crankshaft Alpha1 has addressed these issues by enabling two sets of credentials in Client Mode whilst Hotspot Mode now has default credentials to enable easier testing should you wish to continue using Hotspot Mode.
To set up WiFi in Crankshaft, you need to edit the /boot/crankshaft/crankshaft_env.sh
file, most likely over an SSH connection using a text editor such as nano
.
Note: The /boot/
partition will need to be unlocked from read-only mode via csmt boot unlock
before you can save changes to your /boot/crankshaft/crankshaft_env.sh
file.
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, such as when adding WiFi credentials as described below, by appending your two-letter (uppercase) 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 the /boot/crankshaft/wpa_supplicant.conf
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:
- Client: Crankshaft connects to a router (home, work, public) or your phone's hotspot
- Hotspot: Crankshaft becomes a hotspot for your mobile phone to connect to
To use Client Mode you need to enter WiFi credentials in the /boot/crankshaft/crankshaft_env.sh
file.
Default "sample"
settings for WIFI
may already be in place.
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 set up a choice between two Client Mode WiFi networks, edit both sets of credentials:
WIFI_SSID="sample"
WIFI_PSK="sample"
WIFI2_SSID="sample"
WIFI2_PSK="sample"
As long as the credentials are 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, under the Wifi Mode
section.
- Tap the
Settings
button - Tap the
BT / WiFi
tab - Under
Wifi Mode
, tapRun Hotspot
Crankshaft will immediately attempt to initialize WiFi in Hotspot Mode and if successful, the SSID and Password (PSK) credentials required to connect to Crankshaft (from your phone, tablet, laptop, etc) will be displayed within the Network Information section. These credentials will be the following defaults unless you have changed them by editing the /boot/crankshaft/crankshaft_env.sh
file:
- SSID:
CRANKSHAFT-NG
- Password:
1234567890
- Tap the Save button
- Tap the
Settings
button - Tap the
BT / WiFi
tab - Under
Wifi Setup
, tickEnable
alongsideStart system in Hotspot Mode
- Tap the Save button
- Tap the Power button
- Tap the Reboot button
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 on the top left of the home screen
Crankshaft will attempt to automatically connect to the Android Auto projection on your phone.
If, after a delay, Android Auto takes over the screen on your Crankshaft head unit, you're up and running!
If Crankshaft is unable to detect the Android Auto projection automatically, a dialog will appear with a list of detected IP addresses. Choose the IP address of the device (most likely your phone) running Android Auto and tap Connect
.
After a delay, Android Auto should take over the Crankshaft screen and you're up and running!
- 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