[Nut-upsdev] Some questions on driver implementation and variable

Peter Selinger selinger at mathstat.dal.ca
Mon Feb 26 04:33:54 CET 2007


=?ISO-8859-1?Q?Edgar_Fu=DF?= wrote:
> 
> > On the other hand, if it is not a HID device, then it is most likely a
> > serial-over-USB protocol
> Yes, it is serial-over USB, but non-standard.
> 
> > might be supportable by one of the existing serial-over-USB drivers
> I did not look into these as they wouldn't support the specific  
> serial protocol (encapsulated in USB in this case).
> 
> > An entirely new driver would only be warranted if it's a genuinely new
> > protocol.
> Well, the low-level (USB over serial) protocol is rather simple (send  
> the command in a vendor endpoint write, command 0x0d to the control  
> endpoint, read data from endpoint 1).
> However, the serial protocol itself (looks like a variant of megatec)  
> is only very basically supported by the existing masterguard driver  
> (as I wrote), so I decided to re-write the driver from scratch.

I see. If your protocol is compatible with the megatec protocol, you
might be able to integrate your driver with the new megatec_usb driver
from the nut SVN trunk. That driver already supports two different
serial-over-USB access methods; it would be easy to add another access
method if it's not already identical to one of the supported ones. The
main question is how compatible the underlying serial protocol is. 

-- Peter



More information about the Nut-upsdev mailing list