<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 15/08/2012 22:23, Martyn Hill wrote:<br>
    </div>
    <blockquote cite="mid:502C1354.7080006@gmail.com" type="cite">
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      <div class="moz-cite-prefix">Hi Arnaud!<br>
        <br>
        On 14/08/2012 21:50, Arnaud Quette wrote:<br>
      </div>
      <blockquote
cite="mid:CAFm_bUg_9CBe9byB55kXrYvT1T77vOiMhdbtq2oyB4KQV0+YMw@mail.gmail.com"
        type="cite"><br>
        <br>
        <div class="gmail_quote">2012/8/14 Martyn Hill <span dir="ltr"><<a
              moz-do-not-send="true"
              href="mailto:martyn.joseph.hill@gmail.com" target="_blank">martyn.joseph.hill@gmail.com</a>></span><br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>
                <div class="h5">
                  <div>On 11/08/2012 21:27, Arnaud Quette wrote:<br>
                  </div>
                  <blockquote type="cite"><br>
                    <br>
                    <div class="gmail_quote">2012/8/11 Martyn Hill <span
                        dir="ltr"><<a moz-do-not-send="true"
                          href="mailto:martyn.joseph.hill@gmail.com"
                          target="_blank">martyn.joseph.hill@gmail.com</a>></span><br>
                      <blockquote class="gmail_quote" style="margin:0 0
                        0 .8ex;border-left:1px #ccc
                        solid;padding-left:1ex">
                        <div>
                          <div>On 11/08/2012 21:00, Chris Rees wrote:<br>
                            <blockquote class="gmail_quote"
                              style="margin:0 0 0 .8ex;border-left:1px
                              #ccc solid;padding-left:1ex"> On 11 August
                              2012 20:52, Martyn Hill <<a
                                moz-do-not-send="true"
                                href="mailto:martyn.joseph.hill@gmail.com"
                                target="_blank">martyn.joseph.hill@gmail.com</a>>


                              wrote:<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex"> On
                                11/08/2012 20:48, Chris Rees wrote:<br>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex"> On 11 August
                                  2012 20:29, Martyn Hill <<a
                                    moz-do-not-send="true"
                                    href="mailto:martyn.joseph.hill@gmail.com"
                                    target="_blank">martyn.joseph.hill@gmail.com</a>>


                                  wrote:<br>
                                  <blockquote class="gmail_quote"
                                    style="margin:0 0 0
                                    .8ex;border-left:1px #ccc
                                    solid;padding-left:1ex"> On
                                    11/08/2012 20:24, Chris Rees wrote:<br>
                                    <blockquote class="gmail_quote"
                                      style="margin:0 0 0
                                      .8ex;border-left:1px #ccc
                                      solid;padding-left:1ex"> On 11
                                      August 2012 19:14, Arnaud Quette
                                      <<a moz-do-not-send="true"
                                        href="mailto:aquette.dev@gmail.com"
                                        target="_blank">aquette.dev@gmail.com</a>>


                                      wrote:<br>
                                      <blockquote class="gmail_quote"
                                        style="margin:0 0 0
                                        .8ex;border-left:1px #ccc
                                        solid;padding-left:1ex"> <br>
                                        2012/8/11 Chris Rees <<a
                                          moz-do-not-send="true"
                                          href="mailto:utisoft@gmail.com"
                                          target="_blank">utisoft@gmail.com</a>><br>
                                        <blockquote class="gmail_quote"
                                          style="margin:0 0 0
                                          .8ex;border-left:1px #ccc
                                          solid;padding-left:1ex"> <br>
                                          On 11 Aug 2012 13:03, "Martyn
                                          Hill" <<a
                                            moz-do-not-send="true"
                                            href="mailto:martyn.joseph.hill@gmail.com"
                                            target="_blank">martyn.joseph.hill@gmail.com</a>><br>
                                          wrote:<br>
                                          (...)<br>
                                          <br>
                                          <blockquote
                                            class="gmail_quote"
                                            style="margin:0 0 0
                                            .8ex;border-left:1px #ccc
                                            solid;padding-left:1ex"> My
                                            FreeBSD 8 appears to be
                                            running/linking against
                                            libusb20 - the<br>
                                            'new'<br>
                                            one...<br>
                                          </blockquote>
                                          We killed the old one a long
                                          time ago ;)<br>
                                        </blockquote>
                                        not sure of what you exactly
                                        mean here!<br>
                                        libusb 0.1 is still avail in
                                        FBSD 9:<br>
                                        <a moz-do-not-send="true"
                                          href="http://www.freebsd.org/cgi/ports.cgi?query=libusb&stype=all"
                                          target="_blank">http://www.freebsd.org/cgi/ports.cgi?query=libusb&stype=all</a><br>
                                        <br>
                                        Update: while reading the
                                        comment on  libusb1.0 website
                                        [1], I now<br>
                                        understand why you're using
                                        "2.0"!<br>
                                        <br>
                                        "FreeBSD 8 and above include a
                                        FreeBSD-specific
                                        reimplementation of the<br>
                                        libusb-1.0 API, so your
                                        applications will probably work
                                        there too. The<br>
                                        source code for this library can
                                        be found:<br>
                                        <a moz-do-not-send="true"
                                          href="http://svnweb.freebsd.org/base/head/lib/libusb/"
                                          target="_blank">http://svnweb.freebsd.org/base/head/lib/libusb/</a>"<br>
                                        <br>
                                        but still, your "killing"
                                        comment leave me in a doubtful
                                        state ;)<br>
                                        <br>
                                      </blockquote>
                                      Oops, haha, sorry, that's right;
                                      we didn't kill it, just switched<br>
                                      default, and loads of ports needed
                                      modification over it.<br>
                                    </blockquote>
                                    <br>
                                    Do we know how to 'use' the legacy
                                    libusb 0.1 in FreeBSD?<br>
                                  </blockquote>
                                  As Arnaud pointed out, they're still
                                  there; including usb.h uses the<br>
                                  libusb 0.1 compat layer.<br>
                                </blockquote>
                                <br>
                                So, does that mean I would need to
                                recompile nut, but link it against
                                libusb<br>
                                0.1 compat layer?<br>
                                <br>
                                If so, how would I go about that?<br>
                              </blockquote>
                              My understanding is that you shouldn't
                              need to be concerned with<br>
                              that-- NUT uses libusb-0.1, which is
                              emulated in FreeBSD with<br>
                              libusb20.  Thus changing the version to
                              link with makes no sense.<br>
                              <br>
                              Chris<br>
                            </blockquote>
                            <br>
                          </div>
                        </div>
                        OK, so back to square one... I guess testing the
                        UPS on a currently supported is the next most
                        sensible step, then - at least to determine if
                        the driver really works with the Zigor...<span></span></blockquote>
                    </div>
                    <br>
                    the good is that it's a HID device, as you've
                    guessed, supported by usbhid-ups.<br clear="all">
                    though the device has a bad/buggy implementation:<br>
                    - vendorid/productid,<br>
                    - and the main "UPS", coded as 00860004 instead of
                    00840004.<br>
                    I'll have to create a fix for this one.<br>
                  </blockquote>
                  <br>
                </div>
              </div>
              I patched your drivers/libhid.c and recompiled, which
              atleast allowed the incorrect code to be recognised as
              'UPS'. Obviously, not enough to get things working...
              <div class="im"><br>
                <br>
                <blockquote type="cite"><br>
                  the bad news is the I/O errors: until it's fixed,
                  we're stuck!<br>
                  you should still be able to force compilation/link
                  against the actual libusb 0.1 (ie not 2.0 compat), and
                  should really do it.<br>
                </blockquote>
                <br>
              </div>
              Can't figure out how to do this and, in the light of
              Chris's comments previously, not sure it's supposed to be
              necessary... <br>
              <div class="im"> <br>
                <blockquote type="cite"> a 2nd thing to check is uhid.
                  iirc, you should either unload it or blacklist the dev
                  or something like that...<br>
                </blockquote>
                <br>
              </div>
              I recompiled my FreeBSD kernel without uhid.ko and can
              succesfully load/unload uhid as a module now.<br>
              <blockquote type="cite"><br>
                cheers,<br>
                Arno<br>
                <br>
              </blockquote>
              <br>
              So, stalled for now, until I can figure how to link
              against libusb01 on FreeBSD... Not giving up hope yet, but
              no amount of googling is shinng a light on this point. :-(<br>
              <br>
              Thanks for your help thus far.<span class="HOEnZb"></span><br>
            </div>
          </blockquote>
          <div><br>
            send in your configure log and config.log (compressed) to
            see what gets detected at compile time.<br>
          </div>
        </div>
      </blockquote>
      <br>
      config.log <sent direct>... Not sure what you mean by my
      'configure log' that is distinct from config.log - could you
      please clarify?<br>
      <br>
      <br>
      <blockquote
cite="mid:CAFm_bUg_9CBe9byB55kXrYvT1T77vOiMhdbtq2oyB4KQV0+YMw@mail.gmail.com"
        type="cite">
        <div class="gmail_quote">
          <div> I'd also like to see the output of 'pkg-config
            --list-all', </div>
        </div>
      </blockquote>
      <br>
      <sent direct>...<br>
      <br>
      <blockquote
cite="mid:CAFm_bUg_9CBe9byB55kXrYvT1T77vOiMhdbtq2oyB4KQV0+YMw@mail.gmail.com"
        type="cite">
        <div class="gmail_quote">
          <div>and still the ldd output (you never sent it iirc)<br>
            <br>
          </div>
        </div>
      </blockquote>
      Oh yes - ldd against blazer_usb:<br>
      <br>
      KRISHNA# ldd /usr/local/libexec/nut/blazer_usb<br>
      /usr/local/libexec/nut/blazer_usb:<br>
              libusb.so.2 => /usr/lib/libusb.so.2 (0x2809a000)<br>
              libm.so.5 => /lib/libm.so.5 (0x280a8000)<br>
              libthr.so.3 => /lib/libthr.so.3 (0x280c2000)<br>
              libc.so.7 => /lib/libc.so.7 (0x280d7000)<br>
      <br>
      and usbhid-ups:<br>
      <br>
      KRISHNA# ldd /usr/local/libexec/nut/usbhid-ups<br>
      /usr/local/libexec/nut/usbhid-ups:<br>
              libusb.so.2 => /usr/lib/libusb.so.2 (0x280a2000)<br>
              libthr.so.3 => /lib/libthr.so.3 (0x280b0000)<br>
              libc.so.7 => /lib/libc.so.7 (0x280c5000)<br>
      <br>
      Is that what you needed?<br>
      <br>
      <blockquote
cite="mid:CAFm_bUg_9CBe9byB55kXrYvT1T77vOiMhdbtq2oyB4KQV0+YMw@mail.gmail.com"
        type="cite">
        <div class="gmail_quote">
          <div>cheers,<br>
            Arno<br>
            <br>
          </div>
        </div>
      </blockquote>
      Thanks again for your time...<br>
      <br>
      M.<br>
      <br>
      <pre class="moz-signature" cols="72">-- 
"There are 10 types of people in this world. Those who understand binary and those who don't."</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
"There are 10 types of people in this world. Those who understand binary and those who don't."</pre>
  </body>
</html>