![Symbian Developer Library](../../../../../../../a_stock/images/mainheading.gif)
![]() |
![]() |
|
This document shows you how to load the Bluetooth stack.
The Bluetooth stack needs to be loaded before you can use Bluetooth.
The following shows you how to load the Bluetooth stack.
Set up required objects and literals.
RSocketServ iSockSvr;
_LIT(KPDDName, "EUART1");
_LIT(KLDDName, "ECOMM");
Start C32.
TInt rerr = KErrNone;
rerr = StartC32();// For any Serial comms
Load the drivers
User::LoadPhysicalDevice(KPDDName);
User::LoadLogicalDevice(KLDDName);
Connect the socket server
iSockSvr.Connect();
Configure the protocol
TProtocolDesc iProtocolInfo;
TRequestStatus status;
iSockSvr.FindProtocol(_L("L2CAP"), iProtocolInfo);
Start the protocol
iSockSvr.StartProtocol(iProtocolInfo.iAddrFamily,iProtocolInfo.iSockType,iProtocolInfo.iProtocol, status);
User::WaitForRequest(status);
At this point the Bluetooth stack is running. Other components can now use the Bluetooth hardware module.
The Remote Control Framework loads the stack automatically when started.
You may also be interested in the following: