Warning: This is an old version. The latest stable version is Version 10.0.0.
Included with the OTAcast library is a test application. This application is not meant for production use, but can be used for investigating whether or not a given environment is a good fit for OTAcast.
Start by building the library as specified in Quick Start.
The OTAcast binary will then be located at install_location/bin/otacast
.
The OTAcast binary has two modes server
and client
.
They can be accessed by providing either as positional arguments to the binary,
like so ./otacast server
or ./otacast client
.
As the name implies the server mode is where the file is served from.
Using the --help
argument the following will be returned:
$ ./otacast server --help
> OTAcast Server Options:
> -f [ --input_file ] arg Path to the file that should be sent.
> -i [ --ip ] arg (=127.0.0.1) The remote IPv4 address.
> -p [ --port ] arg (=45678) The remote port.
> --interface arg The interface.
> --packet_size arg (=1500) Set the max packet size.
> -m [ --meta ] arg (=100) The number of packets between sending a meta packet.
> -d [ --data_rate ] arg (=1000000) The desired data rate in bytes/second.
> --hops arg (=1) Set the multicast hop limit, i.e. the time-to-live associated with outgoing multicast packets.
> -h [ --help ] Print this help message.
Using the --help
argument the following will be returned:
$ ./otacast client --help
> OTAcast Client Options:
> -i [ --ip ] arg (=0.0.0.0) The IPv4 address of the listening interface
> -p [ --port ] arg (=45678) The port.
> -d [ --output_directory ] arg Directory to use for downloading the file.
> -s [ --silent ] Disable the progress output.
> -h [ --help ] Print this help message
[FILENAME].otacast
file,
and upon completion the file is renamed to FILENAME
.Here’s a couple of examples of how to use the otacast application.
In all the examples we will send a file called myfile
, you can use your own
file or generate a one with random data using the following Linux command:
head -c 10M </dev/urandom > myfile
Once the file has been received you can verify the integrity with md5sum
:
$ md5sum myfile
> 0e7c48fab7a4cf3b6ae469b859243e8b myfile
Server command:
./otacast server myfile --ip [IP OF REMOTE]
Client command:
./otacast client /tmp/
To use multicast simply provide a multicast IP when starting OTAcast. Please make sure your network properly supports multicast. Read more about setting up WiFi Multicast here.
Server command:
./otacast server myfile --ip [MULTICAST IP]
Client command:
./otacast client /tmp/ --ip [MULTICAST IP]