-
Notifications
You must be signed in to change notification settings - Fork 74
How to install
This short tutorial shows how to setup the new HTML5-based version of Fab Modules
You can find the new modules at the following address
[https://github.com/fabmodules/fabmodules-html5]
There are some pre-requisites
-
git (apt-get install git)
-
wget (apt-get install wget on a debian / ubuntu system)
-
node.js & npm (download from nodejs.org and follow instructions there)
-
Python
-
PySerial library. After getting python working, just run
sudo pip install pyserial
Open a terminal and cd to a folder where you like the fabmodules to be downloaded.
In my case its /home/fiore/. Make sure you can write to the folder if different from your home.
cd /home/fiore
git clone https://github.com/FabModules/fabmodules-html5.git fabmodule
If you followed all the instructions correctly you should now have a fabmodules folder with all the necessary software.
Once in a while remember to git pull inside the folder so you get the latest stable version.
You now can run the mod_serve,
cd mod_server
node mod_server.js
listening for connections from 127.0.0.1 on 12345
You can install mod_serve on all machines where you have machines attached. Then from the Fab Modules interface type in your server/port combination instead of 127.0.0.1:12345.
You can change the host and port inside the mod_server.js file, look at the top the two lines:
var server_port = '12345'
var client_address = '127.0.0.1'
Changing client_address to 0.0.0.0 will make the server listen for connections coming from any machine in the local network (or the whole internet if the machine has a public ip-address, not recommended).
You can also change the port to any greater than 1024 (otherwise you must launch mod_serve with sudo, again not recommended).
You can use the new Fab Modules in different ways:
You can run your own webserver on the local folder. Assuming you have Python installed just run inside the folder:
python -m SimpleHTTPServer
The open the page http://localhost:8000
Open your browser on the http://fabmodules.org page and use the hosted version of the modules.
The file mod_settings contains the ports and speeds used for the modules operation. Make sure they match your actual devices.
You can load your mod_settings using the last menu item appearing when you open the index.html page.