| Access Server: User's and Developer's Guide | ||
|---|---|---|
| <<< Previous | Next >>> | |
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.
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:
Access Server 2291 supports 7 incoming SPP connections.
Access Server 2293 supports 21 incoming SPP connections.
SPP-over-IP can be used over Ethernet, Wi-Fi or GRPS networks.
SPP-over-IP also works over Bluetooth Personal Area Networking (PAN) connections, so not all Access Servers need to be physically (cable) connected to the TCP/IP network, but some Access Servers can linked using the Bluetooth PAN connection. This is referred to as repeater operation.
If SPP-over-IP application cannot open the TCP connection to defined IP address and port, the SPP connection will not be accepted.
If the TCP server on PC is closed, all SPP connections will be closed as well.
When Access Server is in its default configuration, it tries to enable sniff power saving mode on all idle Bluetooth connections to minimize power consumption.
SPP-over-IP can also be used to opposite direction, i.e. Access Server opens the Bluetooth connections to dedicated Bluetooth devices. See Section 4.1.4 for more details.
SPP-over-IP can also be combined with the Tactical Software's Serial/IP® software. Serial/IP software converts automatically TCP connections to virtual COM ports on the host PC, so legacy applications utilizing COM-ports instead of TCP/IP can also be used.
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
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.
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:
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.
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.
In the basic SPP-over-IP use case, Access Server is in passive mode and only accepts incoming connections. It is however possible to implement a system where Access Server opens the Bluetooth connections to the defined static Bluetooth devices or, alternatively, on ad-hoc basis.
In this case, special software must be developed for Access Server, which handles the outgoing connections and decides where they are opened to. This software can be developed with the Access Server Software Development Kit (SDK). The software can be written with C, C++ or standard Linux scripts.
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.
An evaluation version of Serial/IP can be downloaded from: http://www.tacticalsoftware.com/products/serialip.htm
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.
First, you must figure out Access Server's IP address (if it is connected to a TCP/IP network). This is easiest to do with the WRAPFinder software:
Start the WRAPFinder software
Scan your network for available Access Servers
Choose the correct Access Server
Press the Connect button
Your web browser opens the WWW setup of the selected Access Server.
Once the browser window has opened, click the Setup link
Type in you user name and password and you get access to the main view of the setup:
Note: The "basic" Bluetooth Serial Port Profile must be disabled for SPP-over-IP to work. By default, this is the case. You can verify it by checking that serialport service (which implements the profile) is off in WWW Setup → Applications → Default startup Applications (see Figure 4-9).
SPP-over-IP settings are modified in iWRAP servers' configuration file /etc/bluetooth.confwhich can be edited by navigating in WWW Setup to Setup → Bluetooth settings → Edit startup script.
To enable SPP-over-IP, add lines similar to following to the end of that file (lines starting with # are comments which can be left out):
# Forward incoming connection to IP 192.168.42.99 socket 7444
SET BLUETOOTH LISTEN 1 192.168.42.99:7444
# Add SDP record for Serial Port Profile
SDP ADD SPP 1 "SPP-over-IP"
|
In the example configuration above, RFCOMM channel 1 is used by the SPP-over-IP service. You can, however, use any other free channel as well. The RFCOMM channel must be same in both SDP ADD (see SDP ADD for details of command syntax) and SET BLUETOOTH LISTEN (see Table 7-1 for details of command syntax) configuration commands.
The text "SPP-over-IP" is the name of the service shown in Bluetooth service discovery. Normally, there should be no need to specify a different name, but nobody forces you to use "SPP-over-IP".
In the example, connections are forwarded to a server listening for incoming connections to TCP port 7444 in host with IP address 192.168.42.99. You must change these to match your system.
See Figure 4-10 for WWW Setup example of configuration.
Once you have done your configuration, press the Save button and restart the server so that the settings take place.
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 (line starting with # is comment which can be left out):
# Automatically connect to Access Server with PAN-NAP enabled
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 settings → Bluetooth profiles → Enable 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.
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.
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.
| <<< Previous | Home | Next >>> |
| Using the System | Obexsender |