hi
finally i started learning the code...
i wanted to start with the PTP stuff...
unfortunately i overestimated myself - i am far away from the reverse engineering/disassembling stuff (atleast for now)
good news is that a1ex gave me a hand and pointed me in the right directions... but it will take time to learn basic things...
for now i wanted to see if i can find some handlers in ptp communications with the current code base...
by examining the code i found how can i enable debug mode so the firmware started to write STDOUT.TXT
unfortunately i do not fully understand it...
i've got the ptpcam version which is patched for CHDK operations...
here is sample of my log related to chdk ptp operation call 0x9999
4450: 239270 [FACE] Temperature:27 TempGain:0
[CmndMgr]WARNING: NotFind!!, GetPTPOperationFunction()
--- OperationCode = 0x9999 // AF: 0x9999 = CHDK
[FramCtrl]WARNING: Entry๐oDefaultUndefine()
4451: 247300 [PTPOPE]OperationCode:0x1002,P1:1,P2:0,P3:0 // AF: 0x1002 = OpenSession
4452: 247310 [PTPOPE]OperationCode:0x1001,P1:0,P2:0,P3:0 // AF: 0x1001 = GetDeviceInfo
4453: 247320 [PTP]USBConnectStatus:3
4454: 247320 [MC] T:0012, S:0002, 75
4455: 247320 [RIF]RIF_PtpConnectUILock:1
4456: 247330 [PTPOPE]OperationCode:0x9999,P1:0,P2:0,P3:0 // AF: 0x9999 = CHDK
4457: 247330 [MC] T:0004, S:0002, 76
4458: 247340 act:0141
4459: 247360 [MC] T:0001, S:0002, 77
4460: 247360 [MAIN] Temp. 235(EB)
excuse my terminology, but i'm not sure know the right words in english...
the first number seems to be incrementing line number in the log...
im not sure what is the next number, but it seems it is incrementing too (may be with each call?)
the string in the brackets [] seems to indicate which submodule is working
then follows the message
how can i understand what is [MC], [RIF], [PTPOPE], [CmndMgr], [FramCtrl] ?
i can guess the names for some (PTPOPE = PtpOperations, RIF = RemoteInterFace?), but what exactly is this ?
it seems that the function which is looking for the PTP handlers is called: GetPTPOperationFunction()
the only closest routine name i found is:
funclist.txt๐EF(aBugGetptpopera, 0xFFA626B4)
i suspect it is the right one, but i'm little confused because of "aBug" prefix...
i've started with something which a1ex pointed me:
http://www.mweerden.net/chdk_ptp.html
but for now i do not have memory dump, neither tools/knowledge to examine it, so if someone have a dump which i can use for a start (or i should learn how to use 'COPY' function from the code)...
i could try to find the structure describing the handlers and the function which adds them to the list...
i'm not sure i can handle examining the dump, but it will be a good place to start...
i know my question may sound silly right now, for some of you it may look like an open book, but i'm just a beginner in this area ... and ASM for ARM will make things even more difficult to me... i would like to look back to this post after some time and say "how stupid i must have been to ask such things...๐", but it will take time or may be will never happen, but never hurts to try ๐.