The FreedomPortal project is an exhibition of digital artworks installed on Wi-Fi routers spread out in the public space.
These instructions explain how to :
In order to use these instructions, You need a Wi-Fi router:
We have been using GL-inet routers, which have all of the above, and come with openWRT pre-installed. Following instructions are for these specific routers, but can be easily adapted to another model.
In its simplest form, i.e. if you only want to serve static html and assets, a FreedomPortal app is a node.js app with the following structure :
First, you must have node.js and npm installed on your system.
Then, with your terminal create a folder and inside that folder initialize the node app :
mkdir my-appcd my-appnpm init
Once this is done, install the FreedomPortal library :
npm install --save freedom-portal
Finally create a config file for your FreedomPortal app. You can find an example there.
Then, you can try that everything works by starting the app :
node ./node_modules/freedom-portal/bin/main.js /absolute/path/to/config.js
Go to http://localhost/ with your browser, check that your html pages and assets are served correctly.
Format a USB key, create a single partition ext4 called PORTALKEY (to match the configurations in
scripts/). The reason we need ext4, is that we need to be able to create symlinks.
Copy the source code of your FreedomPortal app on the usb stick under
log/ directory for log files.
On first connection on GL-inet routers, go to the router's web interface 192.168.8.1 to set a password which will be used to connect through SSH.
Use that password to connect through SSH
ssh firstname.lastname@example.org .
We need to stop the default router's web server, and disable it so it won't be started at next boot.
/etc/init.d/uhttpd stop/etc/init.d/lighttpd stop/etc/init.d/uhttpd disable/etc/init.d/lighttpd disable
For this step, the router needs Internet access.
To make some space, we will remove some unused packages. Run the following :
NB: the first and second commands might need to run twice, because packages we are trying to remove depend upon each other.
opkg remove gl-inet luci luci-base luci-* lua lighttpd-* lighttpdopkg remove gl-inet luci luci-base luci-* lua lighttpd-* lighttpdopkg remove kmod-video*opkg remove kmod-video*opkg remove mjpg-streamerrm -rf /usr/lib/luarm -rf /usr/lib/lighttpd/rm -rf /www/*
Then to install the packages we need, first update repo with :
opkg install nodejs
Copy the script for starting the portal app on startup :
cp scripts/portalapp-init.d /etc/init.d/portalapp
make it executable :
chmod +x /etc/init.d/portalapp
Activate at next boot by running
You can test that everything works by launching the server with
Add this line to
config dnsmasq...list address '/#/192.168.8.1'
Add this to the end of
config redirectoption src 'lan'option proto 'tcp'option src_ip '!192.168.8.1'option src_dport '80'option dest_ip '192.168.8.1'option dest_port '80'
/etc/config/wireless change the encryption option to
none and change the
ssid. Max length of SSID is 32 characters!
192.168.0.1:Where the WiFi comes from