Stody
Posts: 2
Joined: Tue Feb 23, 2021 5:46 pm

I2C Remote I/O Error

Tue Feb 23, 2021 5:57 pm

Hallo,
und zwar habe ich ein Problem mit meinem Display und pi4j.
Ich habe heute meine SD-Karte neu geflashed und seitdem bekomme ich dauerhaft diesen Error und ich weiß nicht woran es liegt:
java.io.IOException: Remote I/O error
at java.io.RandomAccessFile.write0(Native Method)
at java.io.RandomAccessFile.write(RandomAccessFile.java:489)
at java.io.RandomAccessFile.writeByte(RandomAccessFile.java:991)
at com.pi4j.io.i2c.impl.I2CBusImpl.lambda$writeByteDirect$4(I2CBusImpl.java:170)
at com.pi4j.io.i2c.impl.I2CBusImpl.runBusLockedDeviceAction(I2CBusImpl.java:260)
at com.pi4j.io.i2c.impl.I2CBusImpl.writeByteDirect(I2CBusImpl.java:169)
at com.pi4j.io.i2c.impl.I2CDeviceImpl.write(I2CDeviceImpl.java:92)
at com.pi4j.component.lcd.impl.I2CLcdDisplay.write(I2CLcdDisplay.java:281)
at com.pi4j.component.lcd.impl.I2CLcdDisplay.lcd_byte(I2CLcdDisplay.java:189)
at com.pi4j.component.lcd.impl.I2CLcdDisplay.init(I2CLcdDisplay.java:217)
at com.pi4j.component.lcd.impl.I2CLcdDisplay.<init>(I2CLcdDisplay.java:134)
at rasenmaehroboter.Start.main(Start.java:52)
sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Code: Select all

 final int LCD_ROWS = 4;
 final int LCD_COLUMNS = 20;
 final int LCD_ADDRESS = 0x27;

I2CLcdDisplay lcd = new I2CLcdDisplay(LCD_ROWS, LCD_COLUMNS, I2CBus.BUS_1, LCD_ADDRESS, 3,0,1,2,7,6,5,4);

FrankDelporte
Posts: 6
Joined: Mon Dec 09, 2019 9:13 pm

Re: I2C Remote I/O Error

Thu Feb 25, 2021 6:57 am

Not clear from the question how this is application is started, so just to check, did you try running the program with sudo on the Pi itself?

Stody
Posts: 2
Joined: Tue Feb 23, 2021 5:46 pm

Re: I2C Remote I/O Error

Thu Feb 25, 2021 7:21 am

Thank you for your reply,
I already solved the problem.
After I downloaded pi4j also on the raspberry no error showed up.

Return to “Java”