Bluegiga Technologies assumes no responsibility for any errors which may appear in this
manual. Furthermore, Bluegiga Technologies reserves the right to alter the hardware, software,
and/or specifications detailed herein at any time without notice, and does not make any
commitment to update the information contained herein. Bluegiga Technologies’ products are
not authorized for use as critical components in life support devices or systems.
The WRAP is a registered trademark of Bluegiga Technologies.
The Bluetooth trademark is owned by the Bluetooth SIG Inc., USA, and is licensed to Bluegiga
Technologies.
ARM and ARM9 are trademarks of ARM Ltd.
Linux is a trademark of Linus Torvalds.
All other trademarks listed herein belong to their respective owners.
2004-11-08
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
10 I/O API ............................................................................................................ 90
10.1 LED/BUZZER API .......................................................................................... 90
10.2 GPIO API ..................................................................................................... 90
11 About Bluegiga ................................................................................................. 91
Appendix A – WRAP Directory Structure................................................................... 93
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
1 INTRODUCTION
WRAP™
Bluegiga's WRAP product family offers for device manufacturers, teleoperators, integrators,
enterprises and platform developers a simple and fast way to set-up wireless communication
systems between standard or proprietary mobile devices, networks, machines and
instruments.
WRAP™ Multiradio Access Server
WRAP™ Multiradio Access Server is a cutting edge wireless Bluetooth basestation supporting
WLAN, Ethernet and GSM/GPRS offering TCP/IP connectivity. It can be deployed into existing
wired or wireless networks without uncompromising the speed, security and ease of
installation and management. WRAP Multiradio Access Server is an open platform for creating
and hosting also local applications and content in the Access Server. Bluegiga also provides
several additional software packages for different purposes; embedded device's Bluetooth
networking, mobile phone TCP/IP connectivity and generic application installation for different
mobile handsets.
It has support for multiple Bluetooth radios (model 2291 has one and model 2293 has three
installed) with configurable range up to 100 meters (class 1), USB host and Compact Flash.
The WRAP Multiradio Access Server enables you to connect a variety of equipment directly to
networks. As a software platform, WRAP Multiradio Access Server runs Linux 2.4 in powerful
ARM processor and has free memory for runtime and persistent storage use of the user
applications.
1.1 L
ICENSES AND WARRANTY
Warning: Bluegiga Technologies is hereby willing to license the enclosed WRAP product and its
documentation under the condition that the terms and conditions described in the License
Agreement are understood and accepted. The License Agreement is supplied within every
WRAP product both in hard copy and soft copy (file \doc\WRAP_eula.pdf on the WRAP CDROM). The use of the WRAP product will indicate your assent to the terms. If you do not agree
to these terms, Bluegiga Technologies will not license the software and documentation to you,
in which event you should return this complete package with all original materials, equipment,
and media.
The following software components: GCC compiler tool chain, Linux kernel, and Linux-userland
applications are licensed under the terms and conditions of the GPL General Public License (file
\doc\GPL.txt on the WRAP CD-ROM). Upon request, Bluegiga will distribute a complete
machine-readable copy of the source of the aforementioned software components during a
period of three (3) years from the order date of the product. Delivery costs of the source code
will be charged from the party requesting the source code.
The Bluegiga WRAP Product Limited Warranty Statement is located in the file
\doc\WRAP_warranty.pdf on the WRAP CD-ROM.
1.2 C
ERTIFICATION INFORMATION
The product is CE approved and Bluetooth qualified v.1.1. It has been measured against the
following specification standards: Radio spectrum Matters (R&TTE, Article 3.2) ETSI EN 300
328-2 v1.3.1. / EN 301 489-1/17, and FCC part 15.247. Supported Bluetooth profiles are:
GAP, SDAP, LAN client and server, SPP A and B, FTP client and server, ObjP client and server,
PAN-PANU, PAN-GN and PAN-NAP.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
Hereby, Bluegiga Technologies declares that this WRAP Multiradio Access Server is in
compliance with the essential requirements and other relevant provisions of Directive
1999/5/EC.
This device complies with Part 15 of the FCC Rules.
Operation is subject to the following two conditions:
1. This device may not cause harmful interference, and
2. This device must accept any interference received, including interference that may
cause undesired operation.
This equipment has been tested and found to comply with the limits for a Class B digital
device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable
protection against harmful interference in a residential installation. This equipment generates,
uses, and can radiate radio frequency energy and, if not installed and used in accordance with
the instructions, may cause harmful interference to radio communications. However, there is
no guarantee that interference will not occur in a particular installation. If this equipment does
cause harmful interference to radio or television reception, which can be determined by turning
the equipment off and on, the user is encouraged to try to correct the interference by 1 or
more of the following measures:
• Reorient or relocate the receiving antenna
• Increase the separation between the equipment and receiver
• Connect the equipment into an outlet on a circuit different from that to which the
receiver is connected
• Consult the dealer or an experienced radio or television technician for help
Warning: Changes or modifications made to this equipment not expressly approved by
Bluegiga Technologies Inc. may void the FCC authorization to operate this equipment.
The radiated output power of the WRAP Multiradio Access Server is far below the FCC radio
frequency exposure limits. Nevertheless, the WRAP Multiradio Access Server should be used in
such a manner that the potential for human contact during normal operation is minimized.
To meet the FCC’s exposure rules and regulations:
• The antenna(s) used for this transmitter must be installed to provide a separation
distance of at least 20 cm from all the persons.
• Any transmitter installed in the CF card slot must not exceed 4 W of e.i.r.p. To check if
a particular equipment complies with this restriction you need to know its FCC ID
number and visit the searching engine in FCC web site in the following Internet address,
where you can find the output power by the equipment in the grant of the equipment
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
1. The output power for 802.11a/b/g/h equipment or similar equipment approved
under §15.247 or §15.407 is listed as Conducted RF power. §15.247 or §15.407
limit the e.i.r.p. to 4 W, so this restriction is fulfilled.
2. The output power for Part 22 cellular equipment is listed as e.r.p. The
relationship between e.r.p. and e.i.r.p. is the following one:
e.i.r.p. = 1.64 x e.r.p.
3. The output power for Part 24 PCS equipment is listed as e.i.r.p.
4. For other type of equipment please consult the distributor in order to assure the
restriction is fulfilled.
Note: Definitions:
Effective Radiated Power (e.r.p.) (in a given direction): The product of the power supplied to
the antenna and its gain relative to half-wave dipole in a given direction.
Equivalent Isotropically Radiated Power (e.i.r.p.) (in a given direction): The product of the
power supplied to the antenna and its gain relative to an isotropic antenna.
The table below is excerpted from Table 1B of 47 CFR 1.1310 titled Limits for Maximum
Permissible Exposure (MPE), Limits for General Population/Uncontrolled Exposure:
Frequency Range (MHz) Power Density (mW/cm2)
300 – 1500 f/1500
1500 – 100 000 1.0
The equipment WRAP Multiradio Access Server transmits in the 2400 - 2483.5 MHz frequency
range, so the applicable MPE limit is 1 mW/cm
2
. The equipment can be provided with up to 4
Bluetooth modules WRAP THOR 2022-1-B2B (FCC ID: QOQWRAP2022-1-B2B):
Under the conditions stated above MPE limits can be guaranteed as the calculation below
shows:
Example 1:
15.247 or 15.407 Compact Flash Card with maximum allowed e.i.r.p. of 4W
Using equation from page 18 of OET Bulletin 65, Edition 97-01:
2
S = P·G/4πR
= Prad (e.i.r.p.)/4πR2
Where,
2
S = power density in mW/cm
(1 mW/cm2 used for G)
P = power input to the antenna
G = power gain of the antenna in the direction of interest relative to an isotropic radiator
R = distance to the centre of radiation of the antenna in cm (20cm Prediction distance)
Please see http://www.bluegiga.com/
contact sales@bluegiga.com
.
Please check http://www.bluegiga.com/techforum/
Please contact support@bluegiga.com
for news and latest product offers. For more information,
for software and documentation updates.
if you need more technical support. To speed up the
processing of your support request, please include as detailed information on your product and
your problem situation as possible. Please begin your email with the following details:
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
2 CONTROLLING THE ACCESS SERVER
There is no graphical user interface for the WRAP Multiradio Access Server. All controlling
operations to the Access Server must be done either by entering commands and using
applications at Access Server shell prompt or by sending and/or retrieving files to/from the
Access Server. There are several ways to access the shell prompt and to transfer files.
2.1 P
HYSICAL INTERFACES
The physical interfaces of the Access Server are described in Figure 1 and Figure 2.
Figure 1. WRAP Multiradio Access Server Connectors.
NOTE: The power adapter is the disconnection device, the socket-outlet shall be installed near
the equipment and shall be easy accessible. The power led (see Figure 2) is on when the
power adapter is connected.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
Figure 2. WRAP Multiradio Access Server LEDs.
2.2 S
HELL PROMPT ACCESS
You can get to the shell prompt using either the management console, SSH or telnet. Normally
the initial configuration, if needed, is done from the management console over the serial cable
and all further controlling activities are performed remotely using SSH or telnet sessions over
Ethernet or Bluetooth LAN / PAN connection.
If you can make SSH or telnet connections from a device that has Bluetooth LAN Access or
PAN profile support, you don’t need the management console. Just connect the Access using
LAN Access or PAN profile. The Access Server can be seen in Bluetooth inquiries as
"Wserialno_n", where "serialno" is the serial number of the device and "n" is the number of the
Bluetooth radio in guestion (model 2293 has three Bluetooth radios, any of which can be
connected). After you have connected (no PIN code / username / password needed), connect
using SSH or telnet to the device in the other end of the connection, typically 192.168.160.1.
When logging in for the first time, log in as the user "root", and enter anything for password.
2.2.1 M
ANAGEMENT CONSOLE
If you don't have Bluetooth LAN/PAN client and you don't have the Access Server connected to
your LAN or you don't know the IP address given to the Access Server, you can get the first
shell prompt access using the management console. To set up management console do the
following:
1. Have a PC with a free COM port.
2. Power off the Access Server.
3. Configure your terminal application, like HyperTerminal in Windows, to use the
following settings with the free COM port:
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
Setting Value
Speed 115 200 bps
Data Bits 8
Parity None
Stop Bits 1
Flow Control None
Table 1. The Management Console Port Settings.
4. Connect the serial cable shipped with the Access Server to your PC's free COM port.
5. Connect the null-modem adapter shipped with the Access Server to the serial cable.
6. Connect the serial cable with the null-modem adapter to the management / user port in
the Access Server (see Figure 1).
7. Power on the Access Server.
8. Enter letter "b" in the terminal application during the first five seconds, while the blue
LEDs in the Access Server turn on one by one.
9. The management console is now activated and you should see the boot log in your
terminal window. Wait for the device to boot up and end with the prompt "[root@wrap
/]$ "
10. You are ready to control the Access Server from the management console.
2.2.2 A
When the WRAP is connected to a LAN it tries to get the IP address using DHCP by default.
One way to see the IP address of the WRAP board, connect to the WRAP with a management
console, power on the board and, after the system is up and running, give the command
"ifconfig nap". The field "inet addr" for the interface "nap" contains the IP address of the WRAP
board. For example, in the following capture from the management console, the IP address is
"10.1.1.43":
CCESSING REMOTELY
[root@wrap /]$ ifconfig nap
nap Link encap:Ethernet HWaddr 00:07:80:00:04:6C
inet addr:10.1.1.43 Bcast:10.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::207:80ff:fe00:46c/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:12635 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1686246 (1.6 MiB) TX bytes:1640 (1.6 KiB)
Interrupt:24 Base address:0xc000
You can use this address to connect the Access Server remotely via SSH, telnet, FTP, SFTP.
2.3 T
You can transfer file to and from the access server by default using for example:
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
3 CONFIGURATION
When the WRAP is installed and powered up for the first time, the default configuration
settings are being used. With these settings, the WRAP automatically configures its network
settings assuming that the board is connected to a LAN network with a DHCP server running.
After booting, you can use the WRAP as a Bluetooth LAN/PAN access point to the network
without any changes in configuration. Also, the Serial Port Profile is enabled by default in
listening mode. You can also use Object Push and File Transfer Profiles to send files to/from
the WRAP.
3.1 U
The basic configuration settings can be changed using the "setup" application. It displays the
settings in a hierarchical menu. Navigating the menu is accomplished by entering the number
or letter corresponding to the setting to be viewed and/or changed and pressing <enter>.
Pressing only <enter> either accepts the previous value of the setting or returns to the
previous level in the menu hierarchy. The settings and their meanings, as well as their default
values are described in the following sections.
Note: Ensure that your terminal application transmits only Carriage Return (CR) when the
<enter> key is pressed. If your terminal transmits both CR and LF, you cannot navigate in the
"setup" application.
3.1.1 N
SING THE SETUP APPLICATION
ETWORK CONFIGURATION
1. Enable Interface Eth0 [Y]
This option determines whether or not an Ethernet interface is brought up at all at boot.
If set to no, the other options in the Network Configuration menu are not visible.
2. Hostname of the Device [wrap]
The hostname of the WRAP device. Local applications will see this name.
Domain of the Device [locadomain]
3.
The domain name of the WRAP device. Local applications will see this name.
4. Time Server []
Hostname (or IP address) of the time server connected at system boot to retrieve
correct time using the Time Protocol (RFC 868)
5. Use Dynamic Network Configuration [Y]
This option determines whether or not automatic configuration of the Ethernet interface
using DHCP should be attempted at boot. If set to yes, the following options in the
Network Configuration menu are not visible.
6. IP Address of the Host [10.0.0.101]
If the dynamic network configuration is disabled (step 5), the IP address of the WRAP
must be entered here.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
If the dynamic network configuration is disabled (step 5), the network mask of the
WRAP must be entered here.
8. IP Address of the Default Gateway [10.0.0.254]
If the dynamic network configuration is disabled (step 5), the IP address of the default
gateway in the LAN to which the WRAP is connected must be entered here.
9. IP Address of the Primary Name Server [10.0.0.1]
The IP address of the primary name server.
10. IP Address of the Secondary Name Server [10.0.0.2]
The IP address of the secondary name server.
3.1.2 B
The Bluetooth settings are divided into general and profile specific settings, and are described
in the following sections.
3.1.2.1 G
LUETOOTH SETTINGS
ENERAL BLUETOOTH SETTINGS
1. Friendly Name [W$S_$p]
The name shown when this device is found when inquired about by other Bluetooth
devices. The name may end with asterisk (*), which will be replaced with the last 3
digits of the serial number of the WRAP board.
2. Bluetooth Server Socket Interface Password []
The password required to be entered before any commands when discussing with the
WRAP Bluetooth Server Socket Interface. Can be empty.
3. Connectable and Discoverable Mode [3]
The setting specifying whether this device is connectable and/or discoverable or not by
other Bluetooth devices.
When a device is connectable, other Bluetooth devices can make a Bluetooth connection
to it. Before making a connection, the calling device must know the Bluetooth address
of the device it is connecting to. The Bluetooth addresses can be found by making an
inquiry. When a device is discoverable, it shows up in inquiries. Possible values for all
combinations of these settings are:
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
The setting specifying how the connecting Bluetooth devices should decide their roles.
When a device is calling another Bluetooth device, it originally is the master and the
answering device is the slave. When the connection is being built, a role switch can be
made. Normally, access point devices want to be the master for all their slaves, and
therefore they require a master-slave switch when a new device is connecting. This is
also how the WRAP is configured by default. Other possible combinations are:
0. Allow switch when calling, do not request when answering
1. Allow switch when calling, request when answering (default)
2. Do not allow switch when calling, request when answering
If you have problems with connecting to the WRAP, it might be due to the fact that your
client device does not support a master/slave switch. In this case, set this setting to
"0".
5. Default PIN Code []
The PIN code used when establishing connections. Up to 16 characters are significant.
If there is no default PIN code, the WRAP does not require a PIN code when
establishing connections. If in this case the other device requests a PIN code, the
default PIN code "1234" is sent, following the Bluetooth specification.
6. Power Save Mode and Parameters [4]
The power save mode used by default for all connections.
0. Active
1. Park: Round-robin
2. Park: Idle
3. Sniff: All
4. Sniff: Idle
3.1.2.2 LAN ACCESS PROFILE SETTINGS
1. Enable Lan Access Profile [Y]
Whether or not the LAN Access Profile is enabled.
2. Lan Access Login Name and Password []
The login name and password required from LAN Access Clients. Must be entered as a
single string, separated with a space. For example: "guest buffy". If empty (default), no
login is required.
3. Service Name (shown in SDP) [Lan Access Using PPP]
The name of this service as shown in the Service Discovery.
3.1.2.3 S
Note: The visibility of some of these settings is controlled by the "Act as the Calling Device"
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
Note2: the Serial Port Profile is disabled if the SMS Gateway is enabled, as they share the
same physical serial port.
1. Enable Serial Port Profile [Y]
Whether the Serial Port Profile is enabled or not.
2. Act as the Calling Device [N]
Whether this device should act as the calling device (DevA) or the answering device
(DevB).
3. BPS Rate [9600]
The bits-per-second rate of the connection. Possible values are 300, 1200, 2400, 4800,
9600, 19200, 38400, 57600, 115200, 230400, and 460800.
4. Data Bits [8]
The number of data bits in the connection. Possible values are 5, 6, 7, and 8.
5. Parity [0]
The parity bit setting of the connection. Possible values are: 0: no parity, 1: odd parity,
and 2: even parity.
6. Stop Bits [1]
The number of stop bits in the connection. Possible values are 1 and 2.
7. Hardware Flow Control (RTS/CTS) [Y]
Whether or not the hardware flow control is used in the connection.
8. Software Flow Control (XON/XOFF) [N]
Whether or not the software flow control is used in the connection.
9. Service Name (shown in SDP) [Serial Port]
The name of this service as shown in the Service Discovery. (This setting is visible only
when setting 2., "Act as the Calling device", is disabled.)
10. Bluetooth Address of the Remote Device [00:07:80:80:01:1f]
The Bluetooth address of the device to be contacted. (This setting is visible only when
setting 2., "Act as the Calling device", is enabled.)
11. Server Channel of the Remote Device [2]
The Bluetooth server channel of the device to be contacted. (This setting is visible only
when setting 2., "Act as the Calling device", is enabled.)
12. Optional Command Line Parameters for SPP Application []
Optional extra parameters for the WRAP Serial Port Profile application. Currently the
only supported parameter is "--msc", which enables transmitting of DCD/DSR status in
MSC. By default, they are not transmitted.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
3.1.2.5 P
ERSONAL AREA NETWORK PROFILE SETTINGS
1. Personal Area Network User (PANU) Profile
1. Enable PANU
Whether or not the PAN User Profile is enabled.
2. Service Name (shown in SDP) [PAN User]
The name of this service as shown in the Service Discovery.
2. Personal Area Network Generic Networking (PAN-GN) Profile
1. Enable PAN-GN [Y]
Whether or not the PAN Generic Networking Profile is enabled.
2. Use Dynamic Network Configuration for Local IP Address [N]
Whether or not DHCP is used for configuring Local IP Address. Enable only if you
are connecting this PAN-GN to another PAN-GN that will provide the IP
configuration.
3. Local GN Interface IP Address [192.168.161.1]
The IP address for the local GN interface (if the dynamic configuration is not
used; step 2 above).
4. Local GN Interface Netmask [255.255.255.0]
The netmask for the local GN interface (if the dynamic configuration is not used;
step 2 above).
5. Start DHCP Server for Remote Devices [Y]
Whether or not this device should launch DHCP for Remote Devices connecting
to this PAN-GN. Disabled if dynamic configuration is used; step 2 above.
6. Service Name (shown in SDP) [Generic Networking]
The name of this service as shown in the Service Discovery.
3. Personal Area Network Network Access Point (PAN-NAP) Profile
1. Enable PAN-NAP
Whether or not the PAN Network Access Point Profile is enabled.
2. Service Name (shown in SDP) [Network Access Point]
The name of this service as shown in the Service Discovery.
3.1.3 R
AMDISK SETTINGS
1. Size of the ramdisk (in kilobytes) [512]
The size of the ramdisk (/mnt/ram/). Sizes below minimum (currently 50) and above
maximum (currently 20480) are not allowed.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
3.1.4 S
YSTEM LOGGER SETTINGS
1. Log locally [Y]
This option determines whether or not the System Logger (syslogd) should log locally
(to /var/log/messages).
2. Address of the Remote Syslog Server []
The address of the device in the network to which the System Logger should log to.
Note: The remote device must be configured to accept syslogd connections from the
WRAP board. See the system logger documentation on the remote device for more
information on how to accomplish that.
3.1.5 W
EB SERVER SETTINGS
1. Enable Web Server [Y]
Whether or not the Web (WWW) server is enabled.
2. Web Server Root Directory [/var/www/html]
The directory where the WWW pages to be served by the Web server are located.
3.1.6 I
NSTALL POINT SETTINGS
1. Install Point logging device [/dev/null]
The file to which the Install Point writes its logs. Use /dev/console for console output
and, for example, /tmp/installpoint.log if you want to save this information. Be careful,
however, not to fill the RAM file system (use a cron job to free disk space from time to
time).
Note: If the file is invalid, Install Point is not started at boot.
3.1.7 SMS G
Note: The SMS Gateway is disabled by default, as the Serial Port Profile is enabled by default,
and they share the same physical serial port. Disable the Serial Port Profile first to be able to
enable the SMS Gateway.
1. Enable SMS Gateway at startup [N]
Whether or not the SMS Gateway (smsgw) should be started automatically when the
system boots up.
2. SMS Gateway logging device [/dev/null]
ATEWAY SETTINGS
The file to which the SMS Gateway (smsgw) logs all traffic. Use /dev/console for
console output and, for example, /tmp/smsgw.log if you want to save this information.
Be careful, however, not to fill the RAM file system (use a cron job to free disk space
from time to time).
3.2 /
ETC/RC.D/RC.LOCAL
While not configurable with the "setup" application, the file "/etc/rc.d/rc.local" is important for
system boot configuration. It is the last init script executed at system startup.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
By default, the script "/etc/rc.d/rc.local" just turns off all LEDs to indicate the startup has
finished. If you want to initialize something automatically at every boot, or start up your own
servers, for example, you should add the required commands here. You can use "vi" editor to
edit the file.
3.3 R
ESETTING CONFIGURATION
You can restore the default configuration by deleting the main configuration file and rebooting
the board. When the system starts up, the default configuration settings are restored. If you
have only changed the configuration by using the "setup" application, the following commands
at the WRAP command prompt will suffice:
[root@wrap /]$ rm /etc/sysconfig/config.xml
[root@wrap /]$ reboot
3.4 ADVANCED CONFIGURATION
More advanced configuration can be done by editing the appropriate files in the /etc directory.
Do not alter these files unless you are an expert user. The files that are the most "safe" to
edit, and their respective purposes, are listed in Table 2.
Note: Files are in Linux text file format, where the lines end with a single Line Feed (LF, "\n")
character. Some applications will not work if the configuration file format is changed to DOS
format, where the lines end with both Carriage Return and Line Feed (CR+LF, "\r\n")
characters.
File Purpose
/etc/bluetooth.conf WRAP Bluetooth Server Socket Interface
commands that are run every time the
Bluetooth Server is started. See section 9 for
details.
/etc/crontab Cron daemon settings. Standard crontab
format. Note: cron is not enabled by default.
You must enable it with command "chkconfig
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
4 USING THE SYSTEM
This chapter describes the basic features of a Bluegiga WRAP Multiradio Access Server and
their usage. This includes information on using the WRAP board as a Bluetooth LAN/PAN
Access Point or a Bluetooth Serial Port Cable Replacer, using the Web Server, Install Point,
WRAP Package Management System and the various ways for uploading content for browsing
and/or downloading, as well as getting familiar with the utility applications.
Using the features described in this chapter does not require the WRAP Software Development
Environment to be installed.
4.1 B
LUETOOTH
The Bluetooth servers are started automatically at power-up. By default, all servers act as a
LAN Access point following the LAN Access Profile specification. The Serial Port, PAN and Object
Push and File Transfer Profiles are also activated. The Bluetooth servers can be accessed and
controlled (by applications or even interactively with a telnet client) using the socket interface,
described in the Development section of the manual. Currently, there can be up to 14
simultaneous Bluetooth (RFCOMM) connections between the master WRAP and up to 7
simultaneous slaves.
4.1.1
BLUETOOTH SERVER SOCKET INTERFACE PASSWORD PROTECTION
The access to the Bluetooth Server Socket Interface can be password protected. By default,
the password is not in use, but it can be set with the "setup" application (see section 3.1.2.1).
The password is case sensitive. The password must be typed in as the first command after the
server has replied with "READY."
4.1.2 LAN A
CCESS PROFILE
This profile is automatically started at boot. By default, no authentication is needed. The
default settings can be changed with the "setup" application (see section 3.1.2.2), or runtime
with the socket interface (see the Bluetooth developer documentation in chapter 9).
The WRAP board can also act as a LAN Access Client, but in this case it must be controlled
manually using the socket interface, described in the Bluetooth developer documentation.
4.1.3 S
ERIAL PORT PROFILE
The Serial Port Profile is used to replace an RS-232 serial cable between two devices with a
Bluetooth connection. The physical setup is shown in Figure 3.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
A)
User
device A
Serial Cable
User
device B
B)
User
device A
Serial
Cable
WRAP
DevA
Bluetooth
Figure 3. Serial Cable Replacement Physical Setup.
State A) in the figure is the starting situation with a serial cable connecting the devices. This
cable is to be replaced with a Bluetooth connection.
User
device B
Serial
Cable
WRAP
DevB
In state B) the long serial connection is replaced with a Bluetooth Serial Port Profile connection
between the two WRAP devices. These WRAP devices are then connected locally to the user
devices with (short) serial cables. The cable between user device A and WRAP device A must
be a cross-over cable. The cable between user device B and WRAP device B must be similar
(direct or cross-over) to the one used in state A).
If RTS/CTS handshaking is used to ensure correct data transfer, the serial cables must have
these pins connected. Note: This handshaking is "local": it takes place between the user
device and the WRAP board. No handshaking between user device A and user device B on the
other end of the Bluetooth connection is provided.
If RTS/CTS handshaking is not used, CTS must be connected to DTR.
DCD, DTR, and DSR signals are not supported. This also means that user devices A and B will
not be able to tell whether or not the Bluetooth connection is up.
When the physical setup is ready, you can create the Bluetooth connection. By default, the
Serial Port Profile is started up at boot with the default settings. That is, listening in DevB
mode, at 9600 bps, 8 data bits, no parity, 1 stop bit, and RTS/CTS enabled. To change these
settings, use the "setup" application, as described in section 3.1.2.3.
You can also start the Serial Port Profile manually by calling its init script: "/etc/init.d/spp
start".
Note: When the Serial Port Profile is enabled, the WRAP SMS Gateway Server can not be used,
as they share the same physical user serial port
4.1.4 O
BJECT PUSH AND FILE TRANSFER PROFILE
The WRAP also has two OBEX profiles: the Object Push Profile (ObjP) and the File Transfer
Profile (FTP). You can use these profiles to transfer files easily between different WRAP devices
and other devices supporting them.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
These profiles are handled by forwarding incoming calls to "obexserver" program, which
handles both profiles. The OBEX working directory is /tmp/obex, and users have full read and
write access there. By default, that directory also contains the default vCard.
Two simple command line utilities, "obexput" and "obexget", are also provided. They can be
used to send and retrieve a single file to and from another Bluetooth device supporting OBEX.
Enter either of the commands without parameters to get a short help for using the command.
If the return value is non-zero, one of the following situations has happened: -2: --help, 2:
Invalid parameter, -3: Error connecting to control socket, -4: Failed talking to Bluetooth
Server, -1: Error connecting to data socket. Note that return value is zero (0) even if the OBEX
communication has failed. You should therefore scan the standard output of the command. On
error, you will see the OBEX error in format "Failed to <what>, errorcode <hexcode>" where
<what> can be "connect", "setpath", "put", "get" or "disconnect" and <hexcode> is the
obexclientlib return code in hexadecimal format for the corresponding command, documented
in 9.8.2.
4.1.5 PAN P
ROFILE
The WRAP Multiradio Access Server has support for all PAN profile modes: Personal Area
Network User (PANU), Network Access Point (NAP) and Group Node (GN).
The device creating the PAN connection decides, which of these modes are to be used.
Incoming connections are handled automatically by the WRAP. The WRAP board can also act as
a PAN Client, but in this case it must be controlled manually using the socket interface,
described in the Bluetooth developer documentation.
4.1.6 B
LUETOOTH RANGE CHANGING
The transmit power of the WRAP Multiradio Access is configurable. By default, class 1 (100
meter range) settings are used. The settings can be changed down to "class 2" settings (10
meter range) with "b2b_class2" command or even less with "b2b_class3" command. The class
1 settings can be restored with "b2b_class1" command.
After "b2b_classX" is given, it is recommended to reboot the WRAP once to restart Install Point
and other applications connected to the Bluetooth server(s).
Note: When the operation is successful, you should get one "Can't open baseband" message
with WRAP Multiradio Access Server model 2293 and three messages with 2291.
4.1.7 BTCLI - B
LUETOOTH SERVER COMMAND LINE INTERFACE UTILITY
You can send commands to a Bluetooth server using the "btcli" application.
Usage:
btcli [options] command
To see the options, enter the command "btcli --help".
The specified command is sent to a WRAP Bluetooth server (default: first server at port 10101)
and all replies are echoed to the standard output. The application waits and prints the replies
for a certain amount of time (default: 10 seconds) and exits.
4.1.8 S
ERIALBLUETOOTH
It is also possible to control the first WRAP Bluetooth server (at port 10101) via RS-232 with
the "serialbluetooth" application. Note: When you want to use this application, you must first
disable the Bluetooth Serial Port Profile and the WRAP SMS Gateway Server with the "setup"
application, as described in chapter 3.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
Usage:
serialbluetooth [options]
To see the options, enter the command "serialbluetooth --help".
Basically, serialbluetooth takes commands from a serial port and forwards them to the
Bluetooth server. All the commands available via socket interface are also available via serial
port.
There are two exceptions:
1) After making an outgoing RFCOMM data call, all input from the serial port is forwarded to
the data socket, not the control socket. To close the data socket, you have to write "+++" with
a 200ms pause before each character. There is no way to have two concurrent RFCOMM calls.
2) All incoming RFCOMM calls are answered automatically. Again, to close the data socket,
write "+++" as with the outgoing call.
4.2 C
OMPACT FLASH GPRS CARD
The Compact Flash GPRS card is identified automatically by the operating system when
inserted. At that time, the device file "/dev/ttyS0" is created.
A GPRS connection is made with command "pppd call gprs" and closed by killing the pppd –
process handling the GPRS connection.
The connections settings are in the directory "/etc/ppp/peers". The default GPRS call settings
work with major Finnish operators (TeliaSonera, Radiolinja, DNA).
If needed for special use, the Compact Flash GPRS card can also be accessed directly from
"/dev/ttyS0".
4.2.1 SIM C
ARD’S PIN CODE
If your SIM card has PIN code checking enabled, insert the following line just after the line '""
AT' in file "/etc/ppp/peers/gprs.connect":
OK 'AT+CPIN="pincode"'
4.2.2 GPRS TROUBLESHOOTING
If you don’t get connection, check "/var/log/messages". To get more verbose error messages
from the GPRS modem, enable more verbose error codes by adding line "OK 'AT+CMEE=2'"
just after the line '"" AT' in file "/etc/pp/peers/gprs.connect".
4.2.3 C
Sometimes, the Compact Flash GPRS card does not get identified. Instead, an error message
"serial_cs: ParseTuple: Bad CIS tuple" appears at console and the device file "/dev/ttyS0" is
not created. This happens most likely because of timing problems but there is no fix available
yet.
ONSOLE MESSAGE "SERIAL_CS: PARSETUPLE: BAD CIS TUPLE"
As a workaround, one can force the identification process to restart with the command line: "[
! -c /dev/ttyS0 ] && cardctl eject && cardctl insert".
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
4.3 C
The WLAN configuration with "setup" application is not yet available. The currently supported
WLAN cards are "EZ Connect" by SMC Networks and "Instant Wireless" by Linksys. For this
kind of Prism II/III based CF WLAN cards there are two different drivers.
4.3.1 H
If your WLAN card firmware is 1.7.4, you have to use Hostap driver. It supports both client and
master modes. You can check the firmware version by inserting the card and entering
command "dmesg". If you see the following line among the latest ones, you have firmware
1.7.4:
OMPACT FLASH WLAN
OSTAP DRIVER
eth1: Looks like an Intersil firmware version 1.7.4
To select Hostap driver enter the following command (ignore errors):
To configure the master mode to use encryption, add following lines (replace examples with
your ESSID and encryption key, which can be also shorter for 40/64bit encryption) to the file
"/etc/sysconfig/wlan":
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
DNS_1="10.1.1.1"
To configure WLAN to use encryption, add following lines (replace examples with your ESSID
and encryption key, which can be also shorter for 40/64bit encryption) to the file
"/etc/sysconfig/network.pcmcia"
0123456789abcdef0123456789"
ESSID="myessid"
After configuration, the WLAN interface comes up automatically when the WLAN card is
inserted. The WLAN interface is "eth1".
4.3.3 G
ENERAL CONFIGURATION
Standard set of wireless utilities are provided to fine-tune your WLAN configuration:
• iwconfig
• iwlist
• iwpriv
For more info see: http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
4.4 S
ERVERS
The WRAP server applications are started automatically at system power-up or when needed
by the Bluetooth server or the Internet services daemon. The servers and their purposes are
described in Table 3.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
Server Purpose
bluetooth WRAP Bluetooth Server, described in detail in section 9.
btcli WRAP Bluetooth Server Command Line Interface utility.
httpd Web server, described in detail in section 4.4.1.
installpoint WRAP Install Point server.
smsgw WRAP SMS gateway server, described in detail in section 4.4.2. Note: By default,
this server is not started at power-up.
watchdog WRAP user level watchdog.
wpkgd WRAP remote management system daemon.
cardmgr Daemon to monitor Compact Flash cards.
crond Daemon to execute scheduled commands. Configurable with /etc/crontab in the
same way as any Linux crond. Note: By default, this is disabled. Use "chkconfig -add cron" to enable.
ftpd Internet File Transfer Protocol Server. Configurable with /etc/stupid-ftpd/stupid-
ftpd.conf.
dhcpcd DHCP client daemon for automatic network configuration.
inetd Internet services daemon. Note: By default, this is disabled. Use "chkconfig --add
inet" to enable.
pppd Point to Point Protocol daemon. Used by the Bluetooth server. Can be used
manually over the user serial port (/dev/ttySA1).
sshd SSH daemon.
syslogd System logging daemon. Configurable with the setup application.
telnetd Telnet protocol server.
Table 3. WRAP Servers.
4.4.1 W
EB SERVER
The integrated web server in the Bluegiga WRAP supports HTTP/1.0 methods GET and POST,
and has light user authentication capabilities. The content can be either static or dynamic – the
WWW server is CGI/1.1 compatible.
The web server is always running and the content (http://wrap-ip-address/
) is located in the
/var/www/html/ directory in the WRAP file system. The directory can be changes using "setup"
–application, see subsection 3.1.5. By default, there is only a simple demonstration file,
index.html, there, but it can be replaced, and more directories and pages can be added.
For further information, see the web examples in section 8.1.
4.4.2 I
NSTALL POINT
The Install Point software is started automatically in the WRAP Multiradio Access Server. It
server two purposes:
1. Receives business cards (vCards), analyses their content and sends files back selecting
them based on configured keywords found.
2. Receives management packets and forwards them to the WRAP Package daemon. The
default configuration is empty, so no files can be requested with business cards.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
4.4.2.1 I
NSTALL POINT CONFIGURATION
The Install Point is configured both by the "setup" application (the logging device / file, see 5)
Install Point Settings) and mainly with its configuration file, "/etc/installpoint.conf".
The configuration file can consists of the following lines:
'#' starts comment line
- # InstallPoint(tm) database file
'%' starts storage directory name definition (only one, last one used)
- %/var/lib/installpoint
All other lines are assumed to be "database" lines with four white space separated fields. When
a request vCard is received, it is parsed and these lines are scanned. If a match is found, a
filename specified is sent. There can be several matches, when several files can be sent. If the
request is not vCard or .wpk file, but for example a picture, it is handled as if it was empty
vCard.
filename
- filename to be sent, must locate in storage directory
"alias"
pincode
bdaddr
4.4.2.2 I
- string that must match in name field (first name or last name (N) or formatted
name (FN)) field in the vCard
- use "*" for accepting any
- NOTE: alias must be in quotes (as formatted name may contain spaces).
- pincode that must be in the preferred telephone (TEL;PREF) or voice telephone
(TEL;VOICE) number field in the vCard
- use '*' (with no quotes) for no pin code
- bdaddr that is allowed to ask for this file
- use '*' (with no quotes) for allowing anyone to request
NSTALL POINT EXAMPLE CONFIGURATION
# example installpoint config file
%/var/lib/installpoint
ipquery.wpk "ip" * *
<EOF>
With this configuration, anyone can send a vCard with "ip" in then name field, and the file
called "ipquery.wpk" is then sent back. The file "ipquery.wpk" must be located in the storage
directory "/var/lib/installpoint".