1 1
Rolf Bakker

can't get debug descriptor: Resource temporarily unavailable, Sony RX100VA won't connect to USB (in PC Remote mode)

Recommended Posts

Armbianmonitor:

I've got a Sony RX100VA camera that I want to connect to the NanoPi Neo2 running Armbian Buster.

On the Camera I can select the type of USB connection:

 

-Auto

-Mass Storage

-MTP

-PC Remote

My intention is to use the PC Remote connection for use with gphoto2, this works fine on a PC with Ubuntu 18.04, but when I connect the camera to the Nano Pi Neo2 with Armbian, the camera display shows connecting (but doesn't connect). 

I suspect a bug in the OS, but I am unsure how to find it.

lsusb gives the following report with an error: can't get debug descriptor: Resource temporarily unavailable
 

root@nanopineo2:~# lsusb -d 054c:0cb2 -v

Bus 003 Device 019: ID 054c:0cb2 Sony Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x054c Sony Corp.
  idProduct          0x0cb2 
  bcdDevice            2.00
  iManufacturer           1 Sony
  iProduct                2 DSC-RX100M5A
  iSerial                 3 C7A5602C40B2
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0027
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         6 Imaging
      bInterfaceSubClass      1 Still Image Capture
      bInterfaceProtocol      1 Picture Transfer Protocol (PIMA 15470)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               7
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)


Mounting as a mass storage device works fine, but then I can't use it with gphoto2.

How do I find the bug?

 

 

Share this post


Link to post
Share on other sites

Could you grab the dmesg output when connection the camera to your PC? Maybe there is a kernel module missing in the Armbian kernel config.

Share this post


Link to post
Share on other sites

dmesg output

 

Connect Sony via USB

[ 6581.158357] usb 3-1: new high-speed USB device number 14 using ehci-platform

[ 6581.187896] usb 3-1: New USB device found, idVendor=054c, idProduct=0cb2, bcdDevice= 2.00

[ 6581.187915] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[ 6581.187926] usb 3-1: Product: DSC-RX100M5A

[ 6581.187937] usb 3-1: Manufacturer: Sony

[ 6581.187947] usb 3-1: SerialNumber: C7A5602C40B2

 

Disconnect Sony from USB

[ 6637.583714] usb 3-1: USB disconnect, device number 14

 

The dmesg output is also part of the Armbianmonitor, of which the output can be found here: http://ix.io/2kIJ

I just found out that despite the camera shows the connecting message, I am able to send gphoto2 commands to the camera. However, normally the connecting message would disappear and a live view is visible on the camera lcd screen.

So although it appears to work, there is something odd in the USB connection. The behaviour is very similar for Armbian Buster and Armbian Bionic.

Share this post


Link to post
Share on other sites
13 minutes ago, Rolf Bakker said:

The behaviour is very similar for Armbian Buster and Armbian Bionic.


Armbian is the hardware interface, "Buster" or "Bionic" are only userland which you choose upon your software need. 

 

You need drivers for this card (probably it just need to be enabled in the config). Try nightly images - we recently enable lots of drivers ...

 

Storage mode works because that is very basic and generic feature. Perhaps it is just a power problem - with mUSB powered devices this is the first thing you check - put powered USB hub in between.

 

 

Share this post


Link to post
Share on other sites

ok, thanks for the explanation and the driver suggestion.

 

The device is not powered via mUSB, it has its own power supply.

 

It's great to receive the feedback and suggestions in such a short time after posting the question.

Share this post


Link to post
Share on other sites

From what I have seen so far is that the output is identical. Which is good...and bad because it does not bring us any further :mellow:

If you want to continue debugging kernelside you can compare the loaded kernel modules on both PC and SBC.

Share this post


Link to post
Share on other sites

Hi Werner,

Thank you for your support. Yesterday I was tied up and couldn't respond. I would like to help getting to the bottom of this, so I got behind the Ubuntu PC and did some tests. In the meantime I have updated the gpphoto2 to the latest version on the Ubuntu PC. The Ubuntu PC has a fresh Ubuntu 18.04 install. 

gphoto2 2.5.23

Copyright (c) 2000-2019 Marcus Meissner and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.23         gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline
libgphoto2      2.5.24         standard camlibs (SKIPPING lumix), gcc, ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb usbdiskdirect usbscsi, gcc, ltdl, EXIF, USB, serial without locking

But now the gphoto2 software stopped working on the Ubuntu PC

 

The last working version on the Ubuntu is based on libgphoto2 2.5.22 instead of libgphoto2 2.5.24

gphoto2 2.5.23

Copyright (c) 2000-2019 Marcus Meissner and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.23         gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline
libgphoto2      2.5.22         all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking

So, maybe its wise to have the libgphoto2 bug fix first which appeared in libgphoto2 2.5.23

 

 

Anyway the lsmod on the Ubuntu pc shows the following:

root@ubuntu-test-pc:~# lsmod
Module                  Size  Used by
rfcomm                 81920  4
ccm                    20480  9
cmac                   16384  1
intel_rapl_msr         20480  0
intel_rapl_common      24576  1 intel_rapl_msr
x86_pkg_temp_thermal    20480  0
intel_powerclamp       20480  0
coretemp               20480  0
kvm_intel             245760  0
kvm                   655360  1 kvm_intel
irqbypass              16384  1 kvm
bnep                   24576  2
crct10dif_pclmul       16384  1
crc32_pclmul           16384  0
mei_hdcp               24576  0
snd_hda_codec_hdmi     57344  1
ghash_clmulni_intel    16384  0
rtl8821ae             233472  0
snd_soc_rt5640        143360  0
btcoexist             147456  1 rtl8821ae
snd_soc_rl6231         20480  1 snd_soc_rt5640
rtl_pci                28672  1 rtl8821ae
aesni_intel           372736  8
aes_x86_64             20480  1 aesni_intel
crypto_simd            16384  1 aesni_intel
rtlwifi                90112  3 rtl_pci,rtl8821ae,btcoexist
cryptd                 24576  2 crypto_simd,ghash_clmulni_intel
glue_helper            16384  1 aesni_intel
snd_hda_codec_realtek   118784  1
intel_cstate           20480  0
snd_hda_codec_generic    81920  1 snd_hda_codec_realtek
mac80211              847872  3 rtl_pci,rtl8821ae,rtlwifi
intel_rapl_perf        20480  0
ledtrig_audio          16384  2 snd_hda_codec_generic,snd_hda_codec_realtek
snd_soc_core          237568  1 snd_soc_rt5640
snd_compress           24576  1 snd_soc_core
ac97_bus               16384  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
i915                 1937408  28
snd_seq_midi           20480  0
input_leds             16384  0
snd_hda_intel          53248  10
snd_seq_midi_event     16384  1 snd_seq_midi
snd_intel_nhlt         20480  1 snd_hda_intel
snd_hda_codec         131072  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
cfg80211              704512  2 rtlwifi,mac80211
drm_kms_helper        180224  1 i915
btusb                  57344  0
btrtl                  20480  1 btusb
snd_hda_core           90112  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              20480  1 snd_hda_codec
btbcm                  16384  1 btusb
btintel                24576  1 btusb
lpc_ich                24576  0
drm                   491520  18 drm_kms_helper,i915
libarc4                16384  1 mac80211
bluetooth             573440  33 btrtl,btintel,btbcm,bnep,btusb,rfcomm
snd_rawmidi            36864  1 snd_seq_midi
snd_pcm               102400  7 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_soc_rt5640,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
i2c_algo_bit           16384  1 i915
fb_sys_fops            16384  1 drm_kms_helper
syscopyarea            16384  1 drm_kms_helper
mei_me                 40960  1
sysfillrect            16384  1 drm_kms_helper
ecdh_generic           16384  2 bluetooth
mei                   102400  3 mei_hdcp,mei_me
ecc                    32768  1 ecdh_generic
sysimgblt              16384  1 drm_kms_helper
snd_seq                69632  2 snd_seq_midi,snd_seq_midi_event
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer              36864  2 snd_seq,snd_pcm
snd                    86016  33 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
soundcore              16384  1 snd
intel_smartconnect     16384  0
acpi_pad              184320  0
mac_hid                16384  0
sch_fq_codel           20480  9
parport_pc             40960  0
ppdev                  24576  0
lp                     20480  0
parport                53248  3 parport_pc,lp,ppdev
ip_tables              32768  0
x_tables               40960  1 ip_tables
autofs4                45056  2
hid_generic            16384  0
usbhid                 53248  0
hid                   126976  2 usbhid,hid_generic
ahci                   40960  1
libahci                32768  1 ahci
alx                    49152  0
mdio                   16384  1 alx
video                  49152  1 i915

The lsmod on the NanoPi Neo2 with Armbian shows this:
 

root@nanopineo2:~# lsmod
Module                  Size  Used by
rfkill                 28672  1
zstd                   16384  4
snd_soc_simple_card    16384  0
sun8i_codec_analog     32768  0
snd_soc_simple_card_utils    16384  1 snd_soc_simple_card
sun4i_i2s              24576  0
sun8i_adda_pr_regmap    16384  1 sun8i_codec_analog
zram                   32768  2
snd_soc_core          151552  4 sun4i_i2s,sun8i_codec_analog,snd_soc_simple_card_utils,snd_soc_simple_card
snd_pcm_dmaengine      16384  1 snd_soc_core
sunxi_cedrus           40960  0
lima                   45056  0
snd_pcm               106496  3 sun4i_i2s,snd_soc_core,snd_pcm_dmaengine
gpu_sched              28672  1 lima
sun4i_gpadc_iio        24576  0
snd_timer              36864  1 snd_pcm
v4l2_mem2mem           28672  1 sunxi_cedrus
snd                    73728  3 snd_timer,snd_soc_core,snd_pcm
industrialio           69632  1 sun4i_gpadc_iio
videobuf2_dma_contig    20480  1 sunxi_cedrus
soundcore              16384  1 snd
videobuf2_memops       16384  1 videobuf2_dma_contig
videobuf2_v4l2         28672  2 sunxi_cedrus,v4l2_mem2mem
videobuf2_common       40960  3 sunxi_cedrus,videobuf2_v4l2,v4l2_mem2mem
videodev              225280  4 sunxi_cedrus,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
mc                     45056  5 sunxi_cedrus,videodev,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
cpufreq_dt             16384  0
usb_f_acm              16384  1
u_serial               28672  1 usb_f_acm
g_serial               16384  0
libcomposite           53248  2 g_serial,usb_f_acm
realtek                20480  1
dwmac_sun8i            24576  0
mdio_mux               16384  1 dwmac_sun8i


But the NanoPi Neo is on a different version, not sure why.
 

gphoto2 2.5.20

Copyright (c) 2000-2018 Lutz Mueller and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.20         gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2      2.5.22         all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking

 

But I am not sure whether that has an impact on how the Camera connects. That issue remains.

Ubuntu 18.04 behaviour:
Camera display shows live view --> plug in USB to camera --> display shows brief message "Connecting" --> camera display shows live view again.


Armbian behaviour:

Camera display shows live view --> plug in USB to camera --> display shows message "Connecting" --> camera display continuous to show "Connecting message". Only when a new command gphoto2 command is issued the live view returns.

If there is anything else I can do to help solve this, please let me know.


 

Share this post


Link to post
Share on other sites
7 hours ago, Rolf Bakker said:

If there is anything else I can do to help solve this, please let me know.


I assume that modules list above is with a connected camera and on most recent Armbian beta kernel? armbian-config -> system -> nightly builds

 

7 hours ago, Rolf Bakker said:

But the NanoPi Neo is on a different version, not sure why.


Did you update packages after you started?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1