I'm implementing some functionality using the Ricoh Theta V device. It is the most basic functionality for the device that I can think of but using the api is so inconsistent, and the device keeps going off after a few minutes.
I just want to take a picture, save to the Android device. That's it.
Here's what I'm doing:
- Connect to the Theta Device over WiFi (Direct Mode)
- Use HttpAsyncClient to make a post request to the device (/osc/commands/execute)
Json for Post
{
"name": "camera.setOptions",
"parameters": {
"options": {
"fileFormat": {
"type": "jpeg",
"width": 2048,
"height": 1024
}
}
}
}
- At the point above it times out or I get this message :
Error Message
{"error":{"code":"invalidParameterValue","message":"Any input parameter or option name is recognized, but its value is invalid."},"name":"camera.setOptions","state":"error"}
- When I do call take picture command directly it sometimes works, but I need the image to be less than 2048x2048 so that I can display it using panoramaGL.
I've tried the code from the "plugin" by importing the sample app as a library and using the HttpConnector to execute commands but the same problem occurs. It works once every 10-20 times, and then would fail the rest of the day after that.
Does anyone have any other resources, or a comprehensive overview on using this device in an Android application. Any resources besides the official api overview because that's not helping at all.
I went through the forum already and no one is talking about the connection timeout issues, so I don't know if the device is faulty, or if this is normal behaviour that everyone has just accepted.
Edit 1: I also have a post on the Forums, and have posted two new updates. The replies still has to be approved before it's visible to public but it can be tracked here.
In the v2.1 sample in the SDK there's a method called forceConnectToWifi(). I copied this over and called it in the onCreate of my capture activity and it made all the timeout problems go away.
You can see the full thread where I solved it here.