Hi Kim:

I tried your method. However, the problem is still there.

Since the SDA and SCL are always high, the gumstix cannt recognize the slave device address  and read register value correctly. All the values are 0xff. 

Even when i didn't connect any slave device to gumstix, i can still get same values after using these commands. 

So did you meet this situation before?

BR
Yifei



On Mon, May 10, 2010 at 1:37 PM, Kimberly Turley <kimberly.turley@gmail.com> wrote:
Hi Shi YiFei -

Boot up your overo and once you're logged in type: opkg install i2c-tools

I don't remember the package name for sure off-hand, so if that gives
you an error like "could not find package i2c-tools", then type:

opkg list | grep i2c

You should have a package with a similar name listed.  Install that as
above (opkg install <package-name>).  If opkg does not list i2c tools,
try running opkg update and opkg upgrade.

If that doesn't work for you, let me know and I'll take a look when
I'm at home and have access to my board.  But you shouldn't need to
cross compile or anything - especially if you have a pre-built image,
it should already be installed.

Good luck!
-Kim

On Mon, May 10, 2010 at 6:27 AM, SHI yifei <shiyifei1@gmail.com> wrote:
> Hi
> Thanks for your suggestions.
> Could you pls tell me how to use opkg to install i2c tools
> more specifically? Should i use OE to cross compile it first or somehow? I
> am a newbie.
> Thank you very much.
> BR
> Yifei
>
> On Sat, May 8, 2010 at 12:19 AM, Kimberly Turley <kimberly.turley@gmail.com>
> wrote:
>>
>> Hi Shi Yifei -
>>
>> If you haven't already, consider testing i2c from the command line.
>> Use opkg to install i2c tools, then try:
>>
>> i2cdetect -y -r 3
>>
>> If you don't see your device address showing up, then you have a
>> hardware configuration problem.  Both level conversion and the need to
>> set the overo to use 100kHz have been problems for me in the past (set
>> in environmental variables).
>>
>> If you do see your device, you can try the built in read-write commands:
>>
>> i2cget -y 3 <address in hex ie 0x1e> <address of register in hex>
>> will return the contents of a register
>>
>> i2cset -y 3 <address in hex> <address of register in hex> <value to
>> set register to>
>> will write a value to a register
>>
>> i2cdump -y 3
>> will dump the contents of your registers, but confuses some of my i2c
>> devices and requires a hard reset to resume normal function.
>>
>> Once you know all of this is working, you'll know the problem is in
>> the userspace program and not your setup.
>>
>> There's a good thread on this here:
>> http://old.nabble.com/I2C-Test-for-Overo-td22425533.html
>>
>> Good luck!
>> -Kim
>>
>> On Fri, May 7, 2010 at 9:08 AM, SHI yifei <shiyifei1@gmail.com> wrote:
>> > Hello all:
>> > I tried to use gumstix to communicate with an I/O expander MCP23017
>> > through
>> > i2c.  I found a demo from
>> > gitnub: http://github.com/scottellis/overo-mcp23017.
>> > I did the same thing as the instruction. I successed  to open /dev/i2c-3
>> > and
>> > tried reading and writing to MCP23017 through i2c. However, nothing
>> > happened
>> > on SDA and SCL. They are 1.8v always.
>> > I didn't see any mistakes in the sample code in demo. Do i need to
>> > configure
>> > something to enable the i2c controller or something similar before
>> > running
>> > the code?The kernel version is 2.6.32, pre-built.
>> > Is there anyone who has experience could give me some clues?
>> >
>> > Thanks a lot.
>> > BR
>> > Yifei
>> >
>> > ------------------------------------------------------------------------------
>> >
>> >
>> > _______________________________________________
>> > gumstix-users mailing list
>> > gumstix-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/gumstix-users
>> >
>> >
>>
>>
>>
>> --
>> Kim Turley
>> kimberly.turley@gmail.com
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> gumstix-users mailing list
>> gumstix-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>



--
Kim Turley
kimberly.turley@gmail.com

------------------------------------------------------------------------------

_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users