Silicon Laboratories Finland WRAPAS229X User Manual

Access Server

User’s and Developer’s Guide
Bluegiga Technologies
Access Server: User’s and Developer’s Guide
by Bluegiga Technologies
Published 2007-01-22 (3.1) Copyright © 2001, 2002, 2003, 2004, 2005, 2006, 2007 Bluegiga Technologies
Bluegiga Technologies reserves the right to alter the hardware, software, and/or specifications detailed herein at any time without
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 to Access Server............................................................................................................1
1.1. Licenses and Warranty ............................................................................................................2
1.2. Bluegiga Technologies Contact Information ........................................................................2
2. Getting Started with Access Server..................................................................................................3
2.1. Powering Up .............................................................................................................................3
2.2. WWW Interface ........................................................................................................................4
2.3. Shell Prompt Access.................................................................................................................7
2.3.1. Management Console .................................................................................................7
2.3.2. Accessing Remotely.....................................................................................................8
2.3.3. Transferring Files to/from Access Server ................................................................9
2.4. Introduction to Configuration ................................................................................................9
2.5. Using the Setup WWW Interface .........................................................................................10
2.6. Using the setup Command Line Application ....................................................................17
2.7. Resetting a Configuration .....................................................................................................18
2.8. Exporting and Importing Configurations...........................................................................18
3. Using the System ...............................................................................................................................19
3.1. Network Interfaces.................................................................................................................19
3.2. Bluetooth .................................................................................................................................19
3.2.1. iWRAP Password Protection ...................................................................................19
3.2.2. LAN Access Profile.................................................................................................... 20
3.2.3. Serial Port Profile .......................................................................................................20
3.2.4. Object Push and File Transfer Profile......................................................................21
3.2.5. PAN Profiles ...............................................................................................................22
3.2.6. Changing the Bluetooth Range................................................................................22
3.2.7. BTCLI - iWRAP Command Line Interface Utility ................................................22
3.2.8. serialbluetooth............................................................................................................22
3.3. Compact Flash Cards.............................................................................................................23
3.3.1. Compact Flash GPRS Cards .....................................................................................23
3.3.2. Compact Flash GPS Card .........................................................................................23
3.3.3. Compact Flash Wi-Fi Cards......................................................................................24
3.4. USB Memory Dongles and Compact Flash Memory Cards ............................................24
3.5. Servers......................................................................................................................................25
3.5.1. Finder ..........................................................................................................................26
3.5.2. ObexSender ................................................................................................................26
3.5.3. SMS Gateway Server................................................................................................. 26
3.5.4. User Level Watchdog ................................................................................................27
3.5.5. Remote Management ................................................................................................27
3.5.5.1. Overview ........................................................................................................27
3.5.5.2. Management Packet Format........................................................................28
3.5.5.3. Management Packet Information File Format ..........................................28
3.5.5.4. Management Operation Example: Hello World.......................................29
3.5.5.5. Management Operation Example: Software Update...............................30
3.5.5.6. Management Operation Example: IPQUERY ...........................................30
3.5.5.7. Management with USB Memory Dongle or Compact Flash Memory
Card ....................................................................................................................30
iii
3.5.6. FTP ...............................................................................................................................31
3.5.7. Web Server ..................................................................................................................31
3.5.8. SNMP ..........................................................................................................................31
3.5.9. OpenVPN....................................................................................................................31
3.5.10. SSH.............................................................................................................................32
3.5.11. Telnet .........................................................................................................................32
3.5.12. NTP ............................................................................................................................32
3.6. Utilities.....................................................................................................................................32
3.7. Real Time Clock ......................................................................................................................36
3.8. Time Zone................................................................................................................................37
3.9. System Re-Install and Upgrade............................................................................................37
4. SPP-over-IP .........................................................................................................................................38
4.1. How SPP-over-IP Works .......................................................................................................38
4.1.1. Standard Operation...................................................................................................38
4.1.2. Repeater Operation ...................................................................................................39
4.1.3. SPP-over-IP over GPRS.............................................................................................39
4.1.4. Opening Connections from Access Server.............................................................40
4.1.5. SPP-over-IP and COM Ports ....................................................................................41
4.2. Configuring SPP-over-IP.......................................................................................................41
4.2.1. Preparations................................................................................................................41
4.2.2. Preparations................................................................................................................44
4.2.3. Repeater Configuration ............................................................................................45
4.2.4. Wi-Fi Configuration ..................................................................................................46
4.2.5. GPRS Configuration ..................................................................................................46
5. Obexsender .........................................................................................................................................47
5.1. Key Features............................................................................................................................47
5.2. Use Cases.................................................................................................................................47
5.2.1. Content Push ..............................................................................................................48
5.2.2. Content Pull................................................................................................................48
5.3. Configuration..........................................................................................................................49
5.3.1. Getting Started ...........................................................................................................49
5.3.2. Updating Obexsender ...............................................................................................51
5.3.3. Ensuring Obexsender is Enabled ............................................................................52
5.3.4. Basic Obexsender Configuration.............................................................................53
5.3.5. Uploading Files ..........................................................................................................53
5.3.6. Advanced Obexsender Configuration....................................................................54
5.3.7. How to Store Files Sent to Access Server ...............................................................56
5.4. Monitoring Obexsender ........................................................................................................57
5.5. Troubleshooting and Known Issues ....................................................................................58
6. Software Development Kit ..............................................................................................................60
6.1. Introduction to SDK ...............................................................................................................60
6.2. Installing SDK.........................................................................................................................60
6.2.1. Access Server Software Development Environment System Requirements ....60
6.2.2. Questions Asked by the Install Script.....................................................................61
6.3. Creating Applications............................................................................................................62
6.3.1. Application Examples...............................................................................................62
6.3.1.1. Installing Examples.......................................................................................62
iv
6.3.1.2. Running Examples........................................................................................62
6.3.2. Creating a New Project .............................................................................................63
6.3.3. Building from the Command Line..........................................................................64
6.3.4. Transferring an Application to Access Server .......................................................64
6.3.4.1. Transferring an Application Using SCP or SFTP......................................64
6.3.4.2. Using SSHFS ..................................................................................................65
6.3.4.3. Transferring an Application Using Terminal Software ...........................65
6.3.4.4. Using NFS Mount .........................................................................................65
6.3.5. Running an Application Transferred to Access Server ........................................66
6.3.6. Using Debugger (GDB/DDD) .................................................................................66
6.3.7. Native SDK .................................................................................................................67
7. iWRAP - Bluetooth Interface ...........................................................................................................68
7.1. Terms........................................................................................................................................68
7.2. Starting the iWRAP Servers..................................................................................................68
7.3. Writing iWRAP Applications ...............................................................................................68
7.3.1. Forklistener .................................................................................................................69
7.3.2. iWRAP Client .............................................................................................................69
7.4. Commands Controlling iWRAP ..........................................................................................69
INFO ......................................................................................................................................70
QUIT ......................................................................................................................................71
SET .........................................................................................................................................72
SAVE......................................................................................................................................82
LOAD ....................................................................................................................................83
PING......................................................................................................................................84
PONG ....................................................................................................................................85
ECHO ....................................................................................................................................86
LOCK.....................................................................................................................................87
UNLOCK ..............................................................................................................................88
SHUTDOWN........................................................................................................................89
SLEEP ....................................................................................................................................90
7.5. Finding Bluetooth Devices....................................................................................................91
INQUIRY...............................................................................................................................91
NAME ...................................................................................................................................93
7.6. Making a Bluetooth Connection ..........................................................................................94
CALL .....................................................................................................................................94
CONNECT............................................................................................................................96
NO CARRIER .......................................................................................................................98
RING......................................................................................................................................99
RINGING............................................................................................................................100
CLOSE .................................................................................................................................101
LIST......................................................................................................................................102
STATUS ...............................................................................................................................104
7.7. Service Discovery .................................................................................................................105
SDPSEARCH......................................................................................................................105
SDPATTR ............................................................................................................................107
SDPQUERY.........................................................................................................................109
SDP bdaddr ........................................................................................................................110
v
SDP ADD ............................................................................................................................111
SDP DEL..............................................................................................................................112
SDP LIST .............................................................................................................................113
7.8. Example Sessions .................................................................................................................114
7.9. Error Codes ...........................................................................................................................114
8. I/O API ...............................................................................................................................................118
8.1. Led and Buzzer API .............................................................................................................118
8.2. GPIO API...............................................................................................................................118
9. Advanced Use Cases for Access Server .......................................................................................119
9.1. Making Access Server Secure .............................................................................................119
9.2. Saving Bluetooth Pairing Information Permanently.......................................................119
9.3. Digital Pen .............................................................................................................................119
9.4. OpenVPN ..............................................................................................................................120
9.4.1. Prerequisites .............................................................................................................120
9.4.2. Installing OpenVPN ................................................................................................120
9.4.3. Creating Certificates and Keys ..............................................................................121
9.4.4. Creating Configuration Files..................................................................................123
9.4.4.1. Server Configuration File...........................................................................123
9.4.4.2. Client Configuration File ...........................................................................126
9.4.5. Starting up VPN.......................................................................................................128
9.4.5.1. Starting up the Server.................................................................................128
9.4.5.2. Starting up the Client .................................................................................129
10. Certification Information and WEEE Compliance ..................................................................130
A. Directory Structure .........................................................................................................................133
B. Setup Options ..................................................................................................................................135
B.1. Security settings ...................................................................................................................135
B.2. Generic settings....................................................................................................................136
B.3. Network settings..................................................................................................................137
B.3.1. Default interface settings .......................................................................................138
B.3.2. Ethernet cable settings............................................................................................138
B.3.3. Wi-Fi settings ...........................................................................................................139
B.3.4. GPRS settings...........................................................................................................139
B.4. Applications..........................................................................................................................140
B.4.1. wpkgd settings ........................................................................................................141
B.4.2. FTP server settings..................................................................................................142
B.4.3. ObexSender settings ...............................................................................................143
B.4.3.1. Delete log (confirm)....................................................................................145
B.4.4. SMS gateway settings .............................................................................................145
B.5. Bluetooth settings ................................................................................................................146
B.5.1. Bluetooth profiles ....................................................................................................148
B.5.1.1. Lan access profile settings .........................................................................148
B.5.1.2. PAN user profile settings...........................................................................149
B.5.1.3. PAN generic networking profile settings................................................149
B.5.1.4. PAN network access point profile settings .............................................150
B.5.1.5. Serial port profile settings .........................................................................150
B.5.1.6. Object push profile settings.......................................................................151
vi
B.5.1.7. File tranfer profile settings ........................................................................151
B.6. Advanced settings ...............................................................................................................151
B.6.1. System information.................................................................................................153
B.6.2. Reboot system (confirm) ........................................................................................153
B.7. Summary of Setup Options ................................................................................................153
C. Open Source Software Licenses...................................................................................................158
D. Supported Hardware .....................................................................................................................162
vii

List of Tables

2-1. The Management Console Port Settings ........................................................................................8
3-1. Access Server Network Interfaces.................................................................................................19
3-2. Access Server Servers......................................................................................................................25
3-3. Access Server Utilities.....................................................................................................................32
6-1. Examples, Their Usage and Purpose ............................................................................................62
7-1. Supported Parameters for iWRAP SET Command....................................................................72
7-1. SAVE parameters.............................................................................................................................82
7-3. Supported Keywords for Replacing SDP UUIDs or Attributes..............................................105
7-1. SDP Response Formatting Characters........................................................................................107
7-5. iWRAP Errors.................................................................................................................................114
7-6. Errors Masks...................................................................................................................................115
7-7. HCI Error Codes ............................................................................................................................115
7-8. L2CAP Error Codes .......................................................................................................................116
7-9. SDP Error Codes ............................................................................................................................117
7-10. RFCOMM Error Codes ...............................................................................................................117
10-1. Excerpt of Table 1B of 47 CFR 1.1310........................................................................................131
C-1. Open Source Licenses in Access Server Software Components ............................................158
C-2. Access Server Open Source Software Components and Their Licences...............................158
D-1. Supported Hardware by Access Server ....................................................................................162
viii

Chapter 1. Introduction to Access Server

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.
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. Access Server is easy to deploy and manage in existing wired and wireless net­works without compromising speed or security. For rapid deployment, Access Server config­urations can easily be copied from one device to another by using USB memory dongles. The device can be conveniently managed and upgraded remotely over SSH secured links. By using Simple Network Management Protocol (SNMP), Access Servers can also be connected to the customer’s management and monitoring systems.
Access Server usage scenarios and applications:
Point-of-sales systems
Logistics and transportation systems
Telemetry and machine-to-machine systems
Medical and healthcare systems
Fitness and sport telemetry systems
Cable replacement
Content and application distribution to mobile phones and PDAs
Access Server key features:
Enables Bluetooth networking between multiple devices and networks
Serves up to 21 simultaneous Bluetooth connections
Offers an open platform for adding local applications
Acts as a transparent router or bridge
Supports all key communication medias:
Bluetooth
Ethernet
WiFi, GSM and GPRS with a Compact Flash card
USB and RS232
Incorporates a packet filtering firewall
Is fast and easy to install
Supports all relevant Bluetooth profiles and APIs
100 meter range / Software configurable to support 10 meter range
DHCP support for plug-and-play installation
Uncompromised security: SSH, firewall, and 128 bit Bluetooth encryption
1
Simple and secure mounting accessory available
Bluetooth, CE, and FCC certified
Compliant with Bluetooth 1.1, 1.2 and 2.0 Specification

1.1. Licenses and Warranty

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. It is also available on-line at http://bluegiga.com/as/current/doc/eula.pdf. 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, equip­ment, and media.
Some software components are licensed under the terms and conditions of an open source li­cense. Details can be found in machine-readable copy of the source of the aforementioned open source software components during a period of three (3) years from the release date of the software. Delivery costs of the source code will be charged from the party requesting the source code.
Chapter 1. Introduction to Access Server
Warning
Appendix C. Upon request, Bluegiga will distribute a complete
The Bluegiga WRAP Product Limited Warranty Statement is available on-line at http://bluegiga.com/as/current/doc/warranty.pdf.

1.2. Bluegiga Technologies Contact Information

Please see http://www.bluegiga.com/ for news and latest product offers. For more information, contact <sales@bluegiga.com>.
Please check http://bluegiga.com/as/ for software and documentation updates.
Please contact <support@bluegiga.com> 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
2

Chapter 2. Getting Started with Access Server

Access Server can be controlled in three ways:
by using the WWW interface
by entering commands and using applications at the Access Server shell prompt
by sending and/or retrieving files to/from Access Server.
Note: The default username is root and the default password is buffy.

2.1. Powering Up

To get started with Access Server, connect it to your local area network (LAN) by using an Ethernet cable, and connect the power adapter. Access Server will power up and retrieve the network settings from your network’s DHCP server.
Access Server will also use Zeroconf (also known as Zero Configuration Networking or Au­tomatic Private IP Addressing) to get an unique IP address in the 169.254.x.x network. Most operating systems also support this. In other words, you can connect your controlling laptop with a cross-over Ethernet cable to Access Server, then power up Access Server, and the devices will automatically have unique IP addresses in the 169.254.x.x network.
Note: If you need to configure the network settings manually and cannot connect first by using Zero­conf, you can do it by using the management console. For more information, see Section 2.3.1.
The physical interface locations of Access Server are described in Figure 2-1 and Figure 2-2.
Figure 2-1. Access Server Connectors
Note: There is no power switch in Access Server. The adapter is the disconnection device; the socket­outlet shall be installed near the equipment and shall be easily accessible. Unplug and plug the power adapter to switch the power on and off. The power led in connected.
Figure 2-2 is on when the power adapter is
3
Figure 2-2. Access Server LEDs
All the blue status LEDs are turned off when the boot procedure is finished and Access Server is ready to be connected.

2.2. WWW Interface

Most Access Server functionality can be controlled through the WWW interface by using any standard WWW browser.
Chapter 2. Getting Started with Access Server
The wrapfinder application (see Figure 2-3), available for the Windows operating system from Bluegiga Techforum (http://www.bluegiga.com/techforum/) provides an easy-to-use interface for finding Access Servers (with SW version 2.1.0 or later) in the local area network.
Figure 2-3. 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 Access Server device types it could find by using
4
Chapter 2. Getting Started with Access Server
UDP broadcast when it was launched.
Note: Normally, there are two entries for each 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 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 (such as the Bluetooth addresses and friendly names) on Access Server. See Figure 2-4 for details.
Figure 2-4. Details Dialog of Access Server Finder
Click Connect or double-click an IP address to connect to the selected Access Server by using a WWW browser.
Click Exit to close the program.
Note: To find Access Server ’s IP address without wrapfinder, see Section 2.3.2.
To access the WWW interface, enter the IP address of Access Server to the browser’s address field and press Enter (see Figure 2-5).
5
Chapter 2. Getting Started with Access Server
Figure 2-5. Access Server WWW Interface
From the top-level page, click Setup to log in to the configuration interface. The default user­name 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 Access Server settings (see Figure 2-7). These are discussed in detail in Section 2.4.
6
Chapter 2. Getting Started with Access Server
Figure 2-7. The WWW Configuration Interface of Access Server

2.3. Shell Prompt Access

Shell prompt access may be needed for advanced controlling operations that cannot be per­formed by using the WWW interface.
You can get to the shell prompt by using either SSH or the management console. The manage­ment console is only needed to change the network configuration settings if you cannot config­ure the network by using DHCP or Zeroconf. The management console is connected to Access Server with a serial cable. All further controlling activities can be performed remotely using SSH sessions over Ethernet or Bluetooth LAN/PAN connection.
If you can establish an SSH connection from a device that has Bluetooth LAN Access or PAN pro­file support, you do not need the management console. Just connect to Access Server by using LAN Access or PAN profile. 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 base­band in question (model 2293 has three Bluetooth basebands, any of which can be connected). After you have connected to the server (no PIN code, username or password needed), establish an SSH connection to the device at the other end of the connection, typically 192.168.160.1. You can also use the wrapfinder application to find the IP address (see
Note: Bluetooth LAN Access and PAN profiles are disabled by default. Use the WWW interface to enable them, if needed. The PAN profile can also be enabled by sending the enable-pan.wpk file (available on-line at http://bluegiga.com/as/current/enable-pan.wpk) to Access Server by using Bluetooth Object Push profile or by inserting a USB memory dongle with the file in its root direc­tory to Access Server’s USB port. Note: The default username is root and the default password is buffy.
Section 2.2 for details).
7
Chapter 2. Getting Started with Access Server

2.3.1. Management Console

If you do not have a Bluetooth LAN/PAN client and if Access Server is not connected to your LAN, or if you do not know the IP address given to Access Server, you can get the first shell prompt access by using the management console.
To setup the management console, proceed as follows:
1. Have a PC with a free COM port.
2. Power off Access Server.
3. Configure your terminal application, such as HyperTerminal in Windows, to use the settings below for your computer’s free COM port
Setting Value
Speed 115200bps
Data Bits 8
Parity None
Stop Bits 1
Flow Control None
Table 2-1. The Management Console Port Settings
4. Connect the serial cable shipped with Access Server to your PC’s free COM port.
5. Connect the serial cable to the management (user) port in Access Server (see Figure 2-1).
6. Power on Access Server.
7. Enter letter b in the terminal application during the first five seconds, while the blue LEDs in Access Server turn on one by one.
8. The management console is now activated and you can see the boot log in your terminal window.
Note: The boot process may stop at the following U-Boot prompt:
Hit any key to stop autoboot: 0 U-Boot>
If this happens, enter command boot to continue to boot Linux.
9. Wait for the device to boot up and end with the following prompt:
Please press Enter to activate this console.
10. Press Enter to activate the console. You will be logged in as root in directory /root:
[root@wrap root]
11. You can now control Access Server from the management console.

2.3.2. Accessing Remotely

When Access Server is connected to a LAN, it tries to get the IP address by using DHCP and Zeroconf by default. You can then use the wrapfinder application to find the IP address (see
8
Chapter 2. Getting Started with Access Server
Section 2.2).
If you cannot get the IP address by using the wrapfinder, another way to see the IP address of Access Server is to connect with a management console (see previous section), power on the unit and, after the system is up and running, give the ifconfig nap command. The inet addr field for the nap interface contains the IP address of Access Server. 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 to Access Server remotely over SSH, SCP or SFTP.
Note: The default username is root and the default password is buffy.

2.3.3. Transferring Files to/from Access Server

You can transfer files to and from Access Server by 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 FTP client on 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 Ac-
cess Server
NFS (mount an NFS share from a remote device as a part of Access Server ’s file system)
SSHFS (mount an Access Server directory over SSH as a part of any other Linux host file
system)
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 con-
sole)
For examples of transferring files, see
Section 6.3.4.
9
2.4. Introduction to Configuration
When Access Server is installed and powered up for the first time, the default configuration settings are being used. With these settings, Access Server automatically configures its network settings assuming that it is connected to a LAN network with a DHCP server running. Addition­ally, 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 up, the only Bluetooth profiles enabled are the Object Push and File Transfer Pro­files, used to send files to/from Access Server.
More Bluetooth profiles can be enabled, and most of Access Server settings can be configured by 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 short help texts.
Note: The default username is root and the default password is buffy.

2.5. Using the Setup WWW Interface

The easiest way to change Access Server settings is to use the WWW interface. Accessing the WWW interface is instructed in Section 2.2.
Chapter 2. Getting Started with Access Server
A typical WWW configuration page is shown in Figure 2-8 (This page can be found at Setup
−→ Security settings)
Figure 2-8. Example WWW Setup Page
10
Chapter 2. Getting Started with Access Server
The different parts of the WWW Setup page are discussed in the following list:
Status area
The status area serves two purposes:
It indicates that the changes are permanently saved when the user clicks the Save button
(or when the user clicks a toggling Yes/No link).
If invalid values were entered in one or more fields, an error message is shown in this area
(see Figure 2-9).
Figure 2-9. Trying to Save an Invalid Input
Note: It is typically necessary to reboot Access Server for the changes to take effect. This can be done through 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, such as the IP address or netmask, there are restrictions on the input format. Setup validates the input at save time and accepts valid data only. The fields with errors are shown to the user so that mistakes can be fixed (see Figure 2-9).
Help -link
Click the Help link to retrieve the setup page again with requested help information displayed. For an example, see Figure 2-10.
11
Chapter 2. Getting Started with Access Server
Figure 2-10. Help Links in WWW Setup
Warning
If you have made changes to the settings on the page before clicking Help and not saved them yet, they are lost.
Yes and No radio buttons
These buttons are typically used to configure a setting that can be either enabled or disabled, and this setting has no effect on the visibility of other settings.
Link to a configuration file
Some of the configurable settings are actually editable configuration files, such as
/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.
12
Chapter 2. Getting Started with Access Server
Figure 2-11. Editing Files in WWW Setup
Note: You can edit any file through the WWW Setup. to edit files, navigate to Setup −→ Advanced setting −→ Edit other configuration files.
Reset button
Reset button resets the fields to the values currently in use at Access Server. In other words, the Reset button discards unsaved changes.
Note: The Reset button does not make a "factory reset".
Save button
Save button sends the WWW page to the setup application for validation. If the values in the fields are valid, they are permanently saved and the page is refreshed with the Changes have been saved. message at the top. The accepted values are shown in the page fields.
If there were errors in the fields, these are shown as in Figure 2-9.
Note: It is typically necessary to reboot Access Server for the changes to take effect. This can be done through the WWW interface (Advanced settings menu).
Back link
Press the Back link to return to the previous level of the Setup menu hierarchy.
Note: Pressing the Back link does not save changes in the fields on the current page.
13
Chapter 2. Getting Started with Access Server
Exit link
Exit link quits the setup application and returns to the Access Server’s main WWW page.
Note: Pressing the Exit link does not save changes in the fields on the current page.
Toggling Yes/No and on/off links
Clicking the Yes/No link (see
Figure 2-12) immediately changes the setting and saves the
change. Typically these links are used display or hide further settings.
Figure 2-12. Yes / No links in WWW Setup
The on/off links in Setup −→ Applications −→ Default bootup applications behave in a same way, making and saving the change immediately (see Figure 2-13).
14
Chapter 2. Getting Started with Access Server
Figure 2-13. Selecting Default Bootup Applications in WWW Setup
Note: To configure the default bootup applications from the command line, use the chkconfig command.
Upload links
The WWW Setup has settings that allow user to upload files to Access Server, for example Setup −→ Advanced −→ Upload a software update (see Figure 2-14).
15
Chapter 2. Getting Started with Access Server
Figure 2-14. Uploading files via WWW Setup
Use the Browse... button to select the file to be uploaded, and send it to Access Server by clicking Upload.
Browsing files
Some WWW Setup pages allow users to browse the Access Server file system or part of it, such as Setup −→ Advanced −→ Browse files (see Figure 2-15).
16
Chapter 2. Getting Started with Access Server
Figure 2-15. Browsing files via WWW Setup
Click the directory names to navigate in the file system.
Click del to delete a file or an empty directory.
Warning
Deletion is not confirmed.
The WWW Setup also has menu items that run commands in Access Server, and show the output in the browser window. Some commands, such as rebooting Access Server, are confirmed before execution.

2.6. Using the setup Command Line Application

The basic configuration settings can also be changed by using the setup application at the com­mand 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.
17
Chapter 2. Getting Started with Access Server
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 you press Enter, you cannot navigate in the setup application.
2.7. Resetting a Configuration
You can reset the default configuration with the setup -r command. The command requires rebooting of Access Server. When the system starts up, the default configuration settings are re­stored. 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; it only affects only the settings changed through the WWW Setup or the setup command line application.
2.8. Exporting and Importing Configurations
You can export configuration settings (expect for passwords and the list of default bootup ap­plications) with the following command:
[root@wrap /root]$ setup -o > settings.txt
The saved settings can later be restored with the following commands:
[root@wrap /root]$ setup -m settings.txt [root@wrap /root]$ reboot
18

Chapter 3. Using the System

This chapter describes the basic features of a Bluegiga Access Server. This includes information on using Access Server as a Bluetooth LAN/PAN Access Point or a Bluetooth Serial Port Cable Replacer, using the Web Server, ObexSender, and WRAP Package Management System. The various ways of uploading content for browsing and/or downloading are also included, as well as getting familiar with the utility applications.
Using the features described in this chapter does not require Access Server Software Develop­ment Environment to be installed.
Note: The default username is root and the default password is buffy. Note: Most of the configuration files are in Linux text file format, where the lines end with a sin-
gle Line Feed (LF, "\n") character. Some applications will not work if the configuration file format is changed to MS-DOS format (this happens, for example, if you transfer the files to Windows for edit­ing with Notepad), where the lines end with both Carriage Return and Line Feed (CR+LF, "\r\n") characters.

3.1. Network Interfaces

The Access Server network interfaces are described in Table 3-1.
Interface Description
nap Dynamic virtual Ethernet ("cable") device. This is the device having an IP
address. All the programs should use this device instead of eth0.
eth0 Real Ethernet device, which is dynamically linked to the nap device. Do not
use this device, use nap instead.
wlan0 Wi-Fi device. In the client mode (default), this device has its own IP address.
In the access point mode, it is dynamically linked to the nap device (the default interface).
wifi0 Virtual control device for wlan0. Do not use this device.
gn Virtual device for PAN-GN connections.
bnep# These devices are used for incoming and outgoing PAN connections. These
devices are created, deleted and linked (to nap or gn) dynamically.
ppp# These devices are used for incoming and outgoing LAP connections. These
devices are created and deleted dynamically. By default, data coming from ppp# is masqueraded to the nap device.
Table 3-1. Access Server Network Interfaces

3.2. Bluetooth

The iWRAP servers (one server in Access Server 2291, three in Access Server 2293) are automat­ically started at power-up. By default, the 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) through the iWRAP interface, described in Chapter 7. Currently, there can be up to 14 simultaneous Bluetooth connections between a single master iWRAP server and up to seven simultaneous slaves.
19
Chapter 3. Using the System

3.2.1. iWRAP Password Protection

The access to iWRAP can be password protected. The default password is buffy, but it can be set off 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 7).
Access Server can also act as a LAN Access Client, but in this case it must be controlled manually using iWRAP commands, as described in Chapter 7.
Note: Since Bluetooth specification 1.2, LAN Access Profile has been deprecated.
3.2.3. Serial Port Profile
This profile is not automatically started at boot. The default settings can be changed with the setup application (see section Section 2.4).
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 locally connected
20
Chapter 3. Using the System
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. Notice that this handshaking is "local": it takes place between the user device and Access Server. 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 enable Serial Port Profile, navigate to Setup −→ Applications −→ Default bootup applications in the WWW Setup interface, and switch serialport application to off. Enabling can also be done from command prompt with command chkconfig serialport on.
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.
The OBEX profiles are handled by forwarding incoming calls to the obexserver program, which handles both profiles. The working directory is /tmp/obex, and users have full read and write access to that directory. By default, the default contact card /etc/default.vcf is copied to that directory at boot.
In the ObjP mode, obexserver will prefix received files with the 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 view a short help text for using the command.
A non-zero return value indicates an error. The reason for this error is printed to the terminal.
Tip: Special parameters and the iWRAP interface (see Chapter 7) obexput command can be easily used from the user application as follows:
CALL bdaddr OBJP FORK \"/usr/bin/obexput - 1 filename\"
21
Chapter 3. Using the System
- as bdaddr and 1 as channel tells obexput that it will be launched by the iWRAP server, and that
data connection is bound to standard input and output.
3.2.5. PAN Profiles
Access Server has support for all PAN profile modes: Personal Area Network User (PANU), Net­work Access Point (NAP) and Generic Networking (GN). Accepting incoming PAN connections to any of these modes is disabled by default for security reasons.
Access Server can be configured to accept incoming PAN connections and the default settings can be changed by using the setup application (see section Section 2.4).
The Network Access Point mode is the most useful PAN profile mode. You can enable it by sending the enable-pan.wpk file (available on-line at http://bluegiga.com/as/current/enable­pan.wpk) to Access Server by using the Bluetooth Object Push profile. Alternatively, you can copy the file to the root of a USB memory dongle and insert the dongle to Access Server ’s USB port.
The device creating the PAN connection decides upon the modes to be used. Access Server automatically handles incoming connections. Access Server can also act as a PAN client, but in this case it must be controlled manually by using the iWRAP interface, described in Chapter 7.

3.2.6. Changing the Bluetooth Range

The transmit power of Access Server is configurable. By default, class 1 (100 meter range) set­tings are used. The settings can be changed down to "class 2" (10 meter range) settings with the b2b_class2 command, or even lower with the b2b_class3 command. Class 1 settings can be restored with the b2b_class1 command.
After b2b_class# is given, it is recommended to reboot Access Server once to restart ObexSender and other applications connected to the iWRAP server(s).
Note: If the operation is successful, you get one Can’t open baseband message with Access Server model 2293 and three messages with the 2291 model.
3.2.7. BTCLI - iWRAP Command Line Interface Utility
You can send commands to an iWRAP server by using the btcli application.
Usage:
btcli [options] command
To see the command options, enter the btcli --help command.
The specified command is sent to an Access Server iWRAP server (the first server at port 10101 by default) and all replies are echoed to the standard output. The application waits and prints the replies for a certain amount of time (10 seconds by default) and exits.
The iWRAP commands are described in Chapter 7.

3.2.8. serialbluetooth

It is also possible to control the first iWRAP server (at port 10101) through RS-232 with the serialbluetooth application.
22
Loading...
+ 140 hidden pages