camerartspdigest-authenticationsdp

RTSP: Not receiving SDP from the server after sending "describe" request


I have a Bosch camera(server) and my end goal is to get the video content description via metadata from it. I am using LwIP Raw API's(1.4.0) for this purpose. At present, I am trying to authenticate with the camera and receive the SDP so I can setup the session. However, after I authenticate by resending the describe request with the digest, I don't get any response from the server and after a while the server resets the connection. Below is the sequence of operations I perform for authentication.

Step 1: Client to Server (mcu sends 1st describe request)

DESCRIBE rtsp://service:PRBUWPCs7*f40j@192.168.1.129/?enablevideo=0&vcd=1 RTSP/1.0
CSeq: 1
User-Agent: rtsp://service:PRBUWPCs7*f40j@192.168.1.129(LIVE555 Streaming Media v2018.02.28)
Accept: application/sdp

Step 2: Server to Client (server responds with nonce for authentication, rx via callback)

Payload:RTSP/1.0 401 Unauthorized
CSeq: 1
WWW-Authenticate: Digest realm="Please log in with a valid 
username",nonce="7bd251bb670e45966c415838679f778f",opaque="",stale=FALSE,algorithm=MD5

Step 3: Client to Server (mcu computes the response and resends the describe command )

DESCRIBE rtsp://service:PRBUWPCs7*f40j@192.168.1.129/?enablevideo=0&vcd=1 RTSP/1.0
CSeq: 2
Authorization: Digest username="service", realm="Please log in with a valid username", nonce="7bd251bb670e45966c415838679f778f", uri="rtsp://service:PRBUWPCs7*f40j@192.168.1.129/?enablevideo=0&vcd=1", response="4c87974de2e3ecc3d534beddef9e6962"
User-Agent: rtsp://service:PRBUWPCs7*f40j@192.168.1.129(LIVE555 Streaming Media v2018.02.28)
Accept: application/sdp

Step 4: mcu waiting for SDP, but instead receives pbuf *p as null in the receive call back function.

After a few seconds, also receives a tcp err callback with err code ERR_RST i.e. connection reset.

Could anyone please clarify if my above procedure is correct and if so, any insights on what could likely cause the camera not to respond with the SDP description leading to connection reset and receiving pbuff as NULL in the receive callback? 


Solution

  • Fixed it. There was an issue with md5 module.