From: Jean Delvare <jdelvare@suse.de>
To: Stephen Davis <stephen.davis@lumet.com>
Cc: Wolfram Sang <wsa@the-dreams.de>, Linux I2C <linux-i2c@vger.kernel.org>
Subject: RE: i2c-tools available commands
Date: Mon, 02 Nov 2015 15:07:36 +0100 [thread overview]
Message-ID: <1446473256.4659.1252.camel@chaos.site> (raw)
In-Reply-To: <BN4PR12MB0753763D8979E33B80683D92E62C0@BN4PR12MB0753.namprd12.prod.outlook.com>
Stephen,
Please keep the list on Cc and don't top-post.
Le Monday 02 November 2015 à 13:23 +0000, Stephen Davis a écrit :
> Thanks for the response. What I'm trying to do is use the i2c port on the Pi. I've
> seen how it can be done with Python, but we are trying to do it without it
> (if possible). I've got a slew of microcontrollers on the i2c bus and am an in
> the process of writing our comm protocol so I really just need a read and write
> from the Pi's i2c. Is this possible? I'm running Raspbian Wheezy (Desbian).
If your micro-controllers are connected to the I2C port of the Pi, you
should indeed be able to talk to them from user-space. Anyway if it
worked with python you can definitely do it without it. Depending on the
exact protocol required by the micro-controllers, i2cget and i2cset may
be enough (if the micro-controllers only use basic SMBus-compliant
commands) or you may need Wolfram Sang's upcoming i2ctransfer tool (I
reviewed it some times ago, no news since, Wolfram where are we with
it?)
If even that isn't enough, you may have to write your code in C
directly, linking with the upcoming libi2c library. It's a bit difficult
at the moment though with the hosting website being down.
> Is this the i2cget and i2cset functions? Those seem to want an
> internal address of the slave devices (seems more geared towards
> external memory).
i2cget and i2cset want a slave address function. Your micro-controllers
need to have a slave I2C address if you want to be able to talk to them
from the Pi. Check the python code and the hardware documentation, the
slave address is certainly mentioned there.
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2015-11-02 14:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BN4PR12MB0753BFBF4E74CD966C61449CE6230@BN4PR12MB0753.namprd12.prod.outlook.com>
2015-10-28 12:53 ` i2c-tools available commands Jean Delvare
[not found] ` <BN4PR12MB0753763D8979E33B80683D92E62C0@BN4PR12MB0753.namprd12.prod.outlook.com>
2015-11-02 14:07 ` Jean Delvare [this message]
2015-11-02 18:50 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446473256.4659.1252.camel@chaos.site \
--to=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
--cc=stephen.davis@lumet.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).