Raw device on I2C bus

Hi folks,

I have a hardware circuit (internally named SAL) based on a MSP430 microcontroller which should be connected via I2C to the BBB.
After physically connecting the SAL via I2C to the BBB it responds to i2cdetect correctly and I am able to start some actions via i2cget because my SAL software interprets register numbers as internal commands - not nice but it works (partially).

But what I really want is to start actions by executing scripts based on BoneScript. As far as I understand there is a suitable driver needed for this device which obviously doesn’t exist. Am I right? Or could the dummy driver be used in any way and how?
In Bonescript I can create a new dummy device at a given address and I can read and write files but are there any files connected to the dummy driver which I can read/write to communicate with my device?

Sorry for those basic questions but I have never done anything with I2C.

Any help/hint is appreciated
Helmut

Hi Helmut,

I’m afraid that I can’t help with BoneScript. Perhaps a good solution does exist (and other will chime in).

However, another option would be to use Python. I am doing this now, and talking to my I2C devices is working fine.

For Python, one needs to install ‘smbus’:

apt-get install python-smbus

Regards,

Chris

The first result for “i2c with bonescript” refers to node-i2c. That link has some examples.

There are many good tutorials on i2c. Your transactions will contain a device address and some number of bytes to read or write. What those bytes are is specific to each device, so you’ll have to read your devices datasheet/documentation.

What’s the device?