You Are Here:

Community: Developer Discussion Boards

#1 Old 2 Bluetooth Questions for Clarification - 2008-04-17, 23:44

Join Date: Oct 2007
Posts: 80
Location: Malta
davmt
Offline
Regular Contributor
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
Reply With Quote

#2 Old Re: 2 Bluetooth Questions for Clarification - 2008-04-18, 13:08

Join Date: Mar 2008
Posts: 577
mahbub_s60's Avatar
mahbub_s60
Offline
Forum Nokia Expert
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
Reply With Quote

#3 Old Re: 2 Bluetooth Questions for Clarification - 2008-04-18, 13:12

Join Date: Oct 2007
Posts: 80
Location: Malta
davmt
Offline
Regular Contributor
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?
Reply With Quote

#4 Old Re: 2 Bluetooth Questions for Clarification - 2008-04-18, 16:42

Join Date: Oct 2007
Posts: 80
Location: Malta
davmt
Offline
Regular Contributor
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);
Tested both on device and emulator and no luck
Reply With Quote

#5 Old Re: 2 Bluetooth Questions for Clarification - 2008-04-18, 18:48

Join Date: Oct 2007
Posts: 80
Location: Malta
davmt
Offline
Regular Contributor
this seems to be the problem,
iBTSocket.SetOpt(KL2CAPUpdateChannelConfig, KSolBtL2CAP, iConfigActivePkg); giving error -6318

KErrL2CAPConfigPending
Reply With Quote

#6 Old Re: 2 Bluetooth Questions for Clarification - 2008-04-20, 19:59

Join Date: Jan 2006
Posts: 3,185
Location: Michigan
Nokia Ron's Avatar
Nokia Ron
Offline
Forum Nokia Expert
Moved to Bluetooth forum


Ron Liechty
Manager Forum Nokia Online Community
ron.liechty@nokia.com
Reply With Quote

#7 Old Re: 2 Bluetooth Questions for Clarification - 2008-04-21, 11:23

Join Date: Mar 2008
Posts: 577
mahbub_s60's Avatar
mahbub_s60
Offline
Forum Nokia Expert
Hi,
The code looks perfect, what platform you are using?


-Mahbub
Reply With Quote

#8 Old Re: 2 Bluetooth Questions for Clarification - 2008-04-21, 11:26

Join Date: Oct 2007
Posts: 80
Location: Malta
davmt
Offline
Regular Contributor
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 With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
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

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia