Debugging Symbian S60 2nd Edition FP2 with Carbide C++ Express and NCF 1.2 Bluetooth
------------------------------------------------------------------------------------
Author Jim Gilmour 30th August 2006 30/08/2006
**********************************************************************************************
Notice
Nokia states this procedure as not being a supported procedure by Carbide.c++ Express
The interaction between Carbide and NCF is not supported.
Nokia or contributors are not responsible any problems what ever they are and any damage caused whether
temporary or continuous in nature.
Responsibilty for use is with the user of this procedure
*****************************************************************************************
Load the NCF 1.2 and configure as described in
Q How to use NCF 1.2 bluetooth with S60 3rd Edition for Symbian C++ MR - Developer Discussion Boards
http://discussion.forum.nokia.com/fo...ad.php?t=85754
In this case initially we will be using S60 2nd Edition FP3.
Load install and register Carbide.c++ from http://www.forum.nokia.com/carbide
Create the Symbian work-space "C:\SYMBIANworkspace" Important " **NO SPACES IN FILENAME**
The standard is my documents and this crashes compiler without instructive error message
Download Bluetooth Point-to-multipoint example from :-
http://www.forum.nokia.com/info/sw.n..._v1_0.zip.html
Copy or unpack the package into
C:\Symbian\8.1a\S60_2nd_FP3\Series60Ex\BluetoothPMP
The example directory for S60 2nd Edition FP3.
Edit the C:\Symbian\8.1a\S60_2nd_FP3\Series60Ex\BluetoothPMP\group\BluetoothPMPExample.mmp
Change the line 15 and Line 18 using notepad or some other editor
From
15:TARGET bt.app <--<
16:TARGETTYPE app
17:UID 0x100039CE 0x101FF1C5
18:TARGETPATH \system\apps\bt <--<
To
15:TARGET BluetoothPMPExample.app <--<
16:TARGETTYPE app
17:UID 0x100039CE 0x101FF1C5
18:TARGETPATH \system\apps\BluetoothPMPExample <--<
Save changes
Start Carbide.C ++ and from the Menu toolbar Click File -> Import
From import pane select "Symbian MMP" and navigate to
C:\Symbian\8.1a\S60_2nd_FP3\Series60Ex\BluetoothPMP\group\BluetoothPMPExample.mmp
From the SDK Pane select "S60 2nd Edition FP3"
Click finish
The project "BluetoothPMPExample" appears in the pane
From the bottom window click Problems tab to bring to front.
Click on Project Menu and select "Clean" and "Build Project"
Well as you will see its failed in “Listener.cpp” with a bluetooth security error.
This error is due to a change from 2nd Ed FP1 to FP2 changes in security model.
Replace the code CListener::SetSecurityL(TInt aChannel)
With the code below: -
Remeber to copy C:\SYMBIANworkspace\BluetoothPMP\Listener.cpp back to the directoryPHP Code:// ----------------------------------------------------------------------------
// CListener::SetSecurityL(TInt aChannel)
//
// sets the security of given bluetooth channel. these settings will turn
// off authentication, authorisation and encryption on given channel.
// ----------------------------------------------------------------------------
void CListener::SetSecurityL(TInt aChannel)
{
// setup channel security
TRequestStatus status;
RBTMan secManager;
TBTServiceSecurity secSettings;
TBTSockAddr listeningAddress;
// Set the Port to listen to.
listeningAddress.SetPort( aChannel );
// setup security
TUid settingsUID;
settingsUID.iUid = KBT_serviceID;
secSettings.SetUid(settingsUID);
secSettings.SetAuthentication(EFalse);
secSettings.SetAuthorisation(EFalse);
secSettings.SetEncryption(EFalse);
secSettings.SetDenied(EFalse);
// register settings with security
// Attach the security settings.
listeningAddress.SetSecurity(secSettings);
}
C:\Symbian\8.1a\S60_2nd_FP3\Series60Ex\BluetoothPMP\ with explorer
as changes in workspace do not get copied to import directory.
Recompile the project
This time the build completes and the created application binary, which is transferred into the emulator.
Right click on the left pane "BluetoothPMPExample" at the top and go down to "Debug as.." and
Select "Debug As Symbian Application".
In the pane click new and the settings pop-up. Click "Debug" and the debug starts.
Carbide moves into the Debug perspective and the "S60 2nd Edition FP3"
On the 5 way button click down arrow and move down until the "BTex" application is found.
Click the middle button to start the app.
When you click left button "Select" and "Discover Devices" you get the error "Bluetooth not supported"
---------------------------------------------------------------------------------
Next part is to set-up NCF 1.2 ready to run with "S60 2nd Edition FP3" and Carbide.



