-
You need a SD card, with a single, Linux compatible partition on it like FAT or better, EXT4.
-
Open a terminal and change directory to the SD card.
-
Shallow Clone/copy the whole contents of this repo onto it, so that the
srcfolder is in its top level directory, like so:git clone git@github.com:robotical/OpenWRT-HubPlusConfig.git ./ --depth=1 --recurse-submodules -
You may optionally need a private signing key, which isn't in git. It goes in the top level as
.signing.secret -
Unmount then Remove the SD card from your computer and insert it into the Router.
-
Turn the router on -- it'll take a couple of minutes to fully boot. You can tell it has booted when all three front LEDs are lit.
-
Whilst it is booting, put a Robotical sticker on it!
-
Go to "Software Setup"
- You need a SD card, with a single, Linux compatible partition on it like FAT or better, EXT4.
- Unzip the release ZIP onto the SD card, so that the top level directory of it has:
- A single folder called by the release name e.g.
3.14.1 - The public signing key (hidden file) called
.signing.pubkey
- A single folder called by the release name e.g.
- Unmount then Remove the SD card from your computer and insert it into the Router.
- Turn the router on -- it'll take a couple of minutes to fully boot. You can tell it has booted when all three front LEDs are lit.
- Whilst it is booting, put a Robotical sticker on it!
- Go to "Software Setup"
- Preferably Connect a computer using an ethernet cable, or connect to its WiFi network,
GL-AR750-___ networkpasswordgoodlife - Go to http://192.168.8.1 (the router's homepage)
- You should see the iNet GL first time setup thingy, asking you to choose a language. No need to do anything there.
- ssh into the router:
ssh -o StrictHostKeyChecking=no root@192.168.8.1(There should be no root password). In Windows, you can use PuTTY to ssh. - Once connected over SSH, Set a root password, this can be done like so:
passwd root -d "martyrocks". cdto the SD card, which is mounted at/mnt/sda1cdto main directory, which is at/mnt/sda1/srcor/mnt/sda1/<version>for a release.- Run the web install scripts:
./install.sh. - Go back to http://192.168.8.1 and check that
- The page now shows the command hub homepage
- The link to ScratchX works and loads the extension properly
- The new SSIDs and WiFi passwords are set.
- Reboot the router and check that http://192.168.8.1 comes back up, that the SSIDs are now
martyHubPlus-5GandmartyHubPlus-2Gand the WiFi passwordmartyrocksworks. - Fin!
You should usually use the hub in an air gapped manner, meaning it is not connected to the Internet and just presents a WiFi network.
Alternatively, you can connect the Hub to the internet using an Ethernet cable into the WAN port (shown with a little Globe Icon), or via USB tethering through the USB-A port (this seems to work with some but not all dongles or phones)
You may need or access the OpenWRT config page on the router, at
http://192.168.8.1/cgi-bin/luci
If you want to connect your Hub to the Internet, we strongly recommend that you first:
- Change the WiFi password from the default
martyrocks - Change the SSH password too
- Treat the Hub and the Hub's WiFi network with the same level of scritiny and security conscientiousness you would your own home router.
If using the Hub in a Networked manner, you can then use the 'normal' Scratch and Marty Programming interfaces instead of the included ones. These online interfaces are more likely to be up-to-date.
The Hub also offers many other configuration options, including VPN, UoPnP, USB Storage Sharing and DDNS support.
If you connect your Hub to a newtork you must ensure you have secured its config, changed its password and are comfortable + understand that the hub could, if miscounfigured, cause problems.
Turn off the Hub, remove the SD card and insert it in to a computer. Copy the update files onto the SD card:
/hub-update.zip
/hub-update.zip.sig
Then simply pop it back in the Hub and turn it back on. It should install the update on boot.
You can check what version of Hub software you're running by running . /mnt/sda1/VERSION on the hub.
-
Remove the SD card from the Hub and plug it in to an internet-connected computer
-
Change to the SD card top-level directory.
-
Run the following command to fetch latest files:
git pull origin master --recurse-submodulesThis will fetch the latest version of this repository and the linked Submodules (currently Scratch)
-
If on a computer, eject the card, add it back to the hub and reboot, SSH in to it,
cd /mnt/sda1 -
Run the update script:
./update.sh
This is very similar to just cloning the repo, but with extra steps!
-
Test that the hub works with this exact set of files! To do this you need to do a full reset and install.
-
To check everything is working before making a release, copy the contents of
src/onto the SD card into a folder calledmaster/, and also copy over.signing.pubkeyto the top-level of the SD card (not insidemaster/). -
Install from
master/install.shas you would any another release -
Once you've checked all is OK, you can proceed:
-
Change
./VERSIONand increment the version number within. Take note of what the number is... -
Do what you can re. making updates painless, see
update.sh -
Now make a new git tag with just the version number (1.1.0 shown as an example):
git tag 1.1.0 -
Push this tag to
origingit push origin --tags -
This will add the tag on GitHub. Go find the tag, and open up the tag editor so we can turn it in to a GithUb release. Sadly the auto-generated source zips won't include the Git Submodules so a few steps are needed to make a working downloadable zip.
-
To do this, run the
makerelease.shscript:./makerelease.shIt will ask you to enter the version number and will then put together a release zip.
-
Now go look at "Signing the Release" so you can put together a full release.
Troubleshooting
If you get
! Submodule 'scratch3-gui' .git is a directory not a file, see README.md
from the makerelease.sh script, then run the git command
git submodule absorbgitdirs
Which will remove the .git directory in the submodules and place it within the root-level
.git dir. This prevents the release ZIP from including all of the git history, which is
large!
Note to the Causal Reader: There's a private key that we have that for obvious
reasons won't be shared... You can make your own by typing the following into a terminal
on the Hub usign -G -p ./.signing.pubkey -s ./.signing.secret. Obviously, don't share it.
You have to do this bit from the command line on a hub, so as to have access to the usign
utility. With the zip file copied onto the Hub, rename it to hub-update.zip:
$ cd /mnt/sda1/
$ mv OpenWRT-HubPlusConfig-0.0.0.zip hub-update.zip hub-update.zip
# ^^^ Replace with correct here
Then create a signature (this will take approx. 10 seconds) and then verify that it works good (another 10s or so):
$ usign -S -m ./hub-update.zip -s ./.signing.secret
$ usign -V -m ./hub-update.zip -p ./.signing.pubkey
This will make a new file called hub-update.zip.sig which is the signature you need!
Remember, you'll need to re-sign if you make any change to the zip.
It's easiest to then just turn the hub off and copy these over.
Default (factory) UCI Wireless Conf.
You can factory reset the hub by holding the reset button down (looks like a circular arrow) for 15 seconds, until it starts flashing really quickly, then releasing.
wireless.radio0=wifi-device
wireless.radio0.type='mac80211'
wireless.radio0.channel='36'
wireless.radio0.hwmode='11a'
wireless.radio0.path='pci0000:00/0000:00:00.0'
wireless.radio0.htmode='VHT80'
wireless.radio0.doth='0'
wireless.radio0.txpower='20'
wireless.radio0.band='5G'
wireless.radio0.disabled='0'
wireless.default_radio0=wifi-iface
wireless.default_radio0.device='radio0'
wireless.default_radio0.network='lan'
wireless.default_radio0.mode='ap'
wireless.default_radio0.ssid='GL-AR750-194-5G'
wireless.default_radio0.encryption='psk-mixed'
wireless.default_radio0.key='goodlife'
wireless.default_radio0.ifname='wlan0'
wireless.radio1=wifi-device
wireless.radio1.type='mac80211'
wireless.radio1.channel='11'
wireless.radio1.path='platform/qca953x_wmac'
wireless.radio1.htmode='HT20'
wireless.radio1.hwmode='11ng'
wireless.default_radio1=wifi-iface
wireless.default_radio1.device='radio1'
wireless.default_radio1.network='lan'
wireless.default_radio1.mode='ap'
wireless.default_radio1.ssid='GL-AR750-194'
wireless.default_radio1.encryption='psk-mixed'
wireless.default_radio1.key='goodlife'
wireless.default_radio1.wds='1'
wireless.default_radio1.ifname='wlan1'