WRAP MULTIRADIO ACCESS SERVER U s e r ’ s V e r s i o n M o n d a y , a n d D e v e l o p e r ’ s 2 . 0 .
Bluegiga Proprietary, Copyright © Bluegiga Technologies 2001-2004 All rights reserved. Bluegiga Technologies assumes no responsibility for any errors which may appear in this manual. Furthermore, Bluegiga Technologies reserves the right to alter the hardware, software, and/or specifications detailed herein at any time without notice, and does not make any commitment to update the information contained herein.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER CONTENTS 1 Introduction ....................................................................................................... 6 1.1 Licenses and Warranty ......................................................................................6 1.2 Certification Information ....................................................................................6 1.3 Bluegiga Technologies Contact Information ............................................
USER'S AND DEVELOPER'S GUIDE 5 6 7 8 9 WRAP MULTIRADIO ACCESS SERVER 4.4.5.5 Management Operation Example: IPQUERY ........................................... 32 4.4.5.6 Management Reply Packet Destination Definition ................................... 33 4.4.5.7 Management With USB Memory Dongle ................................................ 34 4.4.6 FTP ........................................................................................................ 34 4.4.7 SSH .............................
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.8 WRAP Obex Libraries....................................................................................... 86 9.8.1 libobex ................................................................................................... 86 9.8.2 libobexclient............................................................................................ 87 9.8.3 Obexbrowser .......................................................................................
USER'S AND DEVELOPER'S GUIDE 1 WRAP MULTIRADIO ACCESS SERVER INTRODUCTION WRAP™ Bluegiga's WRAP product family offers for device manufacturers, teleoperators, integrators, enterprises and platform developers a simple and fast way to set-up wireless communication systems between standard or proprietary mobile devices, networks, machines and instruments.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER Hereby, Bluegiga Technologies declares that this WRAP Multiradio Access Server is in compliance with the essential requirements and other relevant provisions of Directive 1999/5/EC. This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: 1. This device may not cause harmful interference, and 2.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 1. The output power for 802.11a/b/g/h equipment or similar equipment approved under §15.247 or §15.407 is listed as Conducted RF power. §15.247 or §15.407 limit the e.i.r.p. to 4 W, so this restriction is fulfilled. 2. The output power for Part 22 cellular equipment is listed as e.r.p. The relationship between e.r.p. and e.i.r.p. is the following one: e.i.r.p. = 1.64 x e.r.p. 3. The output power for Part 24 PCS equipment is listed as e.i.r.p. 4.
USER'S AND DEVELOPER'S GUIDE S Total WRAP MULTIRADIO ACCESS SERVER = 0.014316mW/cm2 + 0.795774mW/cm2 = 0.795774mW/cm2 < 1mW/cm2 Example 2: Part 22 Compact Flash Card with maximum e.r.p. of 1.5 W (Category excluded of MPE evaluation according to §2.1091) Using equation from page 18 of OET Bulletin 65, Edition 97-01 and considering that e.i.r.p. = 1.64 x e.r.p.: /4πR2 = 1500 x 1.64mW / 4π(20cm)2 S Compact Flash card = Prad (e.i.r.p.) S Compact Flash card = 0.
USER'S AND DEVELOPER'S GUIDE 2 WRAP MULTIRADIO ACCESS SERVER CONTROLLING THE ACCESS SERVER There is no graphical user interface for the WRAP Multiradio Access Server. All controlling operations to the Access Server must be done either by entering commands and using applications at Access Server shell prompt or by sending and/or retrieving files to/from the Access Server. There are several ways to access the shell prompt and to transfer files. 2.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER Figure 2. WRAP Multiradio Access Server LEDs. 2.2 SHELL PROMPT ACCESS You can get to the shell prompt using either the management console, SSH or telnet. Normally the initial configuration, if needed, is done from the management console over the serial cable and all further controlling activities are performed remotely using SSH or telnet sessions over Ethernet or Bluetooth LAN / PAN connection.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER Setting Value Speed 115 200 bps Data Bits 8 Parity None Stop Bits 1 Flow Control None Table 1. The Management Console Port Settings. 4. Connect the serial cable shipped with the Access Server to your PC's free COM port. 5. Connect the null-modem adapter shipped with the Access Server to the serial cable. 6. Connect the serial cable with the null-modem adapter to the management / user port in the Access Server (see Figure 1). 7.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER - SCP (secure copy over SSH) - SFTP (secure ftp connection over SSH) - FTP (plain ftp connection), remember integrated client of the Internet Explorer (type ftp://root:passwd@wrap-ip-address/ in 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) - USB memory dongle (moun
USER'S AND DEVELOPER'S GUIDE 3 WRAP MULTIRADIO ACCESS SERVER CONFIGURATION When the WRAP is installed and powered up for the first time, the default configuration settings are being used. With these settings, the WRAP automatically configures its network settings assuming that the board is connected to a LAN network with a DHCP server running. After booting, you can use the WRAP as a Bluetooth LAN/PAN access point to the network without any changes in configuration.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER If the dynamic network configuration is disabled (step 5), the network mask of the WRAP must be entered here. 8. IP Address of the Default Gateway [10.0.0.254] If the dynamic network configuration is disabled (step 5), the IP address of the default gateway in the LAN to which the WRAP is connected must be entered here. 9. IP Address of the Primary Name Server [10.0.0.1] The IP address of the primary name server. 10.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER The setting specifying how the connecting Bluetooth devices should decide their roles. When a device is calling another Bluetooth device, it originally is the master and the answering device is the slave. When the connection is being built, a role switch can be made. Normally, access point devices want to be the master for all their slaves, and therefore they require a master-slave switch when a new device is connecting.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER Note2: the Serial Port Profile is disabled if the SMS Gateway is enabled, as they share the same physical serial port. 1. Enable Serial Port Profile [Y] Whether the Serial Port Profile is enabled or not. 2. Act as the Calling Device [N] Whether this device should act as the calling device (DevA) or the answering device (DevB). 3. BPS Rate [9600] The bits-per-second rate of the connection.
USER'S AND DEVELOPER'S GUIDE 3.1.2.4 WRAP MULTIRADIO ACCESS SERVER OBEX SETTINGS 1. Enable Object Push Profile [Y] Whether or not the Object Push Profile is enabled. 2. Service Name (shown in SDP) [OBEX Object Push] The name of this service as shown in the Service Discovery. 3. Enable File Transfer Profile [Y] Whether or not the File Transfer Profile is enabled. 4. Service Name (shown in SDP) [OBEX File Transfer] The name of this service as shown in the Service Discovery.
USER'S AND DEVELOPER'S GUIDE 3.1.2.5 WRAP MULTIRADIO ACCESS SERVER PERSONAL AREA NETWORK PROFILE SETTINGS 1. Personal Area Network User (PANU) Profile 1. Enable PANU Whether or not the PAN User Profile is enabled. 2. Service Name (shown in SDP) [PAN User] The name of this service as shown in the Service Discovery. 2. Personal Area Network Generic Networking (PAN-GN) Profile 1. Enable PAN-GN [Y] Whether or not the PAN Generic Networking Profile is enabled. 2.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 3.1.4 SYSTEM LOGGER SETTINGS 1. Log locally [Y] This option determines whether or not the System Logger (syslogd) should log locally (to /var/log/messages). 2. Address of the Remote Syslog Server [] The address of the device in the network to which the System Logger should log to. Note: The remote device must be configured to accept syslogd connections from the WRAP board.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER By default, the script "/etc/rc.d/rc.local" just turns off all LEDs to indicate the startup has finished. If you want to initialize something automatically at every boot, or start up your own servers, for example, you should add the required commands here. You can use "vi" editor to edit the file. 3.3 RESETTING CONFIGURATION You can restore the default configuration by deleting the main configuration file and rebooting the board.
USER'S AND DEVELOPER'S GUIDE 4 WRAP MULTIRADIO ACCESS SERVER USING THE SYSTEM This chapter describes the basic features of a Bluegiga WRAP Multiradio Access Server and their usage.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER A) User device A User device B Serial Cable B) User device A User device B Serial Cable Serial Cable WRAP DevA Bluetooth WRAP DevB Figure 3. Serial Cable Replacement Physical Setup. State A) in the figure is the starting situation with a serial cable connecting the devices. This cable is to be replaced with a Bluetooth connection.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER These profiles are handled by forwarding incoming calls to "obexserver" program, which handles both profiles. The OBEX working directory is /tmp/obex, and users have full read and write access there. By default, that directory also contains the default vCard. Two simple command line utilities, "obexput" and "obexget", are also provided. They can be used to send and retrieve a single file to and from another Bluetooth device supporting OBEX.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER Usage: serialbluetooth [options] To see the options, enter the command "serialbluetooth --help". Basically, serialbluetooth takes commands from a serial port and forwards them to the Bluetooth server. All the commands available via socket interface are also available via serial port. There are two exceptions: 1) After making an outgoing RFCOMM data call, all input from the serial port is forwarded to the data socket, not the control socket.
USER'S AND DEVELOPER'S GUIDE 4.3 WRAP MULTIRADIO ACCESS SERVER COMPACT FLASH WLAN The WLAN configuration with "setup" application is not yet available. The currently supported WLAN cards are "EZ Connect" by SMC Networks and "Instant Wireless" by Linksys. For this kind of Prism II/III based CF WLAN cards there are two different drivers. 4.3.1 HOSTAP DRIVER If your WLAN card firmware is 1.7.4, you have to use Hostap driver. It supports both client and master modes.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER DNS_1="10.1.1.1" To configure WLAN to use encryption, add following lines (replace examples with your ESSID and encryption key, which can be also shorter for 40/64bit encryption) to the file "/etc/sysconfig/network.pcmcia" 0123456789abcdef0123456789" ESSID="myessid" After configuration, the WLAN interface comes up automatically when the WLAN card is inserted. The WLAN interface is "eth1". 4.3.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER Server Purpose bluetooth WRAP Bluetooth Server, described in detail in section 9. btcli WRAP Bluetooth Server Command Line Interface utility. httpd Web server, described in detail in section 4.4.1. installpoint WRAP Install Point server. smsgw WRAP SMS gateway server, described in detail in section 4.4.2. Note: By default, this server is not started at power-up. watchdog WRAP user level watchdog.
USER'S AND DEVELOPER'S GUIDE 4.4.2.1 WRAP MULTIRADIO ACCESS SERVER INSTALL POINT CONFIGURATION The Install Point is configured both by the "setup" application (the logging device / file, see 5) Install Point Settings) and mainly with its configuration file, "/etc/installpoint.conf".
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 4.4.3 SMS GATEWAY SERVER The WRAP SMS Gateway server supports Nokia 20, Nokia 30 or Wavecom WMOD2 compatible GSM terminals for sending and receiving SMS messages. The device must be connected to the user serial port when the server starts up. The terminals must be configured to operate in RS232/AT-command mode and the PIN code query of the SIM-card at power-up must be disabled.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER USB writer USB memory FTP InstallPoint Bluetooth Scp, Sftp USB hotplug /tmp/wpkgd/out USB memory FTP Scp, Sftp Rsync over SSH InstallPoint Bluetooth WPKGD OUTBOX WPKG processing /tmp/wpkgd/in Rsync over SSH WPKGD INBOX Customer System Figure 4. 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.
USER'S AND DEVELOPER'S GUIDE 4.4.5.3 WRAP MULTIRADIO ACCESS SERVER - Optional signature information file "wpkg.sig" may exist in package root (it is not used yet though) - All other files, if exist, should be data files, scripts or executables required for the management operation MANAGEMENT PACKET INFORMATION FILE FORMAT The management packet information file (wpkg.pif) consists of tags and their data, described here %wpkg-version:0.0.1 - Must be the first line of the file.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER File "functions": - some reusable shell functions File "ipvcard": - script which outputs the serial number, ip address and hostname of the device in vcard format that can be viewed with a mobile phone. File "ipquery": - the main script which calls "ipvcard" to generate response vcard and moves it and the originator info file to WPKG_OUTDIR. To use the example, send the file "ipquery.wpk" to the inbox of you Bluetooth phone.
USER'S AND DEVELOPER'S GUIDE 4.4.5.7 WRAP MULTIRADIO ACCESS SERVER MANAGEMENT WITH USB MEMORY DONGLE When an USB memory dongle is inserted, the WRAP Multiradio Access Server automatically tries to mount (using VFAT type) it. When the mount is successful, directory "/wpkgd/in" is searched for a "*.wpk" packet and if the packet is found, it handled by the WRAP Package daemon. Optional responses are sent to the directory "/wpkgd/out" in the USB dongle, or if "out" does not exist, to the directory "/wpkgd".
USER'S AND DEVELOPER'S GUIDE Application adduser arping awk b2b_class1 b2b_class2 b2b_class3 basename bash btproxy bunzip2 bzcat cardctl cat chat chgrp chkconfig chmod chown chroot clear cmp cp cpio crontab cut date dd deluser df dirname dmesg du dump_cis egrep env expr false fgrep find free ftp gdbserver getty grep gunzip gzip head hexdump hostid hostname hwclock WRAP MULTIRADIO ACCESS SERVER Purpose Add user to the system. Ping hosts by ARP requests/replies. Pattern scanning and processing language.
USER'S AND DEVELOPER'S GUIDE id ide_info ifconfig ifport ifuser insmod ip iptables, ip6tables kill killall ln logger login logread ls lsmod md5sum mkdir mknod mktemp modprobe more mount mv nslookup ntpclient obexbrowser obexget obexput pack_cis passwd picocom pidof ping, ping6 ps pwd rb, rx, rz, sb, sx, sz rdate reboot renice reset rm rmdir rmmod route rsync scp scsi_info sed setup WRAP MULTIRADIO ACCESS SERVER Print information for username or current user. IDE device information.
USER'S AND DEVELOPER'S GUIDE sftp sleep sort ssh, slogin ssh-add ssh-agent ssh-keygen ssh-keyscan strace strings stty su sulogin sync tail tar tcpdump telnet test time top touch tr traceroute true tty uartmode umount uname uniq unzip uptime uudecode uuencode wc vi wget wrapid which whoami wpkg zcat xargs WRAP MULTIRADIO ACCESS SERVER Secure file transfer program. Delay for a specified amount of time. Sort lines of text files. OpenSSH SSH client (remote login program).
USER'S AND DEVELOPER'S GUIDE 4.7 WRAP MULTIRADIO ACCESS SERVER TIME ZONE The default time zone in the WRAP Multiradio 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). 4.8 SYSTEM RE-INSTALL AND UPGRADE The WRAP platform can be re-installed with the latest software version. The latest SW version and instructions are available at http://www.
USER'S AND DEVELOPER'S GUIDE 5 WRAP MULTIRADIO ACCESS SERVER BLUETOOTH TECHNOLOGY OVERVIEW TCP/IP PPP / PAN Wireless Applications Wireless Applications Profiles BGT Bluetooth API SDP RFCOMM BNEP BT Upper Layers Logical Link Control and Adaption Protocol (L2CAP) HCI driver Physical Bus Driver HCI Firmware Link Manager Protocoll (LMP) BaseBand BT Lower Layers Link Controller (LC) RF RF Figure 5. Bluetooth Software and Hardware Components. 5.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 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.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 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.
USER'S AND DEVELOPER'S GUIDE 6 WRAP MULTIRADIO ACCESS SERVER INTRODUCTION TO SDK This manual describes how to create and use applications using the WRAP Software Development Environment. The relationship between the applications and the WRAP Software and Hardware is shown in Figure 6. Customer Applications BGT APIs Servers BGT Core Engine Operating system Network Interfaces Local HW Interfaces Figure 6. Relationship Between the Customer Applications and WRAP.
USER'S AND DEVELOPER'S GUIDE 7 WRAP MULTIRADIO ACCESS SERVER INSTALLING THE WRAP SOFTWARE DEVELOPMENT ENVIRONMENT Note: The Software Development Environment can be installed only on a PC running the Linux operating system! WRAP SOFTWARE DEVELOPMENT ENVIRONMENT SYSTEM REQUIREMENTS 7.1 The following hardware and software is required to run the WRAP Development Environment: PC with • CD-ROM drive • Linux (tested with RedHat 6.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 4. Install toolchain sources (default: no - unless the tools directory was changed) Whether or not the toolchain sources will be installed. These are required only if the WRAP tools directory was changed from the default target location in step 1. 5. Install Linux headers (default: no - unless libc sources are selected) Whether or not the Linux header files will be installed.
USER'S AND DEVELOPER'S GUIDE 8 WRAP MULTIRADIO ACCESS SERVER CREATING WRAP APPLICATIONS The fastest way to start developing WRAP applications is to study, change, and recompile the example files in the asdk/src/examples directory. 8.1 APPLICATION EXAMPLES To demonstrate the software development features of the WRAP, the WRAP Software Development Environment comes with several example applications. 8.1.1 INSTALLING EXAMPLES The compiled example files are located on the WRAP SDK tree in the file asdk\sr
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER Example, source in wrap/src/examples/ Usage, when installed to /tmp and when it is the current directory helloworld ./helloworld The "Hello, world!" application. serial ./serial /dev/ttySA1 "Hello, world!" to the serial port. btsend ./btsend – 12 on the first device, ./btsend 12 on second Machine 2 Machine example. "Hello, world!" over Bluetooth. Note: Currently uses "buffy" as Bluetooth server password. io/led .
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER CREATING A NEW PROJECT 8.2 To start a new project, you need to create a new subdirectory in your Development Environment’s source directory (src/) and add your application source files and Makefile to that directory. This can be done automatically using WRAP Access Server Project AppWizard. Just give the command "make appwiz APP=dir/to/newapp" in the Development Environments top level source directory (src/).
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 1. Tools are prefixed with arm-linux-, so for calling gcc C-compiler you need to call armlinux-gcc, etc. 2. Tools are located in "/usr/local/arm/2.95.3/bin/" -directory, which is not in PATH by default. 8.4 TRANSFERRING AN APPLICATION TO WRAP HARDWARE To run an application on the WRAP, it must first be transferred into the WRAP system. There are several ways of doing this: 1. Over TCP/IP by FTP, SFTP, SCP (using Ethernet or Bluetooth) 2.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 8.4.2 TRANSFERRING AN APPLICATION TO WRAP USING TERMINAL SOFTWARE If your WRAP is not connected to a LAN, you may use terminal software of your own choice to transfer data to the WRAP. The WRAP contains an X/Y/Zmodem protocol application, which allows you to transfer data over the console using almost any terminal software available. 1.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER gdbserver : Example: gdbserver :6789 ./testapp 2) Start debugger on the host PC. (example is for DDD) ddd --debugger /usr/local/arm/2.95.3/bin/arm-linux-gdb 3) Load symbolfile from ddd’s gdb console: Example: symbol-file testapp 4) Create connection to the debugserver target remote : Example: target remote 10.1.1.
USER'S AND DEVELOPER'S GUIDE 9 WRAP MULTIRADIO ACCESS SERVER BLUETOOTH SERVER SOCKET INTERFACE The Bluetooth in the WRAP is controlled via the TCP socket interface. The first Bluetooth server is listening on port 10101. In case of WRAP 2293, the second Bluetooth server is listening on port 10102 and the third one is listening on port 10103. All commands to a Bluetooth server and replies from the server are plain ASCII strings ending in CR+LF ("\r\n"). Commands and replies are not case sensitive.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER In the following examples, lines starting with C: are commands sent by the client to the Bluetooth server and lines starting with S: are replies received from the Bluetooth server by the client.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.3.1 INFO INFO is used to retrieve version info of the Bluetooth server, in the same format as the READYprompt when the control connection is opened. Command: INFO Reply: READY. (wrap-2-0-3 $Revision: 1.289 $ bt1.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.3.2 INQUIRY INQUIRY is used to search for other Bluetooth devices. Timeout is in units of 1.25 seconds. If an optional "NAME" parameter is provided, the NAME command will be sent automatically to all found devices. During the inquiry, all devices are listed as soon as they are found with "INQUIRY_PARTIAL" replies. If the friendly name of the device found has been cached by the Bluetooth server, it is also displayed.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.3.3 NAME You can ask for the friendly name of another Bluetooth device with the NAME command. Command: NAME bdaddr Reply: NAME bdaddr "friendly name" NAME ERROR bdaddr reason_code more_info Example: S: READY.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.3.4 QUIT To close the connection to the Bluetooth server, use the QUIT command. Command: QUIT Reply: There is no reply. Example: S: READY.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.3.5 SET The SET command allows you to alter various Bluetooth and server parameters. The supported parameters are listed in Table 6. Issuing a SET command without parameters will list the current settings. Topic Name Value Description BLUETOOTH BDADDR bdaddr Our bdaddr. This is a read-only value. BLUETOOTH NAME friendly_name Set your friendly name. Others can request this name with the NAME command.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER to be authenticated. 0: No 1: Yes BLUETOOTH PAGEMODE mode {page_timeout {page_scan_rep etition_mode}} Pagemode controls whether or not other devices can find and call you. There are four different modes: 0: No inquiry, no paging 1: Inquiry, no paging 2: No inquiry, paging 3: Inquiry and paging Page timeout is in hex and the default value is 2000. Default page scan repetition mode is 2 (R2). See Bluetooth Core Specification 1.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER this. BLUETOOTH LISTEN psm L2CAP Add L2CAP-listener for the psm. BLUETOOTH LISTEN channel Remove fork/L2CAP-listener for the channel/psm. BLUETOOTH LINK mode params Modify slaves powermode according to "mode". "params" are optional and mode-dependent. Possible values for "mode" are 0, 1, 2, 3, 4: 0: Active. Params: None. 1: Park: Round-robin.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER Core Specification 1.1 for more information on params. Defaults: 65535 40000 PPP AUTH Don't require any PPP authentication on incoming connections. PPP AUTH username password Require specified username:password on incoming PPP connections. PPP CHANNEL channel Our PPP (LAN Access Profile) channel. This channel will be handled internally by the Bluetooth server. If you change this, remember to modify the SDP record as well.
USER'S AND DEVELOPER'S GUIDE link_id ACTIVE link_id PARK WRAP MULTIRADIO ACCESS SERVER Set powermode for link_id to active. params Set powermode for link_id park. Required "params" are: avg_beacon or max_beacon min_beacon See Bluetooth Core Specification 1.1 for more information on params. link_id HOLD params Set link's powermode to hold. Required "params" are: avg or max min See Bluetooth Core Specification 1.1 for more information on params.
USER'S AND DEVELOPER'S GUIDE C: C: C: C: C: C: C: C: C: C: C: SET SET SET SET SET SET SET SET SET SET SET WRAP MULTIRADIO ACCESS SERVER BLUETOOTH AUTH * BLUETOOTH PAIREXPIRE 600 BLUETOOTH LISTEN 1 /bin/login 200 BLUETOOTH LISTEN 2 "my/own/command with parameters" 100 5 BLUETOOTH LISTEN 3 PPP DEFAULTROUTE 0 PPP AUTH buffy willow PPP AUTH PPP CHANNEL 4 PPP WINHANDSHAKE 10 PPP IP 192.168.166.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.3.6 PING The PING command is used to check that the connection to the Bluetooth server is alive. Command: PING Reply: PONG Example: S: READY.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.3.7 PONG The PONG command has to be sent back if you see a PING reply from the server. If you do not answer, the connection will be closed after a few seconds. Command: PONG Reply: There is no reply. Example: S: READY.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.3.8 SHUTDOWN To close the Bluetooth server you can use the SHUTDOWN command. This also immediately closes all active connections. Command: SHUTDOWN Reply: There is no reply. Example: S: READY.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.3.9 SLEEP SLEEP waits for a specified number of seconds before processing further commands. It is only usable in rc scripts (/etc/bluetooth.conf). Command: SLEEP seconds Reply: There is no reply. Example: S: READY.
USER'S AND DEVELOPER'S GUIDE 9.4 WRAP MULTIRADIO ACCESS SERVER CONNECTION COMMANDS AND REPLIES 9.4.1 CALL The CALL command is used to call other Bluetooth devices. It returns the link identifier (with an immediate reply), which will be used in subsequent commands and replies. Always make sure you check for a correct link_id before processing replies further.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER C: CALL 00:11:22:33:44:55 1 RFCOMM S: CALL 3 S: CONNECT 3 RFCOMM 1042 C: CALL 00:11:22:33:44:55 2 FORK /bin/login S: CALL 4 S: CONNECT 4 FORK C: CALL 00:11:22:33:44:66 PAN-NAP S: CALL 5 S: CONNECT 5 PAN-NAP C: CALL 00:11:22:33:44:77 PAN-NAP PAN-NAP S: CALL 6 S: CONNECT 6 PAN-NAP Bluegiga Proprietary, Copyright © Bluegiga Technologies 2001-2004 68 (94)
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.4.2 CONNECT CONNECT is not a command, but rather a reply broadcast to you when CALL successfully makes the connection. Remember to check that the link_id matches your CALL! On RFCOMM/L2CAP connections, there is an additional parameter called port. It is the TCP socket port number, which is used to send and receive data to and from the remote device. Connect to the port just like you connected to the Bluetooth server.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.4.3 NO CARRIER NO CARRIER-reply indicates that you or the remote device closed the active connection, or that your CALL failed for some reason. See 9.7 for the list of reason codes. Field "more_info" is optional. If present it gives you a human readable error code or some statistics about the closed connection. Command: This is not a command. NO CARRIER link_id ERROR reason Reply: NO CARRIER link_id Example: S: READY.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.4.4 RING The RING reply indicates an incoming CALL from a remote device. As with CONNECT, on RFCOMM/L2CAP calls there is an additional port parameter. Connect to it if you want to serve this call. PPP and PAN calls are handled internally so you don't have to do anything about them. The Bluetooth server closes the connection if nobody grabs the call within 30 seconds. Command: This is not a command.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.4.5 CLOSE The CLOSE command closes an active connection started with CONNECT or RING. Note that closing the RFCOMM data socket connection also closes the Bluetooth connection. Command: CLOSE link_id Reply: There is no direct reply. NO CARRIER is replied when the connection actually closes. Example: S: READY.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.4.6 LIST The LIST command reports active connections as well as some statistics. Command: LIST Reply: LIST number_of_connections LIST link_id status type blocksize bytes_in bytes_out elapsed_time our_msc remote_msc bdaddr channel direction powermode role crypt LIST link_id status type blocksize bytes_in bytes_out elapsed_time our_msc remote_msc bdaddr channel direction powermode role crypt ...
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.4.7 STATUS The STATUS reply is used to inform you about changes in connection status. See also the SET command. Command: This is not a command. STATUS link_id MSC value Reply: Example: S: READY.
USER'S AND DEVELOPER'S GUIDE 9.5 WRAP MULTIRADIO ACCESS SERVER SERVICE DISCOVERY This section describes the commands used for Bluetooth service discovery and local SDP record manipulation. The commands and their replies make use of SDP UUID and attribute values, which are listed in the Bluetooth Assigned Numbers documentation. In the commands documented below, the most useful UUID and attribute values can, however, be replaced with keywords listed in Table 7.
USER'S AND DEVELOPER'S GUIDE 9.5.1 SDP BDADDR WRAP MULTIRADIO ACCESS SERVER UUID The SDP bddaddr UUID command is the most useful command for retrieving SDP information from the remote device. The command opens the SDP connection, does the SDP query, closes the connection and replies to the client in encrypted form. The format is described below with SDPATTR command. Command: SDP bdaddr uuid Reply: SDP bdaddr 0 ERROR reason SDP SDP SDP ...
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.5.2 SDPSEARCH The SDPSEARCH command is used to send a Service Search Request to a connected SDP server, identified with link_id. The command only supports searching for one UUID at a time (specified with the uuid parameter, 4 hex digits, or with a keyword), but several requests can be sent during the same SDP connection. However, you must wait for the reply to the previous reply before issuing new SDPSEARCH command.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.5.3 SDPATTR The SDPATTR command is used to send a Service Attribute Request to a connected SDP server, identified with link_id. The command supports requesting for one attribute value (specified with the attribute parameter, 4 hex digits, or a keyword) in one (previously retrieved) service entry (specified with the handle parameter, 8 hex digits), but several requests can be sent during the same SDP connection.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.5.4 SDPQUERY The SDPQUERY command is used to send a Service Search Attribute Request to a connected SDP server, identified with link_id. The command supports requesting for one attribute value (specified with the attribute parameter, 4 hex digits, or a keyword) in all service entries containing one UUID (specified with the uuid parameter, 4 hex digits, or a keyword), but several requests can be sent during the same SDP connection.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.5.5 SDP The SDP command can be used to alter the WRAP’s SDP record. There are three subcommands, described shortly in Table 9. Subcommand Meaning ADD uuid channel desc Add a new entry to the WRAP’s SDP record. LIST List the WRAP’s SDP record entries. DEL handle Delete one entry from the WRAP’s SDP record. Table 9. The Subcommands of the SDP-command.
USER'S AND DEVELOPER'S GUIDE C: S: S: S: WRAP MULTIRADIO ACCESS SERVER CALL 00:11:22:33:44:55 1 RFCOMM CALL 2 CONNECT 2 RFCOMM 1042 STATUS 2 MSC 8d C: CLOSE 2 S: NO CARRIER 2 ERROR 000 Incoming RFCOMM Call: S: READY. C: RING 2 00:11:22:33:44:55 1 RFCOMM 1042 S: STATUS 2 MSC 8d S NO CARRIER 2 ERROR 000 9.7 ERROR CODES Some commands may reply with an error code.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER Other error codes can be analyzed as follows. For example "NO CARRIER ERROR 465": The number "465" is hexadecimal, sum of 0x400 and 0x65, where 0x400 is a mask which means this is an RFCOMM level error (see Table 11 for other error masks) and 0x65 (decimal 101) that the RFCOMM error was connection timeout. Mask Error level 0x100 HCI 0x200 L2CAP 0x300 SDP 0x400 RFCOMM Table 11. Error masks.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER HCI Error Code (decimal) HCI_SUCCESS 0 HCI_ERR_UNKNOWN_COMMAND 1 HCI_ERR_NOCONNECTION 2 HCI_ERR_HARDWARE_FAIL 3 HCI_ERR_PAGE_TIMEOUT 4 HCI_ERR_AUTHENTICATION_FAILED 5 HCI_ERR_KEY_MISSING 6 HCI_ERR_MEMORY_FULL 7 HCI_ERR_CONNECTION_TIMEOUT 8 HCI_ERR_MAX_NUM_CONNECTIONS 9 HCI_ERR_MAX_NUM_SCO_CONNECTIONS 10 HCI_ERR_ACL_CONN_ALREADY_EXISTS 11 HCI_ERR_COMMAND_DISALLOWED 12 HCI_ERR_HOST_REJECTED_0D 13 HCI_ERR_HOST_REJECTED_0
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER HCI_ERR_QOS_NOT_SUPPORTED 39 HCI_ERR_INSTANT_PASSED 40 HCI_ERR_PAIRING_WITH_UNIT_KEY_NOT_SUPP 41 HCI_ERR_ILLEGAL_HANDLE 100 HCI_ERR_TIMEOUT 101 HCI_ERR_OUTOFSYNC 102 HCI_ERR_NO_DESCRIPTOR 103 Table 12. HCI Error Codes. L2CAP Error Code L2CAP_NO_CAUSE 0 L2CAP_ERR_PENDING 1 L2CAP_ERR_REFUS_INV_PSM 2 L2CAP_ERR_REFUS_SEC_BLOCK 3 L2CAP_ERR_REFUS_NO_RESOURCE 4 L2CAP_ERR_TIMEOUT_EXTERNAL 0xee Table 13. L2CAP Error Codes.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER RFCOMM Error Code (decimal) RFCOMM_SUCCESS 0 RFCOMM_ERR_NORESOURCES 1 RFCOMM_ERR_ILL_PARAMETER 2 RFCOMM_ERR_REJECTED (Connection setup was rejected by remote side) 100 RFCOMM_ERR_TIMEOUT (Connection timed out) 101 RFCOMM_ERR_NSC (Non supported command received) 102 RFCOMM_ERR_ILLPARAMETER 103 Table 15. RFCOMM Error Codes.
USER'S AND DEVELOPER'S GUIDE 9.8 WRAP MULTIRADIO ACCESS SERVER WRAP OBEX LIBRARIES There are two libraries for making your own OBEX clients. See include/obex.h. libobex contains mostly low level functions and libobexclient high level functions. Their usage in practice can be studied using the source code of the "obexbrowser" application found in src/examples/obexbrowser/. 9.8.1 LIBOBEX int obex_init(int s_in, int s_out) Initialize the OBEX library. Must be the first function called.
USER'S AND DEVELOPER'S GUIDE 9.8.2 WRAP MULTIRADIO ACCESS SERVER LIBOBEXCLIENT int obex_connect(char *target); Connect to target UUID. Target can be NULL (Object Push connect). Returns 0 if no errors, -1 if timeout, -2 if broken socket, >0 if OBEX error (see OBEX specification for OBEX Response Codes). int obex_disconnect(void); Disconnect. Returns 0 if no errors, -1 if timeout, -2 if broken socket, >0 if OBEX error (see OBEX specification for OBEX Response Codes).
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 9.8.3 OBEXBROWSER The application "obexbrowser" is an Object Push Profile (ObjP) and File Transfer Profile (FTP) client, and is shipped with WRAP in both binary form (as it is part of the WRAP platform) and in source form (at it is a good example of using the WRAP OBEX libraries). For an outgoing ObjP/FTP call you need to: 1. Make the outgoing RFCOMM call from the Bluetooth server's command socket. For example: "CALL 00:11:22:33:44:55 3 RFCOMM" 2.
USER'S AND DEVELOPER'S GUIDE C: S: C: S: C: S: C: WRAP MULTIRADIO ACCESS SERVER get remote.vcf get=143 put default.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 10 I/O API The Bluegiga I/O API (Application Programming Interface) defines how to access the WRAP general purpose I/O (P1), A/D converter (JP2 & JP3), DIP switches (SW2), and LEDs (D1-D8) and contains functions to accomplish this. The I/O API is accessed by using functions, macros, and constants defined in the header file bgio.h. You can use the macros by including the file. Example: #include 10.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER 11 ABOUT BLUEGIGA Bluegiga Technologies Ltd. provides wireless local area networks and communication systems based on Bluetooth technology. Bluegiga connects Bluetooth enabled devices with corporate networks and the Internet. In addition, Bluegiga products create easy-to-use and secure wireless links between Bluetooth devices and applications.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER Founded in 2000, Bluegiga is headquartered in Espoo, Finland and privately held. Bluegiga is an associate member of the Bluetooth Special Interest Group. Bluegiga products are globally available via a network of qualified distributors, original equipment and design manufacturers, and system integrators.
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER APPENDIX A – WRAP DIRECTORY STRUCTURE Directory Tree ============== / |-- bin |-- boot |-- dev | |-- [other devices] | `-- shm | |-- etc | |-- tmp | | |-- in | | |-- logo | | |-- obex | | |-- out | | |-- tone | | `-- wpkgd | | |-- in | | |-- out | | `-- spool | `-- var | |-- lock | | `-- subsys | |-- log | |-- run | `-- tmp |-- etc | |-- init.d -> rc.d/init.d | |-- pcmcia | | `-- cis | |-- ppp | | `-- peers | |-- rc.d | | |-- init.d | | `-- rc3.
USER'S AND DEVELOPER'S GUIDE | | | | | | | | | | | | `-- | | | |-`-- var |-|-|-| | | | |-|-|-|-|-|-| | |-`-- |-- sbin |-- share `-- src sbin share |-- man |-- misc `-- terminfo |-- a |-- l |-- v `-- x cache empty lib |-- b2b |-- installpoint |-- misc `-- setup local lock -> ../dev/shm/var/lock log -> ../dev/shm/var/log opt run -> ../dev/shm/var/run spool `-- cron `-- crontabs tmp -> ..