Public bug reported: The version of digitemp_DS2490 in Trusty and later (and possibly previous versions, though it has worked for us before) does not detect temperature sensors connected to the One-wire network. For reference, we're using
digitemp:i386/trusty 3.6.0+dfsg1-2 but it is likely that other versions are affected too. To reproduce: - Connect some temperature sensors via a DS2490 USB-to-1wire adapter - Run: digitemp_DS2490 -i Expected results: - The sensors are detected and listed on the output (and in a .digitemprc file); this takes a few seconds Actual results: - No sensors are detected; the program returns immediately. Diagnosis: This seems to be a (long-standing?) bug in how the code resets the 1-Wire bus via USB. There are a number of issues: - The DS2490 returns the operation result via interrupt data, but the program reads it via normal data. - A result is only returned if the appropriate bit is set to request it; the program does not set this bit. - The program requests 32 (0x20) bytes from the USB device, but does not check how many were actually returned (and hence whether any result actually came back) - the device will always return 16 (0x10) status bytes, but any result bytes follow these. Thus the program detects status or failure by reading a byte in the buffer that the device has not actually modified. In cases where the program worked, this is likely to be because the value happened to be set to the right value (0 will do) by chance. Fix: I'll attach a patch to the bug that addresses these issues. ** Affects: digitemp (Ubuntu) Importance: Undecided Status: New ** Patch added: "Patch to fix issue reading result after resetting 1wire bus via USB" https://bugs.launchpad.net/bugs/1397382/+attachment/4270220/+files/usb-reset-status.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1397382 Title: digitemp_DS2490 fails to detect sensors To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/digitemp/+bug/1397382/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs