Problem with intel D415 device on Odroid

Post Reply
kafan1986
Posts: 115
Joined: Tue Feb 27, 2018 8:05 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 6 times
Contact:

Problem with intel D415 device on Odroid

Unread post by kafan1986 » Tue Dec 03, 2019 12:22 pm

Hello,

I am using intel depth camera D415 and it currently does not work that stable with Odroid N2 and has problem starting many times. Although it might be related to device and it's SDK but I can not help but notice that Odroid itself tries to probably emulate this device as a camera and fails. The logs with the intel device and application reports interrupt received. Is there a possibility that Odroid tries to reset the device somehow and it is causing the problem. In such case, is there a way to stop odroid from trying to emulate this device as regular camera?


Code: Select all

2019-12-03 08:39:50.691 12431-12434/? A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 12434 (), pid 12431 (provider@2.4-se)
2019-12-03 08:39:50.719 12450-12450/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2019-12-03 08:39:50.720 3097-3097/? I//system/bin/tombstoned: received crash request for pid 12434
2019-12-03 08:39:50.723 12450-12450/? I/crash_dump32: performing dump of process 12431 (target tid = 12434)
2019-12-03 08:39:50.729 12450-12450/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-12-03 08:39:50.729 12450-12450/? A/DEBUG: Build fingerprint: 'ODROID/odroidn2/odroidn2:9/PQ3A.190801.002/20191121:eng/test-keys'
2019-12-03 08:39:50.729 12450-12450/? A/DEBUG: Revision: '0'
2019-12-03 08:39:50.729 12450-12450/? A/DEBUG: ABI: 'arm'
2019-12-03 08:39:50.729 12450-12450/? A/DEBUG: pid: 12431, tid: 12434, name:   >>> /vendor/bin/hw/android.hardware.camera.provider@2.4-service <<<
2019-12-03 08:39:50.729 12450-12450/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
2019-12-03 08:39:50.729 12450-12450/? A/DEBUG: Cause: null pointer dereference
2019-12-03 08:39:50.729 12450-12450/? A/DEBUG:     r0  00000004  r1  00000006  r2  0000000c  r3  0ccccccc
2019-12-03 08:39:50.729 12450-12450/? A/DEBUG:     r4  00000000  r5  f5c36290  r6  f5c36288  r7  f5b88808
2019-12-03 08:39:50.729 12450-12450/? A/DEBUG:     r8  f658b184  r9  f5c36280  r10 00000000  r11 00000002
2019-12-03 08:39:50.729 12450-12450/? A/DEBUG:     ip  f6ae35c0  sp  f5b887f8  lr  f5bed3fb  pc  f5bed4f6
2019-12-03 08:39:50.739 12450-12450/? A/DEBUG: backtrace:
2019-12-03 08:39:50.739 12450-12450/? A/DEBUG:     #00 pc 000254f6  /vendor/lib/hw/camera.odroidn2.so (android::EmulatedCameraFactory::onStatusChanged(int, int)+298)
2019-12-03 08:39:50.739 12450-12450/? A/DEBUG:     #01 pc 00025f2d  /vendor/lib/hw/camera.odroidn2.so (android::EmulatedCameraHotplugThread::threadLoop()+228)
2019-12-03 08:39:50.739 12450-12450/? A/DEBUG:     #02 pc 0000c0cb  /system/lib/vndk-sp-28/libutils.so (android::Thread::_threadLoop(void*)+286)
2019-12-03 08:39:50.739 12450-12450/? A/DEBUG:     #03 pc 00063bf5  /system/lib/libc.so (__pthread_start(void*)+22)
2019-12-03 08:39:50.739 12450-12450/? A/DEBUG:     #04 pc 0001e065  /system/lib/libc.so (__start_thread+22)
2019-12-03 08:39:50.770 3291-3431/system_process W/NativeCrashListener: Couldn't find ProcessRecord for pid 12431
2019-12-03 08:39:50.771 3097-3097/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_20
2019-12-03 08:39:50.775 3291-3311/system_process I/BootReceiver: Copying /data/tombstones/tombstone_20 to DropBox (SYSTEM_TOMBSTONE)
2019-12-03 08:39:50.786 3082-3181/? I/CameraProviderManager: Camera provider 'legacy/0' has died; removing it
2019-12-03 08:39:51.802 11793-12416/com.synapticsense.retailapp W/librs: interrupt event received: 1, 3, 0, 10, 0, 1, 
2019-12-03 08:39:51.809 12457-12457/? I/android.hardware.camera.provider@2.4-service: Camera provider Service is starting.
2019-12-03 08:39:51.825 12457-12457/? I/EmulatedCamera_Factory:   305 get_number_of_cameras - get_number_of_cameras : cam is NULL
2019-12-03 08:39:51.825 12457-12457/? I/CamProvider@2.4-impl: Loaded "Camera Module" camera module
2019-12-03 08:39:51.825 12457-12457/? I/EmulatedCamera_Factory:   305 get_number_of_cameras - get_number_of_cameras : cam is NULL
2019-12-03 08:39:51.825 12457-12457/? I/ServiceManagement: Removing namespace from process name android.hardware.camera.provider@2.4-service to provider@2.4-service.
2019-12-03 08:39:51.826 12457-12457/? I/android.hardware.camera.provider@2.4-service: Registration complete for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0.
2019-12-03 08:39:51.827 3082-3168/? I/CameraProviderManager: Connecting to new camera provider: legacy/0, isRemote? 1
2019-12-03 08:39:51.828 3082-3168/? I/CameraProviderManager: Camera provider legacy/0 ready with 0 camera devices

User avatar
odroid
Site Admin
Posts: 32677
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 209 times
Been thanked: 364 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by odroid » Tue Dec 03, 2019 1:13 pm

Can you try the image sensor device with Ubuntu OS image to narrow down root causes?

kafan1986
Posts: 115
Joined: Tue Feb 27, 2018 8:05 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by kafan1986 » Tue Dec 03, 2019 2:43 pm

odroid wrote:
Tue Dec 03, 2019 1:13 pm
Can you try the image sensor device with Ubuntu OS image to narrow down root causes?
I am installing ubuntu and will let you know. My original software is written for Android device and it would be really difficult to port the entire software now. Although I am testing part of code that just test the device on Ubuntu.

The device works on Android already but it is unstable, it would stop working after sometime. The SDK of the device informs about receiving interrupts. Not sure about from where? Also, there are logs about following on reboot.


Code: Select all

2019-12-03 09:16:22.226 3066-3066/? I/android.hardware.camera.provider@2.4-service: Camera provider Service is starting.
2019-12-03 09:16:22.582 3096-3096/? I/cameraserver: ServiceManager: 0xedb90100
2019-12-03 09:16:22.582 3096-3096/? I/CameraService: CameraService started (pid=3096)
2019-12-03 09:16:22.582 3096-3096/? I/CameraService: CameraService process starting
2019-12-03 09:16:22.585 3096-3096/? I/ServiceManagement: getService: Trying again for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0...
2019-12-03 09:16:22.668 3066-3066/? I/android.hardwar: type=1400 audit(0.0:28): avc: denied { read } for name="u:object_r:media_prop:s0" dev="tmpfs" ino=13413 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:media_prop:s0 tclass=file permissive=1
2019-12-03 09:16:22.668 3066-3066/? I/android.hardwar: type=1400 audit(0.0:29): avc: denied { open } for path="/dev/__properties__/u:object_r:media_prop:s0" dev="tmpfs" ino=13413 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:media_prop:s0 tclass=file permissive=1
2019-12-03 09:16:22.668 3066-3066/? I/android.hardwar: type=1400 audit(0.0:30): avc: denied { getattr } for path="/dev/__properties__/u:object_r:media_prop:s0" dev="tmpfs" ino=13413 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:media_prop:s0 tclass=file permissive=1
2019-12-03 09:16:22.671 3066-3066/? I/EmulatedCamera_FakeCamera3: Constructing emulated fake camera 3 cameraID:0
2019-12-03 09:16:22.671 3066-3066/? I/EmulatedCamera_FakeCamera3:   214 Initialize - mCameraID=0,mStatus=0,ddd
2019-12-03 09:16:22.671 3066-3066/? I/EmulatedCamera_FakeCamera3:   236 Initialize - 
    --------------------------------
    author:aml.sh multi-media team
    branch name:   * s922_9.0.0_64_master
    git version:   b7c17df3f8b849ed59eb1b4635f1fa7bd439293b 
    last changed:  Date: Thu Aug 29 12:19:50 2019 +0900
    build-time:     Thu Nov 21 10:15:52 KST 2019
    build-name:     jenkins
    uncommitted-file-num:0
    ssh user@, cd /srv/jenkins/jobs/s922_pie_64/workspace/ACCESS/Gerrit/BRANCH/s922_9.0.0_64_master/DEVICE/odroidn2/hardware/amlogic/camera/v3
    hostname build
    --------------------------------
2019-12-03 09:16:22.671 3066-3066/? V/EmulatedCamera3_Sensor: startUp: E
2019-12-03 09:16:22.671 3066-3066/? I/EmulatedCamera3_Sensor:   220 startUp - ddd
2019-12-03 09:16:22.671 3066-3066/? I/EmulatedCamera_FakeCamera3: Setting usb camera cameraID:0 to back camera:false
2019-12-03 09:16:22.671 3066-3066/? I/EmulatedCamera_FakeCamera3:  1726 constructStaticInfo - mCameraID=0,mCameraInfo=0x0
2019-12-03 09:16:22.672 3066-3194/? V/EmulatedCamera3_Sensor: Starting up sensor thread
2019-12-03 09:16:22.672 3066-3194/? I/EmulatedCamera3_Sensor:  1081 readyToRun - 
2019-12-03 09:16:22.686 3066-3066/? E/EmulatedCamera3_Sensor: Unable to find a supported sensor format!
2019-12-03 09:16:22.686 3066-3066/? I/EmulatedCamera3_Sensor:  1388 getStreamConfigurations - index=0, break
2019-12-03 09:16:22.686 3066-3066/? I/EmulatedCamera3_Sensor:  1436 getStreamConfigurations - index=0, break
2019-12-03 09:16:22.686 3066-3066/? I/EmulatedCamera3_Sensor:  1549 getStreamConfigurations - index=0, break
2019-12-03 09:16:22.686 3066-3066/? I/chatty: uid=1047(cameraserver) provider@2.4-se identical 2 lines
2019-12-03 09:16:22.686 3066-3066/? I/EmulatedCamera3_Sensor:  1549 getStreamConfigurations - index=0, break
2019-12-03 09:16:22.687 3066-3066/? I/EmulatedCamera3_Sensor:   887 getAWB - camera handle 8 can't support this ctrl
2019-12-03 09:16:22.687 3066-3066/? I/EmulatedCamera3_Sensor:   710 getAntiBanding - camera handle 8 can't support this ctrl
2019-12-03 09:16:22.687 3066-3066/? I/EmulatedCamera3_Sensor:   629 getExposure - getExposure
2019-12-03 09:16:22.687 3066-3066/? I/EmulatedCamera_FakeCamera3:  2189 constructStaticInfo - mCameraID=0,mCameraInfo=0xf49ba000
2019-12-03 09:16:22.687 3066-3066/? V/EmulatedCamera3_Sensor: shutDown: E
2019-12-03 09:16:22.706 3066-3066/? D/EmulatedCamera3_Sensor: shutDown: Exit
2019-12-03 09:16:22.706 3066-3066/? I/EmulatedCamera_FakeCamera3: Constructing emulated fake camera 3 cameraID:1
2019-12-03 09:16:22.706 3066-3066/? I/EmulatedCamera_FakeCamera3:   214 Initialize - mCameraID=1,mStatus=0,ddd
2019-12-03 09:16:22.706 3066-3066/? I/EmulatedCamera_FakeCamera3:   236 Initialize - 
    --------------------------------
    author:aml.sh multi-media team
    branch name:   * s922_9.0.0_64_master
    git version:   b7c17df3f8b849ed59eb1b4635f1fa7bd439293b 
    last changed:  Date: Thu Aug 29 12:19:50 2019 +0900
    build-time:     Thu Nov 21 10:15:52 KST 2019
    build-name:     jenkins
    uncommitted-file-num:0
    ssh user@, cd /srv/jenkins/jobs/s922_pie_64/workspace/ACCESS/Gerrit/BRANCH/s922_9.0.0_64_master/DEVICE/odroidn2/hardware/amlogic/camera/v3
    hostname build
    --------------------------------
2019-12-03 09:16:22.706 3066-3066/? V/EmulatedCamera3_Sensor: startUp: E
2019-12-03 09:16:22.706 3066-3066/? I/EmulatedCamera3_Sensor:   220 startUp - ddd
2019-12-03 09:16:22.706 3066-3066/? I/EmulatedCamera_FakeCamera3: Setting usb camera cameraID:1 to back camera:false
2019-12-03 09:16:22.706 3066-3066/? I/EmulatedCamera_FakeCamera3:  1726 constructStaticInfo - mCameraID=1,mCameraInfo=0x0
2019-12-03 09:16:22.708 3066-3195/? V/EmulatedCamera3_Sensor: Starting up sensor thread
2019-12-03 09:16:22.708 3066-3195/? I/EmulatedCamera3_Sensor:  1081 readyToRun - 
2019-12-03 09:16:22.723 3066-3066/? E/EmulatedCamera3_Sensor: Unable to find a supported sensor format!
2019-12-03 09:16:22.723 3066-3066/? I/EmulatedCamera3_Sensor:  1388 getStreamConfigurations - index=0, break
2019-12-03 09:16:22.723 3066-3066/? I/EmulatedCamera3_Sensor:  1436 getStreamConfigurations - index=0, break
2019-12-03 09:16:22.723 3066-3066/? I/EmulatedCamera3_Sensor:  1549 getStreamConfigurations - index=0, break
2019-12-03 09:16:22.723 3066-3066/? I/EmulatedCamera3_Sensor:  1549 getStreamConfigurations - index=0, break
2019-12-03 09:16:22.724 3066-3066/? I/EmulatedCamera3_Sensor:   887 getAWB - camera handle 8 can't support this ctrl
2019-12-03 09:16:22.724 3066-3066/? I/EmulatedCamera3_Sensor:   710 getAntiBanding - camera handle 8 can't support this ctrl
2019-12-03 09:16:22.724 3066-3066/? I/EmulatedCamera3_Sensor:   629 getExposure - getExposure
2019-12-03 09:16:22.724 3066-3066/? I/EmulatedCamera_FakeCamera3:  2189 constructStaticInfo - mCameraID=1,mCameraInfo=0xf49bae00
2019-12-03 09:16:22.724 3066-3066/? V/EmulatedCamera3_Sensor: shutDown: E
2019-12-03 09:16:22.741 3066-3066/? D/EmulatedCamera3_Sensor: shutDown: Exit
2019-12-03 09:16:22.742 3066-3066/? I/CamProvider@2.4-impl: Loaded "Camera Module" camera module
2019-12-03 09:16:22.742 3066-3066/? V/EmulatedCamera_BaseCamera: getCameraInfo
2019-12-03 09:16:22.742 3066-3066/? V/EmulatedCamera_BaseCamera: getCameraInfo
2019-12-03 09:16:22.743 3066-3066/? I/ServiceManagement: Removing namespace from process name android.hardware.camera.provider@2.4-service to provider@2.4-service.
2019-12-03 09:16:22.744 3066-3066/? I/android.hardware.camera.provider@2.4-service: Registration complete for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0.
2019-12-03 09:16:22.745 3096-3096/? I/CameraProviderManager: Connecting to new camera provider: legacy/0, isRemote? 1
2019-12-03 09:16:22.746 3096-3096/? I/CameraProviderManager: Enumerating new camera device: device@3.3/legacy/0
2019-12-03 09:16:22.746 3096-3096/? I/CameraProviderManager: Enumerating new camera device: device@3.3/legacy/1
2019-12-03 09:16:22.746 3096-3096/? I/CameraProviderManager: Camera provider legacy/0 ready with 2 camera devices
2019-12-03 09:16:22.747 3011-3011/? W/hwservicemanager: getTransport: Cannot find entry android.hardware.camera.provider@2.4::ICameraProvider/external/0 in either framework or device manifest.
2019-12-03 09:16:22.747 3096-3185/? W/CameraProviderManager: addProviderLocked: Camera provider HAL with name 'legacy/0' already registered
2019-12-03 09:16:22.754 3096-3096/? I/CameraHardwareInterface: Opening camera 0
2019-12-03 09:16:22.754 3096-3096/? E/CameraHardwareInterface: initialize: openSession failed! No such file or directory (-2)
2019-12-03 09:16:22.754 3096-3096/? E/CameraFlashlight: connectCameraDevice: initializing camera 0 failed
2019-12-03 09:16:22.754 3096-3096/? I/CameraHardwareInterface: Destroying camera 0
2019-12-03 09:16:22.754 3096-3096/? E/CameraFlashlight: findFlashUnits: failed to check if camera 0 has a flash unit. No such file or directory (-2)
2019-12-03 09:16:22.754 3096-3096/? I/CameraHardwareInterface: Opening camera 1
2019-12-03 09:16:22.754 3096-3096/? E/CameraHardwareInterface: initialize: openSession failed! No such file or directory (-2)
2019-12-03 09:16:22.754 3096-3096/? E/CameraFlashlight: connectCameraDevice: initializing camera 1 failed
2019-12-03 09:16:22.754 3096-3096/? I/CameraHardwareInterface: Destroying camera 1
2019-12-03 09:16:22.754 3096-3096/? E/CameraFlashlight: findFlashUnits: failed to check if camera 1 has a flash unit. No such file or directory (-2)
2019-12-03 09:16:22.754 3096-3096/? I/CameraService: onDeviceStatusChanged: Status changed for cameraId=1, newStatus=1
2019-12-03 09:16:22.754 3096-3096/? I/CameraService: onDeviceStatusChanged: Unknown camera ID 1, a new camera is added
2019-12-03 09:16:22.755 3096-3185/? I/CameraService: onDeviceStatusChanged: Status changed for cameraId=1, newStatus=1
2019-12-03 09:16:22.755 3096-3096/? I/CameraService: onDeviceStatusChanged: Status changed for cameraId=0, newStatus=1
2019-12-03 09:16:22.755 3096-3185/? I/CameraService: onDeviceStatusChanged: Status changed for cameraId=0, newStatus=1
2019-12-03 09:16:22.755 3096-3096/? I/CameraService: onDeviceStatusChanged: Unknown camera ID 0, a new camera is added
2019-12-03 09:16:22.755 3096-3185/? I/CameraService: onDeviceStatusChanged: Unknown camera ID 0, a new camera is added
2019-12-03 09:16:31.021 3307-3307/system_process I/SystemServer: StartCameraServiceProxy
2019-12-03 09:16:31.021 3307-3307/system_process I/SystemServiceManager: Starting com.android.server.camera.CameraServiceProxy
2019-12-03 09:16:31.025 3307-3307/system_process D/SystemServerTiming: StartCameraServiceProxy took to complete: 4ms
2019-12-03 09:16:31.433 3307-3325/system_process I/ActivityManager: Start proc 3476:com.droidlogic/1000 for broadcast com.droidlogic/.UsbCameraReceiver
2019-12-03 09:16:31.451 3307-3443/system_process D/UsbHostManager: USB device attached: vidpid 8086:0ad3 mfg/product/ver/serial Intel(R) RealSense(TM) Depth Camera 415 /Intel(R) RealSense(TM) Depth Camera 415 /50.1115/924623022764 hasAudio/HID/Storage: false/false/false
2019-12-03 09:16:31.456 3307-3443/system_process D/UsbHostManager: Added device UsbDevice[mName=/dev/bus/usb/002/003,mVendorId=32902,mProductId=2771,mClass=239,mSubclass=2,mProtocol=1,mManufacturerName=Intel(R) RealSense(TM) Depth Camera 415 ,mProductName=Intel(R) RealSense(TM) Depth Camera 415 ,mVersion=50.1115,mSerialNumber=924623022764,mConfigurations=[
    UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=55,mInterfaces=[
    UsbInterface[mId=0,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415  Depth,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[
    UsbEndpoint[mAddress=135,mAttributes=3,mMaxPacketSize=64,mInterval=6]]
    UsbInterface[mId=1,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415  Depth,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[
    UsbEndpoint[mAddress=130,mAttributes=2,mMaxPacketSize=1024,mInterval=0]]
    UsbInterface[mId=2,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415  Y,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[
    UsbEndpoint[mAddress=131,mAttributes=2,mMaxPacketSize=1024,mInterval=0]]
    UsbInterface[mId=3,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415  RGB,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[]
    UsbInterface[mId=4,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415  RGB,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[
    UsbEndpoint[mAddress=132,mAttributes=2,mMaxPacketSize=1024,mInterval=0]]]]
2019-12-03 09:16:31.625 3476-3476/com.droidlogic I/UsbCameraReceiver: action: android.hardware.usb.action.USB_DEVICE_ATTACHED
2019-12-03 09:16:31.630 3476-3476/com.droidlogic I/UsbCameraReceiver: action: android.hardware.usb.action.USB_DEVICE_ATTACHED
2019-12-03 09:16:31.630 3476-3476/com.droidlogic I/UsbCameraManager: usb camera attach: true
2019-12-03 09:16:31.634 3476-3476/com.droidlogic I/UsbCameraManager: VideoDevThread isAttach:true, cur camera num:2
2019-12-03 09:16:32.135 3476-3547/com.droidlogic I/UsbCameraManager: /dev/video* num:1
2019-12-03 09:16:32.135 3476-3547/com.droidlogic I/UsbCameraManager: /dev/video* num:2
2019-12-03 09:16:32.135 3476-3547/com.droidlogic I/UsbCameraManager: /dev/video* num:3
2019-12-03 09:16:33.732 3460-3460/com.android.systemui I/CameraManagerGlobal: Connecting to camera service
2019-12-03 09:16:37.367 3307-3934/system_process I/BackupManagerService: Package com.intel.realsense.camera not installed; dropping from full backup
2019-12-03 09:16:37.367 3307-3934/system_process I/BackupManagerService: Package com.shenyaocn.android.usbcamera not installed; dropping from full backup
2019-12-03 09:16:37.989 3476-3476/com.droidlogic I/UsbCameraManager: number of camera: 2

User avatar
odroid
Site Admin
Posts: 32677
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 209 times
Been thanked: 364 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by odroid » Tue Dec 03, 2019 2:48 pm

Just try Ubuntu image to check the weird behaviors.
BTW, was there any strange things in "dmesg" output?

PS. Please post logs with "code" brackets instead of "c" brackets. I've edited your posts.

Luke.go
Posts: 352
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by Luke.go » Tue Dec 03, 2019 2:57 pm

Did you changed the property ro.media.camera_usb.faceback to true on the /vendor/build.prop?

kafan1986
Posts: 115
Joined: Tue Feb 27, 2018 8:05 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by kafan1986 » Tue Dec 03, 2019 3:13 pm

Luke.go wrote:
Tue Dec 03, 2019 2:57 pm
Did you changed the property ro.media.camera_usb.faceback to true on the /vendor/build.prop?
No I haven't changed it. It is at its default value of false

ro.media.camera_usb.faceback=false

kafan1986
Posts: 115
Joined: Tue Feb 27, 2018 8:05 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by kafan1986 » Wed Dec 04, 2019 4:08 am

odroid wrote:
Tue Dec 03, 2019 2:48 pm
Just try Ubuntu image to check the weird behaviors.
BTW, was there any strange things in "dmesg" output?

PS. Please post logs with "code" brackets instead of "c" brackets. I've edited your posts.
I could not get the ubuntu to work with the device. There are some instructions to make the device work with XU4 but that did not work with N2. Regarding dmesg, I did not see any issue.

Also, usually unplugging and replugging the device on USB ports lets me reuse it again. Is there any script or command that would let me reset the USB controller on N2 android? If yes, I would like to call this programmatically from my Android app. Maybe I need root access for that, if yes, maybe the Voodik's image might be helpful.

User avatar
odroid
Site Admin
Posts: 32677
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 209 times
Been thanked: 364 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by odroid » Wed Dec 04, 2019 9:44 am

There should be a way to reset the USB hub controller manually like ODROID-C2: https://wiki.odroid.com/odroid-c2/troub ... usb_hub_ic
We will let you know the GPIO number on ODROID-N2.

BTW, is that device working in USB 2.0 high-speed mode? or USB 3.0 super-speed mode?

User avatar
odroid
Site Admin
Posts: 32677
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 209 times
Been thanked: 364 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by odroid » Wed Dec 04, 2019 12:17 pm


kafan1986
Posts: 115
Joined: Tue Feb 27, 2018 8:05 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by kafan1986 » Wed Dec 04, 2019 1:35 pm

odroid wrote:
Wed Dec 04, 2019 9:44 am
There should be a way to reset the USB hub controller manually like ODROID-C2: https://wiki.odroid.com/odroid-c2/troub ... usb_hub_ic
We will let you know the GPIO number on ODROID-N2.

BTW, is that device working in USB 2.0 high-speed mode? or USB 3.0 super-speed mode?
The device is USB 3.0. After working for few minutes to few hours, the device throws out of memory error from USB data transfer. The device supports 6, 15, 30, 60 fps and multiple resolution from 256x144 to all the way up to 1920x1080. Higher the fps and resolution that I set, increases the chance that I will get the usb error faster. For example at 1920x1080 resolution at 15 fps, I usually get the error within 10-20 minutes, while at 6 fps the device seems to work for maybe 1-2 hours, before eventually throwing the error. The device works fine on Mac OS, Windows and other platform. I have a guess that the camera emulator might be attaching itself to the device and stealing away the bandwidth from the device. If so, can I change the below parameters from default value

Code: Select all

ro.media.camera_preview.maxsize=1920x1080
ro.media.camera_preview.limitedrate=1920x1080x30,1280x720x30,640x480x30,320x240x28

to 

ro.media.camera_preview.maxsize=1x1
ro.media.camera_preview.limitedrate=1x1x30
to prevent the emulator from hooking up with the device and let the usb device driver provided in the device's android SDK get the full bandwidth? Is this approach worth a shot?

Also, regarding the USB reset command set in the above post, can I trigger it without "su" from within application? As I believe the application on the official android image does not have root privilege, only the terminal has that.
Last edited by kafan1986 on Wed Dec 04, 2019 2:05 pm, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 32677
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 209 times
Been thanked: 364 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by odroid » Wed Dec 04, 2019 1:59 pm

Do you use Android 64bit OS image?

kafan1986
Posts: 115
Joined: Tue Feb 27, 2018 8:05 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by kafan1986 » Wed Dec 04, 2019 2:03 pm

odroid wrote:
Wed Dec 04, 2019 1:59 pm
Do you use Android 64bit OS image?
Yes.

User avatar
tobetter
Posts: 4260
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by tobetter » Wed Dec 04, 2019 5:31 pm

Can you please add these to the two files and test in the command line or with your app?

/odm/default.prop

Code: Select all

dev.usbhub.reset=0
/vendor/etc/init/hw/init.odroid.board.rc

Code: Select all

on property:dev.usbhub.reset=1
    write /sys/devices/platform/gpio-reset/reset-usb_hub/control "reset"
    setprop dev.usbhub.reset 0
In order to test in the command line, you can use setprop dev.usbhub.reset 1 in order to trigger the hub reset.

kafan1986
Posts: 115
Joined: Tue Feb 27, 2018 8:05 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by kafan1986 » Wed Dec 04, 2019 9:30 pm

tobetter wrote:
Wed Dec 04, 2019 5:31 pm
Can you please add these to the two files and test in the command line or with your app?

/odm/default.prop

Code: Select all

dev.usbhub.reset=0
/vendor/etc/init/hw/init.odroid.board.rc

Code: Select all

on property:dev.usbhub.reset=1
    write /sys/devices/platform/gpio-reset/reset-usb_hub/control "reset"
    setprop dev.usbhub.reset 0
In order to test in the command line, you can use setprop dev.usbhub.reset 1 in order to trigger the hub reset.
@tobetter @odroid
Do you know how can I change usbfs_memory_mb value? I believe currently it is 16MB. I read somewhere on another https://github.com/microsoft/Azure-Kine ... issues/485
that changing its value to 64MB or even higher something like 256 MB might solve the OOM (ENOMEM) issue.

Regarding the device reset command, I am installing the latest android image and will test the command and update soon.

User avatar
tobetter
Posts: 4260
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by tobetter » Wed Dec 04, 2019 9:54 pm

kafan1986 wrote:
Wed Dec 04, 2019 9:30 pm
tobetter wrote:
Wed Dec 04, 2019 5:31 pm
Can you please add these to the two files and test in the command line or with your app?

/odm/default.prop

Code: Select all

dev.usbhub.reset=0
/vendor/etc/init/hw/init.odroid.board.rc

Code: Select all

on property:dev.usbhub.reset=1
    write /sys/devices/platform/gpio-reset/reset-usb_hub/control "reset"
    setprop dev.usbhub.reset 0
In order to test in the command line, you can use setprop dev.usbhub.reset 1 in order to trigger the hub reset.
@tobetter @odroid
Do you know how can I change usbfs_memory_mb value? I believe currently it is 16MB. I read somewhere on another https://github.com/microsoft/Azure-Kine ... issues/485
that changing its value to 64MB or even higher something like 256 MB might solve the OOM (ENOMEM) issue.

Regarding the device reset command, I am installing the latest android image and will test the command and update soon.
You probably have this /sys/module/usbcore/parameters/usbfs_memory_mb, you can give an amount of memory with echo command.
By the way, have you tried to connect the camera through USB OTG port?

kafan1986
Posts: 115
Joined: Tue Feb 27, 2018 8:05 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by kafan1986 » Thu Dec 05, 2019 1:52 am

tobetter wrote:
Wed Dec 04, 2019 9:54 pm
kafan1986 wrote:
Wed Dec 04, 2019 9:30 pm
tobetter wrote:
Wed Dec 04, 2019 5:31 pm
Can you please add these to the two files and test in the command line or with your app?

/odm/default.prop

Code: Select all

dev.usbhub.reset=0
/vendor/etc/init/hw/init.odroid.board.rc

Code: Select all

on property:dev.usbhub.reset=1
    write /sys/devices/platform/gpio-reset/reset-usb_hub/control "reset"
    setprop dev.usbhub.reset 0
In order to test in the command line, you can use setprop dev.usbhub.reset 1 in order to trigger the hub reset.
@tobetter @odroid
Do you know how can I change usbfs_memory_mb value? I believe currently it is 16MB. I read somewhere on another https://github.com/microsoft/Azure-Kine ... issues/485
that changing its value to 64MB or even higher something like 256 MB might solve the OOM (ENOMEM) issue.

Regarding the device reset command, I am installing the latest android image and will test the command and update soon.
You probably have this /sys/module/usbcore/parameters/usbfs_memory_mb, you can give an amount of memory with echo command.
By the way, have you tried to connect the camera through USB OTG port?
Is there a way to make the usbfs_memory_mb value persist? I saw a previous post not sure which file to edit. viewtopic.php?t=22600

No I don't have USB C (D415 has USB C interface) to Micro USB. Currently I use USB C to USB A cable. BTW, is the micro usb on N2 supports USB 3.0 or USB 2.0 speeds?

User avatar
tobetter
Posts: 4260
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Problem with intel D415 device on Odroid

Unread post by tobetter » Thu Dec 05, 2019 2:51 am

kafan1986 wrote:
Thu Dec 05, 2019 1:52 am
tobetter wrote:
Wed Dec 04, 2019 9:54 pm
kafan1986 wrote:
Wed Dec 04, 2019 9:30 pm
tobetter wrote:
Wed Dec 04, 2019 5:31 pm
Can you please add these to the two files and test in the command line or with your app?

/odm/default.prop

Code: Select all

dev.usbhub.reset=0
/vendor/etc/init/hw/init.odroid.board.rc

Code: Select all

on property:dev.usbhub.reset=1
    write /sys/devices/platform/gpio-reset/reset-usb_hub/control "reset"
    setprop dev.usbhub.reset 0
In order to test in the command line, you can use setprop dev.usbhub.reset 1 in order to trigger the hub reset.
@tobetter @odroid
Do you know how can I change usbfs_memory_mb value? I believe currently it is 16MB. I read somewhere on another https://github.com/microsoft/Azure-Kine ... issues/485
that changing its value to 64MB or even higher something like 256 MB might solve the OOM (ENOMEM) issue.

Regarding the device reset command, I am installing the latest android image and will test the command and update soon.
You probably have this /sys/module/usbcore/parameters/usbfs_memory_mb, you can give an amount of memory with echo command.
By the way, have you tried to connect the camera through USB OTG port?
Is there a way to make the usbfs_memory_mb value persist? I saw a previous post not sure which file to edit. viewtopic.php?t=22600

No I don't have USB C (D415 has USB C interface) to Micro USB. Currently I use USB C to USB A cable. BTW, is the micro usb on N2 supports USB 3.0 or USB 2.0 speeds?
For the persist value, I guess you can try to add a line write /sys/module/usbcore/parameters/usbfs_memory_mb 128 to /vendor/etc/init/hw/init.odroid.board.rc in the section on boot. So it would be like this:

Code: Select all

on boot
     write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
     write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive
     write /sys/class/freq_limit/limit 0
     write /sys/module/usbcore/parameters/usbfs_memory_mb 128
OTG port just runs as USB 2.0, I was just curious if it's kinda USB 3.0 issue or not.

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest