Open willagner opened 7 years ago
Hi, this RTSP framework default imp doesn't support " Digest access authentication" that your camera server need in order to allow you communication establishment. but anyway, RtspURLConnection is an URLConnection and so "Authorization:" could be add the request header. I'll try to have a look on the framework (If I can remember everything :) ) asap and send you a "how to " example. Regards.
Thanks for your attention.
I try use this: String userPassword = username + ":" + password; Encoder encoder = Base64.getEncoder(); String encodeToString = encoder.encodeToString(userPassword.getBytes()); urlc.setRequestProperty("Authorization", "Digest " + encodeToString);
But it did not work
I have this program:
But he return this error: RTSP/1.0 401 Unauthorized
This is the log application: RtspURLConnection.computeHostAndPort() /////// PORT = 554 false ######## SEND TO 192.168.25.200:554 OPTIONS RTSP/1.0 CSeq: 1
########
Client.sendRequest() IS CONNECTION ALIVE = true Client.sendRequest() REQ =
OPTIONS * RTSP/1.0 CSeq: 1
[CONNECTION.DUMPING] .... RECEIVEING: TSP/1.0 401 Unauthorized CSeq: 1 WWW-Authenticate: Digest realm="Login to 9JIE4900821BD", nonce="70b360d7ed176aed f820b90dab8595d8"
[CONNECTION.DUMPING] .... DONE: Client.sendRequest() T-OUT =false Server.parse() RTSP/1.0 401 Unauthorized CSeq: 1 WWW-Authenticate: Digest realm="Login to 9JIE4900821BD", nonce="70b360d7ed176aed f820b90dab8595d8"
RTSP/1.0 401 Unauthorized CSeq: 1 WWW-Authenticate: Digest realm="Login to 9JIE4900821BD", nonce="70b360d7ed176aed f820b90dab8595d8"
How i can solve this?