Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Setting up WIFI

WIFI support requires a Raspberry Pi with onboard WIFI. USB WIFI devices are not supported.

WIFI uses the standard wpa_supplicant to provide access to secure networks using WPA2. In order to configure WIFI support you must add your network settings to the wpa_supplicant.conf file that can be found in the root directory of your SD card. The default state of the file is as below.

#
# wpa_supplicant.conf
#

country=<2 char country code>

network={
	ssid="<your router name>"
	psk="<your router password>"
	proto=WPA2
	key_mgmt=WPA-PSK
}

Edit the country=, ssid= and psk= and replace the name default strings with your country code, the name of your router and the password. Here is an example:

#
# wpa_supplicant.conf
#

country=GB

network={
	ssid="BT4355-2"
	psk="aE65gh23DE"
	proto=WPA2
	key_mgmt=WPA-PSK
}

You must get the country code right or the connection might fail. Don’t pick a random country code. Find out the proper code for your country and use it.

Reboot the device and it should connect to your network. To verify it is connected, either connect to your router and view the list of connected devices, or use the SDC Tools to verify it is broadcasting its presence. SDC broadcasts its availability every 5 seconds when connected to a network. In addition, the default XML configuration that ships with the system will place a WIFI icon on the top right of the page when it is connected to the network. The WIFI icon is on the Always Page so it will be present no matter which page is being displayed.

Limiting WIFI to a specific frequency

wpa_supplicant is a standard system used for establishing a secure connection to a WIFI network. It supports many configuration settings, with the above examples being only basic ones. If you have any difficulties getting connected to your router, you may wish to force the connection to a specific BSSID (Base Station ID).

The BSSID is a mac address of the form hh:hh:hh:hh:hh:hh where hh are a 2 digit hex numbers.

Typically routers that support both 5Ghz and 2.4Ghz frequencies will have separate BSSID’s for the two interfaces. They may be both published under the same SSID (which is what is used in the examples above). Therefore to force a frequency you can pick the interface representing the frequency you want.

Depending on which type of Raspberry Pi you are using, it may prefer to connect to a 5Ghz network over a 2.4Ghz because typically 5Ghz networks are faster. Sometimes though, you might find that your vehicle is within range of your 5Ghz network but in fact the signal strength is too poor for it to complete the connection reliably. In such a case, forcing the device to use 2.4Ghz instead may help, as typically 2.4Ghz networks are a bit slower but have better range.

Some Raspberry Pi’s do not support 5Ghz at all, so be aware of which one you have and what it supports, and configure it appropriately. Don’t try and force a 5Ghz connection on a device that doesn’t support it.

To force a specific BSSID, you can use the following example:

#
# wpa_supplicant.conf
#

country=GB

network={
	ssid="BT4355-2"
	psk="aE65gh23DE"
	proto=WPA2
	key_mgmt=WPA-PSK
	bssid=04:a2:22:2c:d5:0f
}

Just replace the mac address with the one of the interface you want to connect to, and of course make sure the ssid and psk entries match your router’s details as previously outlined. To find the mac address, you can use a WIFI scanner application on your phone, or you may find it on the administration page of your router (not all routers will show it though).

Wired Networks

Wired networks are obviously not much use when your device is in the car, but if you are bench testing and you have a device that has an Ethernet port on it, then if you connect it directly to your router with an Ethernet cable it should automatically connect to your network. This can be useful if you are trying to get WIFI working and want to look in the Application Log to find out whether there are any error messages.

If you have a wired network connected and enable WIFI, then SDC will be connected to your router twice, and with two different IP addresses. This is not a problem but don’t be lured into thinking that WIFI is connected if you can access the device over the network because it could be using the wired connection instead. To verify WIFI is working properly, disconnect any wired networks and reboot the device.