WMR200 USB-communication problems. Driver issue?

311 views
Skip to first unread message

Per Edström

unread,
Aug 31, 2013, 4:10:30 AM8/31/13
to weewx...@googlegroups.com
I've sent in reports earlier about not getting my WMR200 to communicate with weewx (wview works however). Now I changed HW to an Intel G945GSEJT motherboard. Still weewx will not start up:

Aug 30 23:53:10 IntelAtom weewx[1575]: wxengine: No RESTful upload sites. No need to start thread.
Aug 30 23:53:10 IntelAtom weewx[1575]: wxengine: Finished loading service weewx.wxengine.StdRESTful
Aug 30 23:53:10 IntelAtom weewx[1575]: wxengine: Loading service weewx.wxengine.StdReport
Aug 30 23:53:10 IntelAtom weewx[1575]: wxengine: Finished loading service weewx.wxengine.StdReport
Aug 30 23:53:10 IntelAtom weewx[1575]: wxengine: Starting up weewx version 2.4.0
Aug 30 23:53:10 IntelAtom weewx[1575]: wxengine: Station does not support reading the time
Aug 30 23:53:10 IntelAtom weewx[1575]: wxengine: Starting main packet loop.
Aug 31 00:17:01 IntelAtom CRON[1606]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 31 01:17:01 IntelAtom CRON[1613]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 31 02:03:00 IntelAtom weewx[1575]: wmr200: readDevice() USB Error Reason:could not detach kernel driver from interface 0: No such device
Aug 31 02:11:00 IntelAtom weewx[1575]: wmr200: readDevice() USB Error Reason:could not detach kernel driver from interface 0: No such device

Now I restarted weewx again but I think it will be the same result again. Just to be sure that the weewx is actually monitoring the USB I pulled the cable and inserted it again:

root@IntelAtom:~# tail -f /var/log/syslog
Aug 31 09:41:56 IntelAtom weewx[1882]:     ****  'station'
Aug 31 09:41:56 IntelAtom weewx[1882]: wxengine: Data will not be posted to CWOP
Aug 31 09:41:56 IntelAtom weewx[1882]:     ****  'station'
Aug 31 09:41:56 IntelAtom weewx[1882]: wxengine: No RESTful upload sites. No need to start thread.
Aug 31 09:41:56 IntelAtom weewx[1882]: wxengine: Finished loading service weewx.wxengine.StdRESTful
Aug 31 09:41:56 IntelAtom weewx[1882]: wxengine: Loading service weewx.wxengine.StdReport
Aug 31 09:41:56 IntelAtom weewx[1882]: wxengine: Finished loading service weewx.wxengine.StdReport
Aug 31 09:41:56 IntelAtom weewx[1882]: wxengine: Starting up weewx version 2.4.0
Aug 31 09:41:56 IntelAtom weewx[1882]: wxengine: Station does not support reading the time
Aug 31 09:41:56 IntelAtom weewx[1882]: wxengine: Starting main packet loop.
Aug 31 09:47:25 IntelAtom kernel: [38054.528234] usb 3-1: USB disconnect, address 4
Aug 31 09:47:25 IntelAtom weewx[1882]: wmr200: readDevice() USB Error Reason:No error
Aug 31 09:47:25 IntelAtom weewx[1882]: wmr200: readDevice() USB Error Reason:error submitting URB: No such device
Aug 31 09:47:27 IntelAtom weewx[1882]: last message repeated 8447 times
Aug 31 09:47:27 IntelAtom weewx[1882]: wmr200: readDevice() USB Error Reason:
Aug 31 09:47:27 IntelAtom weewx[1882]: wmr200: writeDevice() Unable to send USB control message
Aug 31 09:47:27 IntelAtom weewx[1882]: ****  error sending control message: No such device
Aug 31 09:47:27 IntelAtom weewx[1882]: wmr200: readDevice() USB Error Reason:error submitting URB: No such device
Aug 31 09:47:27 IntelAtom weewx[1882]: last message repeated 2 times
Aug 31 09:47:27 IntelAtom weewx[1882]: wmr200: USB device polling thread exiting
Aug 31 09:47:27 IntelAtom weewx[1882]: wmr200: USB polling thread expired
Aug 31 09:47:27 IntelAtom weewx[1882]: wmr200: Watchdog received shutdown
Aug 31 09:47:27 IntelAtom weewx[1882]: wmr200: Watchdog thread exiting
Aug 31 09:47:27 IntelAtom weewx[1882]: wmr200: watchdog thread expired
Aug 31 09:47:27 IntelAtom weewx[1882]: wmr200: closeDevice() Unable to release device interface. Reason: could not release intf 0: No such device
Aug 31 09:47:27 IntelAtom weewx[1882]: wmr200: closeDevice() Unable to detach driver interface. Reason: could not detach kernel driver from interface 0: No such device
Aug 31 09:47:27 IntelAtom weewx[1882]: wxengine: Caught WeeWxIOError: error sending control message: No such device
Aug 31 09:47:27 IntelAtom weewx[1882]:     ****  Waiting 60 seconds then retrying...
Aug 31 09:47:32 IntelAtom kernel: [38061.172167] usb 3-1: new low speed USB device using uhci_hcd and address 5
Aug 31 09:47:32 IntelAtom kernel: [38061.340580] usb 3-1: configuration #1 chosen from 1 choice
Aug 31 09:47:32 IntelAtom kernel: [38061.363562] generic-usb 0003:0FDE:CA01.0005: hiddev96,hidraw0: USB HID v1.10 Device [Universal Bridge] on usb-0000:00:1d.1-1/input0
Aug 31 09:48:27 IntelAtom weewx[1882]: wxengine: retrying...
Aug 31 09:48:27 IntelAtom weewx[1882]: wxengine: Using configuration file /etc/weewx/weewx.conf
Aug 31 09:48:27 IntelAtom weewx[1882]: wxengine: Loading station type WMR200 (weewx.drivers.wmr200)
Aug 31 09:48:27 IntelAtom weewx[1882]: wmr200: Using PC Time:0
Aug 31 09:48:27 IntelAtom weewx[1882]: wmr200: Created watchdog thread to poke for live data every 30 seconds
Aug 31 09:48:27 IntelAtom weewx[1882]: wmr200: Created USB polling thread to read block on device
Aug 31 09:48:27 IntelAtom weewx[1882]: wmr200: Started poll_usb_device thread live data
Aug 31 09:48:27 IntelAtom weewx[1882]: wmr200: Reset device
Aug 31 09:48:28 IntelAtom weewx[1882]: wmr200: USB polling thread reset sent
Aug 31 09:48:28 IntelAtom weewx[1882]: wmr200: Started watchdog thread live data
Aug 31 09:48:28 IntelAtom weewx[1882]: wmr200: Restart count:2
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Loading service weewx.wxengine.StdTimeSynch
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Finished loading service weewx.wxengine.StdTimeSynch
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Loading service weewx.wxengine.StdConvert
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: StdConvert target unit is 0x1
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Finished loading service weewx.wxengine.StdConvert
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Loading service weewx.wxengine.StdCalibrate
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Finished loading service weewx.wxengine.StdCalibrate
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Loading service weewx.wxengine.StdQC
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Finished loading service weewx.wxengine.StdQC
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Loading service weewx.wxengine.StdArchive
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Using config file archive interval of 300
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Record generation will be attempted in 'hardware'
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Using archive database: archive_sqlite
Aug 31 09:48:28 IntelAtom weewx[1882]: stats: Schema exists with 16 elements
Aug 31 09:48:28 IntelAtom weewx[1882]: stats: Backfilling stats database.
Aug 31 09:48:28 IntelAtom weewx[1882]: stats: stats database up to date.
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Using stats database: stats_sqlite
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Finished loading service weewx.wxengine.StdArchive
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Loading service weewx.wxengine.StdPrint
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Finished loading service weewx.wxengine.StdPrint
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Loading service weewx.wxengine.StdRESTful
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Data will not be posted to Wunderground
Aug 31 09:48:28 IntelAtom weewx[1882]:     ****  'station'
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Data will not be posted to PWSweather
Aug 31 09:48:28 IntelAtom weewx[1882]:     ****  'station'
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Data will not be posted to CWOP
Aug 31 09:48:28 IntelAtom weewx[1882]:     ****  'station'
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: No RESTful upload sites. No need to start thread.
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Finished loading service weewx.wxengine.StdRESTful
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Loading service weewx.wxengine.StdReport
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Finished loading service weewx.wxengine.StdReport
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Starting up weewx version 2.4.0
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Station does not support reading the time
Aug 31 09:48:28 IntelAtom weewx[1882]: wxengine: Starting main packet loop.

Per Edström

unread,
Aug 31, 2013, 6:46:17 AM8/31/13
to weewx...@googlegroups.com
I (dual) booted Windows Xp on this new HW and Virtual Weather Station has no problem communicating with the WMR200 (there are some link issues with the wind-/outdoortemp meter from time to time but might be related to distance). So I conclude that the USB-communication is working fairly well.

Back to Linux OS. The WMR200 is working with weewx on Raspberry Pi HW/SW but not on Ubuntu 10.04 and Ebox3350/3310 and Intel G945. I can't really figure out what is causing this and I'm too much of a novis to start digging into drivers and Phyton-code.. :-(

Chris Manton

unread,
Aug 31, 2013, 10:50:56 AM8/31/13
to weewx...@googlegroups.com
First off, thanks a lot for running the tests as that's what makes projects successful is when people contribute.

Second, I only have a raspberry Pi and a Panda board that I've tested.  So you are now into additional platforms which will be beneficial to the project.

This is my Panda operating platform:

$ uname -a
Linux panda 3.2.0-1420-omap4 #27-Ubuntu SMP PREEMPT Fri Sep 28 16:21:51 UTC 2012 armv7l armv7l armv7l GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:        12.04
Codename:       precise

I'm not sure what OS the Ebox3350/3310 and Intel G945 are running 

This is the python usb package on the Panda.
$ dpkg -l | grep python  | grep usb
ii  python-usb                             0.4.3-1                                 USB interface for Python

Overall the problem seems to be that the USB controller on the host recognizes and connects to the USB on the weather console.  But the Oregon protocol layer which runs over the USB bus is not completely working.  Specifically, the commands being sent by the host to poke the weather console to start providing sensor data across the USB bus.

I do have a 10.04 box I'd have to get working to try to repro this issue, but meanwhile the data you collected is pretty good. 

I would like to know the python usb version on those failing machines, and also logs from the previous work where you ran usbmon on the failing machine would be helpful.

My guess is on the failing machines usbmon will show command to the device that are ignored or not acknowledged (nak)  for some reason.

C
--

Per Edström

unread,
Aug 31, 2013, 11:10:05 AM8/31/13
to weewx...@googlegroups.com
Hi again!
First some system information..

The Ebox'en are pretty much the same in SW but some minor differences in HW..

Ebox3310:
Linux ebox3310 2.6.34.10-vortex86-sg #3 Tue Jul 12 02:05:36 CST 2011 i586 GNU/Linux

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.04.4 LTS
Release:        10.04
Codename:       lucid
ii  python-usb                            0.4.2-2                                         USB interface for Python

Ebox3350:
Linux eBox3350.L5E 2.6.34.10-vortex86-sg #3 Tue Jul 12 02:05:36 CST 2011 i586 GNU/Linux

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.04.4 LTS
Release:        10.04
Codename:       lucid
ii  python-usb                            0.4.2-2                                         USB interface for Python

Intel G945 (dual boot XP SP3 / Ubuntu):
Linux IntelAtom 2.6.32-50-generic #112-Ubuntu SMP Tue Jul 9 20:29:14 UTC 2013 i686 GNU/Linux

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.04.4 LTS
Release:        10.04
Codename:       lucid
ii  python-usb                           0.4.2-2                                         USB interface for Python


I'll include the Raspberry too (that is working fine since a week ago although there was some issues to start with..):

Linux raspberrypi 3.6.11+ #474 PREEMPT Thu Jun 13 17:14:42 BST 2013 armv6l GNU/Linux
folke@raspberrypi ~ $ cat /etc/debian_version
7.1
ii  python-usb                            0.4.3-1                      armhf        USB interface for Python

Per Edström

unread,
Aug 31, 2013, 11:17:04 AM8/31/13
to weewx...@googlegroups.com
Maybe related but all my "non-working-servers", except the Raspberry which is working with weewx, have pyhon-usb 0.4.2-2. Could this be the cause of weewx not being able to communicate properly with WMR200? Is it upgradeable? The systems are fully up-to-date with apt-get.

If it makes the fault-findning easier/faster, then I can provide access to machine for logs and stuff. I guess it would take me quite a bit longer time to get it all right being a newbie (but I might learn something too..)

Chris Manton

unread,
Aug 31, 2013, 11:24:05 AM8/31/13
to weewx-user
I doubt the issues are hardware, as USB is a pretty reliable standard, at least in the ways it's being used here.  Plus, the failure would present as "device not found", which is not what is happening.

The obvious correlation is the python-usb version, where it works on 0.4.3-1 and does not on 0.4.2-2.
This can be a misleading hypothesis, however, but may provide a clue.

My ubuntu box has 10.04 and I may be able to try testing, but may be a few days out.  I just installed python-usb in anticipation for this test, and it presented 0.4.2-2, so that is the latest for that ubuntu version and not upgradeable beyond that version.

The usbmon data on the python-usb 0.4.2-2 OS'es would be a good log to gather when weewx is trying to startup.  

I'm not sure the differences between the 0.4.2-2 and 0.4.3-1.  My guess is that once we find the bug, it's a simple fix to get it all working properly.

One required fix for the driver you already discovered is some way to determine the device timeouts as device not there and to abort rather than continuously retry reads that will never complete.

C
--



On Sat, Aug 31, 2013 at 8:17 AM, Per Edström <peredst...@gmail.com> wrote:
Maybe related but all my "non-working-servers", except the Raspberry which is working with weewx, have pyhon-usb 0.4.2-2. Could this be the cause of weewx not being able to communicate properly with WMR200? Is it upgradeable? The systems are fully up-to-date with apt-get.

If it makes the fault-findning easier/faster, then I can provide access to machine for logs and stuff. I guess it would take me quite a bit longer time to get it all right being a newbie (but I might learn something too..)

--
You received this message because you are subscribed to a topic in the Google Groups "Weewx user's group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/1YeLW1ap77A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Per Edström

unread,
Sep 2, 2013, 9:02:47 AM9/2/13
to weewx...@googlegroups.com
It seems like the problem is solved now but I've done two things:

1. I changed the USB-cable to one with a ferrite core that also loops the cable. Not the original cable but one I found laying around.

2. I set the time/date on the WMR200 from default 2007 to current date. The Virtual Weather Station on XP didn't want to run either and claiming this as a cause "Error on console date". So maybe it is related even on Linux?
Reply all
Reply to author
Forward
0 new messages