On Saturday, November 12, 2016 at 9:33:42 AM UTC-5, Cameron D wrote:
>
>  Hi,
> I had initially tried several times, and then started using the debug 
> method of running the driver directly.
> I have now got it to work - by adding a test for "timed out" in the error 
> string. This seems to come from libusb1 being mapped from 
> LIBUSB_ERROR_TIMEOUT.
>
> I cannot understand how an error message of "No data available" could be 
> created instead of a timeout message.
>

i suspect that different versions of libusb assemble the errors 
differently.  afaict, some of the strerror messages are coming from the 
operating system, not libusb.  i do not yet know a reliable way to extract 
the error intent using pyusb.

the timeouts have been particularly difficult for me to test.  i might see 
a timeout once after not running the driver for some time, but then no 
subsequent timeouts.  not so good for reproducibility.
 

> I also recoded the driver in the non-legacy pyusb api, but that was a 
> waste of time (except that I could then understand a bit better what was 
> happening).
> I will do a bit of packet sniffing of the windows version while I still 
> have the sensors on the ground. 
>

i though about rewriting all the usb weewx drivers to use pyusb 1, but 
there are too many other windmills to tilt.

i'd like to put all the packet captures into a repo somewhere, but i've 
have avoided this out of fear of the dmca and that way of thinking.
 

> I will even put the hose into it and see what the software does when I 
> "overflow" the raingauge counter.
>

that would be *very* helpful.  on eric's system the rain counter hits 10160 
inches (40000 mm) then stops.  any more rain shows up in hour and day 
counts, plus rain rate, but not in the total.  only a physical reset using 
the console will clear the counter.  obviously that is not desirable 
behavior!

when you test, please set debug in weewx.conf:

debug=1
...

[WMR300]
    ...
    debug_rain = 1
    debug_decode = 1

this will help you understand what is happening with the rain counter.  and 
it would help me to see any packets of type 57 (i'm trying to figure out if 
the firmware version is reported there).

m

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to