Loading ...
Sorry, an error occurred while loading the content.

NSLU2, unslung 6.10 and ds9490r

Expand Messages
  • JaskaJ
    Hi, Digitemp reads my sensors and adapter. oww and owfs dont see adapter at all. libusb is v. 0.1.12 What to try next? Regards, Jussi
    Message 1 of 5 , May 16, 2010
    • 0 Attachment
      Hi,

      Digitemp reads my sensors and adapter.
      oww and owfs dont see adapter at all.
      libusb is v. 0.1.12

      What to try next?


      Regards,

      Jussi
    • Robert Hammond
      I noticed in the digitemp build readme file, part of the source files, a patch that may need to be applied to libusb when using the ds9490r adapter, The patch
      Message 2 of 5 , May 16, 2010
      • 0 Attachment
        I noticed in the digitemp build readme file, part of the source files,
        a patch that may need to be applied to libusb when using the ds9490r
        adapter, The patch is written for libusd v0.1.7 but perhaps may also be
        needed with later versions.


        Paste from readme
        Version 3.3.1 works with the DS9490R USB adapter using the DS2490 USB to
        1-wire adapter chip. It needs to be run as root, and your version of
        libusb may need to be patched using the patch in the ./contrib directory



        Paste of the patch mentioned
        I've successfully used the driver found in main PDK archive
        (owpd300b2.zip) under generic library using usblnk.c and usbses.lnk.
        This driver in turn uses libusb library found on the internet.

        I've found libusb v0.1.7, which contained a small bug in linux.c file.
        The fixed routine is below.

        int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size,
        int timeout)
        {
        struct usb_bulktransfer bulk;
        int ret, retrieved = 0, requested;

        /* Ensure the endpoint address is correct */
        ep |= USB_ENDPOINT_IN;

        do {
        bulk.ep = ep;
        requested = size - retrieved;
        if (requested > MAX_READ_WRITE)
        requested = MAX_READ_WRITE;
        bulk.len = requested;
        bulk.timeout = timeout;
        bulk.data = (unsigned char *)bytes + retrieved;

        ret = ioctl(dev->fd, IOCTL_USB_BULK, &bulk);
        if (ret < 0)
        USB_ERROR_STR(ret, "error reading from bulk endpoint 0x%x: %s",
        ep, strerror(errno));

        retrieved += ret;
        } while (ret > 0 && retrieved < size); /* Yefim: && ret == requested
        */

        return retrieved;
        }




        In message <hsosk5+vs04@...>, JaskaJ <jkphome@...> writes
        >Hi,
        >
        >Digitemp reads my sensors and adapter.
        >oww and owfs dont see adapter at all.
        >libusb is v. 0.1.12
        >
        >What to try next?
        >
        >
        >Regards,
        >
        >Jussi
        >

        --
        Robert Hammond
        PGP:0x154144DA
        592B 0199 2D7F FC05 C4B1 0404 2258 4471 1541 44DA
      • Robert Hammond
        I have added this patch to libusb tonight, will be ipk -2, unsure when it will become available in the feeds. In message ,
        Message 3 of 5 , May 16, 2010
        • 0 Attachment
          I have added this patch to libusb tonight, will be ipk -2, unsure when
          it will become available in the feeds.

          In message <Y4vnlPCE3D8LFwnY@...>, Robert Hammond
          <robham@...> writes

          >
          >I noticed in the digitemp build readme file, part of the source files,
          >a patch that may need to be applied to libusb when using the ds9490r
          >adapter, The patch is written for libusd v0.1.7 but perhaps may also be
          >needed with later versions.
          >
          >Paste from readme
          >Version 3.3.1 works with the DS9490R USB adapter using the DS2490
          >USB to
          >1-wire adapter chip. It needs to be run as root, and your version of
          >libusb may need to be patched using the patch in the ./contrib directory
          >
          >Paste of the patch mentioned
          >I've successfully used the driver found in main PDK archive
          >(owpd300b2.zip) under generic library using usblnk.c and usbses.lnk.
          >This driver in turn uses libusb library found on the internet.
          >
          >I've found libusb v0.1.7, which contained a small bug in linux.c file.
          >The fixed routine is below.
          >
          >int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size,
          >int timeout)
          >{
          >struct usb_bulktransfer bulk;
          >int ret, retrieved = 0, requested;
          >
          >/* Ensure the endpoint address is correct */
          >ep |= USB_ENDPOINT_IN;
          >
          >do {
          >bulk.ep = ep;
          >requested = size - retrieved;
          >if (requested > MAX_READ_WRITE)
          >requested = MAX_READ_WRITE;
          >bulk.len = requested;
          >bulk.timeout = timeout;
          >bulk.data = (unsigned char *)bytes + retrieved;
          >
          >ret = ioctl(dev->fd, IOCTL_USB_BULK, &bulk);
          >if (ret < 0)
          >USB_ERROR_STR(ret, "error reading from bulk endpoint 0x%x: %s",
          >ep, strerror(errno));
          >
          >retrieved += ret;
          >} while (ret > 0 && retrieved < size); /* Yefim: && ret == requested
          >*/
          >
          >return retrieved;
          >}
          >
          >In message <hsosk5+vs04@...>, JaskaJ <
          >jkphome@...> writes
          >>Hi,
          >>
          >>Digitemp reads my sensors and adapter.
          >>oww and owfs dont see adapter at all.
          >>libusb is v. 0.1.12
          >>
          >>What to try next?
          >>
          >>
          >>Regards,
          >>
          >>Jussi
          >>

          --
          Robert Hammond
          PGP:0x154144DA
          592B 0199 2D7F FC05 C4B1 0404 2258 4471 1541 44DA
        • Jussi Puustinen
          Thanks! Digitemp works fine. Problem is oww (one wire weather) and owfs (one wire file system). Here is oww debug output: /Setup read from:
          Message 4 of 5 , May 18, 2010
          • 0 Attachment
            Thanks!

            Digitemp works fine.
            Problem is oww (one wire weather) and owfs (one wire file system).

            Here is oww debug output:

            /Setup read from: /opt/etc/oww/setupNG
            Devices read from: /opt/etc/oww/devices
            applctn_startup_finished. Debug to ""
            Interactive? Yes
            bound Unix socket
            bound Unix socket
            owAcquireEx: com = USB
            1-wire Error: Open COM Failed
            1-wire Error: Failed to acquire a necessary system resource
            Check connexions and setup
            RETRY:Will restart in 5 seconds
            owAcquireEx: com = USB
            1-wire Error: Open COM Failed
            1-wire Error: Failed to acquire a necessary system resource
            state_zombie -> state_wsdead
            Problem with link or weather station
            RETRY:Will restart in 5 seconds/

            Robert Hammond wrote:
            > The unslung feeds seem to be currently broken so I have attached the
            > libusb ipk to this email that contains the digitemp patch. Hope that
            > it works for you.
            >
            >
            >
            > In message <hsosk5+vs04@...>, JaskaJ <jkphome@...> writes
            >> Hi,
            >>
            >> Digitemp reads my sensors and adapter.
            >> oww and owfs dont see adapter at all.
            >> libusb is v. 0.1.12
            >>
            >> What to try next?
            >>
            >>
            >> Regards,
            >>
            >> Jussi
            >>
            >
          • Robert Hammond
            The build notes for the latest oww 0.83.2 contain a note that states that the USB option is broken with this version under certain circumstances and with
            Message 5 of 5 , May 19, 2010
            • 0 Attachment
              The build notes for the latest oww 0.83.2 contain a note that states
              that the USB option is broken with this version under certain
              circumstances and with certain adapters.

              The oww support forum has many recent messages on this. There are a
              number of fixes posted to the forum, one of which is to temporarily
              down grade to oww version 0.82.1 where there is also a link to download
              this earlier version.

              Suggest that you read through these forum postings and check some of the
              possible fixes mentioned.


              In message <4BF2D738.7090709@...>, Jussi Puustinen
              <jkphome@...> writes
              >Thanks!
              >
              >Digitemp works fine.
              >Problem is oww (one wire weather) and owfs (one wire file system).
              >
              >Here is oww debug output:
              >
              >/Setup read from: /opt/etc/oww/setupNG
              >Devices read from: /opt/etc/oww/devices
              >applctn_startup_finished. Debug to ""
              >Interactive? Yes
              >bound Unix socket
              >bound Unix socket
              >owAcquireEx: com = USB
              >1-wire Error: Open COM Failed
              >1-wire Error: Failed to acquire a necessary system resource
              >Check connexions and setup
              >RETRY:Will restart in 5 seconds
              >owAcquireEx: com = USB
              >1-wire Error: Open COM Failed
              >1-wire Error: Failed to acquire a necessary system resource
              >state_zombie -> state_wsdead
              >Problem with link or weather station
              >RETRY:Will restart in 5 seconds/
              >
              >Robert Hammond wrote:
              >> The unslung feeds seem to be currently broken so I have attached the
              >> libusb ipk to this email that contains the digitemp patch. Hope that
              >> it works for you.
              >>
              >>
              >>
              >> In message <hsosk5+vs04@...>, JaskaJ <jkphome@...> writes
              >>> Hi,
              >>>
              >>> Digitemp reads my sensors and adapter.
              >>> oww and owfs dont see adapter at all.
              >>> libusb is v. 0.1.12
              >>>
              >>> What to try next?
              >>>
              >>>
              >>> Regards,
              >>>
              >>> Jussi
              >>>
              >>

              --
              Robert Hammond
              PGP:0x154144DA
              592B 0199 2D7F FC05 C4B1 0404 2258 4471 1541 44DA
            Your message has been successfully submitted and would be delivered to recipients shortly.