Several methods are available for connecting to the Raspberry Pi on a VMX-pi Robot:
- Wifi Access Point (AP) Mode
- Wifi Client Mode
- Ethernet
- Direct Desktop Connection
Recommendations:
- Use Wifi AP Mode to access the Raspberry Pi and VMX-pi from Development PC/Driver Station
- Use Wifi Client mode temporarily to allow the Raspberry Pi to access the internet; switch back to Wifi AP Mode when done
- Use the Direct Desktop Connection or Ethernet Connectivity with Remote Desktop Connection for initial setup or if you ever encounter difficulty accessing Raspberry Pi Wifi
Remote Desktop Connection via VNC Viewer
VNC Viewer Server software is included with Raspbian and provides a Remote Desktop Connection to the Raspberry Pi; when VNC Viewer Client is installed on a network-connected computer, a “Remote Desktop Connection” is created with similar capabilities to a Direct Desktop Connection – without requiring a USB Mouse, Keyboard and HDMI Monitor.
Recommendation: Install VNC Viewer Client on network-connected computers which might need administrative access to Raspberry Pi. This avoids the need for a USB Mouse, Keyboard and HDMI Monitor to access the Direct Desktop Connection.
More information on VNC Viewer for Raspberry Pi is available on the Raspberry Pi VNC (Virtual Network Computing) Page.
vmxpi-frc Networking Tools
The vmxpi-frc package (which is included with the VMX_FRC SD Card Image, or may be installed separately) provides simple tools to:
- Connect to Raspberry Pi via Ethernet
- Connect to Raspberry Pi’s Wifi Access Point
- Connect to the Internet via Raspberry Pi’s Wifi Client
Once installed, the vmx-pi frc networking tools are located on the Raspberry Pi at:
/usr/local/vmxpi-frc/networking
The vmxpi-frc networking tools location above is added to the path on the Preconfigured SD Card Image.
Use these tools to manage Ethernet, Wifi AP and Wifi Client connectivity as described below.
Ethernet Connectivity
Ethernet Connectivity is always available, and is enabled the first time Wifi AP or Wifi Client Connectivity are enabled as described below.
Raspberry PI IP Address: 172.22.11.2
Development/Driver Station PC Address: Automatically assigned by Raspberry PI DHCP Server to Development/Driver Station PC when Ethernet is Connected. Assigned Address is an IP Address within the same subnet as the Raspberry Pi
NOTE: The Development/Driver Station PC Ethernet Interface should be configured for Automatic IP Address Assignment from a DHCP Server in order to be assigned its address by the Raspberry Pi.
Wifi Access Point (AP) Mode
Wifi Access Point (AP) Mode Connectivity adds a “Host AP Server” to the Raspberry Pi which creates a Wireless Access Point at a specified “SSID”. In this mode, the Raspberry Pi IP Address is created from the 4-digit FRC Team Number.
Wifi AP Mode is enabled by running the “setupWifiAP.sh” script, as follows:
setupWifiAP.sh <SSID_PREFIX> <FRC_4DIGIT_TEAM_NUMBER> [OPTIONAL PASSWORD]
E.g., the following command will enable the Raspberry Pi’s Access Point at SSID “VMXPI-4567”; the Raspberry Pi’s Wifi IP Address will be “10.45.67.2”
setupWifiAP.sh VMXPI 4567
If a password for the Access Point’s Wifi Network is required, an additional optional password (which must be at least 8 characters long) can be provided. E.g.,
setupWifiAP.sh VMXPI 4567 SSIDPassword
Raspberry PI IP Address: 10.XX.YY.2 (where XX is first two digits of team number, YY is last two digits of team number).
Development/Driver Station PC Address: Automatically assigned by Raspberry PI DHCP Server to Development/Driver Station PC when Ethernet is Connected. Assigned Address is an IP Address within the same subnet as the Raspberry Pi
NOTE: The Development/Driver Station PC Wifi Interface should be configured for Automatic IP Address Assignment from a DHCP Server.
Recommendation: To avoid conflicts, take care when enabling Wifi AP Mode to ensure the SSID is distinct from other SSIDs in the same physical area. To help avoid conflicts, the first time WifiAP Mode is enabled – if invoked without a SSID prefix and team number – the setupWifiAP.sh script defaults to VMXPI-<ABCD> where ABCD is a 4 digit number taken from the Raspberry Pi Serial Number.
Wifi Client Mode
Wifi Client Mode Connectivity allows the Raspberry Pi to connect to the Internet via a Wifi-enabled Internet Router (“Wifi Router”).
NOTE: The Raspberry Pi can only be in Wifi AP Mode OR Wifi Client Mode.
NOTE: In Wifi Client Mode, a wifi connection with the Development/Driver Station PC can only occur if that PC also has a connection to the same subnet as the Wifi Router, and if the Raspberry Pi Address assigned to it by the Wifi Router is known. For these reasons, Wifi Client Mode is not normally recommended when connecting from Development/Driver Station PC to Raspberry Pi.
Wifi Client Mode is enabled by running the “setupWifiClient.sh” script, as follows:
setupWifiClient.sh
Raspberry PI IP Address: Automatically assigned by external WIFI Access Point.