0

I connected my TSL2591: VIN to 3v, GND to GND, SCL to SCL, SDA to SDA.

This is the logcat:

08/21 09:24:45: Launching 'app' on Google iot_rpi3.
App restart successful without requiring a re-install.
$ adb shell am start -n "hr.unipu.mydriver_tsl2591/hr.unipu.mydriver_tsl2591.TSL2591SensorDriver" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 1626 on device 'google-iot_rpi3-Android.local:5555'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT]
I/FirebaseInitProvider: FirebaseApp initialization successful
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 hr.unipu.mydriver_tsl2591.TSL2591.checkConnection(TSL2591.kt:169)
        at hr.unipu.mydriver_tsl2591.TSL2591.<init>(TSL2591.kt:44)
W/System.err:     at hr.unipu.mydriver_tsl2591.TSL2591SensorDriver.onCreate(TSL2591SensorDriver.java:39)
W/System.err:     at android.app.Activity.performCreate(Activity.java:7010)
        at android.app.Activity.performCreate(Activity.java:7001)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
        at android.os.Handler.dispatchMessage(Handler.java:106)
W/System.err:     at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        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:2027)
        at android.os.Parcel.readException(Parcel.java:1959)
W/System.err:     at com.google.android.things.pio.IPeripheralManagerClient$Stub$Proxy.I2cReadRegByte(IPeripheralManagerClient.java:1301)
        at com.google.android.things.pio.I2cDeviceImpl.readRegByte(I2cDeviceImpl.java:84)
        ... 16 more
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/vndksupport: Loading /vendor/lib/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace.
1
  • 1
    It looks like the access to the device failed. Maybe you could provide some information to help, Is this Android OS? Where did the code you are running come from, did you develop any of it? In the case of Rasbian os on the pi the i2c bus must be enabled using raspi-config - is this the same here? I would start by booting the pi into Raspian and checking the i2c devices on the bus with i2cdetect if the interface is enabled and the device is connected to the i2c bus it should show up in the output of i2cdetect -y 1 Aug 21, 2021 at 10:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.