Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version Search this Thread
11-08-2015, 06:14 PM   #46
Veteran Member
patarok's Avatar

Join Date: Jul 2013
Photos: Gallery
Posts: 389
QuoteOriginally posted by derekkite Quote
The API is exposed in the html. It is reasonably simple to access. The challenge is writing something useful. I've had ideas and looked around a bit but got more interested in something else.
So you would need an idea on what to write for the card?

Or you are "just not interested anymore"...

01-01-2016, 06:32 PM - 1 Like   #47
New Member




Join Date: Dec 2014
Location: Sydney
Posts: 13
Extracted Pentax Flucard 'index.html' file

For anyone still interesting this Flucard, I'm late to the party, and trying to figure out how it controls K-3/K-3 II to take photos.

Here is the 'index.html' file from the Pentax Flucard. I extracted it from the firmware, 00.01.00.02, and decoded using 'html' program on the firmware by command 'html decode', which I found from reverse engineering the command. Reformatted in Atom editor, so it's readable.

Here it's:

https://gist.github.com/twang2218/32acd410a8c1875101b3

Here are some interesting strings:

PHP Code:


            var comuHTTPResponseError "responseError";
            var 
comuHTTPResponseNullError "responseNullError";
            var 
comuHTTPTimeoutError "timeoutError";
            var 
comuHTTPMotionJpegError "motionJpegError";
            var 
comuHttpRequestLiveview "/mjpeg_video?action=stream";
            var 
comuHttpOperationRequest "/cgi-bin/host_operation";
            var 
comuHttpResponseErr "err=";
            var 
comuHttpRequestAf "?action=af";
            var 
comuHttpResponseAf "af=";
            var 
comuHttpRequestShutter "?action=shutter";
            var 
comuHttpResponseShutter "shutter=";
            var 
comuHttpRequestCapture "?action=capture";
            var 
comuHttpResponseCapture "capture=";
            var 
comuHttpResFileName "file=";
            var 
comuHttpResDirectory "directory=";
            var 
comuHttpResDate "date=";
            var 
comuHttpRequestLiveviewStop "?action=live-view-stop";
            var 
comuHttpResponseLiveviewStop "live-view-stop=";
            var 
comuHttpRequestLiveviewPause "?action=live-view-pause";
            var 
comuHttpResponseLiveviewPause "live-view-pause=";
            var 
comuHttpRequestLiveviewRestart "?action=live-view-restart";
            var 
comuHttpResponseLiveviewRestart "live-view-restart=";
            var 
comuHttpRequestLiveviewZoom "?action=live-view-zoom";
            var 
comuHttpResponseLiveviewZoom "live-view-zoom=";
            var 
comuHttpRequestHorLowMode "?action=hor-low-mode";
            var 
comuHttpResponseHorLowMode "hor-low-mode=";
            var 
comuHttpRequestHorActiveMode "?action=hor-active-mode";
            var 
comuHttpResponseHorActiveMode "hor-active-mode=";
            var 
comuHttpGetParameter "?action=get-camera-config";
            var 
comuHttpGetCapability "&config-entry=capability";
            var 
comuHttpResCapability "capability=";
            var 
comuHttpGetStatus "&config-entry=status";
            var 
comuHttpResStatus "status=";
            var 
comuHttpGetBattery "&config-entry=battery";
            var 
comuHttpResBattery "battery=";
            var 
comuHttpGetExposureIndex "&config-entry=exposure-index";
            var 
comuHttpResExposureIndex "exposure-index=";
            var 
comuHttpGetFnumber "&config-entry=f-number";
            var 
comuHttpResFnumber "f-number=";
            var 
comuHttpGetShutterSpeed "&config-entry=shutter-speed";
            var 
comuHttpResShutterSpeed "shutter-speed=";
            var 
comuHttpGetExposureBiasComp "&config-entry=exposure-bias-compensation";
            var 
comuHttpResExposureBiasComp "exposure-bias-compensation=";
            var 
comuHttpGetCaptureMode "&config-entry=capture-mode";
            var 
comuHttpResCaptureMode "capture-mode=";
            var 
comuHttpGetDriveMode "&config-entry=drive-mode";
            var 
comuHttpResDriveMode "drive-mode=";
            var 
comuHttpGetAfMode "&config-entry=af-mode";
            var 
comuHttpResAfMode "af-mode=";
            var 
comuHttpGetSdStatus "&config-entry=sd-status";
            var 
comuHttpResSdStatus "sd-status=";
            var 
comuHttpGetSdRecordCount "&config-entry=sd-record-count";
            var 
comuHttpResSdRecordCount "sd-record-count=";
            var 
comuHttpGetHyperMode "&config-entry=hyper-mode";
            var 
comuHttpResHyperMode "hyper-mode=";
            var 
comuHttpGetShiftMode "&config-entry=shift-mode";
            var 
comuHttpResShiftMode "shift-mode=";
            var 
comuHttpGetLVStatus "&config-entry=LV-status";
            var 
comuHttpResLVstatus "LV-status=";
            var 
comuHttpGetLiveviewResol "&config-entry=live-view-resolution";
            var 
comuHttpResLiveviewResol "live-view-resolution=";
            var 
comuHttpGetLanguage "&config-entry=language";
            var 
comuHttpResLanguage "language=";
            var 
comuHttpGetCommunicationParameters "&config-entry=communication-parameters";
            var 
comuHttpResCommunicationParameters "communication-parameters=";
            var 
comuHttpResCommunicationParametersSSID "ssid=";
            var 
comuHttpResCommunicationParametersNetworkKey "networkkey=";
            var 
comuHttpResCommunicationParametersChannel "channel=";
            var 
comuHttpResCommunicationParametersUserSetting "user-setting=";
            var 
comuHttpGetVersionParameters "&config-entry=version-parameters";
            var 
comuHttpResVersionParameters "version-parameters=";
            var 
comuHttpResVersionParametersCamera "camera-version=";
            var 
comuHttpResVersionParametersCard "card-version=";
            var 
comuHttpResVersionParametersHTML "html-version=";
            var 
comuHttpGetStreamFrameResol "&config-entry=stream-frame-resolution";
            var 
comuHttpResStreamFrameResol "stream-frame-resolution=";
            var 
comuHttpGetFocusArea "&config-entry=focus-area";
            var 
comuHttpResFocusArea "focus-area=";
            var 
comuHttpGetFocusFrameSize "&config-entry=focus-frame-size";
            var 
comuHttpResFocusFrameSize "focus-frame-size=";
            var 
comuHttpSetParameter "?action=set-camera-config";
            var 
comuHttpSetExposureIndex "&exposure-index=";
            var 
comuHttpSetFnumber "&f-number=";
            var 
comuHttpSetShutterSpeed "&shutter-speed=";
            var 
comuHttpSetExposureBiasComp "&exposure-bias-compensation=";
            var 
comuHttpSetLiveviewResolution "&live-view-resolution=";
            var 
comuHttpSetLiveviewResolution "&live-view-resolution=";
            var 
comuHttpSetCommunicationParameters "&communication-parameters=";
            var 
comuHttpSetCommunicationParametersSSID "&ssid=";
            var 
comuHttpSetCommunicationParametersNetworkKey "&networkkey=";
            var 
comuHttpSetCommunicationParametersChannel "&channel=";
            var 
comuHttpSetCaptureResetCondition "&capture-reset-condition=";
            var 
comuHttpResCaptureResetCondition "capture-reset-condition=";
            var 
comuHttpSetSdActive "&sd-active=";
            var 
comuHttpResSdActive "sd-active=";
            var 
comuHttpCardCgiFileRemount "/cgi-bin/photo";
            var 
comuHttpCardCgiResFileRemount "/DCIM/";
            var 
comuHttpCardCgiFileRefresh "/cgi-bin/refresh";
            var 
comuHttpCardCgiFileResRefresh "200";
            var 
comuHttpCardCgiGetThumbNail "/cgi-bin/thumbNail";
            var 
comuHttpCardCgiGetThumbNailDng "/cgi-bin/thumbRaw";
            var 
comuHttpCardCgiGetPhotoList "/cgi-bin/photolist";
            var 
comuHttpCardCgiResPhotoList "/DCIM/";
            var 
comuHttpCardCgiResPhotoListEmpty "No files found";
            var 
comuHttpCardCgiParameters "/cgi-bin/card_config";
            var 
comuHttpCardCgiGetParameters "?action=get";
            var 
comuHttpCardCgiSetParameters "?action=set";
            var 
comuHttpCardCgiParametersWifiSSID "wifi_ssid=";
            var 
comuHttpCardCgiParametersWiFiKey "wifi_key=";
            var 
comuHttpCardCgiParametersWiFiChannel "wifi_channel=";
            var 
comuHttpCardCgiParametersAutoWiFi "auto_wifi=";
            var 
comuHttpCardCgiParametersCardVersion "card_version=";
            var 
comuHttpCardCgiGetResParameters "wifi_ssid=";
            var 
comuHttpCardCgiSetResParameters "OK";
            var 
comuHTTPCardCgiGetStatus "/cgi-bin/card_status?action=get";
            var 
comuHTTPCardCgiResStatus "m1=";
            var 
comuHTTPCardCgiReqRestoreControlImage "/cgi-bin/restore";
            var 
comuHTTPCardCgiResRestoreControlImage "OK"



And there are more of how each request url formed in many following functions. such as:

PHP Code:


            function captureOnloadShutter() {
                
sysSetLog("[BUTTON] SHUTTER: onload");
                if (
captureButtonActive == 1) {
                    if (
captureLiveviewStatus == 0AJAX_get(comuHttpOperationRequest comuHttpRequestShutter "&" comuHttpResponseAf "0");
                    else 
AJAX_get(comuHttpOperationRequest comuHttpRequestShutter);
                    
AJAX_start_connection_timer();
                    
setTimeout("captureShutterOff()"200);
                }
            } 




Last edited by taowang; 01-01-2016 at 06:40 PM. Reason: Add more interesting info from the file
01-04-2016, 02:24 PM   #48
Veteran Member
patarok's Avatar

Join Date: Jul 2013
Photos: Gallery
Posts: 389
Seems like nice work. If you would team up with some people who have interest on producing a better flucard, you could get money out of it, and we could maybe have a better interface...
05-21-2016, 02:16 PM   #49
Banned




Join Date: Oct 2014
Posts: 93
taowang, these strings form part of url. And this part of url is passed to the camera and parsed in camera. There is a list of all possible comfiguration parameters and actions, if you are interested. But these are very restricted comparable to API available with pktriggercord (mass storage device interface).

08-28-2016, 03:52 AM   #50
Veteran Member
redcat's Avatar

Join Date: Jul 2014
Location: Paris
Photos: Gallery
Posts: 1,939
QuoteOriginally posted by tempelorg Quote
having it connect to my home Wifi network instead of it creating its own.
how did you do that, it's very useful to have it connect to home wifi, that way I can upload photos in the card directly to Instagram via my phone !
08-28-2016, 04:09 AM   #51
Senior Member




Join Date: Apr 2011
Location: Munich
Photos: Gallery
Posts: 203
Original Poster
Read again, redcat - that was a goal. I never succeeded in that. See post #28 for details.
08-28-2016, 04:19 AM   #52
Veteran Member
redcat's Avatar

Join Date: Jul 2014
Location: Paris
Photos: Gallery
Posts: 1,939
oh sorry, I was too excited with the hack, didn't read carefully. Thank you for your contribution to this project

11-24-2016, 04:54 PM   #53
Veteran Member
amoringello's Avatar

Join Date: May 2008
Location: Virginia, USA
Photos: Gallery
Posts: 1,562
Has anyone run into the problem (or more importantly solved the problem) where cgi-bin/photolist returns only the list of photos on the card when the WiFi was enabled?
Any photos taken since the WiFi was enabled are not listed.

Is there a way to refresh the list?

I have a small Python program that is 90% of the way to getting a basic AutoImporter compatible with LightRoom... similar to the old EyeFi functionality.
But if new files are not detectable without turning WiFi off/on, it is not very useful. :-) :-)

---------- Post added 11-24-16 at 07:19 PM ----------

So, I just tried "cgi-bin/refresh". I have not seen that documented anywhere, but it did what I wanted.
Hopefully I can get the rest working now. :-)
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
ap, card, care, code, equipment, firmware, flucard, hacks, linux, list, log, pentax, pentax firmware, people, photos, sense, tripod, wi-fi, wifi
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resurrecting Pentax firmware hacking Shodan Pentax DSLR Discussion 765 02-23-2019 05:24 AM
Spider Engineering stubyles Monthly Photo Contests 9 11-04-2014 04:16 AM
Latest Pentax hacking results Shodan General Photography 43 06-05-2014 10:07 AM
NY area SDM Hacking dappercorpmonkey Troubleshooting and Beginner Help 11 07-26-2013 04:15 PM
Chinese reverse engineering? ve2vfd General Talk 35 05-29-2009 05:41 AM



All times are GMT -7. The time now is 11:15 PM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top