supplierdeeply

chdkptp build on ubuntu (11.10 32bit) failing with ixus40_sd300_100k

  • 16 Replies
  • 2745 Views
*

Offline srsa_4c

  • ******
  • 3104
  • Publish
    Re: chdkptp build on ubuntu (11.10 32bit) failing with ixus40_sd300_100k
    « Reply #10 on: 30 / August / 2012, 19:56:23 »
    Advertisements
    @sebh
    If you want a half working solution, change
    Code: [Select]
    int (*send_resp)(int handle, PTPContainer *resp);in include/platform.h into
    Code: [Select]
    int (*send_resp)(int handle, PTPContainer *resp, int zero);and
    Code: [Select]
    data->send_resp( data->handle, &ptp );in core/ptp.c into
    Code: [Select]
    data->send_resp( data->handle, &ptp, 0 );
    and you need the A410 workaround in chdkptp (I've tested it)

    Many things (file upload, download, luar, etc.) work, including live view, but ls gives empty result preventing the GUI from populating the tree view on the "Files" tab. It's surely not running out of memory (~3MB free).
    @reyalp: could you give a hint on this?
    « Last Edit: 30 / August / 2012, 19:59:30 by srsa_4c »

    *

    Offline reyalp

    • ******
    • 9810
  • Publish
    Re: chdkptp build on ubuntu (11.10 32bit) failing with ixus40_sd300_100k
    « Reply #11 on: 30 / August / 2012, 21:16:48 »
    Many things (file upload, download, luar, etc.) work, including live view, but ls gives empty result preventing the GUI from populating the tree view on the "Files" tab. It's surely not running out of memory (~3MB free).
    @reyalp: could you give a hint on this?
    I don't really have much idea. ls uses the message interface (write_usb_msg in camera side lua) but return values in luar use the same mechanism as far as PTP is concerned. Have you check that luar actually receives the return values, not just waiting for the script to finish, e.g.
    =return 1
    It should return something like
    1:return:1

    You could also try
    .write_usb_msg('test')
    getm
    which should return something like
    2:user:'test'
    Don't forget what the H stands for.

    *

    Offline srsa_4c

    • ******
    • 3104
  • Publish
    Re: chdkptp build on ubuntu (11.10 32bit) failing with ixus40_sd300_100k
    « Reply #12 on: 30 / August / 2012, 21:34:23 »
    I don't really have much idea. ls uses the message interface (write_usb_msg in camera side lua) but return values in luar use the same mechanism as far as PTP is concerned. Have you check that luar actually receives the return values, not just waiting for the script to finish, e.g.
    =return 1
    It should return something like
    1:return:1

    You could also try
    .write_usb_msg('test')
    getm
    which should return something like
    2:user:'test'
    Your examples work as expected.
    Code: [Select]
    connected: Canon DIGITAL IXUS 30, max packet size 64
    con> =return 1
    1:return:1
    con 1> .write_usb_msg('test')
    con 2> getm
    2:user:'test'
    con 2> ls
    con 3> ls A/
    con 4> ls A
    con 5>
    The problem is, I don't know whether this is related to some other PTP oddity or a firmware function is misbehaving independently. The file explorer on camera works fine too, recognizes dirs, etc.
    « Last Edit: 30 / August / 2012, 21:43:25 by srsa_4c »

    *

    Offline reyalp

    • ******
    • 9810
  • Publish
    Re: chdkptp build on ubuntu (11.10 32bit) failing with ixus40_sd300_100k
    « Reply #13 on: 30 / August / 2012, 21:51:50 »
    The problem is, I don't know whether this is related to some other PTP oddity or a firmware function is misbehaving independently. The file explorer on camera works fine too, recognizes dirs, etc.
    try =return os.listdir('A/') ?
    Don't forget what the H stands for.


    *

    Offline srsa_4c

    • ******
    • 3104
  • Publish
    Re: chdkptp build on ubuntu (11.10 32bit) failing with ixus40_sd300_100k
    « Reply #14 on: 30 / August / 2012, 22:03:41 »
    try =return os.listdir('A/') ?
    Code: [Select]
    connected: Canon DIGITAL IXUS 30, max packet size 64
    con> =return os.listdir('A/')
    5:return:table:{[1]="CHDK",[2]="DISKBOOT.BIN",[3]="DCIM",[4]="badpixel.bin",[5]="ver.req",[6]="paramdmp.log",[7]="MISC",[8]="chdk_ixus30_111006am.tar.gz",}
    con 5>
    Oh, well ...  :-[
    Removing that backup file with the long name makes things work... Sorry about that.

    *

    Offline reyalp

    • ******
    • 9810
  • Publish
    Re: chdkptp build on ubuntu (11.10 32bit) failing with ixus40_sd300_100k
    « Reply #15 on: 30 / August / 2012, 22:07:32 »
    Code: [Select]
    connected: Canon DIGITAL IXUS 30, max packet size 64
    con> =return os.listdir('A/')
    5:return:table:{[1]="CHDK",[2]="DISKBOOT.BIN",[3]="DCIM",[4]="badpixel.bin",[5]="ver.req",[6]="paramdmp.log",[7]="MISC",[8]="chdk_ixus30_111006am.tar.gz",}
    con 5>
    Oh, well ...  :-[
    Removing that backup file with the long name makes things work... Sorry about that.
    No need to apologize, that shouldn't kill ls. I'll have to take a look at it.
    Don't forget what the H stands for.

    *

    Offline srsa_4c

    • ******
    • 3104
  • Publish
    Re: chdkptp build on ubuntu (11.10 32bit) failing with ixus40_sd300_100k
    « Reply #16 on: 31 / August / 2012, 16:56:48 »
    No need to apologize, that shouldn't kill ls. I'll have to take a look at it.
    It may help that some of the camera's routines choked on that file. It couldn't be erased from the file browser or from command line over ptp, and the file browser couldn't tell whether it's a file or directory (??? was displayed after the filename) - probably a failure of stat().

     

    Related Topics