Basically information for future own reference.
There are a number of ways to convert your Erlang code into a stand-alone ‘app’ package containing whole OTP environment in it. Starting with standard systools and reltool. Some useful links below.
There are basically 2 kinds of erlang applications:
– the “pure erlang” way is to create a release including the runtime,
OTP and your application(s). Then a simple .bat script can launch the
runtime with the right options. reltool or systools are made for
creating these releases:
rebar can help you using these tools.
– for a single executable, not distributed, with a single app, you can
create an ‘escript’ from your code which will be launched as an
executable. rebar includes the escriptize command to achieve this.
As an example, you can look at the ‘averell’ web server which is built
or mad: http://erlang.org/pipermail/erlang-questions/2014-October/081420.html
So I’m just going to dump my experience here hoping it helps somebody.
This is Step 1 – making your Pi’s be able to ping each other and communicate via UDP/TCP, ad-hoc, peer to peer, without any central router. This doesn’t include making them route packets with 2 or more hops between origin and destination.
Long story short I’ve tried like a hundred different things and as usual a simple thing made it work.
So here it started as a weekend / hobby project trying to learn more about mesh networking and mesh communications. I’ve purchased 2 x Raspberry Pi 2 Model B (below) along with all standard stuff including usb Wi-Fi dongles and set sail with a goal of simply making them ping each other and eventually transfer a file in a mesh / ad-hoc network mode, basically so that none of them is an access point and both aren’t connected to any 3rd access point.
Continue reading Enabling mesh (ad-hoc) network on multiple Raspberry Pi’s