20 posts, 6 voices
, Tagged: open grid OpenWrt instructions build flash
|
I'm using an OpenWrt as the hardware platform for the residential gateway, i.e. the box that allows the in home devices to chat with the internets and interact with the web application over RESTful web services. UPDATES! At the moment we are using the more powerful, and curiously cheaper WL-500GPv2 router. This has 2x USB2.0 Ports, 32MB RAM and 16MB flash, twice the smaller WL-520GU. The build is just the same, and there are some more bits to be added to build this out for 3G backhaul in adddiiton to ADSL or other. So you want to build up one of these cheap little devices that pack a but of punch? Here is my build procedure, which ends up as a nice little functional box with all the necessities like internets connectivity ssh, ready for the next step, the gateway app. The hardware I am using is the Asus WL-520GU, a box with 4MB of flash memory, 16MB of Ram and a Broadcom CPU running around 200 Mhz, not bad for $50! You can read more about this little puppy over at mightyohm, which also has a bunch of links to some great tutes on the setup, most of which are based around parts 3 & 4 of the wifi radio hack. There is also a great bunch of info in the old OpenWrt wiki on this particular device One great feature of the Asus box, is that it's "forgiving" so if (when) you brick it (...like I have a few times) it's easily brought back from the dead. Setup the internal serial port This requires opening of the device and soldering on a simple 4pin header. Follow along from here, part 3 of the wifi hack which has pictures and lots of nitty gritty. A backup Now you can poke into the gubbins of the box, it's probably wise to know the backup of the Asus standard firmware. Note, I found the download was nicer, better and sexier than the firmware that came in the box new! You can get the Asus firmware here. Getting the Image Right now, I am building the OpenWrt images using the very neat and well designed cross compilation tools, available here this will download a tarball that if you take some panadol, and follow the instructions here you will end up with an image for your tasty little box. This way lets you choose which things you want in your firmware image, and allows you to cross compile for other OpenWrt platforms. Note, you will need a linux machine to take this puppy for a walk. If you can't be fagged going through all this (and I can sympathise with that) you can just down load the image I made. This has all the USB stuff and core packages necessary to get into the box and run the setup ready for the next stage - applications. This is the current SEGbox build, and has all the necessary pre-requisites to complete a build. - has the above plus packages and tools required for the Aiko Gateway software written in LUA by @geekscape openwrt-brcm-2.4-squashfs_v0.13.trx
|
|
Flashing the OpenWrt This guide has some summary points of my procedure, though a more detailed walk through from mightyohm can be found here
|
|
Time for some Internetz Let’s get our little box up and talking to the internet, a precursor step for the rest of the build. One thing that’s really important is to give the device an ip address of 192.168.100.1 instead of 192.168.1.1 or other address likely to conflict with most home ADSL or other routers. This is outlined in the config ‘interface’ ‘lan’ section below.
|
|
Mod for wifi backhaul It’s kinda nice to be able to use the wifi on board the wrt to hook into your internetz tubing. This is not only convenient, but practical. It’s as simple as changing the network and wireless config. The following are the current network and wifi config files we are using. Note, this can also be done using the management GUI. vi /etc/config/network #### VLAN configuration config ‘interface’ ‘loopback’ config ‘interface’ ‘lan’ config ‘interface’ ‘wan’
>>> Then setup the wireless interface: vi /etc/config/wireless config ‘wifi-device’ ‘wl0’ config ‘wifi-iface’
|
|
Aiko Gateway Installation The Aiko Gateway allows the Aiko Node, which collects data and other things from the world to send it’s information back to the interenetz to this site and also to recieve commands from this site. It acts as the go-between for all the devices in your home, office, school or building. Aiko Gateway is open source, made by @geekscape on twittr, and here geekscape We have forked the Aiko software for Smart Energy Groups and our version is available on github here For this to work, the aiko_gateway.lua module needs to be placed into the home directory of the root user on the wrt. This file also needs to be made executable ;) The rest of this is what’s needed to get this baby to work! Configure WRT Disable login splash and shell access on the internal serial port: vi /etc/inittab >>> Get ser2net properly translate serial data into IP data START=95 start() { cd /root ./aiko_gateway.lua & } stop() { kill all aiko_gateway.lua }
chmod 755 /etc/init.d/aiko_gateway cd /usr/lib/lua Then reboot and prepare for OpenWRT SEGbox goodness.
|
|
Hi. New to the whole OpenWRT world… Do you still recommend the ASUS WL-520GU? Or is there a different make/model out there that’s more suitable? Cheers dargs
|
|
Hey Simon, Unfortunately for the OpenWRT community, the 500GP-v2 has been discontinued, and the 520-GU soon to go the same way. The 520 is a great, router, and one that I personally like very much for it’s easy of use and ready recovery from a bricked state. Sam.
|
|
opkg config This is the OpenWrt new package management tool that superceeds ipkg. It’s based on the openmoki work which has improved the older ipkg, so don’t fear if you see ipkg on the internets as the two are at the high level the same. We need to setup the parameters for the tool, do this as follows: vi /etc/opkg.conf …and mod it to look like this: src/gz snapshots http://downloads.openwrt.org/kamikaze/8.09.1/br… save, and update the system. opkg update you should witness: Downloading http://mightyohm.com/files/kamikaze-2.4/package… The location http://downloads.openwrt.org/kamikaze/8.09.1/brcm-2.4/packages/ has a huge range of installable packages for you to install. :) |
|
followed this guide and worked a treat |
|
|
Hi Sam, I have a D-Link DIR-615, Will the openwrt-brcm-2.4-squashfs_v0.13.trx you had compiled work with this router? Or will I need to complie my own?
Thanks Bill |
|
Hey Bill, This device I think uses the Atheros chipset and the Broadcom one above won't work. You can check the OpenWRT tables of hardware here! http://wiki.openwrt.org/toh/start#d-link We are working on building an image for the Dragino hardware, which we are planning to use for the V2 SEGmeters! Thanks, |
|
|
Hi Sam, I had a spare D-Link 615 and I was able to load DD-WRT on it successfully. However I haven't been able to load OPEN-WRT successfully. Is there an Application that I can run on a windows PC that can upload the data to the site? I am thinking of using an existing windows PC that is collecting data from a weather station.
Thanks Bill |
|
Hey Bill, If you can get DDwrt running on it, it's likely that an Atheros version for OpenWRT should work? I will be certainly posting back here when we get our Atheros image all rolling! While not windows people at SEG, it's possible to setup Lua on Windows: http://code.google.com/p/luaforwindows/ And then mod our gateway to run there: https://github.com/samotage/Aiko/tree/master/SE... Or roll your own? Thanks! Sam.
|
|
|
Thanks Sam, I now understand that this is a purely linux solution. I should of paid more attention when you asked if I had any Linux skills. I was more focused on learning how to program the Arduino. Unfortunately I don't have any Linux skills or an old ASUS router lying around. Thanks for your help. Regards Bill |
|
|
Olá Olá!! I talk from Portugal and I would be very interesting to know which solution you suggest at this moment concerning hack a router ro zigbee. Even if the brand is different from Asus we can apply the same reciep as ladyana??? |
|
Hey Xaral, We ran out of Asus routers last year, and about to release our version 2 very soon! This has Dragino runningnOpenWrt with the new Attitude Adjustment firmware,molds a bunch of cool stuff including the V2 SEGmeter! There are also a bunch of Zigbee things on the way too. :D Sam, @samotage |
|
|
Hi Samotage, So when is soon for V2. Need the extra ports and have to save some cash. V1 running perfectly, forgettable. Mano |
|
Hey Mano, We have just moved into our new offices, and one of the next things is setup of the photography space for the V2 gear. It's all working really well and ready for prime time, so keep an eye out! It's also likely we will send a mail to everyone when the SEGshop is open, together with a special members onlu discount coupon :D Thanks! Sam, @samotage |
|
|
Will do, ta |
|
Some shortcuts for re-building your SEGbox ;) Asus 520-GU devices WiFi Connection firmware: https://smartenergygroups.com/segbox/segbox_28_... Ethernet connection firmware: https://smartenergygroups.com/segbox/segbox_28_... This should make life easier! |