On Saturday, 12 November 2016 22:33:12 UTC+10, mwall wrote:
>
>
> if you try starting a second time, does everything work?
>
> on a test system i sometimes see the timeout when starting weewx for the 
> very first time, i.e., when there has been no communication with the 
> station for some time (an hour? a day? a week?).  but a subsequent start 
> works.  i suspect it is a case of getting the station to start spitting out 
> data on the usb - the driver must not be using the right protocol to get 
> communication started.  but once the station is spitting out data, the 
> driver works fine - there is a heartbeat command that keeps communication 
> going.
>
> could you sniff the usb when running the windows software to communicate 
> with the hardware?  we need a capture that covers this:
>
> 1) station is already plugged in to usb
> 2) start the windows software
> 3) record one or two intervals of current data
>
> i also suspect that we are dealing with two issues here - one is the 
> driver's check for 'No error' and 'No data available' (that would be 
> affected by localization) and the other is the timeout failures (due to 
> startup/initialization protocol).
>
> of course, this is all reverse engineering a system for which we get zero 
> help from the manufacturer or vendor, so i could be completely wrong.
>
> m 
>

 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 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 will even put the hose into it and see 
what the software does when I "overflow" the raingauge counter.

But first to plug it back into weewx and see if it still works.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to