Set L2CAP options

Login to reply to this topic.
Sat, 2006-04-29 13:58
Joined: 2006-02-17
Forum posts: 7
Hi,
Can anybody help me set the L2CAP options through the
TL2CAP options class. I'm trying the following:

TL2CapConfig conf;
conf.SetMaxReceiveUnitSize(4096);
conf.SetMaxTransmitUnitSize(4096);
TL2CapConfigPkg config(conf);
TInt res = iServiceSocket->SetOpt(KL2CAPUpdateChannelConfig, KSolBtL2CAP, config);

I get an -6318 (L2CAP configuration is in progress error code). And my link is disconnected (error -36 in my receive callback).

--------------
Or using Ioctl

TL2CapConfig conf;
conf.SetMaxReceiveUnitSize(4096);
conf.SetMaxTransmitUnitSize(4096);
TL2CapConfigPkg config(conf);
TInt res = iServiceSocket->Ioctl(KL2CAPUpdateChannelConfigIoctl, &config, KSolBtL2CAP);

No this dosn't fail with the -6318, but the connection is still broken. My receive callback returns -36 (Disconnected)..


I try to change the L2CAP configuration after establishing the connection.
Is it not possible change the options on a connected socket? If not how should it be done?

Can anybody point me in the right direction?

Sat, 2006-04-29 16:38
Joined: 2006-02-17
Forum posts: 7
Re: Set L2CAP options
I found the problem:
It is ok to set the SetMaxReceiveUnitSize to anything you want (according to the standard ofcourse) on both sides. However what I was trying to do was to set the SetMaxTransmitUnitSize also. This was refused because the MaxReceiveUnitSize on the other side was to low.

So in order to change both values dynamically, I guess you need a small signaling protocol telling the other party to raise his MaxReceiveUnitSize, before you can raise your MaxTransmitUnitSize.

I hope I'm making sense Smiley

Best regards Morten
  • Login to reply to this topic.