I have coded a program for Series 60 (Nokia 6600), which uses both TCP and UDP sockets to communicate with the server. TCP is used for controling the session and UDP for transferring RTP data to the server. The program basically works fine, but there are couple of problems..
If GPRS connection breaks during the session, a new TCP connection cannot be established without rebooting the phone. Not even if I close all GPRS connections from my own program or from the connection manager. After the connection breaks, I cannot anymore connect to any server even if I close my software and use some other software (e.g. WAP browser) with other access points. Has anyone noticed similar behaviour or is there any known solutions to reset the GPRS connection totally without rebooting the phone?
If I send very small UDP packets (<100B bytes), sending bit rate drops dramatically. I know that the packet overhead increases when using smaller packets but that is not the reason. It seems that RSocket::SendTo() call takes too long to finish and thus I cannot send as much packets I would like to. What is the best way to send continuous stream of very small UDP packets as quick as possible? Currently I can send only around 10-15 packets per second, no matter how small packets I send. If I comment out the line with RSocket::SendTo() call and the following User::WaitForRequest() call, the code runs several thousand times per second. I have already tried to change the thread's priority and the socket's sending buffer size without results.
If someone has solutions to these problems or have noticed similar behaviour, please let me know..
Re: GPRS connection problems on 6600..
Could you tell me how to resolve the problem?thanks
Problem: Nokia 6600 Socket Server Problem
Desciption: In Gprs, encoding using AMR515, send a packet every 200ms, every packet less than 250 bytes.
when we send rtp packets in 100 seconds using UDP, we find there
are 6-7 senconds interval that the socket server send noting.And the server didn't receive any
packet, but the rtp packets did't lose. we can find this problem usually.
Question: How to reduce the 6-7 senconds delay?
this is the client and the sever log recoder:
1.No.+ number： packet seqence
2.Send Data From Queue: from the buffer send data
5.DoCancel: call DoCancel() function
6.every send exprired time:300ms，resend times: 0
No.608Send RTP Data: 17:5:28:500000
Send Data From Queue: 17:5:28:531250
No.609Send RTP Data: 17:5:28:671875
No.610Send RTP Data: 17:5:28:796875
RunL: 17:5:28:843750TimeOut = 400 No.608Send RTP Data: 17:5:28:50
Send Data From Queue: 17:5:28:859375
RunL: 17:5:28:890625TimeOut = 130 No.609Send RTP Data: 17:5:28:67
Send Data >From Queue: 17:5:28:921875
RunL: 17:5:28:937500TimeOut = 115 No.610Send RTP Data: 17:5:28:79
No.611Send RTP Data: 17:5:29:62500
Send Data From Queue: 17:5:29:93750
No.612Send RTP Data: 17:5:29:171875
No.613Send RTP Data: 17:5:29:234375
RunL: 17:5:29:265625TimeOut = 265 No.611Send RTP Data: 17:5:29:62
Send Data From Queue: 17:5:29:296875
RunL: 17:5:29:328125TimeOut = 130 No.612Send RTP Data: 17:5:29:17
Send Data >From Queue: 17:5:29:343750
RunL: 17:5:29:390625TimeOut = 145 No.613Send RTP Data: 17:5:29:23
No.614Send RTP Data: 17:5:29:734375
Send Data From Queue: 17:5:29:812500
No.615Send RTP Data: 17:5:29:968750
No.616Send RTP Data: 17:5:30:140625
Send Data From Queue: 17:5:30:343750
No.617Send RTP Data: 17:5:30:500000
No.618Send RTP Data: 17:5:30:656250
No.619Send RTP Data: 17:5:30:812500
Send Data From Queue: 17:5:30:984375
No.620Send RTP Data: 17:5:31:156250
No.621Send RTP Data: 17:5:31:281250
No.622Send RTP Data: 17:5:31:437500
Send Data From Queue: 17:5:31:562500
RunL: 17:5:31:609375TimeOut = 145 No.617Send RTP Data: 17:5:30:50
Send Data From Queue: 17:5:31:640625
No.623Send RTP Data: 17:5:31:765625
No.624Send RTP Data: 17:5:31:906250
No.625Send RTP Data: 17:5:32:15625
Send Data From Queue: 17:5:32:109375
RunL: 17:5:32:140625TimeOut = 130 No.619Send RTP Data: 17:5:30:81
Send Data From Queue: 17:5:32:171875
RunL: 17:5:32:203125TimeOut = 130 No.620Send RTP Data: 17:5:31:15
Send Data >From Queue: 17:5:32:218750
RunL: 17:5:32:265625TimeOut = 145 No.621Send RTP Data: 17:5:31:28
Send Data From Queue: 17:5:32:281250
RunL: 17:5:32:328125TimeOut = 145 No.622Send RTP Data: 17:5:31:43
I have a similar problem on a 7610:
only 10 to 15 UDP packets per second are sent, and it delays audio capturing too.
The funny thing is that sometimes when I leave the application running for a few minutes, suddenly the speed increases and the audio is streamed (almost) perfectly!
However, the application will stop sending UDP completely after some time, while it still thinks it's sending UDP. The SocketServer must be broken in that time or something, because I need to restart the phone completely for any UDP to be sent afterwards.
Anybody any ideas?
The way I'm streaming is very simple (in pseudo code):
if (aBuffer.Length() == 640)
if (&aBuffer == iDualBuffer)
iBufferInUse = 0;
iBufferInUse = 1;
if (iBufferInUse == 0)
SendAudio(*iDualBuffer); // this function creates an RTP packet and sends it over UDP