Thanks to a different firmware and reyalp's help, I could fix this. I updated the original "announcement". A patch for my script in petabyte's ptp-tool is attached to show the fix.
Nice work, with the new information long args are working in my chdkptp code. I've added "proper" support in chdkptp r1118-1120. Documentation can be found in chdkptp/lua/ptpevp.lua before con_methods:ptpevp_call. This should be usable with any cam that supports the API, regardless of whether CHDK is installed.
Briefly
con:ptpevp_initiate() calls 0x9050 x3
con:ptpevp_call(name,arg1,...argN,{options}) calls an eventproc with the given parameters, and by default returns the function return value, followed by return data if requested.
Numbers, strings and chdkptp lbufs are accepted as arguments. Note that
string/lbuf arguments must be explicitly null terminated if the camera expects a C string for the argument.
options controls async, return data and various debugging option.
radata='string' specifies return data should be used and returned as a Lua string.
async=true specifies an async call
wait=true polls IsRunning until an async call finishes
verbose=true to be used to print details about each transaction
By default, if rdata is enabled (and wait is true, if async), the data is fetched and returned. This can be disabled by setting getrdata=false
other functions
con:ptpevp_wait - wait for async to finish, and get data if it returned data
chdku.ptpevp_prepare - generates an lbuf of the data to be sent with Execute
some examples can be found in lua/tests/ptpevp.lua