| Reply | « Previous Thread | Next Thread » |
|
1) On an L2CAP socket,
User::LeaveIfError(iBTSocketListen.Listen(1)); yields system error -28. I'm assuming that an L2CAP socket can only accept one connection so you don't need to specify this, am I correct? (i adapted this code from RFCOMM, where you can specify the number of connections for a listening socket Listen(QSIZE)) 2) I'm sending data packets to Linux using both RFCOMM and L2CAP. With L2CAP if set to default the packet parameter from the socket that I can send is 672bytes (corresponding to L2CAP MTU). So to vary that I can vary MTU I'm assuming. On RFCOMM you don't set the MTU, but RFCOMM lies on L2CAP and depends on L2CAP's setting so does it make sense, that the maximum packet size I managed to send with RFCOMM is 666 bytes (leaving L2CAP default) so that the packet is 666 bytes and the header is 6 bytes. Can somebody confirm this? Where can I get the packet structure of RFCOMM? I can't find it anywhere. I found the L2CAP one but not the RFCOMM (only serial port profile information on RFCOMM, but isn't RFCOMM a transport protocol in itself and serial port emulation is a profile upon it? ) thanks davmt |
|
Hi
L2CAP and RFComm can accept many connection,7 active connection is possible (there could be more with parked state). MTU size is meant for L2CAP,For Packet structure, you need to take a look into Core specificatin that can be fetched from http://www.bluetooth.com/Bluetooth/T...ocol_L2CAP.htm -Mahbub |
| mahbub_s60 |
| View Public Profile |
| Find all posts by mahbub_s60 |
|
hi but I'm referring to 1 single L2CAP port and 1 single RFCOMM port respectively.
Of course you could have up to 255 parked devices (theres an 8 bit field to store these address) and 7 active slaves in a piconet but here we are talking at the physical link level or ACL level. Isn't L2CAP meant to insulate all that through the LMP and itself? |
|
Strangely enough I can't send packets larger than 668 bytes using L2CAP even if I set the MTU correctly and the receiving MTU on the other end correctly.
GetOutboundMaxMTU gives 65535 bytes (the L2CAP advertised max MTU) but does this really work? I was going to get different performance values for my thesis by varying the MTU but I'm doubtful on whether this is possible or not ![]() Sometimes it also does send the first byte and stops. Code:
void CBTStreamActive::ConfigL2CapActive()
{
iConfigActivePkg().SetChannelPriority(TL2CapConfig::EHigh);
iConfigActivePkg().SetupReliableChannel();
TInt mtu;
TInt err = iBTSocket.GetOpt(KL2CAPGetMaxOutboundMTU, KSolBtL2CAP, mtu);
iConfigActivePkg().SetMaxReceiveUnitSize(1024);
iConfigActivePkg().SetMaxTransmitUnitSize(1024);
iBTSocket.SetOpt(KL2CAPUpdateChannelConfig, KSolBtL2CAP, iConfigActivePkg);
![]() |
|
this seems to be the problem,
iBTSocket.SetOpt(KL2CAPUpdateChannelConfig, KSolBtL2CAP, iConfigActivePkg); giving error -6318 KErrL2CAPConfigPending |
|
Moved to Bluetooth forum
|
|
Hi,
The code looks perfect, what platform you are using? -Mahbub |
| mahbub_s60 |
| View Public Profile |
| Find all posts by mahbub_s60 |
|
S60 3rd FP1, i think there is some time involved in effecting the configuration. It doesn't happen instantly cause if I place User::After (350000) I do get the correct MTU on rechecking.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| General MIDLet questions: networking, MIDLet size, Bluetooth, LBS | theAntSki | Mobile Java General | 7 | 2007-12-20 22:51 |
| Bluetooth connection questions | calvin.cal | Mobile Java Networking & Messaging & Security | 6 | 2007-02-14 09:12 |
| Nokia 8910 not working with USB Bluetooth Cards | olivieradler | General Discussion | 0 | 2005-10-05 11:49 |
| Nokia 8910 not working with USB Bluetooth Cards | olivieradler | Bluetooth Technology | 0 | 2005-10-05 11:48 |
| Bluetooth statuspane icon | antijn | Bluetooth Technology | 2 | 2004-10-30 10:23 |