Giter Site home page Giter Site logo

openwisp / openwisp-firmware Goto Github PK

View Code? Open in Web Editor NEW
86.0 21.0 43.0 469 KB

An OpenWRT based firmware to be used with OpenWISP Manager

Home Page: http://openwisp.org

License: GNU General Public License v3.0

Shell 72.75% HTML 0.09% JavaScript 1.84% CSS 23.58% Makefile 1.75%
openwisp openwrt lede wifi

openwisp-firmware's Introduction

OpenWISP Firmware

https://travis-ci.org/openwisp/OpenWISP-Firmware.svg?branch=master

This is legacy software

If you are looking for a wifi controller solution to manage your OpenWRT/LEDE based networks, check out the more recent OpenWISP 2 Controller and the openwisp-config OpenWRT/LEDE daemon.

Description

OpenWISP Firmware (shortly OWF) is an openwrt package that provides a daemon that periodically retrieves the configuration of the following components from an OpenWISP Manager (OWM) server:

  • wifi (currently only for madwifi-ng and ath9k)
  • networking
  • layer 2 traffic shaping
  • openvpn (layer 2, tap)
  • cronjobs

OpenWISP Firmware also provides a web GUI for: - configuring basic network parameters - configuring basic OpenWISP server settings - performing a set of test to spot and resolve most common problems that may prevent Open WISP firmware to work correctly

See the OWM wiki for more details.

Compiling OWF

In order to have a fully working OWF you have to compile it yourself.

OWF package supports an overlay configuration file that you should provide at compile time, this overlay allows you to include custom configuration. See below for more information on this file.

We strongly suggest to build OpenWRT on a GNU/Linux environment, you can find other pre-requisites here: http://wiki.openwrt.org/doc/howto/build.

If you have a properly configured machine follow these steps inside the OpenWRT root directory:

cp feeds.conf.default feeds.conf
echo "src-git openwisp https://github.com/openwisp/OpenWISP-Firmware.git" >> feeds.conf
./scripts/feeds update
./scripts/feeds install openwisp-fw
mkdir files # (see below)
make menuconfig # (choose your arch and include openwisp-fw package and submodule if appropriate)
make -j 1 V=s

The full version of OWF will support UMTS and mesh capability, but will require better hardware and much more space on flash/disk, we recommends an appropriate hardware under this condition.

Our firmware should ideally run on any OpenWRT-compatible device, but we have tested mainly atheros, x86, ar71xx platforms.

Stable version features:

  • wifi support (Both drivers works alone or togheter)
  • 3G support
  • interface failover script

Overlay Configuration

The overlay configuration file is a directory that OpenWRT extracts inside the target rootfs and can potentially overwrite any other config file or add new files in the filesytem of the resulting firmware images.

Here's an example of the overlay configuration directory structure that should be provided to be fully compliant with OWM and OWF v1.x:

etc
├── config
│   └── owispmanager
├── openvpn
│   ├── ca.crt
│   ├── client.crt
│   └── ta.key
└── shadow

This is an exmaple of the contents of etc/config/owispmanager:

config 'server' 'home'
  option 'address' 'my_OWM_server'
  option 'port' ''
  option 'status' 'configured'
  option 'inner_server' ''
  option 'inner_server_port' ''

config 'server' 'local'
  option 'hide_server_page' '1'
  option 'setup_wpa_psk' 'owf_safemode_wpakey'
  option 'setup_wifi_dev' ''
  option 'setup_httpd_port' ''
  option 'setup_ssid' ''
  option 'setup_ip' ''
  option 'setup_netmask' ''
  option 'setup_range_ip_start' ''
  option 'setup_range_ip_end' ''
  option 'hide_umts_page' '1'
  option 'hide_mesh_page' '1'
  option 'hide_ethernet_page' '0'

The etc/openvpn/ directory will contain the RSA certificates to establish a successfull connection with your own openvpn server (aka setup vpn) while /etc/shadow will provide a default password for the root user, here the file content for password "pass":

root:$1$SwrPpeIH$8MMk3YQiVXl5uQzRgTIvU/:16386:0:99999:7:::
daemon:*:0:0:99999:7:::
ftp:*:0:0:99999:7:::
network:*:0:0:99999:7:::
nobody:*:0:0:99999:7:::

The overlay configuration MUST be provided in a directory named files/ in the OpenWRT/LEDE source.

For an example of directory structure see tests/dummy_config and refer to .travis.yml to setup the correct build enviroment.

Beware: if you update your overlay configuration please ensure to clean and recompile the openwisp package. This can be done using the following command inside openwrt build dir:

make package/openwisp-fw/clean

Developing the firmware

If you'd like to work locally on firmare improvement you should use a local OpenWisp Firmware repo clone and a local OpenWrt repo clone. In this configuration you should use the following commands for feed configuration:

echo "src-link openwisp /path/to/local/git/repo/" >> feeds.conf
mkdir files  # put your overlay configuration here
./scripts/feeds update

Compile Openwrt for multiple architectures

Here follows an example script to compile OWF for different arch targets:

#!/bin/bash

git clone https://github.com/openwrt/openwrt.git
cd openwrt

#configure feeds
cp feeds.conf.default feeds.conf
echo "src-git openwisp https://github.com/openwisp/OpenWISP-Firmware.git" >> feeds.conf
mkdir files  # put your overlay configuration here
./scripts/feeds update
./scripts/feeds install openwisp-fw

#config target
for arch in ar71xx atheros x86; do
  echo "CONFIG_TARGET_$arch=y" > .config;
  echo "CONFIG_PACKAGE_openwisp-fw=y" >> .config
  make defconfig;
  make package/openwisp-fw/clean;
  make -j 1 V=s;
done

Copyright

Copyright (C) 2012-2016 OpenWISP.org

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

openwisp-firmware's People

Contributors

anaghamittal avatar andreaferraresi avatar claudyus avatar cvalenti avatar dariomas avatar dguerri avatar nemesifier avatar zioproto avatar

Stargazers

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

Watchers

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

openwisp-firmware's Issues

openwrt feed update give error

hi, i try the procedure for installing and compiling openwrt-firmware with these commands on ubuntu 12.04.5

git clone git://git.openwrt.org/openwrt.git
cd openwrt
cp feeds.conf.default feeds.conf
echo "src-git openwisp https://github.com/openwisp/OpenWISP-Firmware.git" >> feeds.conf

but after these commands:

./feed update 

i have these error:

Resolving deltas: 100% (126/126), done.
Create index file './feeds/openwisp.index' 
ERROR: please fix feeds/openwisp/meta/openwisp-fw/Makefile - see logs/feeds/openwisp/meta/openwisp-fw/dump.txt for details
Collecting package info: done

the dump of the log is:

~/openwrt$ tail ./logs/feeds/openwisp/meta/openwisp-fw/dump.txt 
Makefile:9: *** OPENWISP_CONF is not set.  Arresto.

Consider deprecating OPENWISP_CONF

OPENWISP_CONF can be deprecated in favour of using the standard files directory in the OpenWRT/LEDE source dir. This would make the compilation step easier.

802.11a/an-only AP are not supported

Access points with only 5Ghz radios are not supported because OWF forces the use of channel 1 (i.e. 2,412Ghz) for the setup services:

https://github.com/openwisp/OpenWISP-Firmware/blob/master/tools/mac80211.sh#L71
https://github.com/openwisp/OpenWISP-Firmware/blob/master/owispmanager.sh#L305

If we're using mac80211 driver we can use something like the following in order to determine the first available channel:

iw phy0 info | awk 'BEGIN { FS="[\]|\[]" } ; /Frequencies/ { getline; print $2 }'

The output on a Nanostation M2:

~# iw phy0 info | awk 'BEGIN { FS="[\]|\[]" } ; /Frequencies/ { getline; print $2 }'
1

Error while compiling

Error:

bash: line 0: [: missing `]'
grep: ]: No such file or directory
git describe --tags > /home/cappe/Documenti/openwisp/firmware/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/openwisp-fw-1330d0e/ipkg-ar71xx/openwisp-fw-base/etc/openwisp_version
fatal: No names found, cannot describe anything.

This is my command history

git pull || (git clone git://git.openwrt.org/14.07/openwrt.git
cd openwrt
cp feeds.conf.default feeds.conf
echo "src-git openwisp https://github.com/openwisp/OpenWISP-Firmware.git" >> feeds.conf
./scripts/feeds update
./scripts/feeds install openwisp-fw
make menuconfig (choose ar71xx openwisp-standard openwisp-base)
export OPENWISP_CONF="http://127.0.0.1/openwisp.tar.gz" 
make

Thanks

Compilation Fail

Hello,

for the past few days i've had a bit trouble with compiling openwrt. No matter what i do i get the same issue and i can't seem to understand what did i do wrong. I have tryed compiling different openwrt versions but i get always the same result.

This is the output of the compilation:

make[3]: *** [/home/borys/openwrt/bin/x86/packages/openwisp/openwisp-fw-base_7987c89_x86.ipk] Error 2
make[3]: Leaving directory /home/borys/openwrt/feeds/openwisp/meta/openwisp-fw' make[2]: *** [package/feeds/openwisp/openwisp-fw/compile] Error 2 make[2]: Leaving directory/home/borys/openwrt'
make[1]: *** [/home/borys/openwrt/staging_dir/target-i386_geode_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/borys/openwrt'
make: ** [world] Erro 2

polarssl 1.3.10

VPN doesn't work with polarssl 1.3.10 updated in openwrt trunk

raspberry pie tesseract-ocr

I'm trying to install Tesseract-ocr on a raspberry pi, but I get the following error:
$ ./autogen.sh
fatal: No names found, cannot describe anything

"inner_server_port" config option ignored

The inner_server_port config option is not used by the firmware.

I noticed it while testing it in a development environment where the server port is 8000, changing the parameter did not have effect.

I had to put the port in the inner_server option in the form of domain:port to make it work.

DHCP is no longer the default for network configuration

In the trunk version of openWRT backfire (which is the recommended openWRT version in the OWF installation guide)

svn co svn://svn.openwrt.org/openwrt/branches/backfire backfire

seems there is no way to set DHCP as the initial LAN network configuration option.

So, settings in the .config file used by `deploy-firmware.sh`` are discarded and the images build with this tool are configure with default openWRT network settings (e.g. 192.18.1.1 as IP address)

I think deploy-firmware should find another way to set the initial network configuration.

Restoration of unifi ap outdoor after unsuccessful flashing.

After a failed firmware, the device stops responding SSSH.
Through a Web interface provides:
This device has been identified as counterfeit.
AirOS is not licensed for use on this device and has been disabled.
Please see the Ubiquiti Brand Protection page at www.ubnt.com
for more information.

Due to the lack of visual images in the article: https://github.com/openwisp/OpenWISP-Firmware/wiki/Unifi
I am not able to fully understand how to reflash. It was possible to do the following, disassemble the unit, take the USB cable is connected to the TTL and PC.
Cable usb to TTL, used a custom cable for the mouse, pinout connecting was standard red, green, white, black.
After putty introduced parameters 115200-8N1 com1/com2/usb1/usb2 port, but to join the device did not work.

I ask you to help deal with the flashing the device. Write a statement or make recommendations as possible pereproshivt device using the operating system windows 7.

Problem with serial consolle login

To re-enable console login please insert support for shadow password in
base-system->busy box->Login/password....

is fixed only in x86-full

Custom network configuration

Some time ago I was in the need to deploy a custom initial network configuration for a device with multiple ethernet interfaces.
I'm wondering if #5 could be extended to use a custom configuration file and, if missing, to use a default setup.

This could be handy for devices like the D-Link DIR 825 or any Ubiquiti with more than one eth interface.

Issue new release (1.3.1)

When trying the 1.3 tag we encountered a few issues that were fixed in subsequent commits. We should issue a new minor release with all the fixes.

Root password

whit this
root:$1$SwrPpeIH$8MMk3YQiVXl5uQzRgTIvU/:16386:0:99999:7:::
daemon::0:0:99999:7:::
ftp::0:0:99999:7:::
network::0:0:99999:7:::
nobody::0:0:99999:7:::

root's password isn't pass
doesn't work

Kernel panic on Ubiquiti Unifi AP

Hi, I'm trying to compile openwisp firmware using openwrt 15.05 for Ubiquiti UniFi AP (LR). I'm using the squashfs-factory.bin image and compilation goes well. When I load the firmware on the board (with tftp) and I connect the pppoe to the internet, I have a kernel panic with message:
"CPU0 Unable to handle kernel paging request at virtual address ......"
Same behavior if I use the jffs2 image.
Someone can help me please?

Edit: the problem happens also if I dont connect the board to the internet
Thank you

wireless n mode doesn't work

I select ng mode in the template but wireless works only in g mode.
I think the problem is in the file /etc/owispmanager/tools/mac80211.sh at line 47
echo "hw_mode=g" >> $HOSTAPD_FILE
This probably rewrites the configuration in owm.

Atheros AR71xx

OWF cannot bring up mac80211 devices, seems to be the same problem we have at boot with madwifi in the other bug

Reduce size OpenWISP-Firmware

Dear all,
I have problem when compile openwisp-firmware on openwrt, because the image is too large to install on device's flash. So I decide not to compile openvpn in openwisp by deleting openvpn-polarssl option in Makefile. I wonder if my new firmware is still working properly. Any idea help me reduce size of new openwisp-firmware.
Any help would be appreciated.
Thanks,
Kiet Nguyen.

Update docs

  • convert wiki pages to reStructured text
  • move docs on readthedocs
  • fix broken links
  • remove detailed flashing info in favour of the openwrt wiki (if applicable)
  • add an info table with tested hardware

Uninstalling active configuration doesn't work

After a configuration update in owm, uninstall.sh script try to execute:

uci changes openvpn | grep "=openvpn" | cut -d'.' -f2 | cut -d'=' -f1 | awk '{print "/var/run/openvpn-"$1".pid"}' | xargs cat | xargs kill
uci changes openvpn | grep "=openvpn" | cut -d'.' -f2 | cut -d'=' -f1 | awk '{"rm /var/run/openvpn-"$1".pid"|getline;print}'

but the output is:

--- Tue Dec 2 15:51:02 CET 2014 ------------------

  • Installing new configuration
    Deploying new configuration
    Changing hostname
    Applying network configuration
    Creating tap v37t37
    Tue Dec 2 15:51:02 2014 ERROR: Cannot ioctl TUNSETIFF v37t37: Device or resource busy (errno=16)
    Tue Dec 2 15:51:02 2014 Exiting due to fatal error
    [...]

This problem is due to openVPN init script, because there isn't longer avaliable: SERVICE_PID_FILE="/var/run/openvpn-$s.pid" and the daemon is started without option "--writepid "$SERVICE_PID_FILE".

WPA2-Enterprise security issue

The problem was that the wpad-mini package was installed but it does not support WPA2-Enterprise security. It was necessary to install wpad instead of wpad-mini when compile.

SMP compiling

-j option is broken in attitude adjustment still investigating

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.