/etc/config/easycwmp
config local
option interface wlan0
option port 7547
option ubus_socket /var/run/ubus.sock
option date_format %FT%T%z
option username bob
| Working Huawei E3372h-153 SETPORT mappings | |
| replacing A1,A2 with FF turns off need for usb_modeswitch | |
| AT^SETPORT="A1,A2;12,1,16,A1,A2" | |
| ^GETPORTMODE: TYPE: WCDMA: huawei,PCUI:0,MDM:1,NDIS:2,CDROM:3,SD:4, | |
| AT^SETPORT="A1,A2;1,12,16,A1,A2" |
| var mqtt = require('mqtt') | |
| // Make sure to change this to the IP address of your MQTT server | |
| , host = '192.168.128.204' // or localhost | |
| client = mqtt.createClient(1883, host, {keepalive: 10000}); | |
| // Subscribe to the temperature topic | |
| client.subscribe('temperature'); | |
| // When a temperature is published, it will show up here | |
| client.on('message', function (topic, message) { |
| -- Using LuaSQL for sqlite3 DB handling. | |
| luasql = require('luasql.sqlite3') | |
| local env = assert(luasql.sqlite3()) -- create the context | |
| local conn = assert(env:connect("test.sqlite")) -- connect to the DB | |
| -- Do some queries. | |
| assert(conn:execute("CREATE TABLE IF NOT EXISTS tbl1(one varchar(10), two smallint)")) | |
| assert(conn:execute("INSERT INTO tbl1 VALUES('hello!', 10)")) |
/etc/config/easycwmp
config local
option interface wlan0
option port 7547
option ubus_socket /var/run/ubus.sock
option date_format %FT%T%z
option username bob
| #feeds | |
| cp feeds.conf.default feeds.conf | |
| echo "src-git openwisp https://github.com/openwisp/openwrt-feed.git" >> feeds.conf | |
| ./scripts/feeds update | |
| ./scripts/feeds install -d y openwisp-fw | |
| #config target | |
| echo "CONFIG_TARGET_ar71xx=y" > .config | |
| make defconfig | |
| make -j 4 |
| USER=ubuntu | |
| GROUP=ubuntu | |
| sudo mkdir -p /opt/{dev,git} || exit 0 | |
| sudo chown -R $USER:$GROUP /opt/{dev,git} | |
| git clone git://github.com/json-c/json-c.git /opt/git/json-c | |
| cd /opt/git/json-c/ | |
| autoreconf -i |
| #!/bin/sh | |
| set -e | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
| echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
| sudo add-apt-repository -y ppa:chris-lea/redis-server | |
| sudo add-apt-repository -y ppa:chris-lea/node.js | |
| sudo apt-add-repository -y ppa:brightbox/ruby-ng | |
| sudo apt-get -qq update |
| #!/bin/sh | |
| # | |
| # Traffic logging tool for OpenWRT-based routers | |
| # Original code at https://code.google.com/p/wrtbwmon/ | |
| # For usage with OpenWRT, take a look at http://heyeshuang.tk/?p=268 | |
| # Created by Emmanuel Brucy (e.brucy AT qut.edu.au) | |
| # Modified by HeYSH (yeshuanghe AT gmail.com) | |
| # | |
| # Based on work from Fredrik Erlandsson (erlis AT linux.nu) | |
| # Based on traff_graph script by twist - http://wiki.openwrt.org/RrdTrafficWatch |
| #!/bin/sh | |
| # udhcpc script edited by Tim Riker <Tim@Rikers.org> | |
| RESOLV_CONF="/etc/resolv.conf" | |
| [ -n "$1" ] || { echo "Error: should be called from udhcpc"; exit 1; } | |
| NETMASK="" | |
| [ -n "$subnet" ] && NETMASK="netmask $subnet" | |
| BROADCAST="broadcast +" |
| --- a/Makefile | |
| +++ b/Makefile | |
| @@ -32,11 +32,12 @@ LDLIBREG += -lreg | |
| LDLIBS += $(LDLIBREG) | |
| LDLIBS += -lm | |
| LIBREG += libreg.so | |
| +LIBREG_STATIC += libreg.a | |
| LDFLAGS += -L ./ | |
| all: all_noverify verify |