<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Arnaud<br>
      <br>
      On 09/09/2012 12:13, Arnaud Quette wrote:<br>
    </div>
    <blockquote
cite="mid:CAFm_bUgoORKhm8J4fHGrWePiaGXcfFtgQg-5zzyeAmuY+i+ESg@mail.gmail.com"
      type="cite"><br>
      <div class="gmail_quote">2012/9/6 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">
          Hi Arnaud<br>
        </blockquote>
        <div><br>
          Hi Martin,<br>
           </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          I have not made progress with re-compiling NUT against
          libusb-0.1 on my FreeBSD v8.2 box as I cannot figure out how
          to do so.<br>
          <br>
          Instead, I built a FreeBSD v7.4 install in a VM (VirtualBox)
          on my XP laptop and attempted to test NUT there as a PoC for
          this UPS.<br>
          <br>
          FeeBSD definately uses libusb-0.1, as the following linkage
          for blazer_usb shows:<br>
        </blockquote>
        <div> <br>
          indeed<br>
          <br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          /usr/local/libexec/nut/blazer_usb:<br>
              libusb-0.1.so.8 => /usr/local/lib/libusb-0.1.so.8
          (0x2808d000)<br>
              libm.so.5 => /lib/libm.so.5 (0x28093000)<br>
              libthr.so.3 => /lib/libthr.so.3 (0x280a9000)<br>
              libc.so.7 => /lib/libc.so.7 (0x280be000)<br>
          <br>
          Unfortunately, VirtualBox refused to allow me to attach the
          UPS USB port to the guest OS (saying 'busy with a previous
          request'), so that came to nothing - and after several night's
          effort::-(<br>
        </blockquote>
        <div><br>
          have you shared the device, in VBox ?<br>
          Ie, allowed explicitly your VM to use the UPS, or even
          exclusively?<br>
        </div>
      </div>
    </blockquote>
    <br>
    In the end, I converted my FeeBSD74 VB image to an VM Workstation
    image (that was a project in itself!) and was finally able to attach
    the UPS USB.<br>
    <br>
    The results from usbhid-ups (now with 'setenv USB_DEBUG 3'):<br>
    <br>
       0.000000    send_to_all: SETINFO driver.parameter.port "auto"<br>
       0.000088    send_to_all: SETINFO driver.parameter.vendorid "0001"<br>
       0.000090    send_to_all: SETINFO driver.parameter.productid
    "0000"<br>
       0.000092    send_to_all: SETINFO driver.flag.explore "enabled"<br>
       0.000181    debug level is '7'<br>
       0.001243    upsdrv_initups...<br>
    usb_set_debug: Setting debugging level to 3 (on)<br>
    usb_os_find_busses: Found /dev/usb0<br>
    usb_os_find_devices: Found /dev/ugen0 on /dev/usb0<br>
    usb_control_msg: 128 6 512 0 0xbfbfcf54 8 1000<br>
    usb_control_msg: 128 6 512 0 0x2820b2b0 34 1000<br>
    skipped 1 class/vendor specific interface descriptors<br>
       0.182116    Checking device (0001/0000) (/dev/usb0//dev/ugen0)<br>
    usb_control_msg: 128 6 768 0 0xbfbfcead 255 1000<br>
    USB error: error sending control message: Input/output error<br>
    usb_control_msg: 128 6 768 0 0xbfbfcead 255 1000<br>
       0.197089    - VendorID: 0001<br>
       0.197091    - ProductID: 0000<br>
       0.197093    - Manufacturer: unknown<br>
       0.197095    - Product: unknown<br>
       0.197097    - Serial Number: unknown<br>
       0.197099    - Bus: /dev/usb0<br>
       0.197101    Trying to match device<br>
       0.197210    Device matches<br>
    USB error: could not set alt intf 0/0: Invalid argument<br>
    usb_control_msg: 129 6 8448 0 0xbfbfe908 9 4000<br>
    USB error: error sending control message: Input/output error<br>
       5.546221    Unable to get HID descriptor (error sending control
    message: Input/output error)<br>
       5.546256    i=0, extra[i]=09, extra[i+1]=21<br>
       5.546258    HID descriptor, method 2: (9 bytes) => 09 21 00 01
    00 01 22 70 02<br>
       5.546260    HID descriptor length 624<br>
    usb_control_msg: 129 6 8704 0 0xbfbfd008 624 4000<br>
    USB error: error sending control message: Input/output error<br>
       5.553125    Unable to get Report descriptor: Input/output error<br>
       5.553158    No appropriate HID device found<br>
    Network UPS Tools - Generic HID driver 0.37 (2.6.5)<br>
    USB communication driver 0.31<br>
       5.553179    No matching HID UPS found<br>
    <br>
    And from blazer_usb:<br>
    <br>
       0.000000    send_to_all: SETINFO driver.parameter.subdriver
    "krauler"<br>
       0.000071    send_to_all: SETINFO driver.parameter.protocol
    "megatec"<br>
       0.000073    send_to_all: SETINFO driver.parameter.langid_fix
    "0x409"<br>
       0.000075    send_to_all: SETINFO driver.parameter.port "auto"<br>
       0.000123    send_to_all: SETINFO driver.parameter.vendorid "0001"<br>
       0.000126    send_to_all: SETINFO driver.parameter.productid
    "0000"<br>
       0.000128    send_to_all: SETINFO driver.parameter.bus "/dev/usb0"<br>
       0.000218    debug level is '7'<br>
       0.001667    language ID workaround enabled (using '0x409')<br>
    usb_set_debug: Setting debugging level to 3 (on)<br>
    usb_os_find_busses: Found /dev/usb0<br>
    usb_os_find_devices: Found /dev/ugen0 on /dev/usb0<br>
    usb_control_msg: 128 6 512 0 0xbfbfce44 8 1000<br>
    usb_control_msg: 128 6 512 0 0x2820c400 34 1000<br>
    skipped 1 class/vendor specific interface descriptors<br>
       0.416563    Checking device (0001/0000) (/dev/usb0//dev/ugen0)<br>
    usb_control_msg: 128 6 768 0 0xbfbfcd9d 255 1000<br>
    USB error: error sending control message: Input/output error<br>
    usb_control_msg: 128 6 768 0 0xbfbfcd9d 255 1000<br>
    USB error: error sending control message: Input/output error<br>
       0.434518    - VendorID: 0001<br>
       0.434520    - ProductID: 0000<br>
       0.434522    - Manufacturer: unknown<br>
       0.434524    - Product: unknown<br>
       0.434526    - Serial Number: unknown<br>
       0.434528    - Bus: /dev/usb0<br>
       0.434530    Trying to match device<br>
       0.434648    Device matches<br>
       0.455579    send_to_all: SETINFO ups.vendorid "0001"<br>
       0.455602    send_to_all: SETINFO ups.productid "0000"<br>
    usb_control_msg: 128 6 768 0 0xbfbfe849 255 1000<br>
    USB error: error sending control message: Input/output error<br>
       0.464512    send_to_all: SETINFO device.type "ups"<br>
       0.464514    send_to_all: SETINFO driver.version "2.6.5"<br>
       0.464516    send_to_all: SETINFO driver.version.internal "0.09"<br>
       0.464518    send_to_all: SETINFO driver.name "blazer_usb"<br>
       0.464520    Trying megatec protocol...<br>
       0.464522    send: Q1<br>
    usb_control_msg: 128 6 771 1033 0xbfbfe2e4 512 1000<br>
       0.472538    received 22 (22)<br>
       0.472540    read: UPS No Ack<br>
    usb_control_msg: 128 6 771 1033 0xbfbfe2e4 512 1000<br>
    USB error: error sending control message: Input/output error<br>
       1.488435    read: error sending control message: Input/output
    error<br>
       1.488488    blazer_status: short reply<br>
       1.488490    Status read 1 failed<br>
    usb_set_debug: Setting debugging level to 3 (on)<br>
    usb_os_find_busses: Found /dev/usb0<br>
    usb_os_find_devices: Found /dev/ugen0 on /dev/usb0<br>
       1.510017    Checking device (0001/0000) (/dev/usb0//dev/ugen0)<br>
    usb_control_msg: 128 6 768 0 0xbfbfc80d 255 1000<br>
    USB error: error sending control message: Input/output error<br>
    usb_control_msg: 128 6 768 0 0xbfbfc80d 255 1000<br>
    USB error: error sending control message: Input/output error<br>
       1.528508    - VendorID: 0001<br>
       1.528510    - ProductID: 0000<br>
       1.528512    - Manufacturer: unknown<br>
       1.528514    - Product: unknown<br>
       1.528516    - Serial Number: unknown<br>
       1.528518    - Bus: /dev/usb0<br>
       1.528520    Trying to match device<br>
       1.528604    Device matches<br>
       1.548266    send: Q1<br>
    usb_control_msg: 128 6 771 1033 0xbfbfe2e4 512 1000<br>
       1.556560    received 22 (22)<br>
       1.556562    read: UPS No Ack<br>
    usb_control_msg: 128 6 771 1033 0xbfbfe2e4 512 1000<br>
    USB error: error sending control message: Input/output error<br>
       2.573241    read: error sending control message: Input/output
    error<br>
       2.573283    blazer_status: short reply<br>
       2.573285    Status read 2 failed<br>
    usb_set_debug: Setting debugging level to 3 (on)<br>
    usb_os_find_busses: Found /dev/usb0<br>
    usb_os_find_devices: Found /dev/ugen0 on /dev/usb0<br>
       2.593987    Checking device (0001/0000) (/dev/usb0//dev/ugen0)<br>
    usb_control_msg: 128 6 768 0 0xbfbfc80d 255 1000<br>
    USB error: error sending control message: Input/output error<br>
    usb_control_msg: 128 6 768 0 0xbfbfc80d 255 1000<br>
    USB error: error sending control message: Input/output error<br>
       2.613506    - VendorID: 0001<br>
       2.613508    - ProductID: 0000<br>
       2.613511    - Manufacturer: unknown<br>
       2.613513    - Product: unknown<br>
       2.613514    - Serial Number: unknown<br>
       2.613516    - Bus: /dev/usb0<br>
       2.613518    Trying to match device<br>
       2.613637    Device matches<br>
       2.633196    send: Q1<br>
    usb_control_msg: 128 6 771 1033 0xbfbfe2e4 512 1000<br>
       2.641571    received 22 (22)<br>
       2.641573    read: UPS No Ack<br>
    usb_control_msg: 128 6 771 1033 0xbfbfe2e4 512 1000<br>
    USB error: error sending control message: Input/output error<br>
       3.661110    read: error sending control message: Input/output
    error<br>
       3.661162    blazer_status: short reply<br>
       3.661164    Status read 3 failed<br>
       3.661166    Skipping mustek protocol...<br>
       3.661168    Skipping megatec/old protocol...<br>
       3.661170    Skipping zinto protocol...<br>
       3.661172    No supported UPS detected<br>
    Network UPS Tools - Megatec/Q1 protocol USB driver 0.09 (2.6.5)<br>
    <br>
    <blockquote
cite="mid:CAFm_bUgoORKhm8J4fHGrWePiaGXcfFtgQg-5zzyeAmuY+i+ESg@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div> </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          So, do you (or anyone else here) have any guidance on how to
          force NUT to link against libusb-0.1 at compile time ???<br>
          <br>
          I'm still not convinced that the FreeBSD implementation of
          libusb v2 is fully compatible with v0.1 - the available
          documentation is confusing...<br>
          <br>
          Meanwhile, I've seen a posting from a FreeBSD v9 user, who
          clearly gets further than the 'Unknown error' message that I
          get when running their (supported) UPS over USB in FreeBSD...<br>
        </blockquote>
        <div><br>
          try grouping your efforts, FreeBSD knowledges (I'm a newby
          there) and results.<br>
        </div>
      </div>
    </blockquote>
    <br>
    Sure - I'll ping the other FreeBSD users on the list...<br>
    <blockquote
cite="mid:CAFm_bUgoORKhm8J4fHGrWePiaGXcfFtgQg-5zzyeAmuY+i+ESg@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>
          <br>
          you may also try with Linux first, to get around a possible
          device issue with the driver, and then get back to FBSD...<br>
        </div>
      </div>
    </blockquote>
    <br>
    Tried Ubuntu Linux in WM Workstation first, but just got confused
    working out how Linux maps USB ports in /dev/, so gave up...<br>
    <br>
    <blockquote
cite="mid:CAFm_bUgoORKhm8J4fHGrWePiaGXcfFtgQg-5zzyeAmuY+i+ESg@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div> <br>
          cheers,<br>
          Arno<br>
        </div>
      </div>
      <br>
    </blockquote>
    <br>
    Any bright ideas?<br>
    <br>
    Thanks,<br>
    Martyn.<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>