The grep from BusyBox is not complete, not support "-e"

for Attitude Adjustment only

echo "src-git addon https://github.com/sonnyyu/addon.git" >>feeds.conf.default
./scripts/feeds update addon
./scripts/feeds install -p addon grep
make menuconfig
make package/feeds/addon/grep/clean V=s
make package/feeds/addon/grep/compile V=s

Write comment (0 Comments)

Install OpenWrt-SDK:

Openwrt SDK

cd ~
git clone  https://github.com/sonnyyu/UsbRelay.git
cd UsbRelay
mips-openwrt-linux-uclibc-gcc   -O -Wall  -c usbrelay.c -o usbrelay.o
mips-openwrt-linux-uclibc-gcc  -O -Wall -I${CFLAGS} -c hiddata.c -o hiddata.o
mips-openwrt-linux-uclibc-gcc -L${LDFLAGS} -o usbrelay usbrelay.o hiddata.o -Wl,-rpath-link=${LDFLAGS} -lusb
mips-openwrt-linux-uclibc-strip usbrelay
file usbrelay

Write comment (0 Comments)

https://allseenalliance.org/developers/develop/building/linux/openwrt

Patch OpenSSL

For Barrier Breaker, use 39048 or later, or apply patch 4576 (The latest version of Barrier Breaker, aka trunk, already has the patch applied.)

My Checked out revision 46386. 2015/7/16,Barrier Breaker

No Patch OpenSSL is needed

nano feeds.conf.default
src-git alljoyn src-git alljoyn https://git.allseenalliance.org/gerrit/core/openwrt_feed;barrier_breaker
./scripts/feeds update  alljoyn
./scripts/feeds install -p alljoyn -a
make menuconfig

compile it:

make  -j 9  V=s

Write comment (0 Comments)

Sign Up - Xively

https://personal.xively.com/signup

Install software:

opkg update
opkg install python-openssl 
opkg install distribute 
easy_install xively-python
easy_install requests
nano /mnt/sda1/temp.py
#!/usr/bin/python
import os
import xively
import subprocess
import time
import datetime
import requests
import sys
#FEED_ID = "YOURFEEDID"
#API_KEY = "YOURAPIKEY"
# initialize api client
api = xively.XivelyAPIClient(API_KEY)
def read_temperature():
   temperature = sys.argv[1]
   return temperature
# function to return a datastream object. This either creates a new datastream,
# or returns an existing one
def get_datastream(feed):
  try:
    datastream = feed.datastreams.get("TemperatureSensor")
    return datastream
  except:
    datastream = feed.datastreams.create("TemperatureSensor", tags="temperature")
    return datastream
# main program entry point - runs continuously updating our datastream with the
# latest temperature reading
def run():
  feed = api.feeds.get(FEED_ID)
  datastream = get_datastream(feed)
  datastream.max_value = None
  datastream.min_value = None
  degreesCelcius = read_temperature()
  datastream.current_value = degreesCelcius
  datastream.at = datetime.datetime.utcnow()
  try:
      datastream.update()
  except requests.HTTPError as e:
      print "HTTPError({0}): {1}".format(e.errno, e.strerror)
run()
chmod 755 /mnt/sda1/temp.py

Testing:

/mnt/sda1/temp.py 80

ATmega32u4 code:

#include <Process.h>
void setup() {
  Bridge.begin(); // Initialize Bridge
}
void loop() {
  Process p;  // Create a process and call it "p"
  p.begin("/mnt/sda1/temp.py"); // Process that launch the "pythonsqlite3.py" command
  p.addParameter("90"); // Add the parameter to "Temp"
  p.run();      // Run the process and wait for its termination
  delay(10000);
}

Write comment (0 Comments)