## Run Mode On-Device Debugging

To implement run mode on-device debugging the following tasks need to be completed.

1. Install device connection software
2. Install Perl
3. Install an SDK
4. Setup environment variables
5. Setup a virtual drive for Techview and Cust Kits
6. Set the default kit in Devices.xml
7. Install the SISX file on the target device
8. Configure TRK connection on the device
9. Create a launch configuration

#### Configure CODA Connection on the Device

##### Connecting with Bluetooth

1. On the device make sure the Bluetooth port is turned on
2. On the phone launch CODA.

The location of CODA (Carbide On-device Debug Agent) will vary based on the phone. On some phones it will be in the Installed folder, on others it may be in the My Own folder.

3. CODA will ask which host you want to pair with. When requested, select your computer from the available Bluetooth devices list.
4. After the host and phone are paired, CODA should be connected. Verify that CODA is running.
5. On the PC:
   1. Right click on the Bluetooth icon in the System tray and select Advanced Configuration
   2. Click the Local Services tab
   3. Write down the Bluetooth COM Port number from the Local Services tab (Figure 1).

   The Port number will be used when configuring the CODA launch configuration. The Bluetooth COM Port number in the Local Services tab should match the COM port used in the Connections tab of the CODA launch configuration.

   4. Click OK to close the Bluetooth Configuration window

   Figure 1. Bluetooth Configuration windows Local Services panel

##### Connecting with PC Suite

1. Connect the USB cable to the PC and then to the target device
2. On the device select PC suite from the USB mode list
3. Launch the CODA agent

The location of the CODA on-device debug agent will vary based on the phone. On some phones it will be in the Installed folder, on others it may be in My Own folder.

4. Halt the Bluetooth device search by pressing Cancel
5. Click Options > Settings > Connection
6. Change Connection type to USB and set connection options (Figure 2)
7. Select Back and start the CODA software again and you should be connected

Figure 2. USB Connection Settings

8. On the PC

1. Open Windows Computer Management by right-clicking My Computer and select Manage from the context menu to open the Computer Management window.
2. Select System Tools > Device Manager > Ports (COM & LPT) to display all active ports
3. Locate the S60 Phone USB (COMxx) item in the list

Figure 3. Device Manager - Ports

4. Write down the port ID and Communication Port Properties.

The COM Port number in the Device Manager window should match the COM port used in the Connections tab of the CODA launch configuration.

5. Close the Device Manager window