Dâniel Fraga
2007-Jul-01 04:02 UTC
[Nut-upsuser] ST7 RS232 USB Bridge (STMicroelectronics) UPS
I used a brazilian UPS from "TS-Shara" which uses the megatec serial protocol and it works perfectly. Now I have another one from the same brand (TS-Shara) and it uses a USB cable. I found the following: T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0483 ProdID=0035 Rev= 2.00 S: Manufacturer=STMicroelectronics S: Product=ST7 RS232 USB BRIDGE C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 20mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms E: Ad=02(O) Atr=03(Int.) MxPS= 8 Ivl=10ms And lsusb -v: Bus 001 Device 003: ID 0483:0035 SGS Thomson Microelectronics Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0483 SGS Thomson Microelectronics idProduct 0x0035 bcdDevice 2.00 iManufacturer 3 iProduct 1 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 41 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 20mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 3 Human Interface Devices bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 33 US bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 29 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 *** As you can see above, if I load usbhid module, it's attached to this device. I tried the suggestions made in the mailing list about using usbserial generic module, but without success... I'm afraid this UPS still uses the megatec protocol with a serial to usb converter. So I try the energizer protocol (with /dev/hiddev0), but it doesn't work: Network UPS Tools - Energizer USB UPS driver 0.02 (2.0.5) Warning: This is an experimental driver. Some features may not function correctly. Error (SUSAGE) while talking to the UPS *** I tried newhidups, hidups also without success... Any hints? Thank you very much! --
Charles Lepple
2007-Jul-01 15:16 UTC
[Nut-upsuser] ST7 RS232 USB Bridge (STMicroelectronics) UPS
On 7/1/07, D?niel Fraga <fragabr at gmail.com> wrote:> I tried newhidups, hidups also without success...You could try running 'newhidups -u root -x vendorid=0483 -x explore -DD' on the UPS, and send the output to the list. (If it's long, please gzip the output and attach it.) This is a debugging mode, so it will not actually monitor the UPS state, but the information can help us match the device to others that are supported by the new megatec_usb driver. It may also be worthwhile to try the megatec_usb driver directly. This driver was introduced after 2.0.5 was released. The latest NUT release candidate is 2.2.0-pre2, and it can be downloaded here: http://www.networkupstools.org/source.html Let us know how it works. -- - Charles Lepple
Charles Lepple
2007-Jul-02 02:10 UTC
[Nut-upsuser] ST7 RS232 USB Bridge (STMicroelectronics) UPS
On 7/1/07, D?niel Fraga <fragabr at gmail.com> wrote:> On Sun, 1 Jul 2007 15:43:10 -0400 > "Charles Lepple" <clepple at gmail.com> wrote: > > > After running newhidups (or usbhid-ups in 2.2.0 and later), what does > > 'lsusb -v' say about the report descriptor? > > Ok, I ran usbhid-ups again and then lsusb -v as you requested:hmm, maybe 'lsusb -vvv' instead? There should be more information between the HID Device Descriptor heading, and Endpoint Descriptor.> HID Device Descriptor: > bLength 9 > bDescriptorType 33 > bcdHID 1.10 > bCountryCode 33 US > bNumDescriptors 1 > bDescriptorType 34 Report > wDescriptorLength 29 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x81 EP 1 IN > bmAttributes 3 > Transfer Type Interrupt > Synch Type None > Usage Type Data > wMaxPacketSize 0x0008 1x 8 bytes > bInterval 10 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x02 EP 2 OUT > bmAttributes 3 > Transfer Type Interrupt > Synch Type None > Usage Type Data > wMaxPacketSize 0x0008 1x 8 bytes > bInterval 10 > Device Status: 0x6703 > Self Powered > Remote Wakeup Enabled > > > I am not too familiar with this driver, but it might help to run this > > with a few -D options as well. > > Ok, here we go (sudo ./megatec_usb -u root -a tsshara -DD): > > Checking device (0483/0035) (001/003) > - VendorID: 0483 > - ProductID: 0035 > - Manufacturer: unknown > - Product: unknown > - Serial Number: unknown > - Bus: 001 > Trying to match device > Device does not match - skipping > > I think it will not help right?You probably have to specify the "-x vendorid=0483" option here as well (unless the documentation shows another way of specifying nonstandard device types). -- - Charles Lepple
Charles Lepple
2007-Jul-02 12:30 UTC
[Nut-upsuser] ST7 RS232 USB Bridge (STMicroelectronics) UPS
Please keep the list CC'd. On 7/1/07, D?niel Fraga <fragabr at gmail.com> wrote:> Ok, here we go (sudo ./megatec_usb -u root -a tsshara -DD): > > Checking device (0483/0035) (001/003) > - VendorID: 0483 > - ProductID: 0035 > - Manufacturer: unknown > - Product: unknown > - Serial Number: unknown > - Bus: 001 > Trying to match device > Device does not match - skipping > > I think it will not help right?Can you post the contents of ups.conf? This message means that the driver has not even tried to connect to the UPS. Again, I don't know much about this driver, but I think you may need to select one of "subdriver=krauler" or "subdriver=agiler". -- - Charles Lepple