home  wiki

oww-openwrt


OWW-OpenWrt


This page is for information on getting oww to work on openwrt.

Contributors

melb_ap

Background

OWW stands for one wire weather and is a weather monitoring system based around the Dallas one-wire protocol and the Dallas example weather station kit available from aag
The oww software allows for remote monitoring of the device over tcp so you can get the wind speed & temp at your poor freezing remote wireless node on the hill !

OS version used

openwrt RC5 (2.4 kernel)

Hardware used

wl-500gP with dallas one wire weather station kit and rs232 to one-wire adaptor
but any ap with 3.3v serial, openwrt support and enough flash space can be used.
I used the ATen usb to rs232 adaptor to get the rs232 in my case for ease.

The weather station's were available from AAG but they have brough out a new version and i'm not sure on compatibility.

Extra modules like humidity, barometer and the rain sensor can be purchased
from www.hobbyboards.com and these three have been verified as working!
(see setup details below)


Modules


The modules to get this running on openwrt are




  1. usb support

ipkg install kmod-usb-core_2.4.30-brcm-3_mipsel.ipk
ipkg install kmod-usb-ohci_2.4.30-brcm-3_mipsel.ipk
ipkg install kmod-usb-uhci_2.4.30-brcm-3_mipsel.ipk


  1. usb serial adaptor

ipkg install kmod-usb-serial_2.4.30-brcm-3_mipsel.ipk
ipkg install kmod-usb-serial-pl2303_2.4.30-brcm-3_mipsel.ipk


vim /etc/init.d/S95extras

i

insmod usbserial
insmod pl2303.o


chmod 777 /etc/init.d/S95extras


    1. libs and oww modules

ipkg install zlib_1.2.2-2_mipsel.ipk
ipkg install openssl_0.9.7m-3_mipsel.ipk
ipkg install libcurl_7.17.0-2_mipsel.ipk
ipkg install libusb_0.1.10a-1_mipsel.ipk
ipkg install lsusb_0.71-1_mipsel.ipk
ipkg install oww_0.82.0-1_mipsel.ipk



Internet / dns access

The router will need to be setup for internet access

Typically use (natuarally adapt for your subnetting system)

nvram set lan_ipaddr=192.168.0.50
nvram set lan_netmask=255.255.255.0
nvram set wan_gateway=192.168.0.1
nvram set wan_dns=192.168.0.1
nvram commit


##Time zone setup (this is for Melbourne Australia)


    1. Just paste this in to opwnwrt


nvram set time_zone="AEST-10AEDT-11,M10.5.0/02:00:00,M4.1.0/03:00:00"
nvram commit


tz=$(nvram get time_zone)
tz=${tz:-"AEST-10AEDT-11,M10.5.0/02:00:00,M4.1.0/03:00:00"}
echo $tz > /etc/TZ

    1. after a reboot it'll take affect





Discussion

Feel free to add your own contributions.

melb_ap 8/7/08 : I'm currently working on this project to get the dallas weather sensors running at various node locations.

THE NLSU2 unslung site has the oww software available compiled for openwrt and the wl-500gP but I haven't quite got it to work just yet.

I have a max232 and the dallas rs232 interface connected to the wl-500gP
but running ./owwnogui -i in /opt/bin just hangs the router at present.

I've verified it works ok on a pc with the AAG software which was also handy to get the sensor serials required for oww's devices config.

A reference link (here http://oww.sourceforge.net/hardware.html#slug)

Trying a usb to serial adaptor atm, note serial is /dev/usb/tts/0

Yah we have data

01/01/00 , 00:08:29 , 20.1,����¯�¿�½���¯���¿���½������¯������¿������½����¯�¿�½���¯���¿���½����¯�¿�½������¯����¯�¿�½���¯���¿���½������¯������¿������½����¯�¿�½���¯���¿���½����¯�¿�½������¿����¯�¿�½���¯���¿���½������¯������¿������½����¯�¿�½���¯���¿���½����¯�¿�½������½C , 0.00, MPH, WNW ,292.5 , 13 , 0.00, inches

After much work and some help from some other members I have a working configuration.

If your looking at this project , use the RS232 to one wire adaptor and the A-Ten USB to serial converter.

I'm not aware of openwrt support for the USB to one wire device
but it'll just depend on weather it uses a standard linux supported
usb to rs232 chip or not.

And for time sync , just use rdate once you've set the correct time zone
on openwrt.

melb_ap 26/1/10

All working I've updated the links to the new active weather stations
and i've also got hobby board humidity / pressure / rain sensors running.

Thats only setup on node JAA at the moment.
(presently in testing on the bench but soon to move to the site)



Results


Node HVC Melbourne City Weather Station online link External linkhere

Node JAA Kalista Weather Station online link External linkhere
(has Hobby Board pressure/humidity/rain sens)

Node KGL Emerald Weather Station online link External linkhere

Node ICQ Aspendale Weather Station online link External linkhere

Node GHO Weather Station online link External linkhere




Further Setup Details for Hobby Board Devices



My setup that worked;


|wl500gP|---usb to serial--serial to one-wire---

      ---12v------| (on correct wires as per hobby board wiring diagram)
                  |

--rj12-two-wires---|-----rj45-|barometer|-rj45--------


------------|
           |rj45 dbl adapt--|humidity sens|--dallas/aag weather station--
|rain sens                 
 



Notes





Setup instructions for hobby board modules


The hobby boards devices come up as other things by default
without assigninging them to a function.

IE The humidity sensor seems to come up as 2 temperature
sensors

So you use the re assign to assign it to humidity 1

this is done below once to get the correct strings
then you save them to your devices file so it just
uses them in the future.

And the one wire devices do have unique serial id's
so a sensor replacement will require runnng this
again for that sensor.


point A

Plug in only one sensor for each time you run this process

run

/opt/bin/owwnogui -i


type search

to find devices


type assign

to assign devices

Assign the device to to thing it actually is like humidity 1


Then type ? devices


copy and paste to a notepad file.


now close owwnogui with cntrl-c , plug in the next sensor

Repeat this process for each sensor so you have the line for each wire device s/n and assignments from repeat point A


Note - Make sure you assign any actual temperature senors to say temp 2
      so that the main weather sensor still can use temp 1




Once all the device assignments are done you can merge all the assingments togeather
to make it all work togeather.



Once you have this all done , hopefully it'll all work when connected togeather !


Here's my devices file for one of my stations for example

offset 0
reverse 0

    1. rain sens bucket
rain D60000000B2FAD1D 0.010000

    1. oww aag sensor
T1 970008001B3C0E10 1.000000 0.000000
vaneadc E000000006E32F20
anem 2400000000E6081D 1.000000

    1. barometor sensor
BAR1 A9000000BC897526 14.285700 932.142883 1.000000 0.000000

    1. humidity sens
H1 4C000000E76F5626 1.000000 0.000000 1.000000 0.000000
T2 0A000801CB230110 1.000000 0.000000

driver /dev/usb/tts/0
port 0

    1. Data sample offset: 3-10us
ds2480samp 10

    1. Write 1 low time: 5-15us
ds2480write 12

    1. Parameters for DS2490.
    2. Use -1 for defaults, or 0-7 according to data sheet tables 9-11
ds2490slew -1
ds2490write -1
ds2490samp -1

    1. Test setup
recharge 1
autoalloc 1







Trouble shooting Tips :


Make sure you test it all connected on the bench before installation to save onsite headaches !


The hobby board sensors with the 12v connecor blocks DO require 12v to work when piggy backed
this can be provided via the connectors or the cat5 cable as per the hobby boards wiring pinout.


If the cables have crossed over wires when yu look at the connectors, they wont work,
they should match when held sid by side with both ends facing away from you.

My Onewire TA weather sensor for what ever reason would only work on one connector - the left one
on the top of the board. The right one has the wire loop rj12 in it.

Most phone RJ12 double adaptors have the wires crossed and wont work unless you pull them apart
and set it to all strait through


I found the rj45 double addaptor seemed to be strait through though so i used that.

With the dallas/aag weather sensor - leave the rj12 with the wire loop between pin 1 and 4 installed in the extra rj12.

I found it unstable for whatever reason without this and it wouldn't work properley when all sensors were connected.


Good luch and let me know if this help you !

(it took a lot of work to get it right)


Version 10 (current) modified Mon, 26 Jul 2021 12:49:29 +0000 by melb_ap
[EditText] [Spelling] [Current] [Raw] [Code] [Diff] [Subscribe] [VersionHistory] [Revert] [Delete] [RecentChanges]
> home> about> events> files> members> maps> wiki board   > home   > categories   > search   > changes   > formatting   > extras> site map

Username
Password

 Remember me.
>

> forgotten password?
> register?
currently 0 users online
Node Statistics
building132
gathering192
interested515
operational242
testing216