Thursday, June 6, 2013

Arch Linux Iomega IConnect I2C Sensors

I recently wrote about installing Arch Linux on the Iomega IConnect.

This shows how to get the I2C interface working and have a look at the built in LM63 temperature sensors.

Install lm_sensors.

pacman -S lm_sensors

Have a look and see what the package gives us, binary wise.

pacman -Ql lm_sensors


We need to load a few kernel modules. i2c-mv64xxx is the driver for the I2C bus and lm63 for the sensors.

[root@biggles ~]# modprobe i2c-mv64xxx
[root@biggles ~]# modprobe lm63
[root@biggles ~]# lsmod
Module                  Size  Used by
lm63                    5257  0
hwmon                   1187  1 lm63
i2c_mv64xxx             4121  0
i2c_core               15344  2 i2c_mv64xxx,lm63
rt2800pci               7802  0
rt2800lib              39393  1 rt2800pci
rt2x00pci               3661  1 rt2800pci
rt2x00lib              30207  3 rt2x00pci,rt2800lib,rt2800pci
eeprom_93cx6            1150  1 rt2800pci
mac80211              170543  3 rt2x00lib,rt2x00pci,rt2800lib
cfg80211              143659  2 mac80211,rt2x00lib
rfkill                 14400  2 cfg80211
ds2490                  6254  0
wire                   15857  1 ds2490
ipv6                  259694  10
mv_cesa                 9128  0
autofs4                22074  2
[root@biggles ~]#
[root@biggles ~]# sensors-detect
# sensors-detect revision 6170 (2013-05-20 21:25:22 +0200)
# DMI data unavailable, please consider installing dmidecode 2.7
# or later for better results.

This program will help you determine which kernel modules you need

------------------------ snip -------------------------------------------

Some boring text and all negative, so skipping it

------------------------ snip -------------------------------------------

Module i2c-dev loaded successfully.

Next adapter: mv64xxx_i2c adapter (i2c-0)
Do you want to scan it? (YES/no/selectively):
Client found at address 0x4c
Handled by driver `lm63' (already loaded), chip type `lm63'

Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `lm63':
  * Bus `mv64xxx_i2c adapter'
    Busdriver `i2c_mv64xxx', I2C address 0x4c
    Chip `lm63' (confidence: 6)

Do you want to generate /etc/conf.d/lm_sensors? (YES/no):
ln -s '/usr/lib/systemd/system/lm_sensors.service' '/etc/systemd/system/'
Unloading i2c-dev... OK

[root@biggles ~]# sensors
Adapter: mv64xxx_i2c adapter
temp1:        +38.0°C  (high = +70.0°C)
temp2:        +38.2°C  (low  =  +0.0°C, high = +70.0°C)
                       (crit = +85.0°C, hyst = +75.0°C)
All Done