Page 1 of 1

What USB port on Pi

Posted: Fri 23 Aug 2019 8:08 am
by grupe
I am moving my Davis Vantage Pro to Raspberry Pi. I have not been able to get it to connect to Pi. How should the port be set up on the Pi? I have tried numerous settings with no luck. It is a Raspberry Pi 4. with 4 USB ports. How do I configure the station settings in CumulusMX?

Re: What USB port on Pi

Posted: Fri 23 Aug 2019 10:38 am
by mcrossley
You should have something like - /dev/ttyUSB0
Look in the /dev folder for a ttyUSB device that appears/disappears when you plug the VP2 in/out.

Re: What USB port on Pi

Posted: Fri 23 Aug 2019 11:32 am
by axierr
You can check if USB device is correctly detected with the command "sudo lsusb",
or you can check kernel messages, "dmesg | grep -i dev | grep -i usb"

Re: What USB port on Pi

Posted: Sat 24 Aug 2019 10:27 am
by ExperiMentor
mcrossley wrote:
Fri 23 Aug 2019 10:38 am
You should have something like - /dev/ttyUSB0
Look in the /dev folder for a ttyUSB device that appears/disappears when you plug the VP2 in/out.
That doesn't seem to work. My Pi Zero W /dev folder contains tty, tty0, tty1, tty2 etc up to tty63, but nothing starting ttyusb. There is a /dev/usb folder, but nothing there either.

All the below are from a Pi Zero W with nothing plugged in except the weather station

But

Code: Select all

sudo lsusb
shows

Code: Select all

Bus 001 Device 002: ID 1941:8021 Dream Link WH1080 Weather Station / USB Missile Launcher
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
so it is connected [including the "USB Missile Launcher" that someone has noted before ROFL]

Trying

Code: Select all

dmesg | grep -i dev | grep -i usb
shows

Code: Select all

[    0.144092] usbcore: registered new device driver usb
[    0.831010] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.831030] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.253651] usb 1-1: new low-speed USB device number 2 using dwc_otg
[    1.503098] usb 1-1: New USB device found, idVendor=1941, idProduct=8021, bcdDevice= 1.00
[    1.503122] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.517298] hid-generic 0003:1941:8021.0001: hiddev96,hidraw0: USB HID v1.00 Device [HID 1941:8021] on usb-20980000.usb-1/input0
which is the same info in a less-friendly format.

In Cumulus.ini, the station shows up as /dev/ttyusb0 but I'm not sure how to convert one notation to the other

Maybe try /dev/ttyusb0, /dev/ttyusb1, /dev/ttyusb2 etc until you find the one that works? It may depend on which of the ports on a Pi 4 you have chosen to plug it into.

Re: What USB port on Pi

Posted: Sat 24 Aug 2019 12:20 pm
by axierr
But

Code: Select all

sudo lsusb
shows

Code: Select all

Bus 001 Device 002: ID 1941:8021 Dream Link WH1080 Weather Station / USB Missile Launcher
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
so it is connected [including the "USB Missile Launcher" that someone has noted before ROFL]
This gives you the info regarding to connected devices and if they are correctly recognized.

Trying

Code: Select all

dmesg | grep -i dev | grep -i usb
shows

Code: Select all

[    0.144092] usbcore: registered new device driver usb
[    0.831010] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.831030] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.253651] usb 1-1: new low-speed USB device number 2 using dwc_otg
[    1.503098] usb 1-1: New USB device found, idVendor=1941, idProduct=8021, bcdDevice= 1.00
[    1.503122] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.517298] hid-generic 0003:1941:8021.0001: hiddev96,hidraw0: USB HID v1.00 Device [HID 1941:8021] on usb-20980000.usb-1/input0
which is the same info in a less-friendly format.
With this you have the information about what driver uses the system to use the devices and the filesystem link to those devices.
You can see here, it's creating /input0 for that device, which corresponds to a generic HID device driver. You can try searching /dev/input/event0 or something similar, but it seems you are missing more specific driver for the station.

Code: Select all

[    1.503098] usb 1-1: New USB device found, idVendor=1941, idProduct=8021, bcdDevice= 1.00
[    1.503122] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.517298] hid-generic 0003:1941:8021.0001: hiddev96,hidraw0: USB HID v1.00 Device [HID 1941:8021] on usb-20980000.usb-1/input0

Re: What USB port on Pi

Posted: Sat 24 Aug 2019 1:12 pm
by ExperiMentor
axierr wrote:
Sat 24 Aug 2019 12:20 pm
... but it seems you are missing more specific driver for the station.
Actually, mine is working just fine thanks. Nothing is missing.

I've been doing some more checking, using weather station attached to a Pi 3B+ (which also has 4x USB ports).

Connecting the station to a different port gives an increasing Device Number in sudo lsusb as would be expected.
But CumulusMX 'just works' whatever I do. So I thought, it must be /dev/ttyUSB0 whatever I do (with nothing else USB plugged in.)

Then I fiddled experimentally with the CumulusMX / Settings / Station settings, which is where we enter /dev/ttyUSB0 [that's the defualt ... can change it].
I discovered . .. bizarrely ... that it makes no difference what I enter there. I can change it to another port such as /dev/ttyUSB1, or /dev/tty0 or even leave it blank. Saving that change makes the corresponding change in Cumulus.ini, BUT whatever I set it too CumulusMX just finds my weather station. It's like the program doesn't actually look at that setting.

For reference, /dev/input contains only:

Code: Select all

pi@Cumulus:/dev/input $ ls -l
total 0
crw-rw---- 1 root input 13, 63 Aug 24 16:42 mice

Re: What USB port on Pi

Posted: Sun 25 Aug 2019 5:12 pm
by mcrossley
Sorry, I should have noticed you were using a Fine Offset device, for those there is no connection setting you need to set, MX will "just detect" the Missile Launcher - so long as the VID/PID match what it is expecting.