<html>
<body>
<font size=3>Peter,<br>
The only changes that were needed was the addition of the
get/set Ablerex code, or the using of the Krauler stuff for Ablerex. The
'usb_get_string_simple' does the same job as 'usb_get_descriptor', the
former just has one less parameter, and during my investigations the
simpler the better.<br><br>
Having got this far I may have to go a little slow on it as
I have some other stuff I have to do and have been putting off till this
worked. It could be a few days before I get time again.<br><br>
Regards<br>
Jon<br><br>
At 11:47 2/02/2007, Peter Selinger wrote:<br>
<blockquote type=cite class=cite cite="">Alexander,<br><br>
don't worry, I am trying to sort out these patches. Thanks for all
of<br>
your work so far. I have created a branch at:<br><br>
svn://svn.debian.org/svn/nut/branches/megatec-usb<br><br>
this currently contains:<br><br>
revision 793: Andrey's patch (updated)<br>
revision 794: Alexander's patch (updated)<br>
revision 796: Jon's changes merged into Alexander's<br><br>
Notes: in revision 794, I have edited your patch slightly to remove<br>
some unnecessary whitespace changes, to show more clearly the<br>
differences and similarities to Andrey's patch. For the same reason,
I<br>
have retained the name megatec_usb.c for the source file,<br>
rather than serial_usb_megatec.c.<br><br>
In revision 796, I have taken some of Jon's changes and applied them<br>
on top of your changes. I did not apply the multitude of extra<br>
debugging statements that Jon had added. I also did not add some of<br>
Jon's changes:<br><br>
Near line 125:<br><br>
- param_arg.get_data =
get_data_agiler;<br>
- param_arg.set_data =
set_data_agiler;<br>
+ param_arg.get_data =
usb_ups_device->get_data;<br>
+ param_arg.set_data =
usb_ups_device->set_data;<br><br>
This didn't make sense to me, because usb_ups_device will be<br>
uninitialized at this point. <br>
<br>
Near line 198:<br><br>
if ( (c==endchar) ||
(c==0) ) {<br>
break;<br>
}<br><br>
+ if (ignset == NULL)
break;<br>
if
(NULL!=strchr(ignset,c)) continue;<br><br>
I wasn't sure if this makes sense. Can ignset ever be NULL? And if<br>
yes, why should there be a "break", rather than just skipping
the<br>
following test?<br><br>
It looks indeed like the get/set_data_ablerex and
get/set_data_krauler<br>
functions have some similarities, although they are not quite the<br>
same. It's probably good if you experiment with each other's code,<br>
which should be convenient now that it is in SVN.<br><br>
Another note: I don't like the matching code (ser_open,<br>
comm_usb_match). The current logic makes little sense, for example
any<br>
device for which vid
<img src="http://messenger.msn.com/MMM2004-08-11_11.52/Resource/emoticons/tongue_smile.gif" width=19 height=19 alt="Smiley with tongue out">id is specified as the port will be assumed to<br>
be an AGILER device.<br><br>
There should be a more general mechanism, as in usbhid-ups, using<br>
options such as -x vendorid=<regex>, -x product=<regex>,
-x<br>
serial=<regex>, etc. The work has already been done in usbhid-ups
(see<br>
upsdrv_makevartable(), upsdrv_initups()), and should be easy to<br>
duplicate here.<br><br>
-- Peter<br><br>
Alexander I. Gordeev wrote:<br>
> <br>
> Jon, Carlos,<br>
> </font></blockquote>
<BR><BR>
<TABLE width=400><HR>
<P style="FONT: 9pt/11pt verdana"><a href="http://www.avast.com">avast! Antivirus</a>: Outbound message clean.
<P style="FONT: 8pt/11pt verdana">Virus Database (VPS): 000709-2, 01/02/2007<BR>Tested on: 2/02/2007 4:20:00 PM<BR><FONT color=gray>avast! is copyright (c) 2000-2007 ALWIL Software.</FONT></P>
<TBODY></TBODY></TABLE>
<BR>
</body>
<br>
</html>