Re: No sensors found on i2c-usb-tiny

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jan,

On Sun, 4 Nov 2012 01:55:03 +0100, Jan Weber wrote:
> Hi folks,
> 
> I'm using a homebrew i2c-tiny-usb interface connected to a TMP75 sensor
> (TIs equivalent of the LM75). I'm using Ubuntu 8.04 with kernel version
> 2.6.24, but I've tested other versions as well, all with the same result.
> 
> sensors-detect is able to find the device at it's adress 0x48. I can access
> the device using i2cdump and I'm able to retrieve data with i2cget. I'm
> sure the hardware is working fine so far.
> 
> But the sensors program keeps on complaining that there are no sensors
> found. All kernel modules are loaded (i2c-core, i2c-dev, i2c-tiny-usb, lm75)
> 
> i2c-tiny-usb and sensors don't seem to harmonize somehow.
> 
> Do you have any hints for me?

Yes. The TMP75 device can't be auto-detected, so you have to instantiate
it explicitly. Find out the i2c bus number of i2c-tiny-usb on your
system, then do:
# echo tmp75 0x48 > /sys/bus/i2c/devices/i2c-<busnr>/new_device
where <busnr> is the i2c bus number of i2c-tiny-usb on your
system. As this bus number is likely to change, you'll probably want to
write a small script finding the bus number for you:

for i2c in /sys/bus/i2c/devices/i2c-*
do
	if grep -q ^i2c-tiny-usb $i2c/name
	then
		echo tmp75 0x48 > $i2c/new_device
	fi
done

If you are good at udev rules, the same can certainly be achieved with
a udev rule, with the benefit of supporting device hot-plug.

-- 
Jean Delvare
http://khali.linux-fr.org/wishlist.html

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux