RTSP / RTP data streaming

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

RTSP / RTP data streaming

Trond Kortner

Hello there,

I am using the lwIP stack without any OS on a Xilinx FPGA based platform with an enbedded PPC405 processor.
I want to implement an audio/ video streamer server in an echo sounder system based on the RTSP/ RTP protocols.

My development has stoped on a problem that I think has to do with the lwIP TCP protocol not handling persistent TCP connections.

I am using the media player QuickTime (have also tried RealPlayer and Windows Media Player) to initiate the RTP streaming using RTSP to start it.
The RTSP commands for all 3 media players assumes the server support consistent TCP connections. This means that my RTSP application gets the first RTSP command DESCRIBE, which I REPLY to, then the SETUP command is issued, and then the lwip TCP part just issue an ACK and disconnects and does not  pass the data to my application!

Is there any way lwIP can be configured to handle persistent TCP connection? Or does it not support it at all?

With Regards,
Trond Kortner
R&D Engineer
Hydroacoustics
Kongsberg Maritime AS
Horten


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: RTSP / RTP data streaming

Kieran Mansley
On Tue, 2006-01-10 at 08:56 +0100, Trond Kortner wrote:
> Is there any way lwIP can be configured to handle persistent TCP
> connection? Or does it not support it at all?

I'm not sure what you mean by persistent TCP connections.  Connections
in TCP should remain open until their are explicitly closed by the user
or reset by the other end, unless the user has set a timeout (e.g.
SO_KEEPALIVE).

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: RTSP / RTP data streaming

Trond Kortner

By persistent TCP I mean that the connection is kept open until closed by the user, and not closed between each data exchange (which the realy old and / or simple versions of TCP did).

The dump below shows what is happening when I use the QuickTime media player to start a RTP transfer by means of the RTSP protocol:

My application receive a DESCRIBE from the media player via the lwIP stack, I respond with a REPLY. Then the media player issues a SETUP, but the lwIP stack does not pass this data through to my application, it just returns a TCP ACK on its own and then times out.



With Regards,
Trond Kortner
R&D Engineer
Hydroacoustics
Kongsberg Maritime AS
Horten




Kieran Mansley <[hidden email]>
Sent by: lwip-users-bounces+trond.kortner=[hidden email]

10.01.2006 10:02

Please respond to
Mailing list for lwIP users <[hidden email]>

To
Mailing list for lwIP users <[hidden email]>
cc
Subject
Re: [lwip-users] RTSP / RTP data streaming





On Tue, 2006-01-10 at 08:56 +0100, Trond Kortner wrote:
> Is there any way lwIP can be configured to handle persistent TCP
> connection? Or does it not support it at all?

I'm not sure what you mean by persistent TCP connections.  Connections
in TCP should remain open until their are explicitly closed by the user
or reset by the other end, unless the user has set a timeout (e.g.
SO_KEEPALIVE).

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply | Threaded
Open this post in threaded view
|

Re: RTSP / RTP data streaming

Sathya Thammanur
In reply to this post by Trond Kortner
Hi Trond,

Have you taken a look at Xilinx AppNote 663? This explains the usage of lwIP without an OS on PPC405 processor. RTSP seems to be just a payload for TCP and hence it should just work without any issues. See if this example design helps.

Sathya

On 1/9/06, Trond Kortner <[hidden email]> wrote:

Hello there,

I am using the lwIP stack without any OS on a Xilinx FPGA based platform with an enbedded PPC405 processor.
I want to implement an audio/ video streamer server in an echo sounder system based on the RTSP/ RTP protocols.

My development has stoped on a problem that I think has to do with the lwIP TCP protocol not handling persistent TCP connections.

I am using the media player QuickTime (have also tried RealPlayer and Windows Media Player) to initiate the RTP streaming using RTSP to start it.
The RTSP commands for all 3 media players assumes the server support consistent TCP connections. This means that my RTSP application gets the first RTSP command DESCRIBE, which I REPLY to, then the SETUP command is issued, and then the lwip TCP part just issue an ACK and disconnects and does not  pass the data to my application!

Is there any way lwIP can be configured to handle persistent TCP connection? Or does it not support it at all?

With Regards,
Trond Kortner
R&D Engineer
Hydroacoustics
Kongsberg Maritime AS
Horten


_______________________________________________
lwip-users mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.nongnu.org/mailman/listinfo/lwip-users" target="_blank"> http://lists.nongnu.org/mailman/listinfo/lwip-users



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: RTSP / RTP data streaming

kyle treleaven
In reply to this post by Trond Kortner
Hi Trond,

I've been perusing the lwip forums trying to fix some bugs I've been
having with my project implementation.  I'm also using lwIP, no-OS on
a ppc405 in xilinx fpga (v4, fx12 -- don't know what you're using).
As a student at Pitt I have to complete a senior design project, and a
big part of my project involves streaming video over the network (for
simplicity, we're trying to do motion-JPEG).  Did you write your
RTSP/RTP protocol or are you porting something already in existence?
Any of it free?

Thanks,
Kyle


On 1/10/06, Trond Kortner <[hidden email]> wrote:

>
> Hello there,
>
> I am using the lwIP stack without any OS on a Xilinx FPGA based platform
> with an enbedded PPC405 processor.
> I want to implement an audio/ video streamer server in an echo sounder
> system based on the RTSP/ RTP protocols.
>
> My development has stoped on a problem that I think has to do with the lwIP
> TCP protocol not handling persistent TCP connections.
>
> I am using the media player QuickTime (have also tried RealPlayer and
> Windows Media Player) to initiate the RTP streaming using RTSP to start it.
> The RTSP commands for all 3 media players assumes the server support
> consistent TCP connections. This means that my RTSP application gets the
> first RTSP command DESCRIBE, which I REPLY to, then the SETUP command is
> issued, and then the lwip TCP part just issue an ACK and disconnects and
> does not  pass the data to my application!
>
> Is there any way lwIP can be configured to handle persistent TCP connection?
> Or does it not support it at all?
>
> With Regards,
> Trond Kortner
> R&D Engineer
> Hydroacoustics
> Kongsberg Maritime AS
> Horten
>
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: RTSP / RTP data streaming

Trond Kortner
In reply to this post by Kieran Mansley

By persistent TCP I mean that the connection is kept open until closed by the user, and not closed between each data exchange (which the realy old and / or simple versions of TCP did).

The dump below shows what is happening when I use the QuickTime media player to start a RTP transfer by means of the RTSP protocol:

My application receive a DESCRIBE from the media player via the lwIP stack, I respond with a REPLY. Then the media player issues a SETUP, but the lwIP stack does not pass this data through to my application, it just returns a TCP ACK on its own and then times out.


EtheReal Dump:

No.     Time        Source                Destination           Protocol Info
      1 0.000000    10.1.1.1              Broadcast             ARP      Who has 10.1.1.70?  Tell 10.1.1.1

Frame 1 (42 bytes on wire, 42 bytes captured)
Ethernet II, Src: 10.1.1.1 (00:10:a7:17:1d:22), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Address Resolution Protocol (request)

No.     Time        Source                Destination           Protocol Info
      2 0.000334    10.1.1.70             10.1.1.1              ARP      10.1.1.70 is at 00:90:72:00:00:00

Frame 2 (64 bytes on wire, 64 bytes captured)
Ethernet II, Src: 10.1.1.70 (00:90:72:00:00:00), Dst: 10.1.1.1 (00:10:a7:17:1d:22)
Address Resolution Protocol (reply)

No.     Time        Source                Destination           Protocol Info
      3 0.000194    10.1.1.1              10.1.1.70             TCP      1870 > 554 [SYN] Seq=0 Ack=0 Win=64512 Len=0 MSS=1460

Frame 3 (62 bytes on wire, 62 bytes captured)
Ethernet II, Src: 10.1.1.1 (00:10:a7:17:1d:22), Dst: 10.1.1.70 (00:90:72:00:00:00)
Internet Protocol, Src: 10.1.1.1 (10.1.1.1), Dst: 10.1.1.70 (10.1.1.70)
Transmission Control Protocol, Src Port: 1870 (1870), Dst Port: 554 (554), Seq: 0, Ack: 0, Len: 0

No.     Time        Source                Destination           Protocol Info
      4 0.000485    10.1.1.70             10.1.1.1              TCP      554 > 1870 [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1460

Frame 4 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: 10.1.1.70 (00:90:72:00:00:00), Dst: 10.1.1.1 (00:10:a7:17:1d:22)
Internet Protocol, Src: 10.1.1.70 (10.1.1.70), Dst: 10.1.1.1 (10.1.1.1)
Transmission Control Protocol, Src Port: 554 (554), Dst Port: 1870 (1870), Seq: 0, Ack: 1, Len: 0

No.     Time        Source                Destination           Protocol Info
      5 0.000144    10.1.1.1              10.1.1.70             TCP      1870 > 554 [ACK] Seq=1 Ack=1 Win=64512 Len=0

Frame 5 (54 bytes on wire, 54 bytes captured)
Ethernet II, Src: 10.1.1.1 (00:10:a7:17:1d:22), Dst: 10.1.1.70 (00:90:72:00:00:00)
Internet Protocol, Src: 10.1.1.1 (10.1.1.1), Dst: 10.1.1.70 (10.1.1.70)
Transmission Control Protocol, Src Port: 1870 (1870), Dst Port: 554 (554), Seq: 1, Ack: 1, Len: 0

No.     Time        Source                Destination           Protocol Info
      6 0.029362    10.1.1.1              10.1.1.70             RTSP     DESCRIBE rtsp://10.1.1.70/TKOvideo RTSP/1.0

Frame 6 (242 bytes on wire, 242 bytes captured)
Ethernet II, Src: 10.1.1.1 (00:10:a7:17:1d:22), Dst: 10.1.1.70 (00:90:72:00:00:00)
Internet Protocol, Src: 10.1.1.1 (10.1.1.1), Dst: 10.1.1.70 (10.1.1.70)
Transmission Control Protocol, Src Port: 1870 (1870), Dst Port: 554 (554), Seq: 1, Ack: 1, Len: 188
Real Time Streaming Protocol

No.     Time        Source                Destination           Protocol Info
      7 0.190683    10.1.1.70             10.1.1.1              RTSP/SDP Reply: RTSP/1.0 200 OK, with session description

Frame 7 (333 bytes on wire, 333 bytes captured)
Ethernet II, Src: 10.1.1.70 (00:90:72:00:00:00), Dst: 10.1.1.1 (00:10:a7:17:1d:22)
Internet Protocol, Src: 10.1.1.70 (10.1.1.70), Dst: 10.1.1.1 (10.1.1.1)
Transmission Control Protocol, Src Port: 554 (554), Dst Port: 1870 (1870), Seq: 1, Ack: 189, Len: 279
Real Time Streaming Protocol
Session Description Protocol

No.     Time        Source                Destination           Protocol Info
      8 0.088487    10.1.1.1              10.1.1.70             RTSP     SETUP rtsp://10.1.1.70/video RTSP/1.0

Frame 8 (336 bytes on wire, 336 bytes captured)
Ethernet II, Src: 10.1.1.1 (00:10:a7:17:1d:22), Dst: 10.1.1.70 (00:90:72:00:00:00)
Internet Protocol, Src: 10.1.1.1 (10.1.1.1), Dst: 10.1.1.70 (10.1.1.70)
Transmission Control Protocol, Src Port: 1870 (1870), Dst Port: 554 (554), Seq: 189, Ack: 280, Len: 282
Real Time Streaming Protocol

No.     Time        Source                Destination           Protocol Info
      9 0.161666    10.1.1.70             10.1.1.1              TCP      554 > 1870 [ACK] Seq=280 Ack=471 Win=16384 Len=0

Frame 9 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: 10.1.1.70 (00:90:72:00:00:00), Dst: 10.1.1.1 (00:10:a7:17:1d:22)
Internet Protocol, Src: 10.1.1.70 (10.1.1.70), Dst: 10.1.1.1 (10.1.1.1)
Transmission Control Protocol, Src Port: 554 (554), Dst Port: 1870 (1870), Seq: 280, Ack: 471, Len: 0


With Regards,
Trond Kortner
R&D Engineer
Hydroacoustics
Kongsberg Maritime AS
Horten




Kieran Mansley <[hidden email]>
Sent by: lwip-users-bounces+trond.kortner=[hidden email]

10.01.2006 10:02

Please respond to
Mailing list for lwIP users <[hidden email]>

To
Mailing list for lwIP users <[hidden email]>
cc
Subject
Re: [lwip-users] RTSP / RTP data streaming





On Tue, 2006-01-10 at 08:56 +0100, Trond Kortner wrote:
> Is there any way lwIP can be configured to handle persistent TCP
> connection? Or does it not support it at all?

I'm not sure what you mean by persistent TCP connections.  Connections
in TCP should remain open until their are explicitly closed by the user
or reset by the other end, unless the user has set a timeout (e.g.
SO_KEEPALIVE).

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: RTSP / RTP data streaming

Trond Kortner
In reply to this post by Sathya Thammanur

Hi Sathya,

I am using the Xilinx AppNote 663. The problem is that the TCP connection closes down after just one exchange of RTSP commands (DESCRIBE and RELPY), which makes the MediaPlayer disconnect.

With Regards,
Trond Kortner
R&D Engineer
Hydroacoustics
Kongsberg Maritime AS
Horten




Sathya Thammanur <[hidden email]>
Sent by: lwip-users-bounces+trond.kortner=[hidden email]

10.01.2006 17:48

Please respond to
Mailing list for lwIP users <[hidden email]>

To
Mailing list for lwIP users <[hidden email]>
cc
Subject
Re: [lwip-users] RTSP / RTP data streaming





Hi Trond,

Have you taken a look at Xilinx AppNote 663? This explains the usage of lwIP without an OS on PPC405 processor. RTSP seems to be just a payload for TCP and hence it should just work without any issues. See if this example design helps.

Sathya


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: RTSP / RTP data streaming

Trond Kortner
In reply to this post by kyle treleaven

Hi Kyle,

I am using the Vitex-II Pro XC2VP20. I am writing my own RTSP protocol (kind of an successive approximation method). I have not got very far yet, and plan to write my own RTP protocol to. My goal is to implement an echo sounder as a web and media server for control and echo data transfer.

With Regards,
Trond Kortner
R&D Engineer
Hydroacoustics
Kongsberg Maritime AS
Horten




kyle treleaven <[hidden email]>
Sent by: lwip-users-bounces+trond.kortner=[hidden email]

10.01.2006 23:19

Please respond to
Mailing list for lwIP users <[hidden email]>

To
Mailing list for lwIP users <[hidden email]>
cc
Subject
Re: [lwip-users] RTSP / RTP data streaming





Hi Trond,

I've been perusing the lwip forums trying to fix some bugs I've been
having with my project implementation.  I'm also using lwIP, no-OS on
a ppc405 in xilinx fpga (v4, fx12 -- don't know what you're using).
As a student at Pitt I have to complete a senior design project, and a
big part of my project involves streaming video over the network (for
simplicity, we're trying to do motion-JPEG).  Did you write your
RTSP/RTP protocol or are you porting something already in existence?
Any of it free?

Thanks,
Kyle


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: RTSP / RTP data streaming

Kieran Mansley
In reply to this post by Trond Kortner
On Wed, 2006-01-11 at 09:23 +0100, Trond Kortner wrote:
>
> By persistent TCP I mean that the connection is kept open until closed
> by the user, and not closed between each data exchange (which the
> realy old and / or simple versions of TCP did).

Interesting - do you have a reference for this?  I'd be interested in
reading about it.  I wasn't aware that TCP ever had that property.

> The dump below shows what is happening when I use the QuickTime media
> player to start a RTP transfer by means of the RTSP protocol:
> My application receive a DESCRIBE from the media player via the lwIP
> stack, I respond with a REPLY. Then the media player issues a SETUP,
> but the lwIP stack does not pass this data through to my application,
> it just returns a TCP ACK on its own and then times out.

That sounds like a different problem to the persistent connection one.
>From the trace you give the connection does not appear to be closed
after the transfer.  As to why you're not getting data passed through to
the application, I'm not sure.  Which API are you using?  If you can
provide a code snippet of your receive path someone who is more familiar
with the APIs than I am may be able to help.

Kieran




_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: RTSP / RTP data streaming

Trond Kortner

Hi Kieran

The non persistant TCP / IP stack that I have used earlier is one from Xilinx. It is called Xilnet, it closes the connection between each data exchange and has no timer functionality. It works just fine for simple web server applications.

My problem is solved, I messed up a parameter in my transmit part of the code that made my receive application skip new input, my fault (not the first - and sure not the last).

Thanks for the effort anyway.

With Regards,
Trond Kortner
R&D Engineer
Hydroacoustics
Kongsberg Maritime AS
Horten




Kieran Mansley <[hidden email]>
Sent by: lwip-users-bounces+trond.kortner=[hidden email]

11.01.2006 10:20

Please respond to
Mailing list for lwIP users <[hidden email]>

To
Mailing list for lwIP users <[hidden email]>
cc
Subject
Re: [lwip-users] RTSP / RTP data streaming





On Wed, 2006-01-11 at 09:23 +0100, Trond Kortner wrote:
>
> By persistent TCP I mean that the connection is kept open until closed
> by the user, and not closed between each data exchange (which the
> realy old and / or simple versions of TCP did).

Interesting - do you have a reference for this?  I'd be interested in
reading about it.  I wasn't aware that TCP ever had that property.

> The dump below shows what is happening when I use the QuickTime media
> player to start a RTP transfer by means of the RTSP protocol:
> My application receive a DESCRIBE from the media player via the lwIP
> stack, I respond with a REPLY. Then the media player issues a SETUP,
> but the lwIP stack does not pass this data through to my application,
> it just returns a TCP ACK on its own and then times out.

That sounds like a different problem to the persistent connection one.
>From the trace you give the connection does not appear to be closed
after the transfer.  As to why you're not getting data passed through to
the application, I'm not sure.  Which API are you using?  If you can
provide a code snippet of your receive path someone who is more familiar
with the APIs than I am may be able to help.

Kieran




_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users