-
Notifications
You must be signed in to change notification settings - Fork 5
Ricoh Wireless API
There is a basic wireless API that is used to communicate from the Ricoh GR-series of camera and the image transfer app. I've dumped the Android application's Smali code in bytecode-viewer to get a sense of the basic APIs and here's what we've learned so far.
- All over HTTP/REST
- No authentication needed
- Pretty fragmented by way of Camera series (i.e. GR II, GR III, etc.)
- Seems to always be at the IP
192.168.0.1
- The API is versioned (currently at
v1
)
Name | Path | Full URL |
---|---|---|
Camera Information | props |
http://192.168.0.1/v1/props |
Photo List | photos |
http://192.168.0.1/v1/photos |
Specific Photo | photos/:folder/:file |
http://192.168.0.1/v1/photos/:folder/:file |
Specific Photo Info | photos/:folder/:file/info |
http://192.168.0.1/v1/photos/:folder/:file/info |
Here are some sample responses from a real camera to take a look at and explain the data that is coming back to you.
{
"errCode": 200,
"errMsg": "OK",
"manufacturer": "RICOH IMAGING COMPANY, LTD.",
"model": "RICOH GR III",
"serialNo": "0029542",
"firmwareVersion": "1.11",
"macAddress": "E8:E8:B7:07:CE:90",
"channelList": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
],
"hot": false,
"battery": 100,
"operationModeList": [
"capture"
],
"stillFormatList": [
"jpeg",
"dng",
"rawdng"
],
"storages": [
{
"name": "in",
"equipped": true,
"available": false,
"writable": false,
"format": "jpeg",
"remain": 0,
"recordableTime": 0,
"numOfPhotos": 0,
"numOfMovies": 0
},
{
"name": "sd1",
"equipped": true,
"available": true,
"writable": true,
"format": "jpeg",
"remain": 4161,
"recordableTime": 5854,
"numOfPhotos": 0,
"numOfMovies": 0
}
],
"datetime": "2019-06-22T07:24:19",
"operationMode": "other",
"geoTagging": "off",
"gpsInfo": "",
"bdName": "GR_0980D2",
"bleEnableCondition": "disable",
"channel": 6,
"ssid": "GR_07CE90",
"key": "10028121",
"powerOffTransfer": "off",
"stillFormat": "jpeg",
"focusSettingList": [
"manual",
"snap",
"inf",
"spot",
"multiauto",
"pinpoint",
"tracking",
"continuous"
],
"focused": false,
"focusEffectiveArea": [
68,
64
],
"focusMode": "mf",
"focusSetting": "snap",
"stillSizeList": [
"L3",
"M3",
"S3",
"XS3"
],
"movieSizeList": [
"FHD24p",
"FHD30p",
"FHD60p"
],
"captureModeList": [
"still",
"movie"
],
"shootModeList": [
"single",
"self2s",
"self10s",
"continuous",
"interval",
"intervalSelf2s",
"intervalSelf10s",
"intervalComp",
"intervalCompSelf2s",
"intervalCompSelf10s",
"multiExp",
"multiExpSelf2s",
"multiExpSelf10s",
"bracket",
"bracketSelf2s",
"bracketSelf10s"
],
"exposureModeList": [
"U2"
],
"meteringModeList": [
"multi",
"center",
"spot",
"highlight"
],
"WBModeList": [
"auto",
"multiAuto",
"daylight",
"shade",
"cloud",
"daylightFluorescent",
"dayWhiteFluorescent",
"coolWhiteFluorescent",
"warmWhiteFluorescent",
"tungsten",
"cte",
"colorTemp1",
"manual1"
],
"effectList": [
"off",
"col_vivid",
"efc_monochrome",
"efc_softMonochrome",
"efc_hardMonochrome",
"efc_highContrast",
"efc_posiFilm",
"efc_bleachBypass",
"efc_retro",
"efc_HDRTone",
"col_custom1",
"col_custom2"
],
"resoList": [
"720x480",
"1080x720"
],
"capturing": false,
"stateStill": "idle",
"stateMovie": "idle",
"countDown": "idle",
"shotsTotal": 1,
"shotsCurrent": 1,
"avList": [
"2.8",
"3.2",
"3.5",
"4.0",
"4.5",
"5.0",
"5.6",
"6.3",
"7.1",
"8.0",
"9.0",
"10",
"11",
"13",
"14",
"16"
],
"tvList": [
"1.2500",
"1.2000",
"1.1600",
"1.1250",
"1.1000",
"1.800",
"1.640",
"1.500",
"1.400",
"1.320",
"1.250",
"1.200",
"1.160",
"1.125",
"1.100",
"1.80",
"1.60",
"1.50",
"1.40",
"1.30",
"1.25",
"1.20",
"1.15",
"1.13",
"1.10",
"1.8",
"1.6",
"1.5",
"1.4",
"3.10",
"4.10",
"5.10",
"6.10",
"8.10",
"1.1",
"13.10",
"16.10",
"2.1",
"25.10",
"3.1",
"4.1",
"5.1",
"6.1",
"8.1",
"10.1",
"13.1",
"15.1",
"20.1",
"25.1",
"30.1"
],
"svList": [
"100",
"125",
"160",
"200",
"250",
"320",
"400",
"500",
"640",
"800",
"1000",
"1250",
"1600",
"2000",
"2500",
"3200",
"4000",
"5000",
"6400",
"8000",
"10000",
"12800",
"16000",
"20000",
"25600",
"32000",
"40000",
"51200",
"64000",
"80000",
"102400"
],
"xvList": [],
"stillSize": "L3",
"movieSize": "FHD60p",
"captureMode": "still",
"shootMode": "single",
"onePushBracket": false,
"WBMode": "multiAuto",
"exposureMode": "U2",
"meteringMode": "highlight",
"av": "4.0",
"tv": "1.125",
"sv": "1250",
"xv": "0.0",
"effect": "efc_monochrome",
"liveState": "idle"
}
{
"errCode": 200,
"errMsg": "OK",
"dirs": [
{
"name": "100RICOH",
"files": [
"R0000140.JPG",
"R0000141.JPG"
]
}
]
}
This is the endpoint that will give you the actual photo data to transfer to your device, you can optionally pass in a size
parameter to resize the image.
Something important to note here if you pass in a value for the size
parameter the image will come back without orientation data so you may have to make multiple calls to figure out the original orientation in order to rotate it correctly.
Query Parameters
Name | Values | Notes |
---|---|---|
size |
thumb , view
|
This lets you request a smaller image say if you're building a gallery view for something so you're not transferring all of the data at once. |
{
"errCode": 200,
"errMsg": "OK",
"cameraModel": "RICOH GR III",
"dir": "100RICOH",
"file": "R0000142.DNG",
"size": 33330408,
"datetime": "2019-06-22T08:22:23",
"orientation": 1,
"aspectRatio": "3:2",
"av": "4.0",
"tv": "1.125",
"sv": "6400",
"xv": "0.0",
"gpsInfo": ""
}
Note: the orientation field here didn't seem to clearly match the Apple interpretation of orientation so I had to remap it in order to get correct rotation of images/thumbnails. You can find a mapping here.