| Reply | « Previous Thread | Next Thread » |
|
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: - PHP Code:
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. |
| jimgilmour1 |
| View Public Profile |
| Find all posts by jimgilmour1 |
|
Debugging Symbian S60 2nd Edition FP2 with Carbide C++ Express and NCF 1.2 Bluetooth
------------------------------------------------------------------------------------ Author Jim Gilmour 31th August 2006 31/08/2006 Part 2 Section:: NCF and Series 60 2nd Ed. FP3 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 Start NCF in full mode by Start->All Programs->Nokia Developer->Nokia Connectivity Framework-> Nokia Connectivity Framework Full or C:\Nokia\Tools\Nokia_Connectivity_Framework\bin\NCFStart.exe full In NCF open up the "Products-> Hardware" you should see a "BT USB Adapter" with green square next to it. Left click this and drag into the main "Messaging" window. In NCF open up the "Products-> Terminal SDKs" you should see "Series 60 2nd Ed. SDK for Symbian OS Supporting Feature Pack 3" Left click this and drag into the main "Messaging" window. Click the green triangle icon to start the emulator and bluetooth. 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" the "Discovering devices" message and eventually your phone e.g."Nokia6230i" Click the Right button "Exit" the application. Now we are going to stop the emulator to keep the virtual ports open. So click the red "X" in top right corner. In the NCF window click the minimise button leaving the icon in the system tray. --------------------------------------------------------------------------------------------- Section:: Carbide.C++ and NCF 1.2 and Series 60 2nd Ed. FP3 Start Carbide move in the Symbian perspective make sure the application is ready. 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" emulator starts. 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" The "Discovering devices" message appears and eventually your phone e.g."Nokia6230i" ---------------------------------------------------------------------------------------------- Section:: Debugging bluetooth with Carbide.c++ Start Carbide move in the Symbian perspective make sure the application is ready. In the left panel Select the file BluetoothPMPExampleAppUi.cpp and double click. In left pane select the component "CBluetoothPMPExampleAppUi::HandleCommandL" and double click This has now moved the source window to the desired code. PHP Code:
A Blue dot appears in the margin which means a break point has been set at this line 171. 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" emulator starts. 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" the Carbide window pops up and sits at the line 171: Switch to Debug perspective (top right corner of Carbide) Near the top of the Debug Perspective there is a tab with breakpoint. Click on this to see your break point set. In the Debug window (top left) click the green triangle to resume. After a while the debug stops at the line 171: if ( !iEngine->iIsSlave ) ------------------------------------------------------------------------------------------- Section:: Examining local variables after reaching a break point In console version of S60 you have to use RDebug:Print and recompile and restart debug for each variable to be viewed in the console view and "View Process Output" option In Carbide.c++ you can examine any local variable, without recompile or altering source, at a break point as shown below Click the "Variables" tab.The top variable is "aCommand" in this case value 1 , is the reason this case statement was executed and the break point occured. The slightly more difficult variable is to find the value of "IsSlave" Click the "+" at the "*this" to open up the list at the "iEngine" Click the "+" to open the list and look down the list to find the "IsSlave = 0" Click the first down arrow in debug window. to "Step into" the next line. Just keep clicking the "Step into" button to step-on to the next line. Click the green right angle triangle to "Resume" , in the Debug window, until the next break point or control returns to the emulator and waits for the next command button. To terminate the emulator click the red square button. Click the Symbian perspective and exit carbide. Click on the the NCF icon on system tray and click exit. |
| jimgilmour1 |
| View Public Profile |
| Find all posts by jimgilmour1 |
|
Hi Jim
Thanks a lot for your BT articles and experiences. I have a Windows 2000 + SP4 environment so, do you have any experiences about W2000 environment when using BT environment as you describe ? Or, are there some good reasons to use Windows XP environment on your BT case ? I mean that, is it possible to use BT as you describe with W2000 environment or are there some software products that just do not work on W2000 environment that you have worked with ? |
| turnabull2 |
| View Public Profile |
| Find all posts by turnabull2 |
|
Hi turnabull2,
Thanks I am glad you enjoyed the articles and postings. I have used Windows XP because using Java 2 SE and the BlueCove XP bluetooth extensions. To be able use these the XP Microsoft extensions to bluetooth in Service Pack 2 need to be used. I have used Windows 2000 for Java2ME for years. I have now revisited Win2K and bluetooth with NCF 1.2 and I have managed to use my procedure. Q: How to use NCF 1.2 bluetooth with S60 3rd Edition for Symbian C++ MR http://discussion.forum.nokia.com/fo...ad.php?t=85754 I have a new belkin bluetooth adapter new belkin bluetooth adapter I loaded braodcomm bluetooth software supplied set discovery enabled and "paired" with my Nokia 6230i. I tried to install the NCF BT USB driver but it failed. I unpluged the Belkin USB device, then removed the broadcomm software via the "Add/Remove Programs". When I inserted the BT USB the "Found new hardware" program wants the USB driver from path "C:\Nokia\Tools\Nokia_Connectivity_Framework\configuration\addons\ncfbt" and select ncfbt.inf. The driver is now installed and device can be seen in the Control Panel displays the NCF USB driver. The I just used the "Q: How to use NCF 1.2 bluetooth with S60 3rd Edition for Symbian C++ MR" as before. I could discover my phone as before in s60 2nd ed FP3. There is currently no link from Java to WIDCOMM or Broadcomm software in Windows 2000 Carbide.C++ and Carbide.j 1.5 work under Windows 2000 and runs the procedure descibed in this thread. Many problems come from the fact that they need to use the C: drive and one of my windows is installed on E: and D: which cause problems, but its not the Operating System fault Good Luck Jim
Last edited by jimgilmour1 : 2006-09-05 at 20:44.
|
| jimgilmour1 |
| View Public Profile |
| Find all posts by jimgilmour1 |
|
Hi Jim
Thanks a lot for your BT pioneer work in this site. I will be stay tuned on your BT articles. turnabull2 |
| turnabull2 |
| View Public Profile |
| Find all posts by turnabull2 |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|