So, just as recap: I connect USB A (female) to USB B (male) adapter -> HUB -> 2 USB wires male to male, one to raspberry and another one to my device. Thanks a lot. I hope that it works fine :) Maurizio -----Messaggio originale----- Da: Charles Lepple [mailto:clepple at gmail.com] Inviato: marted? 20 gennaio 2015 13:38 A: Maurizio Cc: NUT List Oggetto: Re: [Nut-upsuser] NUT and relay on USB On Jan 20, 2015, at 4:39 AM, Maurizio <maurizio.iacaruso at gmail.com> wrote:> Hi there, > I have a question about a raspberry pi as NUT server and a "relay". > I explain my situation: I have an UPS with USB port, so I connect it > to the rasp. The problem is that I have a device manageable only via > USB port. > How can I handle this configuration? > My assumptions are: > 1) split the USB cable from UPS to rasp and device, but I don't know > if it worksAs Manuel mentioned, you will need a USB hub. It will work better with an external power supply for the hub. However, if you don't already have a hub, you may want to consider a Raspberry Pi Model B or B+, with 2 or 4 ports, respectively.> 2) connect the UPS to rasp directly, so connect the rasp (by GPIO) to > device as a Serial port with a DIY cable. > > The problem with second solution is that I don't know if (and how) I > can do it with NUT. >I don't think anyone has tried connecting to the serial port on the RPi expansion header, but NUT should not have a problem (as long as the driver is not expecting flow control pins). However, the serial port is TTL levels, so you would need a TTL-to-RS-232 level shifter chip. The USB hub would be a lot simpler, IMHO. -- Charles Lepple clepple at gmail
On Jan 20, 2015, at 7:43 AM, Maurizio Iacaruso <maurizio.iacaruso at gmail.com> wrote:> I connect USB A (female) to USB B (male) adapter -> HUB -> 2 USB wires male > to male, one to raspberry and another one to my device.I'm not sure I understand your setup. This should work, using standard USB cables: <- upstream downstream -> <- host device -> A->B A->B Raspberry Pi -> hub -> UPS | \---> device The problem is that there is no equivalent of a "crossover cable" or "null-model adapter" for USB. (I am ignoring USB OTG for the moment, since you want the RPi to talk to the UPS). There are many USB adapter cables out there that will only work for supplying power, or only with point-to-point USB OTG. -- Charles Lepple clepple at gmail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150120/4f9464fb/attachment.html>
Setup that I was on mind is a little different, but I think your setup works well. In my setup the HUB is connected directly to the UPS, then the cables go to raspberry and device. In your setup the HUB is connected directly to the raspberry, then the cables go to UPS and Device. It?s Ok? In both configurations I need the same things: Male B->female A adaptor, HUB and 2 male A-> male A cables. The male A- male A cables have any peculiarity? Can I buy it or make it myself without problems? Thanks a lot for advice. Da: Charles Lepple [mailto:clepple at gmail.com] Inviato: marted? 20 gennaio 2015 14:23 A: Maurizio Iacaruso Cc: NUT List Oggetto: Re: [Nut-upsuser] R: NUT and relay on USB On Jan 20, 2015, at 7:43 AM, Maurizio Iacaruso <maurizio.iacaruso at gmail.com <mailto:maurizio.iacaruso at gmail.com> > wrote: I connect USB A (female) to USB B (male) adapter -> HUB -> 2 USB wires male to male, one to raspberry and another one to my device. I'm not sure I understand your setup. This should work, using standard USB cables: <- upstream downstream -> <- host device -> A->B A->B Raspberry Pi -> hub -> UPS | \---> device The problem is that there is no equivalent of a "crossover cable" or "null-model adapter" for USB. (I am ignoring USB OTG <http://en.wikipedia.org/wiki/USB_On-The-Go> for the moment, since you want the RPi to talk to the UPS). There are many USB adapter cables out there that will only work for supplying power, or only with point-to-point USB OTG. -- Charles Lepple clepple at gmail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150120/603d053f/attachment.html>