digitemp stopped working after CentOS upgrade

116 views
Skip to first unread message

Per Lönnborg

unread,
Jan 12, 2020, 1:12:16 PM1/12/20
to DigiTemp
Hello,

I´ve been running Digitemp successfully on my 1-wire temp sensors for many years. I would gess for 10 years. About last 5 years I have used a USB-to-Serial device (my present desktop don´t have serial ports).
The serial-to-1-wire interface is homemade and has been the same since start. The OS was Centos 6. Last upgrade was 6.9, still with no issues. All this has working 100% fine.

But for a couple of weeks ago I decided to do a fresh install of CentOS, to CentOS 7.7 (as today)

Now digitemp does NOT work anymore!
When I shall initialize the 1-wire bus I get:

[root@host ~]#  digitemp_DS9097 -i -s /dev/ttyUSB0
DigiTemp v3.7.2 Copyright 1996-2018 by Brian C. Lane
GNU General Public License v2.0 - http://www.digitemp.com
owAcquire: failed to set attributes: Invalid argument
Error 24: Failed to initialize system resource
[root@host ~]#


When I runt exactly the same command on the CentOS 6.9 version ( the same desktop, yhe same hardware) it works:

[pelle@host]$ digitemp_DS9097 -i -s /dev/ttyUSB0
DigiTemp v3.7.2 Copyright 1996-2018 by Brian C. Lane
GNU General Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers
.....
Searching the 1-Wire LAN
10DCEE3E00080011 : DS1820/DS18S20/DS1920 Temperature Sensor
10E9EC3E00080094 : DS1820/DS18S20/DS1920 Temperature Sensor
1025EC3E00080076 : DS1820/DS18S20/DS1920 Temperature Sensor
10F5F83E000800D1 : DS1820/DS18S20/DS1920 Temperature Sensor
103FB33E00080018 : DS1820/DS18S20/DS1920 Temperature Sensor
ROM #0 : 10DCEE3E00080011
ROM #1 : 10E9EC3E00080094
ROM #2 : 1025EC3E00080076
ROM #3 : 10F5F83E000800D1
ROM #4 : 103FB33E00080018
Wrote .digitemprc
[pelle@host]$

As you can see, the digitemp version is the same too.

Here is info of my USB-to-Serial

Jan  8 17:03:36 cento kernel: usb 4-2: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
Jan  8 17:03:36 cento kernel: usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan  8 17:03:36 cento kernel: usb 4-2: Product: USB Serial Converter
Jan  8 17:03:36 cento kernel: usb 4-2: Manufacturer: FTDI
Jan  8 17:03:36 cento kernel: usb 4-2: SerialNumber: FTH0M3YE

# lsusb |grep FT
Bus 004 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC


What can cause this?

Thanks,




Brian C. Lane

unread,
Jan 12, 2020, 1:26:53 PM1/12/20
to DigiTemp
On Sun, Jan 12, 2020 at 02:07:38AM -0800, Per Lönnborg wrote:
> Hello,
>
> I´ve been running Digitemp successfully on my 1-wire temp sensors for many
> years. I would gess for 10 years. About last 5 years I have used a
> USB-to-Serial device (my present desktop don´t have serial ports).
> The serial-to-1-wire interface is homemade and has been the same since
> start. The OS was Centos 6. Last upgrade was 6.9, still with no issues. All
> this has working 100% fine.
>
> But for a couple of weeks ago I decided to do a fresh install of CentOS, to
> CentOS 7.7 (as today)
>
> Now digitemp does NOT work anymore!
> When I shall initialize the 1-wire bus I get:
>
> [root@host ~]# digitemp_DS9097 -i -s /dev/ttyUSB0
> DigiTemp v3.7.2 Copyright 1996-2018 by Brian C. Lane
> GNU General Public License v2.0 - http://www.digitemp.com
> *owAcquire: failed to set attributes: Invalid argument*
> *Error 24: Failed to initialize system resource*
> [root@host ~]#

It looks like this is a FTDI USB chip with a passive adapter added to
it? Not a DS9097U adapter? I'm a bit surprised that ever worked, the
passive design is pretty sensitive to hardware. But in this case I'd
guess that something in the kernel ttyUSB code changed that is causing
the failure.

This isn't really something I can debug, and I hate to say it but you're
better off buying a DS9097U adapter or one of the iButtonLink adapters.


--
https://www.brianlane.com

Per Lönnborg

unread,
Jan 13, 2020, 2:44:36 AM1/13/20
to DigiTemp
Yes, it´s a homemade passive adapter with a FTDI USB, and I have this setup for several years without problems.

Worth to mention, I get exactly the same error message even with the passive adapter disabled (pulled away from USB-to-serial plug).
I guess that emphasizes your thoughts that CentOS has done something to the code between Centos 6 and 7.
Also, /var/log/messages logs this message everytime I run the "digitemp_DS9097 -i -s /dev/ttyUSB0" command:

Jan 13 06:29:00 cento kernel: ftdi_sio ttyUSB0: requested CSIZE setting not supported

/Per

William B. Clay

unread,
Jan 13, 2020, 5:06:36 AM1/13/20
to Per Lönnborg, digi...@googlegroups.com
Per,

I've had digitemp problems after kernel changes in Debian a couple times
since 2011, but have been able to resolve them and recover reliable
operation after a little tinkering with source code.

Given the error message below and a quick look at digitemp source, I'd
try changing "CS6" to "CS8" for the c_cflag settings at:

* userial/ds9097/linuxses.c around line 90 and

* userial/ds9097/linuxlnk.c around line 34.

I don't know why CS6 was chosen, nor am I convinced that CS8 will work
(if not, you could try CS7).  I don't know enough about the
RS232-to-OneWire UART tricks going on here to even guess exactly how
this works, but if you don't get a more knowledgeable answer, it won't
hurt to try this.

For quick testing, I'd try with digitemp_DS9097 -w instead of -i.

Good luck!

Bill

Per Lönnborg

unread,
Jan 13, 2020, 8:36:47 AM1/13/20
to DigiTemp
Bill,

interesting.
Actually, I searched this group for the error message I see ("... requested CSIZE setting not supported") and found an earlier thread (unanswered) that seems to address this issue too.
Thread name is "Digitemp and its problem with 6 bit transmission"

I will try changing "CS6" to "CS8" (or "CS7") and get back as soon I have tested it!

Thanks,

/Per

Per Lönnborg

unread,
Jan 14, 2020, 2:28:45 PM1/14/20
to DigiTemp
It works!

I changed "CS6" to "CS8" and voila!

# ./digitemp_DS9097 -i -s /dev/ttyUSB0
DigiTemp v3.7.2 Copyright 1996-2018 by Brian C. Lane
GNU General Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers
.....
Searching the 1-Wire LAN
10DCEE3E00080011 : DS1820/DS18S20/DS1920 Temperature Sensor
10E9EC3E00080094 : DS1820/DS18S20/DS1920 Temperature Sensor
1025EC3E00080076 : DS1820/DS18S20/DS1920 Temperature Sensor
10F5F83E000800D1 : DS1820/DS18S20/DS1920 Temperature Sensor
103FB33E00080018 : DS1820/DS18S20/DS1920 Temperature Sensor
ROM #0 : 10DCEE3E00080011
ROM #1 : 10E9EC3E00080094
ROM #2 : 1025EC3E00080076
ROM #3 : 10F5F83E000800D1
ROM #4 : 103FB33E00080018
Wrote .digitemprc
# ./digitemp_DS9097 -a
DigiTemp v3.7.2 Copyright 1996-2018 by Brian C. Lane
GNU General Public License v2.0 - http://www.digitemp.com
Jan 14 20:24:15 Sensor 0 C: 3.75 F: 38.75
Jan 14 20:24:16 Sensor 1 C: 8.75 F: 47.75
Jan 14 20:24:18 Sensor 2 C: 11.31 F: 52.36
Jan 14 20:24:19 Sensor 3 C: 11.31 F: 52.36
Jan 14 20:24:21 Sensor 4 C: 10.94 F: 51.69
#

Sebastian Sjoholm

unread,
Jun 13, 2020, 6:04:08 PM6/13/20
to DigiTemp
Hi,

I had the same "CSIZE" issue.

When I was about to change the CSIZE flag to C8, I noted that while it is C6 in linuxses.c, it was already C8 in linuxlnk.c.

Changed it to C8 in linuxses.c and that did fix it.

Thanks.

Regards,
Sebastian

Brian C. Lane

unread,
Jun 13, 2020, 10:59:45 PM6/13/20
to DigiTemp
Looks like is a limitation of the FTDI USB driver:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/serial/ftdi_sio.c?h=v5.7#n2666

The PL2303 doesn't have the same limitation.

I'm glad you figured this out, but I can't change this in digitemp
since it will likely break it for everyone not using a FTDI adapter with
the DS9097 design.

Brian

--
https://www.brianlane.com
Reply all
Reply to author
Forward
0 new messages