GetCameraInformationData and AdjLog - General Discussion and Assistance - CHDK Forum

GetCameraInformationData and AdjLog

  • 12 Replies
  • 1580 Views
*

Offline reyalp

  • ******
  • 13295
GetCameraInformationData and AdjLog
« on: 13 / October / 2019, 00:27:17 »
Advertisements
There is a reference to "freefall" in the firmware, which would appear to be output by GetCameraInformationData and seems like it might record something about whether a camera was dropped. I thought it might be interesting to get this on a camera that had a hard fall  but I haven't been able to figure where it goes. It seems like it could be related to "StartLogOut" "OutputLogToFile", AdjLog.txt etc. I was able to get content in AdjLog.txt using 
Code: [Select]
=return call_event_proc('FA.Create')
=return call_event_proc('InitializeAdjustmentSystem')
=return call_event_proc('StartLogOut',2,0x1000,0)
=return call_event_proc('OutputLogToFile')
However, calling GetCameraInformationData and (and GetTotalShootCount, which appears to use similar functions) didn't result in any output.

StartLogOut appears to take 3 arguments: mode, buffer size, and optional filename. Mode appears to range from -3 to +3, with +/-2 being connected to the AjdLog.txt, and the others possibly not.

There are also functions ActivateAdjLog and InactivateAdjLog, which appear to check a field in the adjlog related struct that I don't see being set anywhere.
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1105
Re: GetCameraInformationData and AdjLog
« Reply #1 on: 22 / October / 2019, 09:48:03 »
There is a reference to "freefall" in the firmware, which would appear to be output by GetCameraInformationData and seems like it might record something about whether a camera was dropped. I thought it might be interesting to get this
However, calling GetCameraInformationData and (and GetTotalShootCount, which appears to use similar functions) didn't result in any output.

I've done something similar here in Reply #304
.https://chdk.setepontos.com/index.php?topic=12542.300
CameraInfo.xml says that FreeFall TotalCount = 0.


Not sure if it was powered off  by the time it hit.

I was sure, my S110 was off when it hit…
M100 100a, M3 101a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline reyalp

  • ******
  • 13295
Re: GetCameraInformationData and AdjLog
« Reply #2 on: 22 / October / 2019, 15:30:11 »
Thanks! I remembered there was discussion but couldn't find it. I'll check in RAM.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 13295
Re: GetCameraInformationData and AdjLog
« Reply #3 on: 18 / July / 2021, 19:59:11 »
I finally got around to looking at this for other reasons, so here's a way to get the GetCameraInformationData  XML.

The first function called by GetCameraInformationData (g7x 100d 0xfc5087ae) collects the actual data and puts it in memory allocated with umalloc. It expects a single argument, which is a pointer that receives the allocated buffer (it also stores it in a global variable, but the pointer is required anyway) It returns the length of the data. So using g7x 100d as an example
Code: [Select]
=call_event_proc'System.Create' p=call_event_proc('AllocateMemory',4) return call_func_ptr(0xfc5087af,p),p,peek(p)
1:return:2912
1:return:5475504
1:return:1079217376
rmem 1079217376 2912 -f=g7x-caminfo.xml
My g7x did not show anything in the FreeFall section of the log, and the TotalShoot value was obviously far less than the real value (~6k, when I know the counter has wrapped passed 9999 multiple times).
The ErrorLog section shows a history of hardware defect errors.
The BatteryAuthentication section shows a history of the last ten times a non-Canon battery power source was detected. In my case, all of these correctly showed "DC coupler".

There is also a section appears to show what power sources have been used in the camera lifetime
Code: [Select]
<Explanation>Whether any non-Canon battery was used</Explanation>
<ThirdParty>YES</ThirdParty>
<Counterfeit>NO</Counterfeit>
<DC-coupler>YES</DC-coupler>
<non-CANON>NO</non-CANON>
Interesting that "ThirdParty" "Counterfeit" and "non-Canon" are all separate categories. I previously experimented with blocking various terminals, which might explain the "ThirdParty" entry on mine.
Don't forget what the H stands for.


*

Offline blackhole

  • *****
  • 835
  • A590IS 101b
    • Planetary astrophotography
Re: GetCameraInformationData and AdjLog
« Reply #4 on: 19 / July / 2021, 04:40:14 »
I finally got around to looking at this for other reasons, so here's a way to get the GetCameraInformationData  XML.
On my sx410 the log looks pretty simplified.
TotalShoot value shows a slightly higher value, the difference is approximately 150 to the value shown on the camera display, but during development I somehow reset the time and number of images, maybe that can explain the difference.
The ErrorLog section did not show anything.
Code: [Select]
-<FirmwareVer>
<Internal>Firmware Ver GM1.00C</Internal>
<Major>1.0.0.0</Major>
</FirmwareVer>
<ErrorLog/>
<TotalShoot>3507</TotalShoot>
<ZoomRetryCount>0</ZoomRetryCount>
<PowerOnCount>1690</PowerOnCount>
<TotalRunningTime>327765</TotalRunningTime>
<ZoomMoveCount>3071</ZoomMoveCount>
</CameraInfo>
</Canon>

*

Offline c_joerg

  • *****
  • 1105
Re: GetCameraInformationData and AdjLog
« Reply #5 on: 19 / July / 2021, 08:44:03 »
The ErrorLog section did not show anything.
 

All my cams show ErrorLog section :(

The following basic script does the same for all newer canon cams
https://chdk.setepontos.com/index.php?topic=13943.msg144153#msg144153

M100 100a, M3 101a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline blackhole

  • *****
  • 835
  • A590IS 101b
    • Planetary astrophotography
Re: GetCameraInformationData and AdjLog
« Reply #6 on: 19 / July / 2021, 09:54:21 »
All my cams show ErrorLog section :(

The following basic script does the same for all newer canon cams
https://chdk.setepontos.com/index.php?topic=13943.msg144153#msg144153
I don’t seem to have caused any hardware errors in 5 years, even though the camera fell from 2 meters to the floor 7 months ago.
Now I forced an E18 error for the test. :D In addition to the E18 error, the battery temperature value also appeared.
If anyone else wants to see GetCameraInformationData on sx410 fw100c, the pointer is 0xFFBD085C.
Code: [Select]
-<ErrorLog>
-<Log>
<DateTime>2021.07.19 14:22:40</DateTime>
<Reason>E18 ZoomLensSpeedError</Reason>
<BatteryTemperature>297 30</BatteryTemperature>
</ErrorLog>

*

Offline c_joerg

  • *****
  • 1105
Re: GetCameraInformationData and AdjLog
« Reply #7 on: 19 / July / 2021, 12:47:14 »
I don’t seem to have caused any hardware errors in 5 years, even though the camera fell from 2 meters to the floor 7 months ago.
Was the camera on or off when that happened?
I have never seen FreeFall > 0.
M100 100a, M3 101a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd


*

Offline blackhole

  • *****
  • 835
  • A590IS 101b
    • Planetary astrophotography
Re: GetCameraInformationData and AdjLog
« Reply #8 on: 19 / July / 2021, 13:00:27 »
Was the camera on or off when that happened?
I have never seen FreeFall > 0.
The turned off camera fell out from the closet in the M6.4 earthquake.
No damage is visible, only the slightly noisier zoom mechanism was the first few minutes of operation.

*

Offline Caefix

  • *****
  • 526
  • Sorry, busy deleting test shots...
Re: GetCameraInformationData and AdjLog
« Reply #9 on: 19 / July / 2021, 13:10:04 »
Some 13  :haha .../.../funcs_by_name.csv have a line like
Quote
0xe050178b,CamInfo_Debug_FW
probably Ix180 too ...
Code: [Select]
<?xml version="1.0"?><Canon><CameraInfo><Serial>313061007584</Serial><FirmwareVer><Internal>Firmware Ver GM1.00A</Internal><Major>1.0.0.0</Major></FirmwareVer><ErrorList></ErrorList><TotalShoot>381</TotalShoot><ZoomRetryCount>0</ZoomRetryCount><PowerOnCount>251</PowerOnCount><TotalRunningTime>24937</TotalRunningTime><ZoomMoveCount>261</ZoomMoveCount><TotalZoomMoveCount>265</TotalZoomMoveCount><ZoomResetCount>216</ZoomResetCount></CameraInfo></Canon>Maybe on others (Ix265, M3) the canon basic script doesn´t work...?  ::)
Code: [Select]
Search "CamInfo_Debug_FW"
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\!trunk6001\#m100\platform\m100\sub\100a\funcs_by_name.csv (1 hit)
Line 79: 0xe050178b,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\g7x2\sub\101a\funcs_by_name.csv (1 hit)
Line 82: 0xe057ed81,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\g7x2\sub\110b\funcs_by_name.csv (1 hit)
Line 82: 0xe057edcd,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\ixus180_elph190\sub\100a\funcs_by_name.csv (1 hit)
Line 75: 0xff35463c,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\ixus185_elph185\sub\100a\funcs_by_name.csv (1 hit)
Line 75: 0xffafb3dc,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\ixus190_elph200\sub\100d\funcs_by_name.csv (1 hit)
Line 76: 0xff35e8c8,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\ixus285_elph360hs\sub\100b\funcs_by_name.csv (1 hit)
Line 76: 0xff3ddc10,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\sx420is\sub\100a\funcs_by_name.csv (1 hit)
Line 75: 0xff377840,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\sx430is\sub\100b\funcs_by_name.csv (1 hit)
Line 76: 0xff385818,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\sx620hs\sub\100b\funcs_by_name.csv (1 hit)
Line 78: 0xff3e2ea8,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\sx620hs\sub\100c\funcs_by_name.csv (1 hit)
Line 78: 0xff3e2ea8,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\sx730hs\sub\100c\funcs_by_name.csv (1 hit)
Line 85: 0xfc4426c1,CamInfo_Debug_FW
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-6001\platform\sx730hs\sub\100d\funcs_by_name.csv (1 hit)
Line 85: 0xfc4426e9,CamInfo_Debug_FW
« Last Edit: 19 / July / 2021, 13:28:12 by Caefix »
All lifetime is a loan from eternity.

 

Related Topics