Git Product home page Git Product logo

alfred-client's Introduction

alfred-client build-status

A Python client library for the Almighty Lightweight Fact Remove Exchange Daemon (A.L.F.R.E.D.) by Open-Mesh

Dependencies

This project relies upon alfred which in turn depends upon a configured batman-adv environment.

See instructions for installing batctl and alfred below

Installation

Install the application by setting up and activating a virtual environment, and then running:

$ python3 -m venv ./env
$ source ./env/bin/activate
$ python setup.py install

Make a copy of the example config file and edit as needed:

$ cp alfred_client/example_config.py alfred_client/config.py

And then run the application by calling the provided entry point:

alfred_client --config=config.py

To have alfred_client start at boot, follow the System startup instructions below

Installing batctl and alfred

The development of this project has focused nearly entirely on the Raspberry Pi platform. In order to build and run batctl and alfred, you will need to install the following:

  • make
  • gcc
  • git
  • python3-dev
  • python3-venv
  • libnl-3-dev
  • libnl-genl-3-dev
  • libcap-dev
  • libgps-dev
  • gpsd (optional, assuming we add gps modules later)

Build batctl

Pull and build batctl from the OpenMesh source repository:

$ git clone https://git.open-mesh.org/batctl.git
$ cd batctl
$ sudo make install

Build alfred

Pull and build alfred from the OpenMesh source repository:

$ git clone https://git.open-mesh.org/alfred.git
$ cd alfred
$ sudo make install

System startup

To have alfred and batadv-vis start at system boot, unit files have been included in with this project in the config directory. At a minimum, this project requires that the alfred service is running. To enable visualization data to be shared, the batadv-vis service must also be running.

On Raspbian (or Debian), perform these steps for each service you wish to run:

$ sudo cp config/alfred.service /etc/systemd/system/alfred.service
$ sudo systemctl daemon-reload
$ sudo systemctl enable alfred.service
$ sudo systemctl start alfred.service

Configuring the Raspberry Pi to run this project

Add the batman-adv module to /etc/modules:

sudo echo "batman-adv" >> /etc/modules

Configure ethernet for IPv4, DHCP. This will be our outside interface to the mesh, as well as our maintenance interface.

On Raspbian (or Debian) edit /etc/network/interfaces to contain:

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

Configure your wireless interface and attach the batman-adv interface:

auto wlan0
iface wlan0 inet6 manual
  wireless-channel 1
  wireless-essid <your essid>
  wireless-mode ad-hoc
  wireless-ap 02:12:34:56:78:9A
  pre-up ifconfig wlan0 mtu 1532

auto bat0
iface bat0 inet6 auto
pre-up /usr/local/sbin/batctl if add wlan0

After completing this step, you may bring up the configured interfaces:

sudo systemctl restart networking

alfred-client's People

Contributors

coyote240 avatar

Watchers

 avatar

alfred-client's Issues

Better handling of network interfaces.

Rather than expect the web (external) interface to be present at server start, don't bind to or interact with the interface until it is present. This may mean bringing up the service without web binding for starters. Not sure how to watch for the interface to come up just yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.