1-wire (w1) subsystem problems
by Mike Davies from LinuxQuestions.org on (#56PH8)
We've got two temperature sensors (DS18B20) on a 1-wire bus, one measuring the room temp, and the other measuring the temp inside a case, and the idea is we can change a fan pwm depending on the temp difference etc.
And it works well, for 24hrs a day, 7 days a week, until we start getting CRC errors, from which we never seem to be able to recover.
We've told w1_master_max_slave_count we have two devices and after the master finds 2 devices we stop the master searching.
We read the sensors about every 20/30 secs, and it all works well until we start getting CRC errors.
A reboot will fix the problem, BUT, as we don't power down the one-wire subsystem during a reboot, and a reboot fixes the problem, it seems to us that there must be a software solution to these CRC errors. i.e. the DS18B20 sensors are not switching internally into some sort of "silly bugger mode" from which only powering off and on again knock them back into life.
We have tried removing drivers and reloading modules, and using w1_master_remove followed by w1_master_add, but the problem persists.
Of course the main problem are these CRC errors happen only rarely, so it's difficult to try different possible solutions.
Is the a 1-wire expert in the house ?
Can anyone give some advice ?
Oh, yeah, we did try swapping out the DS18B20's for different devices, but it made no difference.
Thanks.


And it works well, for 24hrs a day, 7 days a week, until we start getting CRC errors, from which we never seem to be able to recover.
We've told w1_master_max_slave_count we have two devices and after the master finds 2 devices we stop the master searching.
We read the sensors about every 20/30 secs, and it all works well until we start getting CRC errors.
A reboot will fix the problem, BUT, as we don't power down the one-wire subsystem during a reboot, and a reboot fixes the problem, it seems to us that there must be a software solution to these CRC errors. i.e. the DS18B20 sensors are not switching internally into some sort of "silly bugger mode" from which only powering off and on again knock them back into life.
We have tried removing drivers and reloading modules, and using w1_master_remove followed by w1_master_add, but the problem persists.
Of course the main problem are these CRC errors happen only rarely, so it's difficult to try different possible solutions.
Is the a 1-wire expert in the house ?
Can anyone give some advice ?
Oh, yeah, we did try swapping out the DS18B20's for different devices, but it made no difference.
Thanks.