[Commotion-admin] [commotion-router] Cli (#127)

gradyoti notifications at github.com
Wed Jun 18 12:04:29 EDT 2014


CLI Testing Instructions

What you will need:

* Two picostations
* The image with the CLI (It requires special build instructions right now, so please ask me for a copy)


Now let's test!

Flash both nodes with the CLI image

Router 1:
Set up the first node using the regular graphical Set Up Wizard, as you normally would, using the following values:

Node Name:
DrBunsenHoneydew

Mesh SSID:
MuppetMesh

Channel:
11

Mesh Encryption:
MuppetMesh

Access Point SSID:
DrBunsenHoneydew

Access Point Encryption:
MuppetAP


Router 2:

Follow these instructions:

Flash Router

Switch to DHCP

... to get a lease (ip address) from the node once it boots up

On command line

Determine your node's IP address

~ ifconfig

Copy the IP address used by the eth0 interface and change the last octet to .1

~ telnet 10.48.162.1 

Run the setup wizard:

~ setupwizard

Use the following values for the second node. We will be trying bad values to make sure that it refuses bad inputs.

New password:
muppetshow

Set Hostname?
First Try:
Meep

Second Try:
y

Host Name:

First Try:
%!^@!^

Second Try:
Beaker

Mesh SSID:

First Try:
(Nothing. Just hit enter)

Second Try:
MuppetMesh

Channel:

First Try:
9001

Second Try:
11

Mesh Encryption:
y

First Try:
Meep

Second Try:
MuppetMesh


Set up an access point?
y

Access Point SSID:
Beaker

Access Point Encryption:
BeakerAP


Keep this configuration?
n  (sorry, but we have to go through it again)

Hostname:
NoBeaker

Mesh SSID:
NoMuppetMesh

Channel:
5

Mesh Encryption:
NoMuppetMesh

Access Point SSID:
NoBeaker

Access Point Encryption:
NoBeakerAP

Keep this configuration?
y


Your node will now restart networking and should after a minute or so begin broadcasting an access point.

Connect to the "NoBeaker" access point, then go back to the command line:

~ ssh root at thisnode 

OR

~ ssh root@[IP address we used to telnet in]

Once you're reconnected, rerun the set up wizard:

~ setupwizard

Set new configuration?
y

Run back through the set up wizard with the following configuration:

Node Name:
Beaker

Mesh SSID:
MuppetMesh

Channel:
11

Mesh Encryption:
MuppetMesh

Access Point SSID:
Beaker

Access Point Encryption:
MuppetAP


Your node will now restart networking and should after a minute or so begin broadcasting an access point. But NOW we should be able to mesh with Dr.BunsenHoneydew

Connect to the "Beaker" access point, then go back to the command line:

~ ssh root at thisnode 

OR

~ ssh root@[IP address we used to telnet in]

Once you're logged in, type:

~ route

You should see in the table a route to DrBunsenHoneydew


You can merge this Pull Request by running:

  git pull https://github.com/opentechinstitute/commotion-router cli

Or you can view, comment on it, or merge it online at:

  https://github.com/opentechinstitute/commotion-router/pull/127

-- Commit Summary --

  * added setup wizard
  * added save changes
  * added option to set mesh password.
  * added password check
  * drafted AP setup and added uci commits to mesh setup
  * added uci network calls
  * changed MESH_CONFIG to WIRELESS_CONFIG
  * fixed typos and deleted redundant network config entry
  * cleanup
  * fixed uci warnings
  * added option to change hostname
  * removed unnecessary bssid generation
  * fixed typo
  * fixed more typos
  * removed network option in /etc/config/wireless
  * fixed hostname check
  * fixed hostname statement. Now repeats after incorrect input
  * added firewall and network configurations
  * fixed typo
  * added commotiond restart
  * fixed broken profile calls. Profiles now saved under mesh network name
  * added encryption 'none' field when no encryption used
  * changed MESH_CHANNEL to CHANNEL since channels must match
  * changed encryption entry for no encryption
  * refactored and added access point configuration
  * added setup_wizard file to indicate that setupwizard has already been run
  * configuration changes now reflected in setup_wizard config
  * fixed typo
  * fixed setup_wizard uci calls
  * fixed typo
  * changed password from 'true' to 'changed' to conform with gui setupwizard
  * renamed setupwizard to setupwizard.sh
  * fixed output for settings review
  * added reset option prompt
  * refactored script into get and set functions
  * refactored setupwizard to allow multiple runs of get_config
  * added clear variables
  * wrapped variables to prevent code execution
  * fixed typo
  * added check for whether setup wizard has already been run
  * setup wizard now re-runnable
  * improved formatting
  * password mismatch now prompts retry
  * more formatting
  * even more formatting
  * MOAR FORMATTING
  * added input validation for mesh setup
  * fixed hostname loop
  * refactored validator function
  * added default channel limits and fixed AP_PASSWORD validation
  * fixed interface name in /etc/config/network to match gui setup wizard
  * renamed setupwizard.sh to setupwizard
  * Merge branch 'master' into cli

-- File Changes --

    A default-files/etc/cli (11)
    A default-files/usr/bin/setupwizard (350)
    A default-files/usr/bin/setupwizard.sh (350)

-- Patch Links --

https://github.com/opentechinstitute/commotion-router/pull/127.patch
https://github.com/opentechinstitute/commotion-router/pull/127.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/opentechinstitute/commotion-router/pull/127
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20140618/fe303155/attachment.html>


More information about the Commotion-admin mailing list