Bug 213515 - dolphin kamera-kio can't write to my PTP still camera
Summary: dolphin kamera-kio can't write to my PTP still camera
Status: CONFIRMED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: kamera (show other bugs)
Version: 4.12.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Marcus Meissner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-07 08:24 UTC by Philippe ROUBACH
Modified: 2020-12-20 08:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe ROUBACH 2009-11-07 08:24:19 UTC
Version:           1.3 (using 4.3.2 (KDE 4.3.2), Mandriva Linux release 2010.0 (Cooker) for i586)
Compiler:          gcc
OS:                Linux (i686) release 2.6.31.5-desktop-1mnb

i plug my still camera

i open dolphin

i go to camera:/<my camera folder>

i can read , preview, delete a photo

i cannot copy past a photo to my camera folder

the option "paste" is in grey

if i try to drag and drop dolphin crash

i made this experiment which demonstates i can copy a photo to my camera folder

********************************************************
[roubach@localhost test]$ gphoto2 --auto-detect
libusb couldn't open USB device /dev/bus/usb/002/003: Permission denied.
libusb requires write access to USB device nodes.
Modèle                        Port
----------------------------------------------------------
Kodak C913                     usb:
Kodak C913                     usb:001,005
[roubach@localhost test]$ gphoto2 --auto-detect -u 100_0552.jpg -f /store_00010001/DCIM/100KC913
libusb couldn't open USB device /dev/bus/usb/002/003: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/003: Permission denied.
libusb requires write access to USB device nodes.
Modèle                        Port
----------------------------------------------------------
Kodak C913                     usb:
Kodak C913                     usb:001,005
[roubach@localhost test]$
********************************************************
Comment 1 Philippe ROUBACH 2009-11-07 08:28:25 UTC
see my other report

https://qa.mandriva.com/show_bug.cgi?id=41998
Comment 2 Andi Clemens 2009-11-07 11:07:37 UTC
Hmm but your "experiment" also shows that copying failed?
At least for me I can not upload with gphoto2, although it says it can.

*** Error ***
PTP: Sequence number mismatch 1 vs expected 0.

*** Error ***
PTP: Sequence number mismatch 0 vs expected 1.

*** Error ***
PTP General Error

*** Error ***
An error occurred in the io-library ('Unspecified error'): No error description available
*** Error (-1: 'Unspecified error') ***

For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-devel@lists.sourceforge.net>, please run
gphoto2 as follows:

    env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt -f /store_00010001/DCIM/100NCD50 -u alien.jpg

Please make sure there is sufficient quoting around the arguments.
Comment 3 Andi Clemens 2009-11-07 11:11:14 UTC
Since we are just calling the gphoto methods directly, it should work.
What gphoto version are you using?
I can only say that for me gphoto command line tool is not working anymore, so it might be as well a gphoto issue, not digikam.

digiKam version 1.0.0-beta6
Exiv2 can write to Jp2: Yes
Exiv2 can write to Jpeg: Yes
Exiv2 can write to Pgf: No
Exiv2 can write to Png: Yes
Exiv2 can write to Tiff: Yes
Exiv2 supports XMP metadata: Yes
LibCImg: 130
LibExiv2: 0.18.2
LibJPEG: 70
LibJasper: 1.900.1
LibKDE: 4.3.3 (KDE 4.3.3)
LibKExiv2: 1.0.0
LibKdcraw: 1.0.0
LibLCMS: 118
LibPGF: 6.09.44
LibPNG: 1.2.39
LibQt: 4.5.3
LibRaw: 0.8.3
LibTIFF: LIBTIFF, Version 3.9.2 Copyright (c) 1988-1996 Sam Leffler Copyright (c) 1991-1996 Silicon Graphics, Inc.
Marble widget: 0.8.1
Parallelized demosaicing: Yes
LibGphoto2: 2.4.7
LibKipi: 1.0.0
Comment 4 Philippe ROUBACH 2009-11-07 11:30:44 UTC
i sumup

1. i use to upload images to my camera since i have it
i make this with digikam

it works well with :
- digikam till 0.9.6
- gphoto2 mandriva 2008.1
- gphoto2 mandriva 2010.0

2. this does not work with

- konqueror 3.5.9 mandriva 2008.1
- dolphin 1.3 mandriva 2010.0
- digikam 1.0.0b5

3. the reports with errors with gphoto2

yesterday battery of my camera was very low
Comment 5 Philippe ROUBACH 2009-11-07 11:38:41 UTC
gphoto2    2.4.7
libgphoto2 2.4.7

digiKam version 1.0.0-beta5
Exiv2 can write to Jp2: Oui
Exiv2 can write to Jpeg: Oui
Exiv2 can write to Pgf: Non
Exiv2 can write to Png: Oui
Exiv2 can write to Tiff: Oui
Exiv2 supports XMP metadata: Oui
LibCImg: 130
LibExiv2: 0.18.2
LibJPEG: 70
LibJasper: 1.900.1
LibKDE: 4.3.2 (KDE 4.3.2)
LibKExiv2: 0.6.0
LibKdcraw: 0.5.0
LibLCMS: 118
LibPGF: 6.09.33
LibPNG: 1.2.40
LibQt: 4.5.3
LibRaw: 0.7.2
LibTIFF: LIBTIFF, Version 3.9.1 Copyright (c) 1988-1996 Sam Leffler Copyright (c) 1991-1996 Silicon Graphics, Inc.
Marble widget: 0.8.1
Parallelized demosaicing: Non
LibGphoto2: 2.4.7
LibKipi: 0.4.0
Comment 6 Philippe ROUBACH 2009-11-16 13:08:56 UTC
some info about my camera :

see somme extract of "gphoto2 --summary --manual --about"

.............
Description étendue du vendeur : Eastman Kodak PTP Extensions SPD Specification Ver1.00
....................
Device Capabilities:
        File Download, File Deletion, File Upload <<<<<<<<<<!!!!!!!!!!!
........................................
Storage Devices Summary:
store_00010001:
        StorageDescription: Aucune
        VolumeLabel: Aucune
        Storage Type: Removable RAM (memory card)
        Filesystemtype: Digital Camera Layout (DCIM)
        Access Capability: Read-Write <<<<<<<<<<<<<<<!!!!!!!!!!
........................................
À propos du pilote de l'appareil :
PTP2 driver
.....................
This driver supports cameras that support PTP or PictBridge(tm), and
Media Players that support the Media Transfer Protocol (MTP).
...............................

summup : yes you cant write, copy, upload with my still camera
Comment 7 Philippe ROUBACH 2009-11-16 13:17:25 UTC
now i understand why i can write with digikam 0.9.6 kde 3.5.9 mandriva 2008.1

digikam uses libgphoto
libgphoto (as i experiment with gphoto2) auto detects and uses ptp
libgphoto allows writing with ptp
Comment 8 Philippe ROUBACH 2009-11-16 13:24:42 UTC
hypothesis about kde camera protocol

camera protocol assummes you can't write with ptp protocol which is false
thus you can see in camera.protocol file this statement :

writing=false

if i set writing to true

then i copy-past a photo then dolphin does not crash but do nothing

does kde4 camera protocol use libgphoto or what other lib ?
Comment 9 Philippe ROUBACH 2009-11-16 13:41:00 UTC
exactly :

if i copy-past

notifier show a progress bar then says "copy is terminated"
and
kde open an error window : writing to camera is not supported
Comment 10 Philippe ROUBACH 2009-11-16 13:44:46 UTC
in my comment #6 i made obviously an error

instead of
summup : yes you cant write, copy, upload with my still camera
you must read
summup : yes you can write, copy, upload with my still camera
Comment 11 Philippe ROUBACH 2009-11-16 13:59:49 UTC
ok i found dependancies ok kamera packet

camera protocol uses libgphoto2

then i made the hypothesis this is kde camera protocol which forbids writing

conclusion :

to the kde camera protocol devs

please
- add the ability to write with ptp protocol for camera which has this ability
- if a still camera is ptp and mtp compliant choose the most complete protocol mtp to access it
Comment 12 Marcus Meissner 2009-11-30 17:03:32 UTC
you cannot just set 
writing=true 
in the .desktop file ;)

You would also need to implement the ::put() method.

It is currently not implemented.

I put in on my TODO list :/
Comment 13 Philippe ROUBACH 2009-11-30 17:29:54 UTC
(In reply to comment #12)
> I put in on my TODO list :/

thanks

and what about the ability to give choice to user between the 2 protocols if there are 2 protocols ? 
this is the case with gnome environment (it's buggy), i have to desktop icons which appear when i plug my camera
Comment 14 Marcus Meissner 2009-11-30 17:38:03 UTC
MTP and PTP are the same thing basically.

The MTP protocol is just some extensions added to PTP.

If the device talks MTP it will already be talked to with the MTP extensions enabled.
Comment 15 Philippe ROUBACH 2012-08-21 10:11:08 UTC
mandriva 2010.2
kde 4.8.4

1. now in dolphin there are 3 options to access to my DC card
Kodak C913 (camera:/Kodak C913@usb:001,010/)
MTP device (camera:/MTP Device@usb:/)
USB PTP Class camera (camera:/USB PTP Class Camera@usb:/)

see the capture kamera.png

it is strange i expected 2 accesses : mtp and ptp.
what is this third access "kodak c913" ?

i can access  to the card via "kodak c913" and "USB PTP Class camera"

i can't access to the card via "MTP device"

error message : 
Code d'erreur 150 inconnu
Impossible de trouver l'appareil requis sur le port USB
Veuillez envoyer un rapport de bogue détaillé à http://bugs.kde.org.

2. ptp copy/paste no enhancement

i can't write with usb ptp to the dc card
the option "past the file" is in grey

3. i have not the choice to choose between ptp and mtp
it seems that ptp is chosen by default by kde, ligphoto2 ?
Comment 16 Philippe ROUBACH 2012-08-21 10:54:55 UTC
the place "camera" is not added in the left panel of dolphin
Comment 17 Philippe ROUBACH 2012-10-04 12:18:01 UTC
today résumé :

mandriva 2010.2
kde 4.8.4
digikam 2.9.0

with usb ptp protocol
- i can copy again a file to the dc card with digikam

- i still can't copy a file to the dc card with dolphin
Comment 18 Philippe ROUBACH 2014-01-12 17:17:07 UTC
opensuse 13.1 , kde 4.12 , digikam 3.5

- ptp
no camera in dolphin places panel
but
in kde settings/kamera
the camera is there
but
all buttons are in grey whne i select camera

in digikam no pb to access to it

- mtp
dolphin : no pb
digikam : no pb
Comment 19 Philippe ROUBACH 2014-01-12 17:26:59 UTC
sorry don't take care of #comment 18

wrong report
Comment 20 Philippe ROUBACH 2014-01-15 18:51:30 UTC
opensuse 13.1 , kde 4.12.1 , digikam 3.5
Samsung SII P , android 4.2.2

i set smartphone to use ptp

- i can't copy a photo to smartphone with digikam 
- i can't copy a photo to smartphone with dolphin

i can conclude : pb still there
Comment 21 Marcus Meissner 2014-01-16 08:48:02 UTC
that has not changed, yes. the kamera slave does not implement upload at this time.

you can try kio-mtp
Comment 22 Dan MacDonald 2014-10-16 10:11:05 UTC
I've only just discovered that KDE/Dolphin/Konq can upload files to my phone

IF

I access it using mtp:/ instead of camera:/

The problem here is that Plasma and Dolphin only offer to mount it as a camera device when I plug my phone into my computer which gives the impression that KDE only supports downloading files from MTP devices.

It seems to me KDE should access cameras via MTP by default, certainly until the camera KIO slave gets fixed.
Comment 23 Marcus Meissner 2014-10-16 16:03:19 UTC
or someone can implement upload in camera:/ ... sadly I do not have much time these days.

But I try to keep it in mind.
Comment 24 L P Luigi Espenlaub 2020-12-20 08:28:41 UTC
Latest version of Dolphin 20. camera:/ returns "Invalid protocol" Gnome's Nautilus has no problem opening the camera and showing it as USB PTP in the side panel. No problem accessing or moving files. But no preview or thumbnails, have to open a separate window to do moving. Dolphin 17 worked but 20 does not. Konqueror uses Dolphin for its file manager function I am informed. Loaded the latest DigiKam and to no surprise, its ability to connect with any thing USB besides mass storage [not PTP] has been removed I conclude because the user guide still shows windows with PTP options but is out of date.