AW: [Nut-upsuser] Re: [Nut-upsdev] megatec driver and

Peter Selinger selinger at mathstat.dal.ca
Fri Nov 3 06:31:08 CET 2006


Hi Philipp,

I am not sure whether we are all talking about the same thing (at
least I am not sure if I am talking about the same thing as everybody
else). One scenario is:

(a) a UPS device that has a serial port, connected to a computer that
    has only a USB port, when a NUT serial driver is available. 

    In this situation, one could use a USB-to-serial converter, and I
    agree that something like /dev/ttyUSB0 should work. Essentially,
    since the driver and the UPS are serial, all the in-between stuff
    just looks like a very fancy serial cable from the point of view
    of driver and device. 

Another scenario is:

(b) a UPS device that has only a USB port, connected to a computer
    that has a USB port, when a NUT serial driver is available. 

    In this situation, it is not at all clear that the UPS understands
    any kind of serial protocol. Even if it does, most devices (at
    least that I know of) don't seem to use a standard USB-to-serial
    encoding. In principle, it is possible that such a UPS could
    internally be a serial device with a built-in standard
    USB-to-serial converter. In this case, the setup would be
    equivalent to scenario (a), and /dev/ttyUSB0 should work. But my
    impression is that many manufacturers don't go this route, but use
    a custom hack to implement their own serial-over-USB solution.

Carlos suggested that the Megatec devices internally implement
scenario (a). If this were true, he should be able to use a serial
driver through /dev/ttyUSB0. So perhaps it isn't?

-- Peter



Philipp Leusmann wrote:
> 
> Actually it is as easy as that. I just got a USB-to-serial-converter for =
> my
> IR-receiver.
> All I had to do was compiling the proper kernel-module for my converter =
> and
> then use /dev/ttyUSB0=20
> 
> Philipp
> 
> > -----Urspr=FCngliche Nachricht-----
> > Von: nut-upsuser-bounces+philipp.leusmann=3Drwth-
> > aachen.de at lists.alioth.debian.org [mailto:nut-upsuser-
> > bounces+philipp.leusmann=3Drwth-aachen.de at lists.alioth.debian.org] Im
> > Auftrag von Peter Selinger
> > Gesendet: Donnerstag, 2. November 2006 03:54
> > An: Carlos Rodrigues
> > Cc: nut-upsdev at lists.alioth.debian.org; nut-
> > upsuser at lists.alioth.debian.org
> > Betreff: [Nut-upsuser] Re: [Nut-upsdev] megatec driver and usb-to-
> > serialconverters
> >=20
> > Hi Carlos,
> >=20
> > as far as I know, there is a standard "serial over USB" interface.  I
> > think the USB specification discourages such interfaces.
> >=20
> > All the "serial over USB" devices that I have seen have used a
> > manufacturer-specific hack. So connecting to a USB device should not
> > usually be as simple as connecting to /dev/something.
> >=20
> > If I am wrong, somebody please correct me! -- Peter
> >=20
> > Carlos Rodrigues wrote:
> > >
> > > Hi all,
> > >
> > > Currently, the "megatec" driver only supports UPSes which have a
> > > serial (RS232) interface.
> > >
> > > However, I'm under the impression that most of the models that speak
> > > the megatec protocol, and have an USB interface, just have a =
> standard
> > > serial-to-USB converter inside. This being the case, there should be =
> a
> > > "/dev/ttyUSBx" device which the megatec driver could use just as if =
> it
> > > were talking to the UPS over an RS232 cable.
> > >
> > > But... either this isn't the case, or these converters aren't
> > > recognized by the kernel's "usbserial" driver as such, and all that
> > > needs to be done is just convice the kernel to see the converter.
> > >
> > > This is something that I would like to know (even if just to be able
> > > to point people who email me about not having serial ports =
> available,
> > > or with models that lack a serial interface, in the right =
> direction).
> > >
> > > So, if someone out there with an UPS supported by the "megatec" =
> driver
> > > (and with an USB interface) wants to try this, I would appreciate =
> the
> > > feedback...
> > >
> > > Here are the general steps:
> > >
> > >   1. Connect the UPS using the USB cable (AFAIK, the USB and serial
> > > cables can't be connected simultaneously);
> > >   2. Run "lsusb -v" to find the vendorID and productID for the UPS;
> > >   3. "rmmod usbserial" if the module happens to be loaded already;
> > >   4. Load the module again with "modprobe usbserial vendor=3D0x...
> > > product=3D0x..." (or add this to your "/etc/modprobe.conf" file as
> > > "options usbserial vendor=3D0x... product=3D0x...");
> > >   5 .If there is now a "/dev/ttyUSBx" device available, configure
> > > "megatec" to use it.
> > >
> > > My Mustek PowerMust 600 doesn't have an USB interface, so I can't =
> test
> > > this myself, and I have no idea if this works with some models, all
> > > models, or no models (*)...
> > >
> > > Anyone interested?
> > >
> > > (*) Or what happens if the usbserial driver gains successful control
> > > of a device that happens to be something else entirely not a
> > > usb-to-serial converter... Although I really doubt something bad =
> would
> > > happen, I'm just covering my ass here... :)
> > > --
> > > Carlos Rodrigues
> > >
> > > _______________________________________________
> > > Nut-upsdev mailing list
> > > Nut-upsdev at lists.alioth.debian.org
> > > http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
> > >
> >=20
> >=20
> > _______________________________________________
> > Nut-upsuser mailing list
> > Nut-upsuser at lists.alioth.debian.org
> > http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
> 
> 
> 
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
> 




More information about the Nut-upsdev mailing list