Chapter 4. SPP-over-IP

SPP-over-IP is a special functionality of iWRAP Bluetooth servers running in Access Servers. It offers a transparent way to transmit data from Bluetooth Serial Port Profile (SPP) enabled devices to server computers or PCs. Several transport medium are supported, such as Ethernet, Wi-Fi or and GPRS.

4.1. How SPP-over-IP Works

The SPP-over-IP application enables transparent data transfer between any Bluetooth Serial Port Profile (SPP) complaint device and a server, laptop or desktop connected to the same network. This enables plug n' play connectivity from a Bluetooth network to any standard TCP/IP based network. See Figure 4-1 for an overview of the application and a brief introduction to its functionality.

Features of SPP-over-IP are:

4.1.1. Standard Operation

With the standard configuration, SPP-over-IP works as described below:

  • Listens for incoming Serial Port Profile (SPP) connections

  • Takes control of all incoming connections

  • Opens a TCP connection to the defined IP address and TCP port

  • Forwards all incoming data from the SPP device to the established TCP connection and vice versa

Figure 4-1. SPP-over-IP Network Architecture

All the server computer needs to do is to listen for incoming TCP connections from Access Server to a specified TCP port and receive/send the application data.

4.1.2. Repeater Operation

The SPP-over-IP application can also be used in a so-called repeater mode. This feature is useful when all Access Servers can not be directly connected to the TCP/IP network, but they can be connected to other Access Servers by using Bluetooth PAN-connection. PAN enables transmitting TCP/IP packets wirelessly over Bluetooth. The figure below illustrates this configuration:

Figure 4-2. Repeater Mode in SPP-over-IP

4.1.3. SPP-over-IP over GPRS

SPP-over-IP software can also be used over GPRS instead of wired Ethernet connection. This requires that Access Server is equipped with a working GSM/GPRS compact flash card. See Appendix D for supported cards.

Figure 4-3. SPP-over-IP over GPRS

Notice when using GPRS:

  • Data upload rate is around 8-12kbps (depending on GPRS card)

  • Data download rate is around 32-48kbps (depending on GPRS card)

  • Data transmission delays can be very high, sometimes even seconds

  • GPRS connection may be unreliable and break easily. This should be taken account when designing the system. If GPRS connection breaks, all the TCP and Bluetooth connections will also be closed.

4.1.4. Opening Connections from Access Server

In the basic SPP-over-IP use case, Access Server is in passive mode and only accepts incoming connections. Using connector service, Access Server can open and maintain outgoing Bluetooth connections to defined Bluetooth devices

Figure 4-4. Access Server Opening the Connections

4.1.5. SPP-over-IP and COM Ports

SPP-over-IP can also be used together with Tactical Software's Serial/IP® software. Serial/IP software simply converts the TCP connections into virtual COM ports on the host computer. This is very useful in applications, which do not have support for TCP/IP but support COM ports instead.

Figure 4-5. SPP-over-IP with Serial/IP

An evaluation version of Serial/IP can be downloaded from: http://www.tacticalsoftware.com/products/serialip.htm

4.2. Configuring SPP-over-IP

This chapter briefly instructs you to configure SPP-over-IP to work in different network setups or use cases.

SPP-over-IP is easiest to configure through WWW setup, which allows you to access all the necessary configurations. For instructions about finding Access Server's IP address and using the WWW setup interface, see Section 2.2.

4.2.1. Forwarding Incoming Connections

The basic SPP-over-IP operation, listening incoming Bluetooth connections and forwarding them to a TCP/IP socket on a remote host (or a local application), is configured at SetupiWRAP settingsBluetooth profilesConnection forwarding. For details of the settings, see Section B.5.1.5

4.2.2. Maintaining and Forwarding Outgoing Connections

The SPP-over-IP connector, which opens and maintains outgoing Bluetooth connections and forwards them to a TCP/IP socket on a remote host (or a local application), is configured at SetupApplicationsConnector. For details of the settings, see Section B.4.3

4.2.3. Repeater Configuration

If you want to configure Access Server also to act as a repeater (see Figure 4-2) you must make some additional configurations. Add the line below to your Bluetooth startup script, editable at SetupiWRAP settingsEdit startup script. Line starting with # is comment which can be left out:


# Automatically connect to Access Server with PAN-NAP enabled using baseband 1
10101 SET CONTROL AUTOEXEC CALL 00:07:80:bf:01 PAN-NAP
        

You must replace the Bluetooth address used in the example (00:07:80:80:bf:01) with the Bluetooth address of the Access Server, on which you want to receive the PAN connection.

Note: The server receiving the PAN connection must have the PAN-NAP profile enabled. This is by default not the case, so in setup or its WWW interface, ensure that the setting at → Bluetooth settingsBluetooth profilesEnable PAN network access point profile says yes. No other configuration is needed. See Section 3.2.5 for more information on PAN profiles.

The Bluetooth PIN codes must be the same in both Access Servers.

In the example configuration (Figure 4-6) connection forwarding has already been configured using the WWW Setup (two lines above the SET CONTROL AUTOEXEC line).

Figure 4-6. Repeater Configuration

4.2.4. Wi-Fi Configuration

If Access Servers must be connected to Wi-FI (WLAN) instead of physical Ethernet connection, you also need to make additional configurations through the WWW setup.

See Section 3.3.3 for more information.

4.2.5. GPRS Configuration

If Access Servers must be connected to GPRS network instead of physical Ethernet or Wi-Fi connection, you also need to make additional configurations through the WWW setup.

See Section 3.3.1 for more information.