Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I/O error (code 5) #97

Open
Yanqilong opened this issue Apr 17, 2018 · 1 comment
Open

I/O error (code 5) #97

Yanqilong opened this issue Apr 17, 2018 · 1 comment

Comments

@Yanqilong
Copy link

Yanqilong commented Apr 17, 2018

Sensor: BMP/BME
I2C
board: raspberry pi 3 model B

executor the statement will occur error

private static final int BMX280_REG_ID = 0x60;
mChipId = mDevice.readRegByte(BMX280_REG_ID);

error:

W/System.err: com.google.android.things.pio.PioException: android.os.ServiceSpecificException: I/O error (code 5)
W/System.err:     at com.google.android.things.pio.I2cDeviceImpl.readRegByte(I2cDeviceImpl.java:86)
W/System.err:     at com.iot.driver.bmx.Bmx280.connect(Bmx280.java:199)
W/System.err:     at com.iot.driver.bmx.Bmx280.<init>(Bmx280.java:177)
W/System.err:     at com.iot.driver.bmx.Bmx280.<init>(Bmx280.java:164)
W/System.err:     at com.iot.MainActivity.printDeviceId(MainActivity.java:37)
W/System.err:     at com.iot.MainActivity.onCreate(MainActivity.java:31)
W/System.err:     at android.app.Activity.performCreate(Activity.java:7000)
W/System.err:     at android.app.Activity.performCreate(Activity.java:6991)
W/System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
W/System.err:     at android.app.ActivityThread.-wrap11(Unknown Source:0)
W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
W/System.err:     at android.os.Looper.loop(Looper.java:164)
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:6494)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
W/System.err: Caused by: android.os.ServiceSpecificException: I/O error (code 5)
W/System.err:     at android.os.Parcel.readException(Parcel.java:2018)
W/System.err:     at android.os.Parcel.readException(Parcel.java:1950)
W/System.err:     at com.google.android.things.pio.IPeripheralManagerClient$Stub$Proxy.I2cReadRegByte(IPeripheralManagerClient.java:1301)
W/System.err:     at com.google.android.things.pio.I2cDeviceImpl.readRegByte(I2cDeviceImpl.java:84)
W/System.err: 	... 18 more

what`s the problem?
This is a screenshot

@Fleker
Copy link
Contributor

Fleker commented Apr 17, 2018

This seems to be related to an error connecting to and communicating with the peripheral. Can you verify that the device is connected correctly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants