Page 1 of 1
Multiple serial/USB adaptor inputs
Posted: Sun Apr 07, 2013 11:08 pm
by benichols
Newbie here (please be gentle).
I currently have my RPi reading data via USB from 1) ambient weather ws-2080 and 2) CurrentCost Envi-R. I am using pywws for the weather station and a perl script to read the data from the CurrentCost and uploading to cosm. That all is working great.
I would like to add home automation to my RPi (smartenit.com software for the RPi). The smartenit controller plugs into the RPi via a USB/serial adapter (and has 2 way communication as opposed to the other connections). It will work but it breaks #1 and #2 above. I am guessing that the multiple chatter on the USB ports breaks everything. Does anyone know how to fix this so that all 3 functions can work simultaneously?
Thanks for any help!
Brian
Re: Multiple serial/USB adaptor inputs
Posted: Mon Apr 08, 2013 7:31 am
by sdjf
this sounds like it could be a power supply problem.
are you using a powered hub? is the controller self-powered?
can you use a multimeter to measure TP1-TP2 when okay compared to under full load?
Re: Multiple serial/USB adaptor inputs
Posted: Mon Apr 08, 2013 4:45 pm
by benichols
Thanks for the reply.
The RPi has its own power supply. The USB hub has its own power supply. My first 2 USB inputs (#1 and #2) can be plugged into the hub and everything works fine. If I plug the serial/USB adapter from the ZBPLM into the open USB port on the RPi, it breaks the first 2 inputs. I don't know if the serial/USB adapter is drawing power from the RPi, but I've tried to plug the serial/USB adaptor into the hub as well with the same result. Is it possible that the data from the USB inputs are colliding? It doesn't seem like it could be a power issue.
Thanks,
Brian
Re: Multiple serial/USB adaptor inputs
Posted: Mon Apr 08, 2013 10:57 pm
by sdjf
A lot of this does not make any sense to me. But if you are trying to debug a problem, it would be wise to post some technical details, some output, because "it breaks it" really does not give any clues as to why or how.
Is any of this stuff logged anywhere? Is there a difference in the logs between the events that "work" and those that do not work, that break your application?
Also, having their own power supply does not tell us if the power supplies are adequate. The surest test to see if inadequate power is an issue is for you to measure the power between TP1 and TP2 on your Pi when it is not under load, and when it is under load. It has to stay within the range 4.75-5.25 or there is a power problem.
Re: Multiple serial/USB adaptor inputs
Posted: Tue Apr 09, 2013 5:31 pm
by benichols
It turns out I had two programs trying to access ttyUSB0. I plugged one into the hub and changed the access from the perl script to ttyUSB1 and now everything is running as expected. Thanks for the input!
Brian
Re: Multiple serial/USB adaptor inputs
Posted: Tue Apr 09, 2013 6:35 pm
by sdjf
HI, glad you figured it out. You might post how, to help others debugging similar issues. What files did you look at?