|
| Problem with multicast (S60 3rd) |
 |
Wed, 05 Jul 2006 11:31:04 +030 |
Hi,
I'm having difficulties on joining multicast group with Symbian S60 3rd
(v9.1). I have only emulator disposal so testing with real phone isn't
possible atm. If I have understood correctly there is difference with
real phones TCP/IP stack and the emulator one and my problem is caused
because of that difference.
Here is my simple code which leave on RSocket::SetOpt() when option is
KSoIp6JoinGroup. Leave code -5 KErrNotSupported.
Code:
RSocketServ server;
RSocket socket;
User::LeaveIfError( server.Connect() );
// RSocket
User::LeaveIfError( socket.Open( server, KAfInet, KSockDatagram,
KProtocolInetUdp) );
User::LeaveIfError( socket.SetOpt( KSoReuseAddr, KProtocolInetIp, 1 ) );
User::LeaveIfError( socket.SetLocalPort( 9000 ) );
// Multicast
TInetAddr multiAddr;
multiAddr.SetAddress( INET_ADDR(224,7,8,9) );
multiAddr.SetPort( 9000 );
if ( multiAddr.Family() != KAfInet6 ) {
multiAddr.ConvertToV4Mapped();
}
TPckgBuf< TIp6Mreq > req;
req().iAddr = multiAddr.Ip6Address();
req().iInterface = 0;
User::LeaveIfError( socket.SetOpt( KSoIp6JoinGroup, KSolInetUdp,
multiAddr ) ); // Leaves here.
///
So is this even possible with emulator?
If is what am I doing wrong?
More discussion about this problem can be found here:
http://forum.newlc.com/index.php/topic,12493.0.html
|
| Post Reply
|
| Re: Problem with multicast (S60 3rd) |
 |
05 Jul 2006 19:46:35 +0300 |
I've commentend on the NewLC thread earlier, but ...
Marko Saukko <firstname.lastname@tut.fi> writes:
> I'm having difficulties on joining multicast group with Symbian S60 3rd
> (v9.1). I have only emulator disposal so testing with real phone isn't
> possible atm. If I have understood correctly there is difference with
> real phones TCP/IP stack and the emulator one and my problem is caused
> because of that difference.
There is no difference in the stack between emulator and real device,
unless you *force it to be different*. Otherwise, the code is exactly
the same.
> Here is my simple code which leave on RSocket::SetOpt() when option is
> KSoIp6JoinGroup. Leave code -5 KErrNotSupported.
This just means that in emulator some wise guy has decided to make it
default not use real TCPIP and/or RSocket library. I don't know wich
applies
> So is this even possible with emulator?
Yes, definitely.
> If is what am I doing wrong?
a) check that you don't link in some replacement library
b) I've seen some weird emulator environment, which totally de-install
the real stack and put some non-working "wsock.prt" there. Check your
"*.esk" files for that (you really should have the real
"tcpip6.esk").
> More discussion about this problem can be found here:
> http://forum.newlc.com/index.php/topic,12493.0.html
>
> -Marko
|
| Post Reply
|
| Re: Problem with multicast (S60 3rd) |
 |
Thu, 6 Jul 2006 06:35:06 +0100 |
>> If I have understood correctly there is difference with real phones
TCP/IP stack and the emulator one and my problem is caused because of that
difference.
By default the S60 v3 SDK uses a Winsock connection to the Internet. In
other words, if you are using the default connection then immediately below
the sockets layer you're hooking into the Windows TCPIP stack, bypassing
Symbian's altogether. I haven't yet got this working with Ethernet, which
does use the SYmbian OS stack, but you can do this easily enough using the
S60 v3 beta SDK, which sets up an ethernet connection as the default.
That said, I do not know if this is the cause of your problem.
Regards
H
"Markku Savela" <msa@moth.iki.fi> wrote in message
news:87irmcrod0.fsf@moth.iki.fi...
> I've commentend on the NewLC thread earlier, but ...
>
> Marko Saukko <firstname.lastname@tut.fi> writes:
>
> > I'm having difficulties on joining multicast group with Symbian S60
3rd
> > (v9.1). I have only emulator disposal so testing with real phone
isn't
> > possible atm. If I have understood correctly there is difference with
> > real phones TCP/IP stack and the emulator one and my problem is
caused
> > because of that difference.
>
> There is no difference in the stack between emulator and real device,
> unless you *force it to be different*. Otherwise, the code is exactly
> the same.
>
> > Here is my simple code which leave on RSocket::SetOpt() when option
is
> > KSoIp6JoinGroup. Leave code -5 KErrNotSupported.
>
> This just means that in emulator some wise guy has decided to make it
> default not use real TCPIP and/or RSocket library. I don't know wich
> applies
>
> > So is this even possible with emulator?
>
> Yes, definitely.
>
> > If is what am I doing wrong?
>
> a) check that you don't link in some replacement library
>
> b) I've seen some weird emulator environment, which totally de-install
> the real stack and put some non-working "wsock.prt" there. Check
your
> "*.esk" files for that (you really should have the real
"tcpip6.esk").
>
> > More discussion about this problem can be found here:
> > http://forum.newlc.com/index.php/topic,12493.0.html
> >
> > -Marko
>
|
| Post Reply
|
| Re: Problem with multicast (S60 3rd) |
 |
Thu, 06 Jul 2006 09:06:07 +030 |
Markku Savela wrote:
> I've commentend on the NewLC thread earlier, but ...
>
> Marko Saukko <firstname.lastname@tut.fi> writes:
>
>> If is what am I doing wrong?
>
> a) check that you don't link in some replacement library
>
> b) I've seen some weird emulator environment, which totally de-install
> the real stack and put some non-working "wsock.prt" there. Check
your
> "*.esk" files for that (you really should have the real
"tcpip6.esk").
I dont really know how to check if I'm linking to replacement library or
not. Anyway this is what I found out with those filenames you gave me.
wsock.ptr and tcpip6.ptr are in here Epoc32\release\winscw\udeb\
ip.tcpip.esk in Epoc32\winscw\c\private\101f7989\esock points to
wsock.prt and ip.tcpip.esk in Epoc32\Data\z\private\101f7989\esock
points to tcpip6.prt.
I tried to replace ip.tcpip.esk in c with one in z (this is in the
phones ROM so it is the orginal version?) but that didn't help.
So how can I get real stack reinstalled?
>
>> More discussion about this problem can be found here:
>> http://forum.newlc.com/index.php/topic,12493.0.html
>>
>> -Marko
|
| Post Reply
|
| Re: Problem with multicast (S60 3rd) |
 |
06 Jul 2006 09:45:05 +0300 |
Marko Saukko <firstname.lastname@tut.fi> writes:
> I dont really know how to check if I'm linking to replacement library or
> not. Anyway this is what I found out with those filenames you gave me.
>
> wsock.ptr and tcpip6.ptr are in here Epoc32\release\winscw\udeb\
> ip.tcpip.esk in Epoc32\winscw\c\private\101f7989\esock points to
> wsock.prt and ip.tcpip.esk in Epoc32\Data\z\private\101f7989\esock
> points to tcpip6.prt.
> I tried to replace ip.tcpip.esk in c with one in z (this is in the
> phones ROM so it is the orginal version?) but that didn't help.
That should have worked, assuming you removed totally the ESK file
referring to the WSOCK.PRT (or just rename the extension to something
else than ESK).
> So how can I get real stack reinstalled?
Stack is apparently installed, its just not activated due to different
ESK file configurations.
Whoever decided to put the WSOCK.PRT into SDK for emulator should have
at least put a BIG WARNING SIGN on the SDK readme/release notes, and
also provided clear instructions to re-enable the real stack.
This WSOCK.PRT apparently only support very minimal subset of the internet
socket api of the real stack (support only IPv4 TCP! No UDP! ...)
|
| Post Reply
|
|
|
|
|
|
|
|
|
|