Author Topic: Issues with USB dropping out  (Read 2371 times)

0 Members and 1 Guest are viewing this topic.

Offline bbowers

  • Traffic Surgeon
  • Contributor
  • ***
  • Posts: 118
    • Country Knolls - Ballston Lake, NY
Issues with USB dropping out
« on: July 18, 2016, 03:54:59 PM »
So I had this problem on two or three systems at this point. I have a Vantage Vue with the USB data logger (davis brand). I've had it connected to a couple of windows XP desktops running VWS, and now a raspberry Pi 3 B with weewx and cumulusmx. Basically it keeps dropping the usb connection and Im not sure what's going wrong.

On XP VWS would report it lost connection to the console, stop reporting data to CWOP/Wunderground etc, until rebooted. Simply restarting the program wouldn't bring it back, the PC needed a reboot.

On the RPi3B with CumulusMX it throws the following error in the software and CMX keeps sending the last value it recorded to Wunder/CWOP which obviously becomes a problem because I only know about it when I get the quality reports from CWOP showing 100+ errors for a day. TO fix this I need to reboot the RPi3B as well. But I noticed on the Pi that I actually get some indication of what happens.

Code: [Select]
CumulusMX Error:
_wapi_connect: error looking up socket handle 0x10 (error 10038)
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x12
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x12
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x10
System.IO.IOException: Input/output error
at System.IO.Ports.SerialPortStream.ThrowIOException () [0x00000] in <filename unknown>:0
at System.IO.Ports.SerialPortStream.DiscardInBuffer () [0x00000] in <filename unknown>:0
at System.IO.Ports.SerialPort.DiscardInBuffer () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPort:DiscardInBuffer ()
at ?.? (System.IO.Ports.SerialPort ?, System.String ?) [0x00000] in <filename unknown>:0
at ?.? () [0x00000] in <filename unknown>:0
at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0
**** An error has occurred - please zip up the MXdiags folder and post it in the forum ****
Press Enter to terminate

Here is what I found in /var/log/messages about the USB port.

Code: [Select]
Jul 1 06:25:04 piwx rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="552" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jul 1 07:13:27 piwx kernel: [3751405.770335] usb 1-1.3: USB disconnect, device number 5
Jul 1 07:13:27 piwx kernel: [3751405.770795] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
Jul 1 07:13:27 piwx kernel: [3751405.770838] cp210x 1-1.3:1.0: device disconnected
Jul 1 07:13:28 piwx kernel: [3751406.011725] usb 1-1.3: new full-speed USB device number 6 using dwc_otg
Jul 1 07:13:28 piwx kernel: [3751406.118208] usb 1-1.3: New USB device found, idVendor=10c4, idProduct=ea60
Jul 1 07:13:28 piwx kernel: [3751406.118230] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 1 07:13:28 piwx kernel: [3751406.118244] usb 1-1.3: Product: CP2102 USB to UART Bridge Controller
Jul 1 07:13:28 piwx kernel: [3751406.118257] usb 1-1.3: Manufacturer: Silicon Labs
Jul 1 07:13:28 piwx kernel: [3751406.118269] usb 1-1.3: SerialNumber: 0001
Jul 1 07:13:28 piwx kernel: [3751406.121118] cp210x 1-1.3:1.0: cp210x converter detected
Jul 1 07:13:28 piwx kernel: [3751406.121421] usb 1-1.3: cp210x converter now attached to ttyUSB1
Jul 1 09:24:37 piwx rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="552" x-info="http://www.rsyslog.com"] exiting on signal 15.

Ignore the syslog stuff, just there for showing timing of the events, syslog is fine.

So it dumped ttyUSB0, then found it again on ttyUSB1... obviously because it's still hung on USB0. hmm. This has happened on multiple computers, so the only thing in common is the USB cable, USB Data logger and the console. Any ideas on what's happening here?
Even a stopped clock gives the right time twice a day.

Offline wbkkwx

  • Member
  • *
  • Posts: 3
Re: Issues with USB dropping out
« Reply #1 on: July 19, 2016, 08:50:57 AM »
Hi there,

I am also a user of weewx using raspberry pi with USB connection to vantage. I am experiecing similar problems of late and from my research it seems Davis's USB datalogger has some weakness.

Have a look at weewx documentation -> hardware problems and it will recommend using ferrite coils on each end of the USB cable to the pi. You can also look into weewx forum and search Davis USB  which should give you more information if you wish to pursue it further.

If all else fails the either you logger needs replacing or switch to a serial, this is what gather from my reading about this issue.

Hope this helps.

Offline bbowers

  • Traffic Surgeon
  • Contributor
  • ***
  • Posts: 118
    • Country Knolls - Ballston Lake, NY
Re: Issues with USB dropping out
« Reply #2 on: July 19, 2016, 11:06:38 AM »
Yeah that definitely looks like the issue. Maye a shorter USB with more ferrite is the answer... hmmm.
Even a stopped clock gives the right time twice a day.

Offline droiddk

  • Forecaster
  • *****
  • Posts: 334
Re: Issues with USB dropping out
« Reply #3 on: July 19, 2016, 11:29:11 AM »
Hi, I was also dealing with drop-outs.

A short high-quality USB-cable with ferrite fixed it.

Also: Try running the USB-cable far away from high-voltage cables and that like.

Regards


Offline wbkkwx

  • Member
  • *
  • Posts: 3
Re: Issues with USB dropping out
« Reply #4 on: September 21, 2016, 04:21:18 AM »
hi bbowers,

just to drop you an update, it seems my issues with usb dropping out for my rpi2 weewx has stopped after I changed the power supply to the console. The stock power supply got fried by a power surge and it has been running on batteries for almost 2 weeks before the new one I ordered from ebay arrived. No drop outs has been noticed so far. Perhaps it is something worth trying before moving to the serial data logger.

Offline WheatonRon

  • Forecaster
  • *****
  • Posts: 1243
    • WUnderground
Re: Issues with USB dropping out
« Reply #5 on: September 23, 2016, 06:13:47 PM »
hi bbowers,

just to drop you an update, it seems my issues with usb dropping out for my rpi2 weewx has stopped after I changed the power supply to the console. The stock power supply got fried by a power surge and it has been running on batteries for almost 2 weeks before the new one I ordered from ebay arrived. No drop outs has been noticed so far. Perhaps it is something worth trying before moving to the serial data logger.

I too had this problem with the VP2 console periodically losing or dropping connection with my computer when using my USB cable and the Davis datalogger "talking to Weatherlink." Davis support told me to use the batteries instead of AC power (seemed goofy to me) since they sell the AC adapter. For the most part, I fixed this problem by placing tin foil around my USB cable connectors, bought a better USB cable, and as suggested by Davis--added interference devices (Ferrite Core, part number 240-2245-ND--cost $1.58 per each plus shipping) that I bought from Digi-Key (1-800-344-4539) and placed one around the USB cable and the other around the AC cable.
« Last Edit: September 23, 2016, 08:27:26 PM by WheatonRon »
Davis VP2 with SHT31 (3 complete VP2 systems—2 with a daytime fan and 1 that has a 24 hour fan); CWOP--CW5020, FW3075 and FW4350; WU--KILWHEAT17, KILWHEAT36 and KILWHEAT39; WeatherCloud.net; CoCoRaHS--IL-DP-132; and Weatherlink 2.0

Offline bbowers

  • Traffic Surgeon
  • Contributor
  • ***
  • Posts: 118
    • Country Knolls - Ballston Lake, NY
Re: Issues with USB dropping out
« Reply #6 on: September 28, 2016, 10:48:42 AM »
Thanks WheatonRon. My problem is so intermittent it's hard to pinpoint. Interesting though that I had the same problem with different computers too. I have some ferrite snap on cores and I've added one to the end closest to the PI, with a few wraps of the USB cable in it. So far so good. It sucks though that the only way I find out it's disconnected is via the CWOP data quality report showing multiple bad data uploads (hundreds). Im working on a way within the pi to detect this and email me when it craps out. More to follow on that.
Even a stopped clock gives the right time twice a day.