I am hoping that somebody could help me with this problem. In previous posts
I have seen that problems with i2c communication is rather common. I am
using netwifimicroSD+gumstix(verdex XM4-BT)+robostix. My goal is to create
pwm signals in order to control servo motors. I am connecting via wifi on
gumstix platform. In my program, in a while loop I am setting OCR registers,
using for example I2C_IO_WriteReg16(i2cDev,0x86,
2000); it works fine for a
while and then suddenly stops and connection fails. It returns error:
ERROR: I2cTransfer: ioctl failed: Remote I/O error (121)
ERROR: I2C_IO_WriteReg16: I2cWriteBlockFailed: Remote I/O error (121)

I have plugged power adapters both in gumstix and robostix and i also have
jumper described in robostix_power.pdf...

Here is part of test source code:

# include <stdio.h>
# include <fcntl.h>
#include <unistd.h>
# include "i2c-io-api.h"
# include "i2c-api.h"
# include "i2c-io.h"
# include "i2c.h"
# include "i2c-dev.h"
# include "Log.h"

int main(){

const char *i2cDevName = "/dev/i2c-0";
int i2cDev = -1;
int gI2cAddr = 0x0B;
int i=0;

if ((i2cDev = open(i2cDevName,O_RDWR))<0)
{      printf("Error opening \n");
      return 0;

I2cSetSlaveAddress(i2cDev,gI2cAddr, I2C_USE_CRC);

I2C_IO_WriteReg8(i2cDev, 0x8B,0xA2); //TCCR3A
I2C_IO_WriteReg8(i2cDev,0x8A,0x1A); // TCCR3B
I2C_IO_WriteReg16(i2cDev,0x80,40000); // ICR3
I2C_IO_WriteReg16(i2cDev,0x88,0); // TCNT

//pin directions
I2C_IO_SetGPIODir(i2cDev,1,0xE0,0xE0); // port B =1
I2C_IO_SetGPIODir(i2cDev,4,0x38,0x38); //port E= 4



return 1;