chdkptp - alternative ptp client - page 92 - General Discussion and Assistance - CHDK Forum supplierdeeply

chdkptp - alternative ptp client

  • 1097 Replies
  • 397369 Views
*

Offline srsa_4c

  • ******
  • 4426
Re: alternative ptp client
« Reply #910 on: 11 / September / 2016, 16:12:43 »
Advertisements
Hmm, looking again I think it's only write protection:
Code: [Select]
  Access permission    0x5 5 [P:R- U:--]

=peek(0) works fine on g7x.
Oh. I keep forgetting that the CPU is always in privileged mode in Powershots.

*

Offline Ant

  • ****
  • 491
Re: alternative ptp client
« Reply #911 on: 11 / September / 2016, 16:16:34 »
On EOS M3 I can dump 0xBFE00000 and 0x80000000 memory, but can not dump 0xDFE00000. Why?

*

Offline srsa_4c

  • ******
  • 4426
Re: alternative ptp client
« Reply #912 on: 11 / September / 2016, 16:24:35 »
On EOS M3 I can dump 0xBFE00000 and 0x80000000 memory, but can not dump 0xDFE00000.
Which dumping method? rmem or DmpRAM? What happens when you try?

*

Offline Ant

  • ****
  • 491
Re: alternative ptp client
« Reply #913 on: 11 / September / 2016, 16:34:51 »
rmem causes crash when I try to read 0xDFE00000.


*

Offline reyalp

  • ******
  • 13435
Re: alternative ptp client
« Reply #914 on: 11 / September / 2016, 17:15:24 »
rmem causes crash when I try to read 0xDFE00000.
The canon firmware send_ptp_data almost certainly uses DMA, (there might be a minimums size). DMAing from MMIO address space is likely to be unpredictable
Don't forget what the H stands for.

*

Offline Ant

  • ****
  • 491
Re: alternative ptp client
« Reply #915 on: 11 / September / 2016, 18:06:44 »
Is there equivalent of "call" and "set" commands used in ptpcam?

*

Offline reyalp

  • ******
  • 13435
Re: alternative ptp client
« Reply #916 on: 11 / September / 2016, 18:26:55 »
Is there equivalent of "call" and "set" commands used in ptpcam?
In most cases, you should be able to use call_func_ptr and poke in Lua to do the same things.

The call PTP command is available using con:call_function, but is not currently exposed in the CLI. I have not implemented set.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 13435
Re: alternative ptp client
« Reply #917 on: 18 / December / 2016, 14:06:43 »
Replying to a question from mphx in PM
Quote
So i am trying to compile chdkptp in linux.Since my system has newest packages than chdkptp is "used" to work well with , i downloaded :
It would be helpful to know which distro you you are using.

Quote
1. IUP
2. CD
3. Lua52 source (system has lua5.3 but lets play it safe here with 5.2)


So i created a folder with chdkptp source , an extra subfolder in there were i put iup/cd/lua(headers and compiled lib from the lua source i downloaded)
I created and edited the config.mk file , put the correct paths for headers/libs/etc and hit the "make" command.
And i am here -> (attachment mphx-chdptp_compile-error.png)
From the little that i understand that must be the end of the compiles ...i mean if was not the error.
Error about some variable not defined although i checked lua headers and it seems to be defined at luaxlib.h just fine.

So have you ever seen this before?Any ideas?

It looks like you set the Lua path to a relative path like ./lib/lua52. The error is related to something lfs, which is in the a subdirectory where the relative path is no longer valid. Try using an absolute paths for all the library / include settings. Be sure to make clean before you rebuild, because lfs may have been built with the wrong lua includes.

Quote
I would have used the latest binary (r723 if not mistaken) that seemed to be ok with the supplied libs but has a thing with installed gtk as far as i can understand.
(attachment mphx-chdkptp_gui-error.png)
Maybe its not chdkptp's problem but system's problem.
I haven't seen this one before. Just to be sure: chdkptp fails to run when this happens? It's not unusual for linux GUI programs to spew some messages without any real problem.

Again, knowing which distro and desktop would be helpful.
Don't forget what the H stands for.


*

Offline mphx

  • ***
  • 210
Re: alternative ptp client
« Reply #918 on: 18 / December / 2016, 15:24:52 »
First of all i hadnt notice this thread , thats why i sent the pm.


@reyalp


Second of all i am using Manjaro (archlinux in essence) with XFCE4.


About the compiling and the lfs situation.
------------------------------------------------------------
You were right.it was all about the relative paths to lua headers/libs.I corrected them and compile finished without errors.


And now we come to the real (as it seems) problem.


After the compile as everyone would do , i tried to run the binary.Before that i created a new subfolder.I threw all the cd/iup(+lua) libs into this subfolder.
I edited config.sh accordingly and ran the executable. NO-GO :)
Ok not entirely true. cli mode works.GUI not.
And to answer your question , when the "messages" are thrown , chdkptp (gui) doesnt not start.I am talking about the binary i was testing,  before i compiled the source myself.
This one (the compiled one) , does not show any message.
Only "Segmentation  fault"


EDIT : i noticed a related system message (dmesg) that maybe help anyone having more technical knowledge than me.


Code: [Select]
[27136.899370] chdkptp[14723]: segfault at 21044f ip 00007f174655493a sp 00007ffefeda4180 error 4 in libgobject-2.0.so.0.5000.2[7f1746520000+51000]

That message comes in harmony with the messages that the binary was throwing before.Something about GObject stuff.


Any ideas welcomed.


Thanks.
« Last Edit: 18 / December / 2016, 15:29:08 by mphx »

*

Offline reyalp

  • ******
  • 13435
Re: alternative ptp client
« Reply #919 on: 18 / December / 2016, 17:06:44 »
Second of all i am using Manjaro (archlinux in essence) with XFCE4.
Thanks. I have not built or tested on any arch based distros. I don't really have the time to troubleshoot every linux flavor. If changing distros is an option, the builds I provided should run out of the box on many Debian based distros. The builds are built on Debian 8 and I have verified they work on Ubuntu 16.04.

I'm a bit confused from you post what problems each build has. As far as I understand

Your self built build
* Running the gui segfaults with no other errors displayed. The dmesg segfault is also from this build?
* Running the same executable in command line mode (chdkptp -i etc) works

For this build, it might be useful to know what specific IUP and CD libraries you used.

My build (chdkptp-r723-Linux-*.zip)
* Displays the GTK errors posted earlier and does not start, but does not segfault?

For both builds, running ldd with same environment that chdkptp would run in might provide insight into which libraries each one is actually using. e.g. in chdkptp_gui.sh replace

"$CHDKPTP_DIR/$CHDKPTP_EXE" "$@"

with
ldd "$CHDKPTP_DIR/$CHDKPTP_EXE"

Doing this in the .sh file ensures it uses the same LD_LIBRARY_PATH that chdkptp is actually using.

Since your errors seem to be GTK related, comparing the GTK libraries provided with your distro to those used by the Debian or Ubuntu versions known to work might provide a clue.
Don't forget what the H stands for.

 

Related Topics