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 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html