Page 1 of 1

Oregon Scientific WMR200 not recognized.

Posted: Thu 18 Mar 2021 5:17 pm
by zoomx
Hello,
I had an Oregon WMR200 on an Ubuntu 18 FitPC2 and I wish to shift to CumulusMX. I stopped and disabled the WeeWX service and removed the script from init.d
Once installed CumulusMX and started it says
WMR200 station not found!

lsusb find it
Bus 001 Device 003: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0fde:ca01 Oregon Scientific WMRS200 weather station
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

and I see on WMR200Station.cs that the Vendorid and Productid are the same.

so the problem should be here
var devicelist = DeviceList.Local;
var station = devicelist.GetHidDeviceOrNull(Vendorid, Productid);

I start CumulusMX as root.

This is the mono version

CumulusMX# mono --version
Mono JIT compiler version 6.12.0.122 (tarball Mon Feb 22 17:27:39 UTC 2021)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(610)
Suspend: hybrid
GC: sgen (concurrent by default)


This is extracted from the log
2021-03-18 17:59:54.167 Cumulus MX v.3.10.2 build 3117
2021-03-18 17:59:54.183 Platform: Unix
2021-03-18 17:59:54.185 OS version: Unix 5.4.0.67
2021-03-18 17:59:54.187 Mono version: 6.12.0.122 (tarball Mon Feb 22 17:27:39 UTC 2021)
2021-03-18 17:59:54.187 Current culture: Italian (Italy)
2021-03-18 17:59:54.187 Directory separator=[/] Decimal separator=[,] List separator=[;]


Any clues?

Re: Oregon Scientific WMR200 not recognized.

Posted: Thu 18 Mar 2021 8:54 pm
by mcrossley
Sorry, the lsusb shows it is there, I have no idea why MX cannot find it.

Is it plugged into a USB hub? If so could you try it directly plugged into the PC?

Re: Oregon Scientific WMR200 not recognized.

Posted: Thu 18 Mar 2021 11:00 pm
by ConligWX
try looking at what the Port name is, maybe you have an incorrect port name.

ssh into your ubuntu box and run:

Code: Select all

dmesg | grep tty
if no go with that try this post:

viewtopic.php?p=122240#p122240

Re: Oregon Scientific WMR200 not recognized.

Posted: Fri 19 Mar 2021 7:15 am
by zoomx
mcrossley wrote: Thu 18 Mar 2021 8:54 pm Is it plugged into a USB hub? If so could you try it directly plugged into the PC?
No, no hub.
Very strange because weewx find it, that's the reason to write here, maybe someone had a similar problem.
Since the CumuluxMX instruction that fails is only one it is not a bug of CumulusMX, maybe a mono bug in my particular hardware.
The idea is to write a simple C# program that do nothing other than getting the USB information and printing it.
ConligWX wrote: Thu 18 Mar 2021 11:00 pm try looking at what the Port name is, maybe you have an incorrect port name.

ssh into your ubuntu box and run:

Code: Select all

dmesg | grep tty
if no go with that try this post:

viewtopic.php?p=122240#p122240
The communication betwween WMR200 is not a serial communication, it is seen as a HID.

Anyway
# dmesg | grep tty
[ 0.295291] printk: console [tty0] enabled
[ 2.708795] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A

This miniPC has a serial port

Re: Oregon Scientific WMR200 not recognized.

Posted: Fri 19 Mar 2021 8:58 am
by mcrossley
I could add into MX a dump of the HID devices it does see if it fails to find the WMR200.

I found this thread back in 2017 - viewtopic.php?p=126798#p126798
Where there was a similar issue that did get resolved and appeared to be mono related, but that was back on version 3.8

Re: Oregon Scientific WMR200 not recognized.

Posted: Fri 19 Mar 2021 11:25 am
by ConligWX
does the Baud rate need lowered at all?

Re: Oregon Scientific WMR200 not recognized.

Posted: Fri 19 Mar 2021 12:28 pm
by mcrossley
Its a pure USB connection Simon, no serial port type config to do.

Re: Oregon Scientific WMR200 not recognized.

Posted: Fri 19 Mar 2021 4:25 pm
by zoomx
I tested a small program taken from here
https://stackoverflow.com/questions/333 ... sb-devices
works on Windows but crashes on Linux, it seems that SystemManagement doesn't exist.

Since in CumulusMX HidSharp is used I got this small program
https://github.com/todbot/win-hid-dump/ ... Program.cs
It didn't crash but find nothing. On Windows it find only my mouse but not the other devices.

Re: Oregon Scientific WMR200 not recognized.

Posted: Sat 20 Mar 2021 1:52 pm
by mcrossley
I don't know what to suggest, there are other people using MX with these stations so it must work for them.

I do not have access to any WMR200 hardware so I cannot test/debug it myself. But if you are saying that the HIDSharp test utility did not find it either, then maybe there is an issue with the version of Mono you have installed. You do have the mono-complete package?

On Windows did you run the HIDsharp utility under mono or .Net?

Re: Oregon Scientific WMR200 not recognized.

Posted: Sat 20 Mar 2021 4:52 pm
by zoomx
Mark,
as can you see the bug is not in CumulusMX, I wrote here in the hope that someone had a similar problem.

I Installed mono-complete so I will dig more in HidSharp and mono. I will report my results here hoping I find somethings.

Tanks.

Re: Oregon Scientific WMR200 not recognized.

Posted: Sun 21 Mar 2021 9:18 pm
by zoomx
I dowloaded the library Hidsharp from here
https://www.zer7.com/software/hidsharp
and compiled the example obtaining the same result.