WMRUSB driver question

123 views
Skip to first unread message

SteveB05

unread,
Feb 10, 2012, 8:27:25 PM2/10/12
to wview
Hey all,

First off, let me say this is an awesome project. There isn't much out
there for Linux and I'm very happy to see a solution this solid.

I'm running the latest Debian package on an ARM processor (NSLU2) and
the install couldn't have been easier...okay, maybe if I didn't have
to restart the logging service myself to get the logs in the right
place (I'M KIDDING!!)

I have a UV sensor on my OS WMR88A. Before coming to this package I
was running another solution (something about a frog) and it saw my UV
sensor data. WView doesn't. I've looked at the source and it appears
the driver supports it, but maybe the Debain package is somehow
restricted, or maybe turning on expanded graphics isn't enough to
enable it. In either case, can someone point me to a possible
solution? I've Googled for DAYs trying to find the answer myself, but
to no avail.

Thanks!
Steve

Maxwell

unread,
Feb 11, 2012, 2:37:43 AM2/11/12
to wview
Have more or less the same configuration but with a WMR100N. Make sure
that you have the "Generate Extended Sensor Values" option selected in
the File Generation section of the configuration. Hopefully you have
been recording data but not seeing it.

This should generate graphs for UV, Solar Radiation and EVAPot (no
sensor for these on my station)
It hasn't been sunny enough to register anything on my station since I
got things working but I it does generate a graph for UV with a
flatline value of 1 (station reports 0). I'm lookiing forward to
seeing some higher values soon :-).

KT. Pedersen

unread,
Feb 11, 2012, 3:00:50 AM2/11/12
to wv...@googlegroups.com
It does support UV from wmr200.   Enable the plus templates and the variable is UV.  


--
You received this message because you are subscribed to the Google Groups "wview" group.
To post to this group, send email to wv...@googlegroups.com.
To unsubscribe from this group, send email to wview+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wview?hl=en.




--
Best Regards,

Kjell Thomas Pedersen



KT. Pedersen

unread,
Feb 11, 2012, 3:02:07 AM2/11/12
to wv...@googlegroups.com
sorry wmr88..

SteveB05

unread,
Feb 11, 2012, 8:07:16 AM2/11/12
to wview
Ahhh...interesting. I do have the graphs running but didn't think I
was getting data since I don't see any "received packet UV" in the
logs and the graphs are like Maxwell says...flatlined at 1. Guess I'll
wait for more Sun and see what I get!

Thanks!

On Feb 11, 1:02 am, "KT. Pedersen" <kjel...@gmail.com> wrote:
> sorry wmr88..
>
>
>
>
>
> On Sat, Feb 11, 2012 at 9:00 AM, KT. Pedersen <kjel...@gmail.com> wrote:
> > It does support UV from wmr200.   Enable the plus templates and the
> > variable is UV.
>
> > *Best Regards,*
> > *
> > *
> > *Kjell Thomas Pedersen*
> > *kjel...@gmail.com*
> > *
> > *
> > *
> > *
>
> --
> *Best Regards,*
> *
> *
> *Kjell Thomas Pedersen*
> *kjel...@gmail.com*
> *
> *
> *
> *- Hide quoted text -
>
> - Show quoted text -

KT. Pedersen

unread,
Feb 11, 2012, 8:20:22 AM2/11/12
to wv...@googlegroups.com
Keep in mind that the OS UV sensor only shows increments of 1, not decimals.

SteveB05

unread,
Feb 11, 2012, 3:03:26 PM2/11/12
to wview
Ok so, the console is showing 2 right now, but wview is still
flatlined at 1. I would expect 3 or at least 2 from wview. Any
suggestions?

SteveB05

unread,
Feb 13, 2012, 5:27:40 PM2/13/12
to wview
Bump...anyone?
> > - Show quoted text -- Hide quoted text -

SteveB05

unread,
Feb 18, 2012, 11:44:29 AM2/18/12
to wview
One last try before I move on...can anyone help with figuring out why
the WRMUSB driver is not trapping the UV packets?

Mark Teel

unread,
Feb 18, 2012, 12:09:39 PM2/18/12
to wv...@googlegroups.com
If you can build and run from a source tarball and are willing to
capture debug logs and report them here, I am planning to publish a test
version on the wviewweather.com site later today and I can place some
debug logs in the UV processing for WMRUSB. You will need to annotate
the console's value for UV corresponding to the logs you submit as well...

Mark

Michael Gray

unread,
Feb 18, 2012, 12:19:21 PM2/18/12
to wv...@googlegroups.com
I don't have a UV sensor so can't offer any direct help... But if it
were me, I think I'd
start by adding some debug writes. In stations/WMRUSB/wmrusbprotocol.c
to see
if you're getting UV sensor data in the work packet:

***************
*** 216,221 ****
--- 219,228 ----
{
wmrWork.sensorData.UV = ptr[0] & 0x0F;
}
+ if (! wmrWork.started)
+ {
+ radMsgLog (PRI_MEDIUM, "received UV packet... UV: %f",
wmrWork.sensorData.UV);
+ }
}

static int IsFFFFPacketStart (UCHAR* value)

If you're getting data there, next thing would be to turn on debugging
in stations/common/station.c
to see if it's getting copied into the loop packet.

Try the above and let us know results...

Michael

SteveB05

unread,
Feb 19, 2012, 11:16:40 AM2/19/12
to wview
I have the WMRUSB source but I'm not a Debian guy (been playing with
Arch and Fedora/Red Hat mostly) so I'm not sure how to compile. I've
learned how to use autoconfig to make the .configuration file but when
I run `./configure` I get this:


configure: creating ./config.status
config.status: creating Makefile
config.status: error: cannot find input file: `config.h.in'

I would certainly be willing to capture any debug info that is
helpful. This is a sigle purpose machine so its no problem.

Maxwell

unread,
Feb 28, 2012, 8:08:44 AM2/28/12
to wview
Had some sun at the weekend which caused the sensor to read UV = 1 on
my station for a long period (WMR100N) but no movement within wview. I
am expecting to have some rather dull charts over the summer if I
don't fix the problem. Have downloaded source code - what changes do I
need to make to generate debug info?

Maxwell

unread,
Mar 2, 2012, 4:43:32 PM3/2/12
to wv...@googlegroups.com
Hi,
 
I am a total novice when it comes to c and, to a lesser extent linux. I have updated wmrusbprotocol.c in line with Michael suggestions and successfully compiled the code. I originally installed my current version running on NSLU2 with Debian 6 using apt-get and the binaries reside in /usr/bin. I dont' particulary won't to mess with the current configuration and was hoping that I could insert a new module without too much bother. 
 
When running ./configure I made sure that --prefix /usr was included as a suffix and this had the desired outcome of placing wviewd_wmrusb in the right directory. However when I started wview again I got the error: Cannot create run directory: /usr/var/wview - aborting! Is there something else that I need to change in ./configure to get things working properly.
 
Thanks, Max
> > >>>>>>>> wview+unsubscribe@googlegroups.com.
> > >>>>> wview+unsubscribe@googlegroups.com.

Mark Teel

unread,
Mar 2, 2012, 9:02:33 PM3/2/12
to wv...@googlegroups.com
./configure --prefix=/ --bindir=/usr/bin --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib
To view this discussion on the web visit https://groups.google.com/d/msg/wview/-/mgpuoHPH0HwJ.

To post to this group, send email to wv...@googlegroups.com.
To unsubscribe from this group, send email to wview+un...@googlegroups.com.

Mark S. Teel

unread,
Mar 3, 2012, 7:03:39 AM3/3/12
to wv...@googlegroups.com
I've already added a debug statement that logs the byte of data received
for UV in the latest test build (Latest Stable on wviewweather.com).

If you can build/run that version then when your WMR station is showing
UV values above 1, make note of the station's values alongside the wview
logs and submit them here or to me personally for analysis.

Thanks,
Mark

Maxwell

unread,
Mar 3, 2012, 10:30:40 AM3/3/12
to wv...@googlegroups.com, mtee...@gmail.com
Thanks Mark,
 
I noticed that the test code looked a little different as I downloaded this before the 5.19 source. In the end I modified 5.19 by putting the addition that Michael suggested (without "if (! wmrWork.started)
)" and included the statement that you included in the test version of wmrusbprotocol.c. Had some sun today and by tilting the sensor got values on the station up to 4 but no change in the values logged by wview. The output below is consistent regardless of sensor reading. Took the batteries out of the sensor and stopped getting packets when station showed "--" so wview definitely knows the sensor is there. I ran wfrog with python and collected values consistent with the UV sensor so that should rule out a problem with the station.
 
Test Version Statement: Mar  3 15:12:21 chester wviewd[1067]: <1330787541320> : WMRUSB: received UV: 01
Michaels Statement: Mar  3 15:12:21 chester wviewd[1067]: <1330787541321> : received UV packet... UV: 0.000000
 
I only modified decodeUV - if there are additional statements in the test code that will help with debugging let me know and I will compile your test code directly without edits. Otherwise I assume it's a case of checking the raw values. How do I do that?
 
Thanks Max
 
For reference this is how my modified wmrprotocol.c looks:
 
static void decodeUV (unsigned char *ptr)
{
    if (ptr[0] == 0xFF)
    {
        wmrWork.sensorData.UV = -1;
    }
    else

    {
        wmrWork.sensorData.UV = ptr[0] & 0x0F;
        radMsgLog(PRI_MEDIUM, "WMRUSB: received UV: %2.2X", (unsigned int)ptr[0]);

Thanks,
Mark

>>>>>>>>>>> wview+unsubscribe@googlegroups.com.

>>>>>>>> wview+unsubscribe@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages