Giter Site home page Giter Site logo

subnodes-lighttpd's Introduction

subnodes-lighttpd

Subnodes is an open source project built for Raspberry Pi / Raspbian (as of this writing, Buster Lite) into an offline mesh node and wireless access point.

This project is an initiative focused on streamlining the process of setting up a Raspberry Pi as a wireless access point for distributing content, media, and shared digital experiences. The device becomes a web server, creating its own local area network, and does not connect with the internet. This is key for the sake of offering a space where people can communicate anonymously and freely, as well as maximizing the portability of the network (no dependibility on an internet connection means the device can be taken and remain active anywhere).

The device can also be configured as a BATMAN Advanced mesh node, enabling it to join with other nearby BATMAN nodes into a greater mesh network, extending the access point range and making it possible to exchange information with each other. Support for Subnodes has been provided by Eyebeam. This code is published under the AGPLv3.

How to Install

Assuming you are starting with a fresh Raspbian Buster Lite (Latest tested version: Feb 2020) installed on your SD card, these are the steps for setting up subnodes on your Raspberry Pi. It is also assumed that you have two wireless USB adapters attached to your RPi. They both must be running the nl80211 driver. This guide will help you find a suitable radio. If you are running a Raspberry Pi 3 or Pi Zero W, you only need one additional radio for the mesh point. Make sure the extra radio support ad hoc mode. The access point will be set up utilizing the Pi's internal wireless radio.

Also, if this is your first time connecting to your Raspberry Pi headlessly (i.e. via SSH), you must first enable SSH by placing an empty file with no filename extension simply called ssh in the root of your SD card.

  • configure your Raspberry Pi with a new password and locale information.

    You must select "4 Localisation Options" and then "I4 Change Wi-fi Country" in order for wifi to work on the Raspberry Pi. Also, change your password!

      sudo raspi-config
    
  • update apt-get

      sudo apt-get update
    
  • install git

      sudo apt-get install git -y
    
  • clone the repository into your home folder (assuming /home/pi)

      git clone https://github.com/chootka/subnodes-lighttpd.git
      cd subnodes-lighttpd
    
  • configure your wireless access point and mesh network in subnodes.config in any text editor, or in the command line you can use nano

      nano subnodes.config
    
  • run the installation script

      sudo ./install.sh
    

The installation process takes about 5 minutes. After it has completed, you will have a running lighttpd php7 web server, wireless access point, and BATMAN Advanced mesh node (if you left DO_SET_MESH=y). Connecting to the network and navigating to a browser page will redirect you to your new captive portal page. It's only going to be a boilerplate (aka, default) lighttpd web page, so head into /var/www/html and create a new index.html file and go nuts.

From here, fork, build, share your ideas, and have fun!

References

License

This code is published under the AGPLv3.

subnodes-lighttpd's People

Contributors

chootka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

subnodes-lighttpd's Issues

Running it on two devices but they are not able to ping each other

Hi,

I am running subnodes on two RaspberryPI and setup it successfully. I am using an external USB Wifi from leoxys which does support adhoc.

I have changed the subnodes.conf file in each device like this:

device1:

#!/bin/sh
# Config file for subnodes configuration





############################################################
############################################################
############################################################
# MESH STUFF
# FLAGS: y or n
DO_SET_MESH=y

# PARMAS FOR SUBNODES_MESH INIT SCRIPT
MESH_SSID="graminnonetwork"
MESH_CHANNEL=3
CELL_ID=02:12:34:56:78:90
MTU=1532

# SET GATEWAY MODE - CLIENT OR SERVER (IF THIS IS A GATEWAY NODE)
GW_MODE="client" 

# IP ADDRESS OF GATEWAY NODE
# GW_IP=192.168.100.1


# To-Do: Specify exact device you would like to use for mesh point
#MESH_PHY="phy2"





############################################################
############################################################
############################################################
# IF SETTING UP A MESH NODE, CONFIGURE THE BRIDGE WHICH WILL HOLD THE MESH AND ACCESS POINTS
# START WITH NUMBER 2+ (UNLESS THIS IS A GATEWAY NODE, THEN USE .1)
BRIDGE_IP=10.168.100.2
BRIDGE_NETMASK=255.255.255.0





############################################################
############################################################
############################################################
# HOSTAPD STUFF
# WIRELESS RADIO DRIVER
RADIO_DRIVER=nl80211

# ACCESS POINT
AP_COUNTRY=US

# BE SURE TO USE A UNIQUE NAME
AP_SSID="PINODE1"

# Recommended channels: 1, 6 or 11. Do not use channels 12 or 13 because they won't work with the onboard RPi3 radio
AP_CHAN=6

# START WITH NUMBER 2+ (UNLESS THIS IS A GATEWAY NODE, THEN USE .1)
AP_IP=10.80.100.2
AP_NETMASK=255.255.255.0

# To-Do: Specify exact device you would like to use for access point
#AP_PHY="phy1"





############################################################
############################################################
############################################################
# DNSMASQ STUFF

# SET THE DHCP NETMASK AND LEASE ( do not change unless you know what you're doing :) )
DHCP_NETMASK=255.255.255.0
DHCP_LEASE=1h

# IF WE ARE ONLY SETTING UP AN ACCESS POINT
# SET THE DHCP RANGE
AP_DHCP_START=10.80.100.101
AP_DHCP_END=10.80.100.254

# IF WE ARE SETTING UP A MESH AND ACCESS POINT
# SET THE DHCP RANGE
BR_DHCP_START=10.168.100.101
BR_DHCP_END=10.168.100.254

# SET THE IP ADDRESS OF THE GATEWAY ROUTER FOR ROUTING BETWEEN NETWORKS
# DHCP_ROUTER=10.168.100.1

# SET THE IP ADDRESS OF THE GATEWAY ROUTER WHICH WE WILL ALSO USE FOR DNS
# DNS=10.168.100.1





############################################################
############################################################
############################################################
# other options could be 
#  - Other Adapter Names
# ....

and the second PI:

#!/bin/sh
# Config file for subnodes configuration





############################################################
############################################################
############################################################
# MESH STUFF
# FLAGS: y or n
DO_SET_MESH=y

# PARMAS FOR SUBNODES_MESH INIT SCRIPT
MESH_SSID="graminnonetwork"
MESH_CHANNEL=3
CELL_ID=02:12:34:56:78:90
MTU=1532

# SET GATEWAY MODE - CLIENT OR SERVER (IF THIS IS A GATEWAY NODE)
GW_MODE="client" 

# IP ADDRESS OF GATEWAY NODE
# GW_IP=192.168.100.1


# To-Do: Specify exact device you would like to use for mesh point
#MESH_PHY="phy2"





############################################################
############################################################
############################################################
# IF SETTING UP A MESH NODE, CONFIGURE THE BRIDGE WHICH WILL HOLD THE MESH AND ACCESS POINTS
# START WITH NUMBER 2+ (UNLESS THIS IS A GATEWAY NODE, THEN USE .1)
BRIDGE_IP=10.168.100.3
BRIDGE_NETMASK=255.255.255.0





############################################################
############################################################
############################################################
# HOSTAPD STUFF
# WIRELESS RADIO DRIVER
RADIO_DRIVER=nl80211

# ACCESS POINT
AP_COUNTRY=US

# BE SURE TO USE A UNIQUE NAME
AP_SSID="PINODE1"

# Recommended channels: 1, 6 or 11. Do not use channels 12 or 13 because they won't work with the onboard RPi3 radio
AP_CHAN=6

# START WITH NUMBER 2+ (UNLESS THIS IS A GATEWAY NODE, THEN USE .1)
AP_IP=10.80.100.3
AP_NETMASK=255.255.255.0

# To-Do: Specify exact device you would like to use for access point
#AP_PHY="phy1"





############################################################
############################################################
############################################################
# DNSMASQ STUFF

# SET THE DHCP NETMASK AND LEASE ( do not change unless you know what you're doing :) )
DHCP_NETMASK=255.255.255.0
DHCP_LEASE=1h

# IF WE ARE ONLY SETTING UP AN ACCESS POINT
# SET THE DHCP RANGE
AP_DHCP_START=10.80.100.101
AP_DHCP_END=10.80.100.254

# IF WE ARE SETTING UP A MESH AND ACCESS POINT
# SET THE DHCP RANGE
BR_DHCP_START=10.168.100.101
BR_DHCP_END=10.168.100.254

# SET THE IP ADDRESS OF THE GATEWAY ROUTER FOR ROUTING BETWEEN NETWORKS
# DHCP_ROUTER=10.168.100.1

# SET THE IP ADDRESS OF THE GATEWAY ROUTER WHICH WE WILL ALSO USE FOR DNS
# DNS=10.168.100.1





############################################################
############################################################
############################################################
# other options could be 
#  - Other Adapter Names
# ....

Based on past experience, I kept the Batman cell id and essid same so that devices can find each other. However, they don't. When I ping the batman IP from one machine i get the destination host unreachable error.

Please help!

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.