Raspberry pi USB disconnects

156 views
Skip to first unread message

Praveen Chandrasekaran

unread,
Apr 27, 2020, 11:24:23 AM4/27/20
to weewx-user
Hi,

Weewx log is reporting USB disconnects to Vantage Vue now and then (uploaded snippet, not able to copy from putty to windows)

It recovers on its own everytime. Any idea why this is happening?

Regards,
Praveen


Capture.PNG

Tom Keffer

unread,
Apr 27, 2020, 11:56:00 AM4/27/20
to weewx-user
See the section Davis cp2101 converter problems in the Wiki.  The following section, Installing a udev script shows how to solve the problem.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/41c861bd-6733-4112-b5ef-39289a61d34b%40googlegroups.com.

Tom Keffer

unread,
Apr 27, 2020, 11:59:27 AM4/27/20
to weewx-user
Oh, and it's possible to save putty sessions.  For example, see this web page: https://kerneltalks.com/tips-tricks/how-to-save-putty-session-output-automatically/

Screen shots don't work very well. They save a tiny area, and take a lot of space.

Praveen Chandrasekaran

unread,
Apr 27, 2020, 12:13:36 PM4/27/20
to weewx-user
Thanks. I already hav the udev which is why it auto recovers. Mine is a serial port on Vue side. So the usb issue must be on pi side I assume? Ferrite coil should solve the problem?

You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/5mAHXO5pLzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEAQynSvy_ZThKbaT1DYPGgEahZxUqnCxXLAHCJ0CSMfZg%40mail.gmail.com.

Tom Keffer

unread,
Apr 27, 2020, 12:37:27 PM4/27/20
to weewx-user
Don't know what you mean by "Mine is a serial port on Vue side."  

"usb issue must be on pi side." Not sure what you're asking here but, yes, the USB plugs into the pi, and that's where the assignment to /dev occurs. 

The very short screenshot you included doesn't offer many clues as to the cause.

The output from 'dmesg' may also give clues.

Yes, ferrite coils tend to help.

-tk



Praveen Chandrasekaran

unread,
Apr 27, 2020, 1:54:27 PM4/27/20
to weewx-user
Sorry, just ignore the part of serial/USB. I got confused with different data logger types available. Will attached detailed log in a few minutes.

Praveen Chandrasekaran

unread,
Apr 27, 2020, 2:04:29 PM4/27/20
to weewx-user
Attached syslog (all today's entries). The USB disconnect has happened around 6 times today). No major issue as it recovers but just wondering why. Need to buy a ferrite coil. 
syslog

Tom Keffer

unread,
Apr 27, 2020, 3:34:25 PM4/27/20
to weewx-user
Things to try:

1. Ferrite coils might help, although you are getting a lot more errors than what is normally associated with EMI.

2, Another possibility is that something else is trying to claim /dev/ttyUSB0. For example, modemmanager has been known to do this.

To see a list of processes using /dev/ttyUSB0.

lsof | grep ttyUSB0

Unfortunately, this will only tell you if something is using it at the moment.

3. It's worth looking at the details of your USB connection:

lsusb -v -d 0403:6015




Praveen Chandrasekaran

unread,
Apr 28, 2020, 12:14:05 AM4/28/20
to weewx-user
Attached output of lsusb.

I dont see anything in lsof output probably because nothing is using it at the moment (shouldnt weewx be using it continuously in rapidfire mode?)

Also can I edit weewx to add lsob whenever the error occurs?

lsusb_output

Andrew Milner

unread,
Apr 28, 2020, 5:28:59 AM4/28/20
to weewx-user
what model pi are you using?
are you using a separate powered usb hub or one of the ports on the rpi?




On Tuesday, 28 April 2020 07:14:05 UTC+3, Praveen Chandrasekaran wrote:
Attached output of lsusb.

I dont see anything in lsof output probably because nothing is using it at the moment (shouldnt weewx be using it continuously in rapidfire mode?)

Also can I edit weewx to add lsob whenever the error occurs?

On Tue, 28 Apr 2020 at 01:04, Tom Keffer <tke...@gmail.com> wrote:
Things to try:

1. Ferrite coils might help, although you are getting a lot more errors than what is normally associated with EMI.

2, Another possibility is that something else is trying to claim /dev/ttyUSB0. For example, modemmanager has been known to do this.

To see a list of processes using /dev/ttyUSB0.

lsof | grep ttyUSB0

Unfortunately, this will only tell you if something is using it at the moment.

3. It's worth looking at the details of your USB connection:

lsusb -v -d 0403:6015




On Mon, Apr 27, 2020 at 11:04 AM Praveen Chandrasekaran <prave...@gmail.com> wrote:
Attached syslog (all today's entries). The USB disconnect has happened around 6 times today). No major issue as it recovers but just wondering why. Need to buy a ferrite coil. 

On Mon, 27 Apr 2020 at 23:24, Praveen Chandrasekaran <prave...@gmail.com> wrote:
Sorry, just ignore the part of serial/USB. I got confused with different data logger types available. Will attached detailed log in a few minutes.

On Mon, 27 Apr 2020 at 22:07, Tom Keffer <tke...@gmail.com> wrote:
Don't know what you mean by "Mine is a serial port on Vue side."  

"usb issue must be on pi side." Not sure what you're asking here but, yes, the USB plugs into the pi, and that's where the assignment to /dev occurs. 

The very short screenshot you included doesn't offer many clues as to the cause.

The output from 'dmesg' may also give clues.

Yes, ferrite coils tend to help.

-tk



On Mon, Apr 27, 2020 at 9:13 AM Praveen Chandrasekaran <prave...@gmail.com> wrote:
Thanks. I already hav the udev which is why it auto recovers. Mine is a serial port on Vue side. So the usb issue must be on pi side I assume? Ferrite coil should solve the problem?

On Mon, 27 Apr 2020, 21:26 Tom Keffer, <tke...@gmail.com> wrote:
See the section Davis cp2101 converter problems in the Wiki.  The following section, Installing a udev script shows how to solve the problem.

On Mon, Apr 27, 2020 at 8:24 AM Praveen Chandrasekaran <prave...@gmail.com> wrote:
Hi,

Weewx log is reporting USB disconnects to Vantage Vue now and then (uploaded snippet, not able to copy from putty to windows)

It recovers on its own everytime. Any idea why this is happening?

Regards,
Praveen


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/5mAHXO5pLzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/5mAHXO5pLzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/5mAHXO5pLzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx...@googlegroups.com.

Praveen Chandrasekaran

unread,
Apr 28, 2020, 5:33:13 AM4/28/20
to weewx-user
Pi 3b+

One of the usb ports on the pi.

To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/36e56d3c-dc14-43c5-a7c8-3a6bff731d18%40googlegroups.com.

Rich Altmaier

unread,
Apr 28, 2020, 10:12:02 AM4/28/20
to weewx-user
Praveen, as I have advised before, consider upgrading to the Intel NUC. All USB electrical problems gone!
Yes it costs more. Yes it is 10-20x faster. Yes it is trouble free!
Good luck.
Rich

Tom Keffer

unread,
Apr 28, 2020, 10:15:02 AM4/28/20
to weewx-user
A NUC is also an order of magnitude more expensive!

Andrew's suggestion of an externally powered USB hub is a good one. A good power supply for the RPi is also essential.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/1256cab2-9622-49ea-bcfb-d249652b5905%40googlegroups.com.

Daniel Rich

unread,
Apr 28, 2020, 12:21:06 PM4/28/20
to weewx-user
Or just upgrade to a Pi4. I have had USB issues for years with older Pis, to the point where I have a hub on one of them just to drive a z-wave stick. However, I haven’t had any issues at all with the Pi4, I’m assuming because of the USB hardware redesign on that box.

Admittedly, I haven’t had any issues on the Pi3 that has my Vantage Pro on it either, but that is a dedicated Pi that does nothing else and only has a single USB device plugged into it. 

Dan Rich <dr...@employees.org> |   http://www.employees.org/~drich/
                               |  "Step up to red alert!"  "Are you sure, sir?
                               |   It means changing the bulb in the sign..."
                               |          - Red Dwarf (BBC)

Praveen Chandrasekaran

unread,
Apr 28, 2020, 12:36:28 PM4/28/20
to weewx-user
My pi doesn't have anything else plugged into it either

You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/5mAHXO5pLzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/7593357d-9e9d-4cab-bfb7-d1c5244a2a02%40Spark.

Rich Altmaier

unread,
Apr 28, 2020, 3:44:37 PM4/28/20
to weewx-user
Ah, but that NUC order of magnitude cost is equal to how many hours of Pi troubleshooting?   
Rich


On Tuesday, April 28, 2020 at 7:15:02 AM UTC-7, Tom Keffer wrote:
A NUC is also an order of magnitude more expensive!

Andrew's suggestion of an externally powered USB hub is a good one. A good power supply for the RPi is also essential.

On Tue, Apr 28, 2020 at 7:12 AM 'Rich Altmaier' via weewx-user <weewx...@googlegroups.com> wrote:
Praveen, as I have advised before, consider upgrading to the Intel NUC.  All USB electrical problems gone!
Yes it costs more. Yes it is 10-20x faster. Yes it is trouble free!
Good luck.
Rich

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Andrew Milner

unread,
Apr 28, 2020, 10:39:26 PM4/28/20
to weewx-user
will you please stop pushing NUC which is not at all coimparable with an RPI - it is like comparing apples to pears.

Praveen Chandrasekaran

unread,
Apr 29, 2020, 12:07:58 AM4/29/20
to weewx-user
Also attached lsof output. Realized that I have to sudo as root to get the output. 1830 is weewx PID. Looks like 3 threads from weewx as per below this.

image.png

You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/5mAHXO5pLzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/633cc2b5-a0f1-493d-9b60-3d73450eb25a%40googlegroups.com.

Rich Altmaier

unread,
Apr 29, 2020, 1:24:55 PM4/29/20
to weewx-user
Agree completely!  Keen observation Andrew.   
Reply all
Reply to author
Forward
0 new messages