4

I'm following this tuto http://skpang.co.uk/blog/archives/575 in order to setup my rpi with an I/O port expander. My problem is whenever I run i2cdetect to find out the device, I get a weird output.

julien@raspberrypi ~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a UU 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77

I was expecting an output like this:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --  

It looks like all ports are being used. I get this 1b = UU that looks wrong also.

I tried to clear the following file with a similar output (3 more ports showing UU), but right now it goes like this.

julien@raspberrypi ~ $ cat /etc/modprobe.d/raspi-blacklist.conf
# blacklist spi and i2c by default (many users don't need them)

#blacklist spi-bcm2708
#blacklist i2c-bcm2708
blacklist snd-soc-pcm512x
blacklist snd-soc-wm8804

Here's more info.

julien@raspberrypi ~ $ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

snd-bcm2835
i2c-bcm2708
i2c-dev

julien@raspberrypi ~ $ lsmod
Module                  Size  Used by
i2c_dev                 5769  0
snd_bcm2835            19496  0
snd_soc_tas5713         5573  0
snd_soc_bcm2708_i2s     6210  0
regmap_mmio             2818  1 snd_soc_bcm2708_i2s
snd_soc_core          128465  2 snd_soc_tas5713,snd_soc_bcm2708_i2s
snd_compress            8259  1 snd_soc_core
regmap_i2c              1661  2 snd_soc_core,snd_soc_tas5713
snd_pcm_dmaengine       5505  1 snd_soc_core
regmap_spi              1913  1 snd_soc_core
snd_pcm                83845  3 snd_bcm2835,snd_soc_core,snd_pcm_dmaengine
snd_page_alloc          5132  1 snd_pcm
snd_seq                55484  0
snd_seq_device          6469  1 snd_seq
snd_timer              20998  2 snd_pcm,snd_seq
leds_gpio               2079  0
led_class               4118  1 leds_gpio
snd                    62252  7 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_seq,snd_seq_device,snd_compress
i2c_bcm2708             4943  0
spi_bcm2708             4964  0

gpio readall
 +-----+-----+---------+------+---+-Model B2-+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
 |   2 |   8 |   SDA.1 | ALT0 | 0 |  3 || 4  |   |      | 5V      |     |     |
 |   3 |   9 |   SCL.1 | ALT0 | 1 |  5 || 6  |   |      | 0v      |     |     |
 |   4 |   7 | GPIO. 7 |   IN | 1 |  7 || 8  | 1 | ALT0 | TxD     | 15  | 14  |
 |     |     |      0v |      |   |  9 || 10 | 1 | ALT0 | RxD     | 16  | 15  |
 |  17 |   0 | GPIO. 0 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO. 1 | 1   | 18  |
 |  27 |   2 | GPIO. 2 |   IN | 0 | 13 || 14 |   |      | 0v      |     |     |
 |  22 |   3 | GPIO. 3 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO. 4 | 4   | 23  |
 |     |     |    3.3v |      |   | 17 || 18 | 0 | IN   | GPIO. 5 | 5   | 24  |
 |  10 |  12 |    MOSI | ALT0 | 0 | 19 || 20 |   |      | 0v      |     |     |
 |   9 |  13 |    MISO | ALT0 | 0 | 21 || 22 | 0 | IN   | GPIO. 6 | 6   | 25  |
 |  11 |  14 |    SCLK | ALT0 | 0 | 23 || 24 | 1 | ALT0 | CE0     | 10  | 8   |
 |     |     |      0v |      |   | 25 || 26 | 1 | ALT0 | CE1     | 11  | 7   |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |  28 |  17 | GPIO.17 |   IN | 0 | 51 || 52 | 0 | IN   | GPIO.18 | 18  | 29  |
 |  30 |  19 | GPIO.19 |   IN | 0 | 53 || 54 | 0 | IN   | GPIO.20 | 20  | 31  |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+-Model B2-+---+------+---------+-----+-----+
3

Your hardware connections are incorrect.

You need to recheck that the ground, SDA, and SCL wires are firmly in place.

It looks like, perhaps, SDA, is shorted to ground.

If you can't find the fault please post a close-up photo of your set-up.


The UU entry(s) are not faults. They indicate that the kernel has pre-loaded a module to handle an I2C device at that address.

  • Will do that when I'll be back home. In the mean time, can you confirm that the port expander has to be connected in order to get a correct output? Cause I've got the same output while everything was disconnected from the Pi and I was expecting everything to be -- (empty). – Julien B. Jan 7 '15 at 18:23
  • @JulienB. Everything would normally be -- apart from a few UU entries (see edited reply). – joan Jan 7 '15 at 18:25
  • Ok, so I confirm that when there is nothing connected to my PI, the output is the same. So I suspect a problem with my Pi and not with my circuit. Does that make sense? – Julien B. Jan 8 '15 at 0:06
  • 1
    If you have NOTHING connected to the pins that would suggest a problem with the Pi. – joan Jan 8 '15 at 0:30
  • All that is connected to my Pi is the network and the power cables. Nothing connected to the pins. However, I can work with the pins without using the i2c module. So that's kind of odd. – Julien B. Jan 8 '15 at 0:40
1

So that was a hardware problem, using another Pi (tried two and both worked) solved the problem.

All the information is in the comments above, but here a short summary of the process.

  1. I tried to run i2cdetect with nothing connected to the GPIO of my Pi, with the same result. That raised the flag of a possible hardware defect.
  2. I tried to follow the same tuto on another Pi (model B+) and it worked right away.
  3. I tried to run i2cdetect on another Pi (exactly the same as the 1st Pi), using the SD card from the first Pi (so same config, files, etc.) and it worked. That confirmed the hardware problem on the 1st Pi.

Thanks to joan

  • You should describe the problem in more detail and what it took to determine. – Steve Robillard Jan 15 '15 at 5:51
0

Apologies for coming late to the party, but I just came across this as I had the same problem. I'm powering my RPi from an Adafruit Powerboost 1000c through the (optional) USB-A socket, using a USB to micro USB cable. This has charge-rate resistors connected to the USB D+ & D- lines, to set charging levels for iOS devices. The problem went away when I replaced the cable with a power-only version (i.e., no data wires). Begs the question though: why are data lines present on a RPi's power socket (RPi 2B in my case)?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.