Android ONVIF - Internal Server Error when trying to retrieve profiles from ONVIF IP camera
I'm currently building an Android Things application that communicates with an ONVIF IP camera following this youtube tutorial
I can talk to the camera and I can get services and device information but when I try to retrieve profiles, it responds with D/RESPONSE: Response{protocol=http/1.1, code=500, message=Internal Server Error
What would cause this response?
onCreate
currentDevice = OnvifDevice("192.168.1.5","admin","password")
currentDevice.listener = this
currentDevice.getServices()
Log.d("REQUEST", "Get services");
requestPerformed
override fun requestPerformed(response: OnvifResponse) {
//method called when response is received from camera
Log.d("RESPONSE", response.parsingUIMessage);
if (response.request.type == OnvifRequest.Type.GetServices) {
Log.d("REQUEST", "Get device information");
currentDevice.getDeviceInformation()
}
else if (response.request.type == OnvifRequest.Type.GetDeviceInformation) {
Log.d("REQUEST", "Get profiles");
currentDevice.getProfiles()
}
else if (response.request.type == OnvifRequest.Type.GetProfiles) {
Log.d("REQUEST", "Get stream URI");
currentDevice.mediaProfiles.firstOrNull()?.let {
currentDevice.getStreamURI(it)
}
}
else if (response.request.type == OnvifRequest.Type.GetStreamURI) {
Log.d("REQUEST", "Get get video stream");
currentDevice.rtspURI?.let { uri ->
val surfaceView = findViewById<SurfaceView>(R.id.surfaceView)
vlcVideoLibrary = VlcVideoLibrary(this, this, surfaceView)
vlcVideoLibrary?.play(uri)
}
}
}
android kotlin android-things onvif
|
show 2 more comments
I'm currently building an Android Things application that communicates with an ONVIF IP camera following this youtube tutorial
I can talk to the camera and I can get services and device information but when I try to retrieve profiles, it responds with D/RESPONSE: Response{protocol=http/1.1, code=500, message=Internal Server Error
What would cause this response?
onCreate
currentDevice = OnvifDevice("192.168.1.5","admin","password")
currentDevice.listener = this
currentDevice.getServices()
Log.d("REQUEST", "Get services");
requestPerformed
override fun requestPerformed(response: OnvifResponse) {
//method called when response is received from camera
Log.d("RESPONSE", response.parsingUIMessage);
if (response.request.type == OnvifRequest.Type.GetServices) {
Log.d("REQUEST", "Get device information");
currentDevice.getDeviceInformation()
}
else if (response.request.type == OnvifRequest.Type.GetDeviceInformation) {
Log.d("REQUEST", "Get profiles");
currentDevice.getProfiles()
}
else if (response.request.type == OnvifRequest.Type.GetProfiles) {
Log.d("REQUEST", "Get stream URI");
currentDevice.mediaProfiles.firstOrNull()?.let {
currentDevice.getStreamURI(it)
}
}
else if (response.request.type == OnvifRequest.Type.GetStreamURI) {
Log.d("REQUEST", "Get get video stream");
currentDevice.rtspURI?.let { uri ->
val surfaceView = findViewById<SurfaceView>(R.id.surfaceView)
vlcVideoLibrary = VlcVideoLibrary(this, this, surfaceView)
vlcVideoLibrary?.play(uri)
}
}
}
android kotlin android-things onvif
This is internal error in your server API not client side
– sasikumar
Nov 13 '18 at 12:05
Okay, so the error is in the device running my app? Not the IP camera?
– Paul Alexander
Nov 13 '18 at 12:17
i think ip camera .did you pass correct values for ip camera?
– sasikumar
Nov 13 '18 at 12:19
Yeah correct IP, username and password. I have tested this by inputting an incorrect password where I received 400 Bad Request and no camera device information
– Paul Alexander
Nov 13 '18 at 12:21
1
sometimes, the problem isn't with the code you wrote, but with the device/camera you're using... I had a problem with one of my camera... It wasn't returning a valid response when asked for its status. here I would suggest you to look for any camera software update. If this still doesn't work, I would suggest to try with another device as @sasikumar said.
– LoukMo
Nov 14 '18 at 16:41
|
show 2 more comments
I'm currently building an Android Things application that communicates with an ONVIF IP camera following this youtube tutorial
I can talk to the camera and I can get services and device information but when I try to retrieve profiles, it responds with D/RESPONSE: Response{protocol=http/1.1, code=500, message=Internal Server Error
What would cause this response?
onCreate
currentDevice = OnvifDevice("192.168.1.5","admin","password")
currentDevice.listener = this
currentDevice.getServices()
Log.d("REQUEST", "Get services");
requestPerformed
override fun requestPerformed(response: OnvifResponse) {
//method called when response is received from camera
Log.d("RESPONSE", response.parsingUIMessage);
if (response.request.type == OnvifRequest.Type.GetServices) {
Log.d("REQUEST", "Get device information");
currentDevice.getDeviceInformation()
}
else if (response.request.type == OnvifRequest.Type.GetDeviceInformation) {
Log.d("REQUEST", "Get profiles");
currentDevice.getProfiles()
}
else if (response.request.type == OnvifRequest.Type.GetProfiles) {
Log.d("REQUEST", "Get stream URI");
currentDevice.mediaProfiles.firstOrNull()?.let {
currentDevice.getStreamURI(it)
}
}
else if (response.request.type == OnvifRequest.Type.GetStreamURI) {
Log.d("REQUEST", "Get get video stream");
currentDevice.rtspURI?.let { uri ->
val surfaceView = findViewById<SurfaceView>(R.id.surfaceView)
vlcVideoLibrary = VlcVideoLibrary(this, this, surfaceView)
vlcVideoLibrary?.play(uri)
}
}
}
android kotlin android-things onvif
I'm currently building an Android Things application that communicates with an ONVIF IP camera following this youtube tutorial
I can talk to the camera and I can get services and device information but when I try to retrieve profiles, it responds with D/RESPONSE: Response{protocol=http/1.1, code=500, message=Internal Server Error
What would cause this response?
onCreate
currentDevice = OnvifDevice("192.168.1.5","admin","password")
currentDevice.listener = this
currentDevice.getServices()
Log.d("REQUEST", "Get services");
requestPerformed
override fun requestPerformed(response: OnvifResponse) {
//method called when response is received from camera
Log.d("RESPONSE", response.parsingUIMessage);
if (response.request.type == OnvifRequest.Type.GetServices) {
Log.d("REQUEST", "Get device information");
currentDevice.getDeviceInformation()
}
else if (response.request.type == OnvifRequest.Type.GetDeviceInformation) {
Log.d("REQUEST", "Get profiles");
currentDevice.getProfiles()
}
else if (response.request.type == OnvifRequest.Type.GetProfiles) {
Log.d("REQUEST", "Get stream URI");
currentDevice.mediaProfiles.firstOrNull()?.let {
currentDevice.getStreamURI(it)
}
}
else if (response.request.type == OnvifRequest.Type.GetStreamURI) {
Log.d("REQUEST", "Get get video stream");
currentDevice.rtspURI?.let { uri ->
val surfaceView = findViewById<SurfaceView>(R.id.surfaceView)
vlcVideoLibrary = VlcVideoLibrary(this, this, surfaceView)
vlcVideoLibrary?.play(uri)
}
}
}
android kotlin android-things onvif
android kotlin android-things onvif
asked Nov 13 '18 at 11:58
Paul AlexanderPaul Alexander
1,17621942
1,17621942
This is internal error in your server API not client side
– sasikumar
Nov 13 '18 at 12:05
Okay, so the error is in the device running my app? Not the IP camera?
– Paul Alexander
Nov 13 '18 at 12:17
i think ip camera .did you pass correct values for ip camera?
– sasikumar
Nov 13 '18 at 12:19
Yeah correct IP, username and password. I have tested this by inputting an incorrect password where I received 400 Bad Request and no camera device information
– Paul Alexander
Nov 13 '18 at 12:21
1
sometimes, the problem isn't with the code you wrote, but with the device/camera you're using... I had a problem with one of my camera... It wasn't returning a valid response when asked for its status. here I would suggest you to look for any camera software update. If this still doesn't work, I would suggest to try with another device as @sasikumar said.
– LoukMo
Nov 14 '18 at 16:41
|
show 2 more comments
This is internal error in your server API not client side
– sasikumar
Nov 13 '18 at 12:05
Okay, so the error is in the device running my app? Not the IP camera?
– Paul Alexander
Nov 13 '18 at 12:17
i think ip camera .did you pass correct values for ip camera?
– sasikumar
Nov 13 '18 at 12:19
Yeah correct IP, username and password. I have tested this by inputting an incorrect password where I received 400 Bad Request and no camera device information
– Paul Alexander
Nov 13 '18 at 12:21
1
sometimes, the problem isn't with the code you wrote, but with the device/camera you're using... I had a problem with one of my camera... It wasn't returning a valid response when asked for its status. here I would suggest you to look for any camera software update. If this still doesn't work, I would suggest to try with another device as @sasikumar said.
– LoukMo
Nov 14 '18 at 16:41
This is internal error in your server API not client side
– sasikumar
Nov 13 '18 at 12:05
This is internal error in your server API not client side
– sasikumar
Nov 13 '18 at 12:05
Okay, so the error is in the device running my app? Not the IP camera?
– Paul Alexander
Nov 13 '18 at 12:17
Okay, so the error is in the device running my app? Not the IP camera?
– Paul Alexander
Nov 13 '18 at 12:17
i think ip camera .did you pass correct values for ip camera?
– sasikumar
Nov 13 '18 at 12:19
i think ip camera .did you pass correct values for ip camera?
– sasikumar
Nov 13 '18 at 12:19
Yeah correct IP, username and password. I have tested this by inputting an incorrect password where I received 400 Bad Request and no camera device information
– Paul Alexander
Nov 13 '18 at 12:21
Yeah correct IP, username and password. I have tested this by inputting an incorrect password where I received 400 Bad Request and no camera device information
– Paul Alexander
Nov 13 '18 at 12:21
1
1
sometimes, the problem isn't with the code you wrote, but with the device/camera you're using... I had a problem with one of my camera... It wasn't returning a valid response when asked for its status. here I would suggest you to look for any camera software update. If this still doesn't work, I would suggest to try with another device as @sasikumar said.
– LoukMo
Nov 14 '18 at 16:41
sometimes, the problem isn't with the code you wrote, but with the device/camera you're using... I had a problem with one of my camera... It wasn't returning a valid response when asked for its status. here I would suggest you to look for any camera software update. If this still doesn't work, I would suggest to try with another device as @sasikumar said.
– LoukMo
Nov 14 '18 at 16:41
|
show 2 more comments
1 Answer
1
active
oldest
votes
Sometimes, the problem isn't with the code you wrote, but with the device/camera you're using... I had a problem with one of my camera... It wasn't returning a valid response when asked for its status. here
I would suggest you to look for any camera software update. If this still doesn't work, I would suggest to try with another device as @sasikumar said.
Thanks for your reply. I think I will try with another device of another manufacturer and see what the result is.
– Paul Alexander
Jan 4 at 12:36
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53280568%2fandroid-onvif-internal-server-error-when-trying-to-retrieve-profiles-from-onvi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sometimes, the problem isn't with the code you wrote, but with the device/camera you're using... I had a problem with one of my camera... It wasn't returning a valid response when asked for its status. here
I would suggest you to look for any camera software update. If this still doesn't work, I would suggest to try with another device as @sasikumar said.
Thanks for your reply. I think I will try with another device of another manufacturer and see what the result is.
– Paul Alexander
Jan 4 at 12:36
add a comment |
Sometimes, the problem isn't with the code you wrote, but with the device/camera you're using... I had a problem with one of my camera... It wasn't returning a valid response when asked for its status. here
I would suggest you to look for any camera software update. If this still doesn't work, I would suggest to try with another device as @sasikumar said.
Thanks for your reply. I think I will try with another device of another manufacturer and see what the result is.
– Paul Alexander
Jan 4 at 12:36
add a comment |
Sometimes, the problem isn't with the code you wrote, but with the device/camera you're using... I had a problem with one of my camera... It wasn't returning a valid response when asked for its status. here
I would suggest you to look for any camera software update. If this still doesn't work, I would suggest to try with another device as @sasikumar said.
Sometimes, the problem isn't with the code you wrote, but with the device/camera you're using... I had a problem with one of my camera... It wasn't returning a valid response when asked for its status. here
I would suggest you to look for any camera software update. If this still doesn't work, I would suggest to try with another device as @sasikumar said.
answered Nov 16 '18 at 15:26
LoukMoLoukMo
10313
10313
Thanks for your reply. I think I will try with another device of another manufacturer and see what the result is.
– Paul Alexander
Jan 4 at 12:36
add a comment |
Thanks for your reply. I think I will try with another device of another manufacturer and see what the result is.
– Paul Alexander
Jan 4 at 12:36
Thanks for your reply. I think I will try with another device of another manufacturer and see what the result is.
– Paul Alexander
Jan 4 at 12:36
Thanks for your reply. I think I will try with another device of another manufacturer and see what the result is.
– Paul Alexander
Jan 4 at 12:36
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53280568%2fandroid-onvif-internal-server-error-when-trying-to-retrieve-profiles-from-onvi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This is internal error in your server API not client side
– sasikumar
Nov 13 '18 at 12:05
Okay, so the error is in the device running my app? Not the IP camera?
– Paul Alexander
Nov 13 '18 at 12:17
i think ip camera .did you pass correct values for ip camera?
– sasikumar
Nov 13 '18 at 12:19
Yeah correct IP, username and password. I have tested this by inputting an incorrect password where I received 400 Bad Request and no camera device information
– Paul Alexander
Nov 13 '18 at 12:21
1
sometimes, the problem isn't with the code you wrote, but with the device/camera you're using... I had a problem with one of my camera... It wasn't returning a valid response when asked for its status. here I would suggest you to look for any camera software update. If this still doesn't work, I would suggest to try with another device as @sasikumar said.
– LoukMo
Nov 14 '18 at 16:41