Re: [weewx-user] Fine offset usb error

807 views
Skip to first unread message

Thomas Keffer

unread,
Jan 13, 2013, 10:40:56 AM1/13/13
to weewx...@googlegroups.com
Hi, Eric, and welcome to the weewx group!

I am not the Fine Offset expert, but I have seen this kind of behavior with other USB devices. It is frequently caused by insufficient permissions. Try running as root. If this succeeds, then we will know this is the problem and can find another solution.

-tk

On Sun, Jan 13, 2013 at 7:34 AM, Eric Johnson <johns...@gmail.com> wrote:
Just installed 2.1.1 and get the following in the logs at startup
Jan 13 10:29:10 eemedia2 weewx[4039]: wxengine: Using configuration file /home/weewx/weewx.conf.
Jan 13 10:29:10 eemedia2 weewx[4039]: fousb: Unable to claim USB interface: could not claim interface 0: Operation not permitted
Jan 13 10:29:10 eemedia2 weewx[4039]: wxengine: Unable to open WX station hardware: could not claim interface 0: Operation not permitted

Any suggestions?
Thanks very much in advance.

--
 
 



--
Tom Keffer
kef...@threefools.org
+1 541-386-8891 (h)
+1 541-490-9507 (c)
Skype: tkeffer

Eric Johnson

unread,
Jan 13, 2013, 11:03:03 AM1/13/13
to weewx...@googlegroups.com
Yes, running sudo did it, getting loopback data and generating summary, just need to find how to point to them with my webbrowser.....
Eric

Thomas Keffer

unread,
Jan 13, 2013, 11:25:28 AM1/13/13
to weewx...@googlegroups.com
That's good news.

You can point your webrowser at the file /home/weewx/public_html/index.html

Or, you can run Apache, and add /home/weewx/public_html to /etc/apache2/sites-available/default.

As far as running as root, this can be avoided by writing an appropriate udev script that will automatically give the user write privileges to the device.

For example, with my WMR100N, I edited the file /lib/udev/rules.d/50-udev-default.rules and changed the line

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"

to

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"

You will have to find something similar that works for your system. Writing udev scripts is tricky, but is probably the best solution. I have found this article to be helpful. (Note, however, that this article uses the old udevinfo command, rather than the newer udevadm command.) 

-tk


--
 
 

Eric Johnson

unread,
Jan 13, 2013, 11:35:07 AM1/13/13
to weewx...@googlegroups.com
Working fine using configuration file for apache2 from mwall at http://lancet.mit.edu/~mwall/projects/weather/
Looking forward to using this.   I'm migrating from wview, and will update any 'bad magic number problems..... on the fine offset series.

mwall

unread,
Jan 13, 2013, 1:07:43 PM1/13/13
to weewx...@googlegroups.com
eric,

good to hear that it is working for you.

beware that you might see the "Unable to claim USB interface" error when the weather station usb locks up.  the ws-2080 and ws-1090 stations occasionally stop responding, and the only solution is to power cycle the console (remove batteries and unplug from usb).  symptoms of the lockup are that the graphs do not get updated and the above error message shows up in the logs.

our best guess is that the lockup is a timing issue caused by querying the console while it is writing data to archive or reading data from the sensors.  jim easterbrook (author of pywws) has written some code to avoid the situation, and i am in the process of integrating this into the fousb.py driver for weewx.

m

edfa...@yahoo.com

unread,
Apr 12, 2013, 3:03:52 PM4/12/13
to weewx...@googlegroups.com
Sorry to dredge this up again, but were you able to fix the usb-lockup with the 2.3.0 release? (I didn't see it in the change log).

thanks,
-edfardos

mwall

unread,
Apr 12, 2013, 3:31:08 PM4/12/13
to weewx...@googlegroups.com
On Friday, April 12, 2013 3:03:52 PM UTC-4, edfa...@yahoo.com wrote:
Sorry to dredge this up again, but were you able to fix the usb-lockup with the 2.3.0 release? (I didn't see it in the change log).


the 2.3 release has nothing to fix the fine offset usb lockups.

however, i now have two usb hubs with which i am experimenting to create an automated "power cycle the console when lockup is detected" feature.

also, i am working on an improved ADAPTIVE implementation that will reduce (but not eliminate) the likelihood of lockups.

m

John Gorst

unread,
Apr 13, 2013, 4:17:57 AM4/13/13
to weewx...@googlegroups.com

Let me know if you want me to test the power cycle feature. I am using a d-link H7 hub which is capable if power cycling.
However console lockups seem very infrequent since I replaced with a higher quality USB cable and used an alternative WH1080 console (the company sent me a whole new weather station rather than just the rain sensor that was broken.... which turned out not to be broken...)
Reply all
Reply to author
Forward
0 new messages