How To Set up Mesh Potato as a Wifi Access Point or Wifi Client
NOTE: This is largely superseded by the SECN firmware and is left here just for historical record.
This guide (courtesy of Terry Gillett) describes how to configure a Mesh Potato as either a Wifi Access Point or as a Wifi Client so that it can be used in a simple (non-mesh) Wifi network.
The first section is common setup for both configurations. After completing this section, proceed with either Sect 2 or Sect 3 depending on whether you wish to run the MP as an Access Point or as a Client.
The setup was done with a PC running Ubuntu 10.04 and a Mesh Potato model MP01 v1.2
1. Basic Setup
In this section the MP will be flashed with the required firmware and additional packages installed to support operation as a Wifi Access Point or Wifi Client
1.1 Flash the MP with VT-rv273 firmware
The MP rv233 firmware as shipped from factory needs to be updated to support this configuration. Download firmware from:
Download the .img .squashfs .lzma files for the rv273 firmware version and save to a suitable directory. Refer to the general instructions in Upgrading Mesh Potato Firmware HowTo. Connect the MP directly to your PC with an ethernet cable with the MP Power off Execute potato-flash:
$ sudo potato-flash eth0 openwrt-atheros-root-rv273.squashfs openwrt-atheros-vmlinux-rv273.lzma
Wait for the program to start looking for the MP device - a series of dots will appear onscreen. Switch the power on to the MP. Wait for the flashing process to complete and for the MP to restart. This will take several minutes.
1.2 Set up MP Fallback ethernet profile on the PC
Set up the PC with an ethernet profile in Network Manager as follows:
Static IP: 172.31.255.253 Netmask: 255.255.255.252
Save the profile in Network Manager for later use. At any stage of the configuration of the MP, it can always be accessed at the fallback address on ethernet.
1.3 Connect the MP to a LAN
Connect the MP via ethernet cable to a LAN with a DHCP server and internet access.
Connect the PC to the same LAN and set it to the MP Fallback profile.
Check that you can access the MP from the PC by pinging the MP fallback address 172.31.255.254
For Sections 1 and 2 of this guide, it is assumed that the MP and PC are connected to the LAN this way.
1.4 Set up root password on MP
Telnet to the MP at 172.31.255.254
$ telnet 172.31.255.254
Set the root password with the command:
Exit and connect to the MP with ssh:
$ ssh email@example.com
1.5 Start DHCP on the MP ethernet port
Open an ssh session on the MP from the PC Start DHCP on the ethernet port by issuing the command:
# udhcpc -i eth0
The MP will acquire an IP address on the LAN after a short time. DHCP will run on the ethernet port only until the MP is powered down; it is not a permanent configuration. Check that the MP has internet access by pinging an internet address from the MP command line:
# ping www.google.com
1.6 Load the MP configuration files
Download the configuration files tarball (configs.tgz) to the PC from:
Extract the tarball contents to a suitable directory and cd to the directory. Open a terminal session and copy the config directories/files to the MP /etc directory:
$ scp -r ./config-ap firstname.lastname@example.org:/etc $ scp -r ./config-ap-client email@example.com:/etc
1.7 Install additional packages
Browse to the MP Fallback address to get the OpenWRT LuCI login page. Log in as root and go to the menu item: System/Software This page will list the software packages installed on the MP.
Select 'Edit package lists and installation targets' link and update the first line to read:
Select the 'Update package list' link to load the list of available packages and show both installed and available packages.
Select the checkboxes for the required packages as follows:
- Access Point mode: hostapd-mini and hostapd-utils
- Client mode: iptables, iptables-mod-nat, iptables-mod-nat-extra, and wpa-supplicant
Click on 'Perform Actions' button at bottom of page. The page will refresh and show these packages as 'installed'.
Alternatively you can install these packages from the command line on the MP:
For Access Point mode:
opkg install hostapd-mini hostapd-utils
For Client mode:
opkg install iptables iptables-mod-nat iptables-mod-nat-extra wpa-supplicant
1.8 This completes the basic set up.
Proceed with either Sect 2 for Access Point configuration, or Sect 3 for Client configuration.
2. MP Access Point Setup
In this section the MP will be configured as a Wifi Access Point and its configuration parameters will be set up. The MP Access point is configured to obtain an IP address using DHCP when connected to a LAN via ethernet. A wifi enabled PC should be able to associate with the MP Access Point and access the internet.
2.1 Execute the wifi Access Point configuration set up script
Connect to the MP with ssh on the Fallback IP address and execute the setup script:
The MP will restart. Allow several minutes for the MP to become fully operational in the new mode. Connect to the MP with ssh on the fallback IP address to check its operation. Note: At this point the MP is acting as an open, un-encrypted Wifi Access Point, so be aware of security.
2.2 Set up the Wifi Access Point configuration
Connect to the MP with a browser and log in to the OpenWRT LuCI page. Select Network/Wifi/WIFI0. Set the required ESSID and channel for the MP Access Point. Scroll down to the Interfaces section and select required Encryption: e.g. WPA-PSK and enter the pass phrase Key. Scroll down and click on 'Save&Apply'. The page will refresh with the new values Check that you are able to connect to the MP AP with a wifi enabled PC and access the internet.
3 Wifi Client Setup
In this section the MP will be configured as a Wifi Client and will be set up to associate with a Wifi Access Point. A PC connected to the MP ethernet port will be then be able to access the Wifi Access Point LAN, and the Internet, via the LAN gateway.
3.1 Execute the wifi Client configuration set up script
Connect a PC configured for MP Fallback address to the MP ethernet port. Connect to the MP with ssh and execute the setup script for wireless client mode:
The MP will restart. Allow several minutes for the MP to become fully operational in the new mode.
3.2 Set up MP Wifi Client configuration
Browse to the MP Fallback address 172.31.255.254 to get to the OpenWRT LuCI login page. Log in as root and go to menu item Network/Wifi/WIFI0. Set the Channel, ESSID, Encryption type (eg WPA-PSK), and passphrase key, to match the required AP settings. Scroll down and click 'Save&Apply'. The screen will refresh and the MP should associate with the required AP after a short time.
3.3 Connect a PC to the MP ethernet port with DHCP
Connect a PC, with its ethernet port configured for DHCP, to the MP ethernet port. The PC should acquire an IP address lease in the range 10.10.10.100 - 200 Check that you can connect to the MP ethernet address 10.10.10.1 Check that you have internet access on the PC by browsing to an internet site.