WRAP Access Server

User's and Developer's Guide

Bluegiga Technologies

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 assumes no responsibility for any errors which may appear in this manual. 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. iWRAP, WRAP THOR and WRAP Access Server are trademarks 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.


Table of Contents
1. Introduction
1.1. Licenses and Warranty
1.2. Bluegiga Technologies Contact Information
2. Getting Started with the Access Server
2.1. Powering Up
2.2. WWW Interface
2.3. Shell Prompt Access
2.3.1. Management Console
2.3.2. Accessing Remotely
2.3.3. Transferring Files to/from the Access Server
2.4. Introduction to Configuration
2.5. Using the Setup WWW Interface
2.6. Using the setup Command Line Application
2.7. Resetting Configuration
3. Using the System
3.1. Network Interfaces
3.2. Bluetooth
3.2.1. iWRAP Password Protection
3.2.2. LAN Access Profile
3.2.3. Serial Port Profile
3.2.4. Object Push and File Transfer Profile
3.2.5. PAN Profiles
3.2.6. Bluetooth Range Changing
3.2.7. BTCLI - iWRAP Command Line Interface Utility
3.2.8. serialbluetooth
3.2.9. Resetting Bluetooth Basebands
3.3. Compact Flash Cards
3.3.1. Compact Flash GPRS Cards
3.3.2. Compact Flash GPS Card
3.3.3. Compact Flash WiFi Cards
3.4. USB Memory Dongles
3.5. Servers
3.5.1. Finder
3.5.2. ObexSender
3.5.3. SMS Gateway Server
3.5.4. User Level Watchdog
3.5.5. Remote Management
3.5.6. FTP
3.5.7. Web Server
3.5.8. SNMP
3.5.9. OpenVPN
3.5.10. SSH
3.5.11. Telnet
3.6. Utilities
3.7. Real Time Clock
3.8. Time Zone
3.9. System Re-Install and Upgrade
4. Bluetooth Technology Overview
4.1. Frequency Bands and Channel Arrangement
4.2. Power Considerations
4.3. Radio Frequency Propagation
5. Software Development Kit
5.1. Introduction to SDK
5.2. Installing SDK
5.2.1. WRAP Access Server Software Development Environment System Requirements
5.2.2. Questions Asked by the Install Script
5.3. Creating Application
5.3.1. Application Examples
5.3.2. Creating a New Project
5.3.3. Building From the Command Line
5.3.4. Transferring an Application to the WRAP Access Server
5.3.5. Running an Application Transferred to Access Server
5.3.6. Using Debugger (GDB/DDD)
6. iWRAP - Bluetooth Interface
6.1. Terms
6.2. Starting the iWRAP Servers
6.3. Writing iWRAP Applications
6.3.1. Forklistener
6.3.2. iWRAP Client
6.4. Commands Controlling iWRAP
INFO -- Get basic info
QUIT -- Close iWRAP connection
SET -- Change parameters
SAVE -- Save iWRAP settings
LOAD -- Run iWRAP command script
PING -- Ask if connection is alive
PONG -- Connection is alive
ECHO -- Send a message to other iWRAP clients
LOCK -- Lock other iWRAP clients
UNLOCK -- Unlock other iWRAP clients
SHUTDOWN -- Close iWRAP server
SLEEP -- Wait a second
6.5. Finding Bluetooth Devices
INQUIRY -- Search for other devices
NAME -- Find a friendly name
6.6. Making a Bluetooth Connection
CALL -- Connect to other device
CONNECT -- Connected to other device
NO CARRIER -- Disconnected from other device
RING -- Other device is calling you
RINGING -- Call in progress
CLOSE -- Disconnect
LIST -- List connections
STATUS -- Status of a connection
6.7. Service Discovery
SDPSEARCH -- Browse SDP Records
SDPATTR -- Browse SDP Records
SDPQUERY -- Browse SDP Records
SDP bdaddr -- Check devices SDP
SDP ADD -- Add entry to local SDP
SDP DEL -- Delete entry for local SDP
SDP LIST -- List local SDP
6.8. Example Sessions
6.9. Error Codes
6.10. OBEX Libraries
6.10.1. libobex
6.10.2. libobexclient
6.10.3. obexbrowser
7. I/O API
7.1. Led and Buzzer API
7.2. GPIO API
8. Advanced Use Cases for Access Server
8.1. Making Access Server Secure
8.2. Digital Pen
8.3. SPP to Socket
9. Certification Information and WEEE Compliance
10. About Bluegiga Technologies
A. Directory Structure
B. Setup Options
B.1. Security settings
B.2. Generic settings
B.3. Network settings
B.3.1. Default interface settings
B.3.2. Ethernet cable settings
B.3.3. WiFi hostap settings
B.3.4. WiFi hermes settings
B.3.5. GPRS settings
B.4. Bluetooth settings
B.4.1. Lan access profile settings
B.4.2. Personal area network user profile settings
B.4.3. Personal area network generic networking profile settings
B.4.4. Personal area network network access point profile settings
B.4.5. Object push and file transfer profile settings
B.4.6. Serial port profile settings
B.5. Applications
B.5.1. FTP server settings
B.5.2. ObexSender settings
B.5.3. SMS gateway settings
B.5.4. wpkgd settings
B.6. Advanced settings
B.6.1. Reboot (confirm)
B.7. Summary of Setup Options
C. Software Licenses
D. Supported Hardware

Chapter 1. Introduction

WRAP™

Bluegiga's WRAP product family offers for device manufacturers, integrators, companies and developers a simple and fast way to set-up wireless communication systems between standard or proprietary devices, networks, machines and instruments.

WRAP Access Server™

WRAP Access Server™ is a cutting edge wireless Bluetooth router. It supports multiple communication standards including Ethernet, WiFi, and GSM/GPRS enabling full media-independent TCP/IP connectivity. WRAP Access Server™ is easy to deploy and manage in existing wired and wireless networks without compromising speed or security. For very fast deployment, WRAP Access Server™ configurations can easily be copied from one device to another using USB memory dongles. The device can be conveniently managed and upgraded remotely over SSH secured links and by supporting SNMP (Simple Network Management Protocol), WRAP Access Servers can also be connected to customer's management and monitoring systems.

Usage scenarios and applications:

Key features:


1.1. Licenses 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\eula.pdf on the WRAP Access Server SDK CD-ROM). 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.

Some software components are licensed under the terms and conditions of an open source license. Details can be found in Appendix C. Upon request, Bluegiga will distribute a complete machine-readable copy of the source of the aforementioned open source 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\warranty.pdf on the WRAP Access Server SDK CD-ROM.


1.2. Bluegiga Technologies Contact Information

Please see https://www.bluegiga.com/ for news and latest product offers. For more information, contact .

Please check https://www.bluegiga.com/techforum/for software and documentation updates.

Please contact 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:

  • Access Server product type

  • Access Server product serial number

  • Access Server software version

  • End customer name

  • Date of purchase


Chapter 2. Getting Started with the Access Server

The WRAP Access Server can be controlled via the WWW interface, by entering commands and using applications at Access Server shell prompt or by sending and/or retrieving files to/from the Access Server.

Note: The default username is root with password buffy.


2.1. Powering Up

To get started with the WRAP Access Server, connect it to your local area network (LAN) using an Ethernet cable and connect the power adapter. The Access Server will power up and retrieve the network settings from your network's DHCP server.

The WRAP Access Server will also use Zeroconf (also known as Zero Configuration Networking or Automatic Private IP Addressing) to get an unique IP address in the 169.254.x.x network. Most operating systems also support this. So, you can connect your controlling laptop with a cross-over Ethernet cable to the WRAP Access Server, then power up the Access Server, and the devices will automatically have unique IP addresses in 169.254.x.x network.

Note: If you need to configure the network settings manually and cannot connect first using Zeroconf, you can do it using the management console, see subsection Section 2.3.1.

Locations of the physical interfaces of the Access Server are described in Figure 2-1 and Figure 2-2.

Figure 2-1. WRAP Access Server Connectors

Note: There is no power switch in the WRAP Access Server. Unplug and plug the power adapter to switch the power on and off. The power led in Figure 2-2 is on when the power adapter is connected.

Figure 2-2. WRAP Access Server LEDs

All the blue status LEDs are turned off when the boot procedure is finished and the Access Server is ready to be connected.


2.2. WWW Interface

Most WRAP Access Server functionality can be controlled via the WWW interface using any standard WWW browser.

The wrapfinder application (see Figure 2-3), available for Windows operating system from Bluegiga Techforum (https://www.bluegiga.com/techforum/) provides easy-to-use interface for finding the WRAP Access Servers (with SW version 2.1.0 or later) in the local area network.

Figure 2-3. WRAP Access Server Finder Application

The wrapfinder automatically identifies the broadcast address of the network it runs in and shows the IP addresses, serial numbers and WRAP Access Server device types it could find using UDP broadcast when it was launched.

Note: Normally, there are two entries for one Access Server. Use the one with the IP address in your local area network. Use the one with the 169.254.x.x, the Zeroconf network address, when it is the only one shown.

You can change the broadcast address used for finding the Access Servers. A new scan can be done by clicking Rescan.

Select an Access Server (by clicking its IP address) and click Details to see more information (like the Bluetooth addresses and friendly names) of the Access Server. See Figure 2-4 for details.

Figure 2-4. Details Dialog of WRAP Access Server Finder

Click Connect or double-click an IP address to connect to the selected Access Server using a WWW browser.

Click Exit to close the program.

Note: To find the IP address of the Access Server without wrapfinder, see Section 2.3.2.

The WWW interface is accessed at http://wrap-ip/, where wrap-ip is the IP address of the WRAP Access Server (see Figure 2-5).

Figure 2-5. WRAP Access Server WWW Interface

From the top-level page, click Setup to log in to the configuration interface. The default username is root and the default password is buffy (see Figure 2-6).

Figure 2-6. WWW Login Prompt for Access Server Setup

After logging in, you can configure several WRAP Access Server settings (see Figure 2-7). These are discussed in detail in Section 2.4.

Figure 2-7. The WWW Configuration Interface of the Access Server


2.3. Shell Prompt Access

Shell prompt access may be needed for advanced controlling operations that cannot be performed using the WWW interface.

You can get to the shell prompt using either SSH or the management console. The management console over a serial cable should only be needed to change the network configuration settings in the case were the network configuration using DHCP or Zeroconf is not possible. All further controlling activities can be performed remotely using SSH sessions over Ethernet or Bluetooth LAN/PAN connection.

If you can make SSH connection from a device that has Bluetooth LAN Access or PAN profile support, you don't need the management console. Just connect to the Access Server 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 question (model 2293 has three Bluetooth radios, any of which can be connected). After you have connected (no PIN code, username or password needed), connect using SSH to the device in the other end of the connection, typically 192.168.160.1. You can also use the wrapfinder application to find the IP address (see Section 2.2 for details).

Note: Bluetooth LAN Access is disabled by default. Use the WWW interface to enable it, if needed.

Note: The default username is root with password buffy.


2.3.1. Management 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 setup 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 settings in with the free COM port

    Table 2-1. The Management Console Port Settings

    SettingValue
    Speed115200bps
    Data Bits8
    ParityNone
    Stop Bits1
    Flow ControlNone
  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 2-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.3.2. Accessing Remotely

When the WRAP Access Server is connected to a LAN it tries to get the IP address using DHCP and Zeroconf by default. You can then use the wrapfinder application to find the IP address (see Section 2.2).

If you cannot get the IP address using the wrapfinder, another way to see the IP address of the WRAP Access Server is to connect with a management console (see previous section), 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 Access Server board. For example, in the following capture from the management console, the IP address is 192.168.42.3.


        [root@wrap /]$ ifconfig nap
        nap      Link encap:Ethernet  HWaddr 00:07:80:00:BF:01
                 inet addr:192.168.42.3  Bcast:192.168.42.255  Mask:255.255.255.0
                 inet6 addr: fe80::207:80ff:fe00:bf01/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, SCP or SFTP.

Note: The default username is root with password buffy.


2.3.3. Transferring Files to/from the Access Server

You can transfer file to and from the Access Server by default using for example:

  • SCP (secure copy over SSH)

  • SFTP (secure ftp connection over SSH)

  • FTP (plain ftp connection).

    Note: FTP is disabled by default for security reasons. Use SFTP instead.

    Tip: If enabled, use the integrated client of the Internet Explorer (type ftp://root:buffy@wrap-ip-address/ in the address bar)

  • Bluetooth OBEX (Object Push and File Transfer Profiles) to/from directory /tmp/obex in WRAP Access Server

  • NFS (mount a nfs-share from a remote device as a part of the file system of the Access Server)

  • SSHFS (mount a WRAP Access Server directory over SSH as a part of the filesystem of any other Linux host)

    To download and install SSHFS, visit http://fuse.sourceforge.net/sshfs.html.

  • USB memory dongle (see Section 3.4 for more information).

  • Xmodem/Ymodem/Zmodem (use rz/rx/rb/sz/sx/sb commands from the management console)

For examples of file transferring, see Section 5.3.4.


2.4. Introduction to Configuration

When the WRAP Access Server is installed and powered up for the first time, the default configuration settings are being used. With these settings, the Access Server automatically configures its network settings assuming that the board is connected to a LAN network with a DHCP server running. Additionally, the Access Server also uses Zero Configuration Networking (also known as Automatic Private IP Addressing) to connect to the 169.254.x.x network, which can be used if the network has no DHCP server.

After booting, you can use the Access Server as a Bluetooth 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 Access Server.

Most of the settings of the WRAP Access Server are configurable using the setup application. It has a WWW interface at http://wrap-ip/setup but it can also be run at the command line.

All configurable settings in the setup application are listed in Appendix B with their help.

Note: The default username is root with password buffy.


2.5. Using the Setup WWW Interface

The easiest way to change the Access Server settings is to use the WWW interface. Accessing the WWW interface is instructed in Section 2.2.

Typical WWW configuration page example is shown in Figure 2-8 (This page can be found at SetupSecurity settings)

Figure 2-8. Example WWW Setup Page

The different parts of a WWW Setup page are discussed in the following:

  • Changes have been saved. -line

    This line comes visible when the user saves the changes by clicking the Save button (or by clicking a toggling Yes/No link). It confirms that the changes have been saved into permanent storage.

    If invalid values were entered into one or more fields, an error message is shown at this line (see Figure 2-9).

    Figure 2-9. Trying to Save an Invalid Input

    Note: Rebooting of the Access Server is typically necessary to take changes into use. This can be done via the WWW interface (Advanced settings menu).

  • Number or text entry fields

    Most of the configurable settings are text (or number) entry fields. For some fields (like IP address or netmask), there are restrictions on the input format. Setup validates the input at save time and accepts only valid data. The fields with errors are shown to the user so that mistakes can be fixed (see Figure 2-9).

  • Help -link

    Clicking the Help link will retrieve the setup page again with requested help information displayed, like in like in Figure 2-10.

    Figure 2-10. Help Links in WWW Setup

    Note: If you have made changes to settings on the page before clicking Help and not saved them yet, they are lost.

  • Yes and No radio buttons

    These buttons are used to configure typically a setting that can be either enabled or disabled, but that is not connected to another setting that would be hidden or shown according to the value of this one.

  • Link to a configuration file

    Some of the configurable settings are actually editable configuration files, like /etc/httpd.conf for WWW passwords. Clicking the link will retrieve the file for editing in the browser window, or create a new file, if it does not exist. See Figure 2-11.

    Figure 2-11. Editing Files in WWW Setup

    Note: Any file can be edited via the WWW Setup, in page SetupAdvanced settingEdit other configuration files.

  • Reset -button

    Reset -button resets the fields to the values currently in use by the Access Server, i.e. it discards the changes that have not been saved yet.

    Note: This does not make a "factory reset".

  • Save -button

    Save -button sends the WWW page for the setup application for validation. If the values in the fields are valid, they are saved to permanent storage and the page is refreshed with Changes have been saved. message at top and the accepted values in the fields.

    If there were errors in the fields, these are shown as in Figure 2-9.

    Note: Rebooting of the Access Server is typically necessary to take changes into use. This can be done via the WWW interface (Advanced settings menu).

  • Back -link

    Returns to the previous level of the Setup menu hierarchy.

    Note: This does not save changes in the fields at the current page.

  • Exit -link

    Quits the setup application and returns to the WRAP Access Server's main WWW page.

    Note: This does not save changes in the fields at the current page.

  • Toggling Yes/No and on/off links

    Clicking Yes/No link (see Figure 2-12) immediately changes the setting and saves the change. Typically this is used with settings that require some other settings to come visible or to hide according to this setting.

    Figure 2-12. Yes / No links in WWW Setup

    The on/off links in SetupApplicationsDefault bootup applications behave in a same way, making and saving the change immediately (see Figure 2-13).

    Figure 2-13. Selecting Default Bootup Applications in WWW Setup

  • Upload links

    WWW Setup has settings that allow user to upload files to the Access Server, for example SetupAdvancedUpload a software update (see Figure 2-14).

    Figure 2-14. Uploading files via WWW Setup

    Use Browse... button to select a file to be uploaded, and send it to the Access Server by clicking Upload.

  • Browsing files

    Some WWW Setup pages allow users to browse the WRAP Access Server filesystem or part of it, like SetupAdvancedBrowse files (see Figure 2-15).

    Figure 2-15. Browsing files via WWW Setup

    Click the directory names to navigate in the filesystem.

    Click del to delete a file or an empty directory.

    Warning

    Deletion is not confirmed.

The WWW Setup has also menu items that run commands in the Access Server and then show the output in the browser window. Some commands, like rebooting the Access Server, are confirmed before execution.


2.6. Using the setup Command Line Application

The basic configuration settings can also be changed using the setup application at command line interface.

The setup application displays the settings in a hierarchical menu (see Figure 2-16). 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.

Figure 2-16. Using the setup Command Line Application

Note: Ensure that your terminal application does not send line ends with line feeds. If your terminal sends both CR and LF when Enter is pressed, you cannot navigate in the setup application.


2.7. Resetting Configuration

You can restore the default configuration with setup application 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 Access Server's command prompt will suffice:


      [root@wrap /]$ setup -r
      [root@wrap /]$ reboot
    

Note: This does not reset the edited files to factory defaults, only the other settings changed with WWW Setup or setup command line application.


Chapter 3. Using the System

This chapter describes the basic features of a Bluegiga WRAP Access Server and their usage. This includes information on using the Access Server board as a Bluetooth LAN/PAN Access Point or a Bluetooth Serial Port Cable Replacer, using the Web Server, ObexSender, 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 Access Server Software Development Environment to be installed.

Note: The default username is root with password buffy.

Note: Most of the configuration 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 MS-DOS format (happens for example if you transfer the files to the Windows for editing with Notepad), where the lines end with both Carriage Return and Line Feed (CR+LF, "\r\n") characters.


3.1. Network Interfaces

The network interface in the WRAP Access Servers are described in Table 3-1.

Table 3-1. WRAP Access Server Network Interfaces

InterfaceDescription
napDynamic virtual Ethernet ("cable") device. This is the device having an IP address. All the programs should use this device instead of eth0.
eth0Real Ethernet device, dynamically linked to nap device. Do not use this, use nap instead!
eth1WiFi device for the Hermes driver (client mode only).
wlan0WiFi device for the Hostap driver. In client mode this device has an IP address, in access point mode it is dynamically linked to nap device.
wifi0Virtual control device for wlan0. Do not use.
gnVirtual device for PAN-GN connections.
bnep#These devices are used for incoming and outgoing PAN connections. They are created, deleted and linked (to nap or gn) dynamically.
ppp#These devices are used for incoming and outgoing LAP connections. They are created and deleted dynamically. By default data coming from ppp# is masqueraded to nap device.

3.2. Bluetooth

The iWRAP servers (one in WRAP Access Server 2291, three in WRAP Access Server 2293) are started automatically at power-up. By default, the Serial Port, PAN and Object Push and File Transfer Profiles are activated. The iWRAP servers can be accessed and controlled (by applications or even interactively with a telnet client) using the iWRAP interface, described in section 9. Currently, there can be up to 14 simultaneous Bluetooth connections between a single master iWRAP server and up to 7 simultaneous slaves.


3.2.1. iWRAP Password Protection

The access to the iWRAP can be password protected. By default it's buffy, but it can be unset or changed with the setup application (see Section 2.4). The password is case sensitive. The password must be typed in as the first command after the server has replied with "READY."


3.2.2. LAN Access Profile

This profile is not automatically started at boot. The default settings can be changed with the setup application (see section Section 2.4), or runtime with the iWRAP interface (see Chapter 6).

The Access Server board can also act as a LAN Access Client, but in this case it must be controlled manually using iWRAP commands, described in Chapter 6.

Note: Since Bluetooth specification 1.2, LAN Access Profile has been deprecated.


3.2.3. Serial 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-1.

Figure 3-1. 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.

In state B) the long serial connection is replaced with a Bluetooth Serial Port Profile connection between the two Access Server devices. These Access Server devices are then connected locally to the user devices with (short) serial cables. The cable between user device A and Access Server device A must be a cross-over cable. The cable between user device B and Access Server 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 Access Server 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 115200 bps, 8 data bits, no parity, 1 stop bit, and RTS/CTS enabled. To change these settings, use the setup application or the WWW Setup interface, as described in Section 2.4.

Note: To disable Serial Port Profile, navigate to SetupApplications Default bootup applications in the WWW Setup interface, and switch serialport application to off.

Disabling can also be done from command prompt with command chkconfig --del serialport.


3.2.4. Object Push and File Transfer Profile

Access Server has two OBEX profiles: Object Push Profile (ObjP) and File Transfer Profile (FTP). You can use these profiles to transfer files easily between different Access Server devices and other devices supporting ObjP/FTP.

These profiles are handled by forwarding incoming calls to obexserver program, which handles both profiles. The working directory is /tmp/obex, and users have full read and write access there. By default, the default contact card /etc/default.vcf is copied there at boot.

In ObjP mode obexserver will prefix received files with sender's Bluetooth address and iWRAP port number.

Two simple command line utilities, obexput and obexget, are provided. They can be used to send and retrieve files to and from another Bluetooth device supporting ObjP/FTP.

Usage: obexput [parameters] bdaddr channel file(s)

Note: You can use the friendly name instead of Bluetooth address as the "bdaddr" parameter and keywords "OBJP" and "FTP" as the "channel" parameter for automatic service discovery.

Enter either of these commands without parameters to get a short help for using the command.

A non-zero return value means error. Reason for this error is printed to terminal. See Section 6.10 for a list of OBEX Library's return codes.


3.2.5. PAN Profiles

The WRAP Access Server has support for all PAN profile modes: Personal Area Network User (PANU), Network Access Point (NAP) and Generic Networking (GN).

The device creating the PAN connection decides, which of these modes are to be used. Incoming connections are handled automatically by the Access Server. The Access Server board can also act as a PAN client, but in this case it must be controlled manually using the iWRAP interface, described in the Chapter 6.


3.2.6. Bluetooth Range Changing

The transmit power of the WRAP Access Server 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_class# is given, it is recommended to reboot the Access Server once to restart ObexSender and other applications connected to the iWRAP server(s).

Note: When the operation is successful, you should get one Can't open baseband message with WRAP Access Server model 2293 and three messages with 2291.


3.2.7. BTCLI - iWRAP Command Line Interface Utility

You can send commands to a iWRAP 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 Access Server iWRAP 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.

The iWRAP commands are described in Chapter 6.


3.2.8. serialbluetooth

It is also possible to control the first iWRAP 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 Section 2.4.

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 iWRAP server. All the commands available via iWRAP 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.


3.2.9. Resetting Bluetooth Basebands

In case of rare failures in the Bluetooth baseband level, it is possible to give hardware reset for the basebands while the other system services are running with the following command sequence at the command line interface of WRAP Access Server:


        [root@wrap /]$ /etc/init.d/bluetooth stop
        [root@wrap /]$ echo ABCD > /dev/bbreset
        [root@wrap /]$ sleep 1
        [root@wrap /]$ echo abcd > /dev/bbreset
        [root@wrap /]$ sleep 2
        [root@wrap /]$ /etc/init.d/bluetooth start
      

3.3. Compact Flash Cards

WRAP Access Server functionality can be extended using GSM/GPRS, WiFi and GPS Compact Flash cards. The supported compact flash cards are listed in Appendix D.


3.3.1. Compact Flash GPRS Cards

The Compact Flash GPRS card is identified automatically by the operating system when inserted. The WRAP Access Server can use the GPRS card to connect to the GPRS network or to act as an SMS gateway (to send and receive SMS messages).

The GPRS mode is enabled and settings like SIM card's PIN code are configured using the setup application or its WWW interface, see Section 2.4 and documentation for SetupNetwork settingsEnable GPRS interface in Appendix B.

Using the WRAP SMS Gateway Server is documented in Section 3.5.3.

If needed for special use, the Compact Flash GPRS card can also be accessed directly from /dev/ttyS0, a device file which exists when the GPRS card is successfully initialized.


3.3.2. Compact Flash GPS Card

The Compact Flash GPS card is identified automatically by the operating system when inserted. At that time, the device file /dev/ttyS0 is created and the GPS card can be accessed using that device with the serial port settings in use by the GPS card.

The supported compact flash cards are listed in Appendix D.


3.3.3. Compact Flash WiFi Cards

WRAP Access Server has support for Prism II/III based CF WiFi cards. The supported compact flash cards are listed in Appendix D.

Depending on the firmware version, two different drivers must be used. The firmware version can be seen after the insertion of the card in the system log file /var/log/messages, which can be viewed with the WWW Setup interface at SetupAdvanced settingsShow system log file.

You need to use the Hostap driver, if you can see the following line in the log:


          eth1: Looks like an Intersil firmware version 1.7.4
      

If the firmware version is below 1.7.4, you must use the Hermes driver.

Selection of the driver and configuration is done with the setup application or its WWW interface at SetupNetwork settings.

Standard set of wireless utilities are provided to fine-tune your WiFi configuration:

  • iwconfig

  • iwlist

  • iwpriv

For more info see: http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html


3.4. USB Memory Dongles

Access Server's persistent memory storage can be extended using an USB memory dongle. The USB memory dongles are also used by the The WRAP Access Server Remote Management System (see Section 3.5.5) - each time a dongle is inserted, it is automatically mounted, scanned for management packets which are processed and unmounted.

To use the USB dongle for own applications it must be mounted manually with command


      [root@wrap /]$ mount -t vfat usbdevice /mnt/usb
    

The usbdevice parameter is a path to the USB dongle filesystem device. For the first dongle inserted after a reboot, it is /dev/scsi/host0/bus0/target0/lun0/part1, if the dongle is partitioned and and /dev/scsi/host0/bus0/target0/lun0/disc, if the dongle has no partition table. If you have used several dongles after reboot, the host0 part of the path must be changed to host1 or host2 and so on. Example of finding the correct device automatically can be seen in script /usr/sbin/hotplub.usb.

Note: Remember always to unmount the memory dongle with the command


          [root@wrap /]$ umount /mnt/usb
        

Note: Dongles with several partition tables do not fully work with the WRAP Access Server. In case of problems, please contact .


3.5. Servers

The Access Server server applications are started automatically at system power-up or when needed by the iWRAP server or the Internet services daemon. The servers and their purposes are described in Table 3-2.

Table 3-2. Access Server Servers

ServerDescription
bluetoothWRAP Access Server iWRAP Server, described in detail in Chapter 6.
finderWRAP Finder Service.
obexsenderWRAP ObexSender server.
smsgwWRAP SMS gateway server, described in detail in Section 3.5.3. Note: By default, this is disabled. Use setup application or chkconfig --add smsgw command to enable it.
watchdogWRAP user level watchdog.
wpkgdWRAP remote management system daemon.
cardmgrDaemon to monitor Compact Flash cards.
crondDaemon to execute scheduled commands. Configurable with /etc/crontab in the same way as any Linux crond. Note: By default, this is disabled. Use the WWW interface of the setup application or chkconfig --add crond command to enable it.
ftpdInternet File Transfer Protocol Server. Configurable with setup application. Note: By default, this is disabled. Use the WWW interface of the setup application or chkconfig --add ftpd command to enable it.
dhcpcdDHCP client daemon for automatic network configuration.
inetdInternet services daemon. Note: By default, this is disabled. Use setup application or chkconfig --add inetd command to enable it.
httpdWeb server, described in detail in Section 3.5.7.
pppdPoint to Point Protocol daemon. Used by the iWRAP server. Can be used manually over the user serial port (/dev/ttyAT1).
snmpdSNMP daemon.
sshdSSH daemon.
syslogdSystem logging daemon. Configurable with the setup application.
telnetdTelnet protocol server. Note: By default, this is disabled. Use setup application or chkconfig --add telnetd command to enable it.

3.5.1. Finder

The Finder service is a small service, which listens for UDP broadcast queries from the WRAP Access Server Finder applications and responses to those queries with identification information (IP address, model, serial number, etc.) about the Access Server.


3.5.2. ObexSender

The ObexSender application is started automatically in the WRAP Access Server. Its purpose is to receive business cards (vCards), images or other files, and analyze their content and send files back selecting them based on configured keywords found.

ObexSender can also inquiry for bluetooth devices, and automatically send one or more files to all new devices found.


3.5.2.1. ObexSender Configuration

ObexSender can be configured with setup application or by editing /etc/obexsender.conf file (see Section 2.4).


3.5.3. SMS Gateway Server

The WRAP SMS Gateway server supports Nokia 20, Nokia 30 or Wavecom WMOD2 compatible GSM terminals and the supported GSM/GPRS Compact Flash cards for sending and receiving SMS messages. By default the Compact Flash card is used. The PIN code query of the SIM-card at power-up must be disabled.

The WRAP SMS Gateway Server is disabled by default. To enable it, use the setup application's WWW interface, as described in section Section 2.4. Enabling is done at SetupApplicationsDefault bootup applicationssmsgw.

To use Nokia terminals the device must be connected to the user serial port when the server starts up and the terminal must be configured to operate in RS-232/AT-command. The Nokia terminals are configured with the N20 or N30 Configurator application.

The WRAP SMS Gateway is configured to use the terminal connected to the user serial port with the setup application or its WWW interface by changing the setting at SetupApplicationsSMS gateway settingsComport device to /dev/ttyAT1 from the default /dev/ttyS0.

Note: If you are using user serial port you have to disable the Bluetooth Serial Port Profile, as they share the same physical user serial port.

For further information on using smsgw, see the makesms example in Section 5.3.1.


3.5.4. User Level Watchdog

The WRAP User Level Watchdog daemon listens on UDP port 4266 for "id timeout" messages. "id" is an ASCII string, without spaces. If "timeout" equals to 0 (zero), the "id" is removed from the list of processes to wait. If "timeout" is greater than 0 (zero), the "id" is added or updated.

When there is no message for "id" received within the "timeout" seconds, the user level watchdog dies and the WRAP Access Server is rebooted by the kernel watchdog.

The watchdog command can be used to send messages to the watchdog daemon. This is done via command watchdog id timeout, for example watchdog test 5.


3.5.5. Remote Management

The WRAP Access Server contains simple tools that provide base for full and secure remote management of the device.

The basic remote management can be performed using the WWW Setup interface, SSH command line access and SCP and SFTP file transfer protocols.

In addition to them, the Access Server contains the WRAP Remote Management System for transferring management packets over different medium to the Access Server and automatically sending response packets back.

The management packets (*.wpk) are processed automatically when they are transferred to the autoinstall directory in the WRAP Access Server (/tmp/obex by default, configurable with setup application or WWW interface at SetupApplicationswpkgd settings). Easiest way to transfer a management packet to this directory is to upload it from WWW Setup at SetupAdvanced settingsUpload a software update.


3.5.5.1. Overview

The WRAP Remote Management System top level architecture is shown in Figure 3-2.

Figure 3-2. WRAP Remote Management Architecture

A management action is performed using the following protocol:

  1. A management packet (*.wpk) is prepared by the customer system.

  2. The management packet is delivered to Access Server, into packaging daemon's inbox directory. One can currently use Bluetooth, SCP, SFTP and plain FTP to do this. The packet can also be transmitted using a USB memory dongle or via the WWW Setup interface.

  3. The Access Server packaging daemon processes the management packet, possibly generating reply packet.

  4. (optional) Reply packet is delivered to the customer system.


3.5.5.2. Management Packet Format

  • Package name must be of format name.wpk, where "name" can be user defined.

  • Package must be tar -archive that is compressed with gzip (like files named *.tar.gz or *.tgz).

  • Package should contain package information file called wpkg.pif in package root (contents described later), otherwise built-in defaults for wpkg.pif are used.

  • All other files, if exist, should be data files, scripts or executables required for the management operation


3.5.5.3. Management Packet Information File Format

The management packet information file (wpkg.pif) consists of tags and their data, described here

%wpkg-version: 2

Contains information for version checking. 2 is currently the only supported version. This is also the default.

%wpkg-prepare: [command line[s]]

One or more commands (all lines until next tag are interpreted as command lines) to execute. Commands may contain parameters, redirections and job control as well.

Built-in default for this is /usr/bin/dpkg -i *.deb || echo ERROR: Installation failed.. This enables the special case of creating .wpk packets from .deb packets simply with tar czf foo.wpk foo.deb. (wpkg.pif is not needed in this special case).

%wpkg-reply: method

Where the generated reply packet is sent. By default it's sent to where it came from. Possible values are:

  • default

  • file:///path/filename

  • scp://remote:file

  • objp://bdaddr/

  • none

%wpkg-format: type

What kind of reply packet will be generated. Possible values are:

  • ascii (the default, everything echoed by prepare-section will be sent).

  • tgz (all files in current directory will be sent).

  • vcf (same as ascii, but assume it's vCard).

  • vmg (same as ascii, but assume it's vMessage).

  • vnt (same as ascii, but assume it's vNote).

  • vcs (same as ascii, but assume it's vCalendar).

  • html (same as ascii, but assume it's HTML).

%wpkg-auth: auth

Optional authentication string required by wpkgd.


3.5.5.4. Management Operation Example: Hello World

The simplest example of wpkg.pif is:


          %wpkg-version: 2
          %wpkg-prepare:
          echo Hello world
        

This will generate reply packet containing text "Hello world". You can generate the wpk-file simply giving the command tar czf hello.wpk wpkg.pif.


3.5.5.5. Management Operation Example: Software Update

More complex example of wpkg.pif is:


          %wpkg-version: 2
          %wpkg-prepare:
          FOO=`pwd`
          cd /
          tar xzf ${FOO}/files.tar.gz
          echo Done.
        

This example will extract files from included files.tar.gz. You can generate wpk-file with command tar czf update.wpk wpkg.pif files.tar.gz.


3.5.5.6. Management Operation Example: IPQUERY

In this example we build a simple packet that can be used with Bluetooth-enabled phone to retrieve IP Address of the WRAP Access Server. File wpkg.pif is:


          %wpkg-version: 2
          %wpkg-format:  vcf
          %wpkg-prepare:
          ipaddr() {
          echo `ifconfig nap | grep "inet addr" | awk -F [:] \
            \\{print\\$2\\} | awk \\{print\\$1\\}`
          }
          serialno() {
          echo `wrapid | grep Hardware | awk \\{print\\$5\\}`
          }
          echo -e "BEGIN:VCARD\r"
          echo -e "VERSION:2.1\r"
          echo -e "N:`serialno`\r"
          echo -e "TEL:`ipaddr`\r"
          echo -e "URL:`hostname`\r"
          echo -e "END:VCARD\r"
        

This example will send the reply back as vCard (contact card). Please note that you have to include all required vCard formatting by yourself. You can generate wpk-file simply giving the command tar czf ipquery.wpk wpkg.pif.

To use this example, send the file ipquery.wpk to the inbox of you Bluetooth phone. Check that you have Bluetooth enabled in the phone. Then from the phone's inbox, send the file ipquery.wpk via Bluetooth to the WRAP Access Server.


3.5.5.7. Management With USB Memory Dongle

When an USB memory dongle is inserted, the WRAP Access Server automatically tries to mount it (using VFAT type). When the mount is successful, the root directory is searched for a *.wpk packets and if a packet is found, it will be handled by the WRAP Package daemon. Optional reply packets are saved back to the root folder (if not otherwise stated in the %wpkg-reply tag).


3.5.6. FTP

If you enable FTP server then users can use it to log in in anonymously to /tmp/obex directory with download access or as root with password buffy to the root directory with full access. The password and other settings can be changed on the Access Server with setup application or by editing /etc/ftpd.conf file (see Section 2.4).

Note: Do not enable FTP because it's insecure. Use SSH (SCP or SFTP) instead. A nice client with a graphical user interface is for example WinSCP (http://winscp.net/).


3.5.7. Web Server

The integrated web server in the Access Server 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 Access Server file system.

The web server is configured to protect the WWW Setup interface with username and password. The default username and password can be changed as instructed in Section 2.4. For further information about using the web server for your own applications, see the web examples in Section 5.3.1.


3.5.8. SNMP

A separate software update package is available from Bluegiga Techforum (https://www.bluegiga.com/techforum/), which adds the Net-SNMP suite of applications to the WRAP Access Server. Current implementation for the Access Server is limited and will be extended in the future. However, it can be used to poll the basic status of the Access Server.

Configuration details can be found and altered in the configuration file /etc/snmp/snmpd.conf accessible as described in Section 2.4.

For more information about the Net-SNMP suite, see http://net-snmp.sourceforge.net/


3.5.9. OpenVPN

A separate software update package is available from Bluegiga Techforum (https://www.bluegiga.com/techforum/), which adds the OpenVPN™, a full-featured SSL VPN solution to the WRAP Access Server.

For more information about the OpenVPN™, see http://openvpn.net/.


3.5.10. SSH

By default, users can use SSH to log in (or SCP and SFTP to transfer files) as user root with password buffy. The password can be changed on the Access Server using the command passwd or with the setup application.


3.5.11. Telnet

If you enable telnet then users can use it to log in as user root with password buffy. The password can be changed on the Access Server using the command passwd or with the setup application.

Note: Do not enable telnet because it's insecure. Use SSH instead.


3.6. Utilities

The Access Server is basically a small Linux system. Whether logged in from the management console or with SSH, your shell session starts as the root user in the root directory. After that, you have the option to use most of the standard Linux utilities, briefly listed and described in Table 3-3. Most of the commands have a small built-in usage help that can be seen by executing the command with the -h or --help parameter.

Table 3-3. WRAP Access Server Utilities

ApplicationDescription
adduserAdd user to the system.
arpingPing hosts by ARP requests/replies.
awkPattern scanning and processing language.
b2b_class1WRAP Board2Board module control script (set basebands to class 1).
b2b_class2WRAP Board2Board module control script (set basebands to class 2).
b2b_class3WRAP Board2Board module control script (set basebands to shortest possible range).
b2b_defaultWRAP Board2Board module control script (restore all factory defaults, class 1).
basenameStrip directory and suffix from filenames.
bashBourne-Again SHell.
btcliWRAP iWRAP Server Command Line Interface utility.
btproxyWRAP iWRAP Proxy for Access Servers (test revision).
bunzip2Decompress bzip2-compressed files.
bzcatDecompress bzip2-compressed files to stdout.
cardctlMonitor and control the state of PCMCIA sockets.
catConcatenate files and print on the standard output.
chatAutomated conversational script with a modem.
chgrpChange group ownership.
chkconfigUpdates and queries runlevel information for system services.
chmod Change file access permissions.
chownChange file owner and group.
chrootRun command or interactive shell with special root directory.
clearClear the terminal screen.
cmpCompare two files.
cpCopy files and directories.
cpioCopy files to and from archives.
crontabMaintain crontab files for individual users.
cutRemove sections from each line of files.
datePrint or set the system date and time. Note: The date command does not store the date into the battery powered real time clock. Use hwclock application instead.
ddConvert and copy a file.
deluserDelete user from the system.
dfReport file system disk space usage.
dfuWRAP Board2Board module firmware upgrade tool.
dialupWRAP iWRAP helper application.
dirnameStrip non-directory suffix from file name.
dmesgPrints of controls the kernel ring buffer.
dpkgA medium-level package manager for (.deb) packages.
dpkg-debDebian package archive (.deb) manipulation tool .
duEstimate file space usage.
dump_cisRetrieves and parses the Card Information Structures for inserted PCMCIA devices, or optionally, parses CIS information from a file.
dunWRAP iWRAP helper application.
egrepPrint lines matching a pattern.
encode_keychangeProduce the KeyChange string for SNMPv3.
envRun a command in a modified environment.
exprEvaluate expressions.
falseDo nothing, unsuccessfully.
fgrepPrint lines matching pattern.
findSearch for files in a directory hierarchy.
freeDisplay the amount of free and used memory in the system.
ftpInternet file transfer program.
gdbserverRemote server for GDB debugger.
gettyOpens a tty, prompts for a login name, then invokes /bin/login.
grepPrint lines matching a pattern.
gunzipExpand gzip compressed files.
gzipCompress files into gzip format.
headOutput the first part of files.
hexdumpA filter which displays the specified files, or the standard input, if no files are specified, in a user specified format.
hostidPrint out a unique 32-bit identifier for the machine (not yet implemented).
hostnameShow or set the system's host name.
hwclockQuery and set the hardware clock.
idPrint information for username or current user.
ide_infoIDE device information.
ifconfigConfigure a network interface.
ifportSelect the transceiver type for a network interface.
ifuserChecks to see if any of the listed hosts or network addresses are routed through the specified interface.
insmodLoads the specified kernel modules into the kernel.
ipTCP/IP interface configuration and routing utility.
iptables, ip6tablesIP packet filter administration.
killTerminate a program.
killall Kill processes by name.
lnMake links between files.
loggerMake entries into the system log.
loginSign on.
lsList directory contents.
lsmodList loaded modules.
md5sumCompute and check MD5 message digest.
mkdirMake directories.
mknodMake block or character special files.
mktempMake a temporary file name (unique).
modprobeHigh level handling of loadable modules.
moreFile perusal filter for crt viewing.
mountMount a file system.
mvMove (rename) files.
net-snmp-configNet-SNMP tool.
nslookupQueries the nameserver for IP address of given host.
ntpclientSimple NTP client application.
obexbrowserThe WRAP obexbrowser. A command line OBEX client interface.
obexgetThe WRAP OBEX tool for retrieving a file from a remote device with ObjP/FTP support.
obexputThe WRAP OBEX tool for sending a file to a remote device with ObjP/FTP support.
pack_cisConvert a text description of a PCMCIA Card Information Structure (CIS) to its packed binary representation.
passwdUpdate a user's authentication token(s).
picocomMinimal dumb-terminal emulation program.
pidofFind a process ID of a running program.
ping, ping6Send ICMP ECHO_REQUEST packets to network hosts.
psReport process status.
pwdPrint the name of the current/working directory.
rb, rx, rz, sb, sx, szXmodem, Ymodem, Zmodem file receive and send.
rdateGet and possibly set the system date and time from a remote HOST.
rebootReboot the system.
reniceAlter the priority of running processes.
resetResets the screen.
rmRemove files or directories.
rmdirRemove empty directories.
rmmodUnload loadable modules.
routeShow / manipulate the IP routing table.
scpSecure copy (remote file copy program).
scsi_infoSCSI device description tool.
sedA Stream EDitor.
setupThe WRAP Setup Application. See Section 2.4.
sftpSecure file transfer program.
sleepDelay for a specified amount of time.
snmp*Set of standard SNMP command line applications.
sortSort lines of text files.
ssh, sloginOpenSSH SSH client (remote login program).
ssh-keygenSSH authentication key generation, management and conversion.
straceUtility to trace system calls and signals.
stringsDisplay printable strings in binary file.
sttyChange and print terminal line settings.
suRun a shell with substitute user and group IDs.
suloginSingle-user login.
syncFlush filesystem buffers.
tailOutput the last part of files.
tarTar archiving utility.
tcpdumpUtility for dumping traffic on a network.
telnetUser interface to the TELNET protocol.
testCheck file types and compare values.
timeRun command and display it's resource usage information when finished.
topProvides view of processor activity in real time.
touchChange file timestamps.
trTranslate or delete characters.
tracerouteTrace the route ip packets follow going to host.
trueDo nothing, successfully.
ttyPrint the filename of the terminal connected to standard input.
uartmodeWRAP Uartmode: Change the mode of the user serial port (DTE or DCE).
umountUnmount file systems.
unamePrint system information.
uniqRemove duplicate lines from sorted lines.
unzipList, test, and extract compressed files in a ZIP archive.
uptimeTell how long the system has been running.
uudecodeDecode a file create by uuencode.
uuencodeEncode a binary file.
wcPrint the number of bytes, words, and lines in files.
viA text editor.
wgetA utility to retrieve files from the World Wide Web.
wrapfinderFinds other Access Servers in the network.
wrapidThe WRAP Access Server identification program. Shows build and hardware configuration information.
whichShows the full path of (shell) commands.
whoamiPrints the user name associated with the current effective user id.
zcatExpand gzip compressed files to the standard output.
zeroconfZero Configuration Networking application.
xargsBuild and execute command lines from the standard input.

3.7. Real Time Clock

The system clock is read from the battery operated real time clock during boot. The time between the system time and the real time clock can synchronized using the hwclock application. Give command hwclock --help for more information.


3.8. Time Zone

The default time zone in the WRAP Access Server is UTC. You can change the timezone by replacing the file /etc/localtime with the correct file from your desktop Linux system (using your /etc/localtime or a wanted zone from /usr/share/zoneinfo).


3.9. System Re-Install and Upgrade

Access Server can be re-installed with the latest software version. The latest software updates and instructions are available at https://www.bluegiga.com/techforum/.

Most of the software updates are delivered as wpk file.

The easiest way to install these is:

  1. Start Access Server.

  2. Copy wpk file or files to an empty USB memory dongle.

  3. Insert the dongle into Access Server

  4. LEDs will turn on, and after 10-60 seconds they will turn off.

  5. Remove the dongle and reboot Access Server.

  6. All done.

See Section 3.5.5 for detailed description for other options and how to create your own wpk files.


Chapter 4. Bluetooth Technology Overview

Figure 4-1. Bluetooth Software and Hardware Components


4.1. Frequency Bands and Channel Arrangement

The Bluetooth system operates in the license-free 2.4 GHz ISM (Industrial Science Medial) band using frequency hopping spread spectrum (FHSS). In the vast majority of countries around the world this frequency band is 2400 - 2483.5 MHz. Some countries have, however, national limitations on the frequency range. In order to comply with these national limitations, special frequency hopping algorithms have been specified for these countries. It should be noted that products implementing the reduced frequency band will not work with products implementing the full band. Products implementing the reduced frequency band must therefore be considered local versions.

The Bluetooth frequency band is divided into distinct channels with 1 MHz channel spacing. In order to comply with out-of-band regulations in each country, a guard band is used at the lower and upper band edge. The frequency range is 2.400 - 2483.5 MHz, and the corresponding channels are f = 2402 + k MHz; k = 0 - 78. Transmission utilizes channel hopping over the specified range at 1600 kHz hop frequency. When operating in countries that permit the use of only a subset of the overall spectrum, transmission utilizes only the approved portions of the spectrum. The Bluetooth system utilizes Gaussian frequency shift keying (GFSK). The signaling rate is 1 Mbit/s.


4.2. Power Considerations

The Bluetooth system transceivers are classified into three power classes to support different link ranges.

  • Power Class 1. Output power is 1 - 100 mW (0 - 20 dBm) with mandatory power control ranging from 4 to 20 dBm.

  • Power Class 2. Output power is 0.25 - 2.5 mW (-6 - +4 dBm) with optional power control.

  • Power Class 3. Output power is less than 1 mW (0 dBm) with optional power control.

Bluegiga's WRAP products support a 100 meter link range with Option 1 (Power Class 1).


4.3. Radio Frequency Propagation

The radio frequency signal propagates in free space as a spherical wave, from a point source to all directions equally. In reality, the actual signal source always differs from a theoretic isotropic signal source. The power distribution of wireless telecommunication equipment in space is determined by the antenna radiation pattern. In free space the signal propagates with the speed of light and attenuates with 1/r2 relation. In reality, the environment always differs from free space. The propagation environment of wireless telecommunication equipment is restricted by all obstacles.

The basic mechanism of radio propagation is attributed to reflection, diffraction, and scattering depending on existing obstacles. Since the radio frequency signal propagates omnidirectionally, the transmitted signal arrives at the receiver following multiple paths deformed by the aforementioned propagation mechanisms. The received signal is the superposition of attenuated and delayed replicas of the transmitted signal, leading to fading of the transmitted signal and broadening of the duration of the transmitted pulse. The transmitted pulse delay spread leads to inter-symbol interference (ISI) because the subsequent symbols interfere with each other. The ISI leads to a bit error probability (BIT) floor that is independent of the signal to noise ratio (SNR). Depending on the time delay spread of the transmitted pulse or the amount of widening that the transmitted pulse experiences across the radio channel, the multipath interference differs. When the time delay spread of the transmitted signal is very small with respect to the signaling time, the multipath interference essentially leads to the signal fading phenomena of the received signal. When the time delay spread of the transmitted signal is high with respect to the signaling time, the multipath interference leads to the symbol interference phenomena of the received signal as well.

A major difference between indoor and outdoor environments is that the former is considerably more sensitive to changes in the geometry of the environment than the latter. This is because of the differences in distance between obstacles. For example, a door being shut rather than open may have a major impact on an indoor environment whereas a comparable event in an outdoor environment may have a minor impact.

The Bluetooth standard has been designed to operate in noisy radio frequency environments. Transmission utilizes fast frequency hopping and short packages to make the link efficient and robust. Fast hopping and short packages limit the impact of interfering devices on the same frequency band.


Chapter 5. Software Development Kit

5.1. Introduction to SDK

This manual describes how to create and use applications using the WRAP Access Server Software Development Environment. The relationships between the applications in the WRAP Access Server Software Platform are shown in Figure 5-1.

Figure 5-1. Relationship Between the Customer Applications and WRAP Access Server Software


5.2. Installing SDK

Note: The Software Development Environment can be installed only on a PC running the Linux operating system!


5.2.1. WRAP Access Server Software Development Environment System Requirements

The following hardware and software is required to run the WRAP Access Server Development Environment:

PC with

  • CD-ROM drive

  • Linux (tested with RedHat Enterprise Linux 3 and above, Fedora Core 2 and above)

    Devel libraries (especially zlib-devel and ncurses-devel) must be installed

    modutils-2.4.26 or newer must be installed

  • 300MB of available hard disk space

An Ethernet connection to a Local Area Network (also connected to the Access Server board) is highly recommended.

Mount the WRAP Access Server SDK CD-ROM or ISO image, change the current working directory to where it is mounted, and run the install script. If the user running install does not have privileges to create the directory for the toolchain, normally /usr/local/arm, the install scripts prompts for root password.

Example (things you need to type are printed like this):


        $ mount /dev/cdrom /mnt/cdrom
        $ (or mount -o loop /path/to/sdk2.iso /mnt/cdrom)
        $ cd /mnt/cdrom
        $ sh install
      

Install will ask you some questions (described below) regarding which components to install and the paths to install them to. If you are not very familiar with Linux, just press enter to these questions (the default values are suitable for most users and systems).


5.2.2. Questions Asked by the Install Script

Access Server toolchain directory � (default: /usr/local/arm)

This is the path where you want the WRAP Access Server Software Development tools (arm-linux-gcc, etc.) to be installed.

Note: If you change this value, the WRAP Access Server tools and libc must be recompiled. The recompilation process is very complicated and lengthy, and it may fail, depending on your system. Recompilation is done automatically by the install script, if necessary.

Development directory � (default: [home_of_current_user]/asdk)

This is the path where you want the WRAP Access Server Software Development Environment to be installed.

Development directory owner � (default: [current_user])

(Asked only if run as root) This is the username of