MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

Connecting the device to Qt SDK

To connect your Harmattan device and the host workstation:

  1. Activate developer mode on your device.
  2. Connect your device to the development environment.
  3. Set up your host workstation.

On device: Using the SDK Connectivity tool

To connect your device to your development environment, you must use the SDK Connectivity tool on the device.

To connect using a USB connection:

1. Start the SDK Connectivity tool from the Applications view.
2. To connect your device to your host workstation, select USB.
3. If you have not done so yet, plug in the USB cable to your device and to your host workstation. From the available options that your device displays, select SDK.
The SDK Connectivity tool displays the IP address and a generated password in the Connectivity Details view.
USB connection in SDK Connectivity tool
4. Perform the actions described in Setting up a USB connection on your host workstation.
5. Next, use the generated password in combination with the 'developer' user name when configuring device access in Qt Creator.
Note: Leave the SDK Connectivity tool open until you have finished configuring the device-to-SDK connection in Qt Creator.


To connect using a WLAN connection:

1. Enable the WLAN connection.
a. Select Settings > Internet connection.
b. Under the text No internet connection, select Connect.
c. From the list of available WLAN networks, select the one you want to use.
2. Check that both your device and your host workstation are on the same subnet.
3. Start the SDK Connectivity tool from the Applications view.
4. To connect your device to your host workstation, select WLAN.
The SDK Connectivity tool displays the WLAN IP address and a generated password in the Connectivity Details view.
WLAN connection in SDK Connectivity tool
5. Next, use the WLAN IP address of the device as Host Name, and the generated password in combination with the 'developer' user name when configuring device access in Qt Creator.

On host workstation: Setting up the connection

You can use USB or WLAN to connect your device to your host workstation.

Prerequisites

Actions described in On device: Using the SDK Connectivity tool have been performed.

On host workstation: Setting up a USB connection

To set up a connection on your host workstation, prepare your device:

  1. Check that your device is connected to your workstation with a USB cable.
  2. If a dialog prompts you to select the connection mode, select Nokia Ovi Suite mode.

Setting up a USB connection on Windows 7

When you connect your device to your Windows 7 workstation, Windows installs a driver for the Linux USB Ethernet connection automatically. If the installation does not start, unplug the USB cable and try another USB port on your host workstation.

Note: Driver installation takes some time.

When the driver installation is complete:

  1. Go to Start > Control panel > View by and select Small icons.
  2. Go to Network and sharing center > Change adapter settings.
    The Linux USB Ethernet connection you just installed is displayed as a new Local Area Connection Linux USB Ethernet/RNDIS gadget.
    Note: If you cannot see Linux USB Ethernet/RNDIS gadget, try to unplug and replug the USB cable.
    Local area connection
  3. Right-click Linux USB Ethernet/RNDIS gadget and select Properties.
  4. In the opened item list, select Internet Protocol Version 4 (TCP/IPv4) > Properties.
    Local area connection properties
  5. The IP address is automatically configured. If, for some reason, this is not the case, set IP address as 192.168.2.14 and Subnet mask as 255.255.255.0 and click OK.
    Internet Protocol (TCP/IP) Properties
    The network connection between your device and workstation is now configured.

Next, configure device access in Qt Creator.

Setting up a USB connection on Windows XP

When you connect your device to your Windows XP workstation, Windows tries to install a driver for the Linux USB Ethernet connection. The Found New Hardware Wizard opens.

  1. Select No, not this time, and click Next.
    Found New Hardware Wizard 1
  2. Select Install the software automatically, and click Next.
    Found New Hardware Wizard 2
  3. Click Finish.
    Found New Hardware Wizard 3
    Your device is now connected to your host workstation.
  4. Go to Start > Settings > Network Connections.
    The Linux USB Ethernet connection you just installed is now displayed as a new Local Area Connection Linux USB Ethernet/RNDIS gadget.
    Local area connection
  5. Right-click Linux USB Ethernet/RNDIS gadget and select Properties.
  6. In the opened item list, select Internet Protocol (TCP/IP) and Properties.
    Local area connection properties
  7. The IP address is automatically configured. If, for some reason, this is not the case, in the Internet Protocol (TCP/IP) Properties window, click Use the following IP address and enter the following values in the fields:
    • IP address: 192.168.2.14
    • Subnet mask: 255.255.255.0
    Internet Protocol (TCP/IP) Properties
  8. Click OK and OK to close Network Configuration window.
    The network connection between your device and workstation is now configured.

Next, configure device access in Qt Creator.

Troubleshooting for Windows XP and Windows 7

If the USB driver is not installed automatically, you can do it manually as follows:

  1. Open the command prompt.
  2. Go to the Qt SDK install directory (C:\QtSDK by default).
  3. To launch an expanded version of the SDK Maintenance Tool, enter the following command:
    SDKMaintenanceTool.exe --show-virtual-components
  4. Select Package Manager and click Next.
    Installing the USB driver manually
  5. Select USB Network Driver from Development Tools > Maemo Toolchain and click Next.
  6. Click Update.

This installs the USB driver. Note that the described installation process requires administrator privileges on the workstation.

Setting up a USB connection on Linux

The USB interface is automatically configured. If, for some reason, that is not the case, create a new network interface for the USB connection with the following command:

sudo ifconfig usb0 192.168.2.14 up

Make sure that the IP addresses of your device and host workstation are not the same and are on the same subnet. The device uses the IP address 192.168.2.15 with the subnet 255.255.255.0 for its USB connection by default, so you can create the network interface with a different address on the same subnet, too.

Next, configure device access in Qt Creator.

Setting up a USB connection on Mac OS X

The USB interface is automatically configured. If, for some reason, that is not the case, create a new network interface manually:

  1. Open the network settings.
  2. Click the + button on the network settings panel.
  3. When the interface is available, select Using DHCP with manual address in the Configure IPv4 drop-down menu.
  4. Enter the address 192.168.2.14 into the IP address field.
    New network connection settings
  5. Click Apply.
    The network connection between your device and workstation is now configured.
    Network connection successfully set up

Next, configure device access in Qt Creator.

On host workstation: Setting up a WLAN connection

Unlike USB, a WLAN connection does not require you to install an additional network driver. You only need to have both the device and your host workstation on the same network.