Page 5
SET BT ROLE .................... 97 6.10 SET BT SNIFF ..................99 6.11 SET BT POWER .................. 101 6.12 SET BT IDENT ................... 103 6.13 SET CONTROL AUTOCALL ..............105 6.14 SET CONTROL BAUD................108 6.15 SET CONTROL CD ................110 6.16 SET CONTROL CONFIG ...............
Page 10
Version history Version: Author: Comments: iWRAP3 official user guide Added “SET CONTROL CONFIG” iWRAP3 updates Added SET {link_id} SELECT Terms & Abbreviations Term or Abbreviation: Explanation: A2DP Advanced Audio Distribution Profile Analog Input Output AVRCP Audio/Video Remote Control Profile Basic Data Rate Set of technologies providing audio and data transfer over short- Bluetooth range radio connections...
Page 11
Hands-Free Profile HFP-AG Hands-Free audio Gateway Human Interface Device Interface for WRAP – a trademark registered by Bluegiga iWRAP Technologies L2CAP The Logical Link Control and Adaptation Layer Protocol Modem Status Control OBEX OBject EXchange Protocol Object Push Profile RFCOMM Serial cable emulation protocol;...
1. INTRODUCTION iWRAP is an embedded firmware running entirely on the RISC processor of WRAP THOR modules. It implements the full Bluetooth protocol stack, and many Bluetooth profiles as well. All software layers, including application software, run on the internal RISC processor in a protected user software execution environment known as a Virtual Machine (VM).
Page 13
In the figure above, a WRAP THOR Bluetooth module with iWRAP firmware could be connected to a host system for example via the UART interface. 1. If the host system has a processor, software can be used to control iWRAP by using ASCII based commands or GPIO events.
2. GETTING STARTED To start using iWRAP firmware, you can use, for example, terminal software such as HyperTerminal. When using the terminal software, make sure that the WRAP THOR module is connected to your PC’s serial port. By default, iWRAP uses the following UART settings: ...
3. IWRAP MODES iWRAP has two basic operational modes, command mode and data mode. In command mode ASCII commands can be given to iWRAP firmware to perform various actions or to change configuration settings and is the default mode when there are no Bluetooth connections.
Initial mode Target mode Requirements for state transition Command Mode Data Mode connection successfully (no Bluetooth connections) created using CALL command and CONNECT event In this mode, ASCII commands that indicates successful can be given to iWRAP. connection is received. A remote device opens a Bluetooth connection to iWRAP.
3.1 Command Mode The command mode is the default mode when iWRAP is powered up. In command mode, ASCII commands can be entered to iWRAP to perform various functions. Note: In command mode if there are active Bluetooth connections, the data from remote devices is buffered into iWRAP buffers.
3.3 Multiplexing Mode In iWRAP version 2.1.0 and newer, there is a special mode called multiplexing mode. In this mode, iWRAP does not have separate commands or data modes, but data, commands and events are all handled in one single mode. There is, however, a special protocol to separate commands and events from the actual data.
4. TECHNICAL DETAILS Feature: Value: MAX simultaneous ACL connections MAX simultaneous SCO connections 600Kbps (WT12/WT11 to BT2.0 USB dongle) MAX data rate 500Kbps (WT12/WT11 to WT12/WT11) 450Kbps (WT12/WT11 to BT1.1-BT1.2 device) MAX UART baud rate 921600 bps Typical data transmission delay 10-15ms Minimum data transmission delay 5-10ms...
Page 20
*) Alternative coding methods (APT-x, FastStream) exist to reduce the delay to 40-60ms **) Custom firmware needs to be request from support@bluegiga.com ***) Limited support...
5. IWRAP COMMAND LISTING iWRAP can be used and controlled from the host system by sending ASCII commands through the UART interface to iWRAP. When installed and configured, the module can be commanded from the host with the following ASCII commands: Command: iWRAP version: HW version:...
KILL iWRAP 3.0 WT12, WT11, WT32 Kills Bluetooth connections L2CAP iWRAP 3.0 WT12, WT11, WT32 Sets up L2CAP psm LIST iWRAP 2.1.0 WT12, WT11, WT32 Lists Bluetooth connections NAME iWRAP 2.2.0 WT12, WT11, WT32 Does friendly name discovery PAIR iWRAP 3.0 WT12, WT11, WT32 Pairs with a Bluetooth device PING...
Command: iWRAP version: HW version: Short description SET BT BDADDR iWRAP 2.1.0 WT12, WT11, WT32 Read BD_ADDR SET BT NAME iWRAP 2.1.0 WT12, WT11, WT32 Change friendly name SET BT CLASS iWRAP 2.1.0 WT12, WT11, WT32 Set Class-of-Device SET BT AUTH iWRAP 2.1.0 WT12, WT11, WT32 Set PIN code...
Command: iWRAP version: HW version: Short description SET {link_id} MASTER iWRAP 2.1.0 WT12, WT11, WT32 Set Bluetooth link to master SET {link_id} SLAVE iWRAP 2.1.0 WT12, WT11, WT32 Set Bluetooth link to slave SET {link_id} MSC iWRAP 2.2.0 WT12, WT11, WT32 Set Bluetooth link MSC status SET {link_id} SELECT iWRAP 3.0...
5.1 Typographical Conventions The ASCII commands and their usage are described further in this chapter. Commands and their output synopsis are presented as follows: Synopsis: COMMAND {required parameter} [optional parameter] STATIC TEXT OPTIONAL PARAMETER] Command parameters, on the other hand, are described like this: Description: parameter Description...
Page 27
5.2 AT "Attention", can be used to check that iWRAP is functional and in command mode. 5.2.1 Syntax Synopsis: Response: 5.2.2 Examples Sending AT to iWRAP: Tip: Most iWRAP commands do not produce replies telling that command was successful or execution has finished.
5.3 INQUIRY Command INQUIRY is used to find other Bluetooth devices in the area i.e. to make a device discovery. 5.3.1 Syntax Synopsis: INQUIRY {timeout} [NAME] [LAP {lap}] Description: timeout The maximum amount of time (in units of 1.28 seconds) before the inquiry process is halted.
Page 29
Response: INQUIRY {num_of_devices} INQUIRY {addr} {class_of_device} num_of_devices The number of found devices addr Bluetooth address of a found device class_of_device Bluetooth Class of Device of a found device Events: INQUIRY_PARTIAL These events are delivered as devices are found. NAME These events are delivered after INQUIRY if the NAME flag is present.
Page 32
5.4 IC The IC (inquiry cancel) command can be used to stop an on-going INQUIRY. 5.4.1 Syntax Synopsis: Description: No Description Response: INQUIRY {num_of_devices} INQUIRY {addr} {class_of_device} num_of_devices The number of found devices addr Bluetooth address of a found device class_of_device Bluetooth Class of Device of a found device Events:...
Page 33
Note: command cancels inquiry only issued before “INQUIRY {num_of_devices}” message.
5.5 NAME Command NAME is used to retrieve the friendly name of the device. 5.5.1 Syntax Synopsis: NAME {address} Description: address Address of the Bluetooth device Response: No response Events: NAME These events are delivered after INQUIRY if the NAME flag is present.
5.6 PAIR PAIR command can be used to pair with other Bluetooth devices. 5.6.1 Syntax Synopsis: PAIR {bd_addr} Description: bd_addr Bluetooth device address of the remote device Response: No response Events: PAIR {bd_addr} This event occurs if PAIR event is enabled with “SET CONTROL {status} CONFIG”...
Page 36
Successful pairing with a remote device and interactive pairing: PAIR 00:07:80:80:12:34 AUTH 00:07:80:80:12:34? AUTH 00:07:80:80:12:34 1234 PAIR 00:07:80:80:12:34 OK...
5.7 AUTH AUTH command can be used to reply to AUTH event. 5.7.1 Syntax Synopsis: AUTH {bd_addr} [pin_code] Description: bd_addr Bluetooth device address of the remote device pin_code Bluetooth pin code Response: No response Events: PAIR {bd_addr} This event occurs if PAIR event is enabled with SET CONTROL CONFIG {link_key} and pairing is successful.
Page 38
Note: Even if pin code is enabled with “SET BT AUTH” command you still can use a different pin code with “AUTH” command. However if no pin code is set with “SET BT AUTH”, the remote end can choose the pin code and “AUTH {bd_addr} [pin_code]”...
5.8 CALL The CALL command is used to initiate Bluetooth connections to the remote devices. Connections are closed by using command CLOSE. Currently open connections can be viewed by using command LIST. 5.8.1 Syntax Synopsis: CALL {address} {target} {connect_mode} [MTU {packet size}] Description: address Bluetooth address of the remote device...
Page 40
connect_mode Defines the connection mode to be established. Possible modes are: RFCOMM Normal RFCOMM connection Opens a connection in the Hands Free device mode. HFP-AG Opens a connection in the Hands Free Audio Gateway mode. A2DP Opens a connection in the Advanced Audio Distribution Profile (A2DP) mode or Audio Video Remote Control Profile (AVRCP) mode.
Page 41
PAIR If the PAIR event is enabled by using “SET CONTROL CONFIG”, it will be displayed during the call if paring has to be done. CLOCK If piconet clock event is enabled, CLOCK event will be displayed. AUTH IF interactive pairing mode is enabled and no paring exists, AUTH event will be displayed.
Page 42
Note: If CALL is used with CHANNEL instead of UUID, it will be on average around 300ms faster, since there is no need to do service discovery. However when calling directly with RFCOMM channel you need to be sure that the profile you want to connect to is always in that RFCOMM channel.
5.9 CLOSE Command CLOSE is used to terminate a Bluetooth connection. 5.9.1 Syntax Synopsis: CLOSE {link_id} Description: link_id Numeric connection identifier from a previously used command CALL or from event RING. Response: No response Events: NO CARRIER This event is delivered after the link is closed. 5.9.2 Examples Closing an active connection: CALL 00:60:57:a6:56:49 1103 RFC...
5.10 LIST Command LIST shows information about active connections. 5.10.1 Syntax Synopsis: LIST Description: No Description Response: LIST {num_of_connections} LIST {link_id} CONNECTED {mode} {blocksize} 0 0 {elapsed_time} {local_msc} {remote_msc} {addr} {channel} {direction} {powermode} {role} {crypt} {buffer} link_id Numeric connection identifier mode RFCOMM Connection type is RDCOMM...
Page 45
addr Bluetooth device address of the remote device channel RFCOMM channel number at remote device direction Direction of the link. The possible values are: OUTGOING The link is initiated by a local device (by using command CALL) INCOMING The link is initiated by the remote device powermode Power mode for the link.
Page 46
Response: LIST {num_of_connections} LIST {link_id} CONNECTED RFCOMM {blocksize} 0 0 {elapsed_time} {local_msc} {remote_msc} {addr} {channel} {direction} {powermode} {role} {crypt} {buffer} link_id Numeric connection identifier blocksize RFCOMM data packet size, that is, how many bytes of data can be sent in one packet elapse_time Link life time in seconds local_msc...
Page 47
role Role of the link. The possible values are: MASTER iWRAP is the master device of this link SLAVE iWRAP is the slave device of this link crypt Encryption state of the link. The possible values are: PLAIN Link is not encrypted ENCRYPTED Link is encrypted buffer...
Page 48
5.10.2 Examples Listing active connections: LIST LIST 1 LIST 0 CONNECTED RFCOMM 320 0 0 3 8d 8d 00:60:57:a6:56:49 1 OUTGOING ACTIVE MASTER PLAIN 0...
5.11 SELECT Command SELECT is used to switch from command mode to data mode. 5.11.1 Syntax Synopsis: SELECT {link_id} Description: link_id Numeric connection identifier Response: No response if a valid link is selected. iWRAP goes to data mode of the link link_id. Events: SYNTAX ERROR This event occurs if an invalid link_id is given...
5.12 SDP The SDP command can be used to browse the available services on other Bluetooth devices. 5.12.1 Syntax Synopsis: SDP {bd_addr} {uuid} Description: bd_addr Bluetooth address of the remote device uuid Service to look for UUID “1002” stands for root and returns all the services the remote device supports.
Page 51
SCRIPTORLIST < < U L2CAP > < U RFCOMM I 01 > > > 128-bit SDP response: SDP 00:17:4b:67:a8:c3 1101 SDP 00:17:4b:67:a8:c3 < I SERVICENAME S "Bluetooth SPP" > < I PROTOCOLDESCRIPTORLIST < < U 00000100-0000-1000-8000-00805f9b34fb > < U 00000003-0000-1000-8000-00805f9b34fb I 19 > > > According to the Bluetooth specification: 00000100-0000-1000-8000-00805f9b34fb = L2CAP...
5.13 SDP ADD The SDP ADD command can be used to modify a local service record to add new services. 5.13.1 Syntax Synopsis: SDP ADD {uuid} {name} Description: uuid Identifier of the service name Name of the service Response: SDP {channel} channel RFCOMM channel where the service is bound to Events:...
5.14 IDENT IDENT command can be used to identify a remote Bluetooth device with the Bluetooth Device ID method. 5.14.1 Syntax Synopsis: IDENT {bd_addr} Description: bd_addr Bluetooth device address of the remote device Response: No response Events: IDENT IDENT event is raised if a successful response is received IDENT ERROR IDENT ERROR event is raised if identification fails 5.14.2 Examples...
5.15 L2CAP Command L2CAP is used to create a L2CAP psm for L2CAP connections to the device. 5.15.1 Syntax Synopsis: L2CAP {uuid16} Description: uuid16 16-bit UUID for searching channels; must be odd. Response: No response Events: SYNTAX ERROR if an invalid UUID is given; no event if successful. 5.15.2 Examples Making an L2CAP call between two iWRAPs: L2CAP 25 (device 1, address 00:07:80:12:34:56)
5.17 SCO ENABLE The SCO ENABLE command is needed before any SCO (audio) connections can be used 5.17.1 Syntax Synopsis: SCO ENABLE Description: None Response: None Events: None Note: The SCO ENABLE command must be given every time after reset; it is not stored on flash memory.
5.18 SCO OPEN The SCO OPEN command is used to open the actual SCO connection. An existing RFCOMM connection is needed before SCO OPEN can be issued. 5.18.1 Syntax Synopsis: SCO OPEN {link_id} Description: link_id Numeric connection identifier Response: None Response: None Events:...
Page 58
5.18.2 Examples Creating an SCO connection to another iWRAP device: SCO ENABLE CALL 00:07:80:80:52:27 1 RFCOMM CALL 0 CONNECT 0 RFCOMM 1 [+++] SCO OPEN 0 CONNECT 1 SCO...
5.19 CLOCK CLOCK command can be used to read the Bluetooth piconet clock value. 5.19.1 Syntax Synopsis: CLOCK {link_id} Description: link_id Numeric connection identifier Response: No response Events: CLOCK {bd_addr} CLOCK event occurs, if valid link_id is used. {clock} SYNTAX ERROR If incorrect parameters are given.
5.20 KILL Command KILL is used to explicitly disconnect a connection. 5.20.1 Syntax Synopsis: KILL {bd_addr} [reason] Description: bd_addr Bluetooth address of the connected remote device. reason Reason for disconnecting; see Chapter 9 for a listing of possible error codes. The default value is 0x115: HCI_ERROR_OETC_POWERING_OFF, device is about to power off.
5.21 BER The BER command returns the Bit Error Rate of the given link ID. 5.21.1 Syntax Synopsis: BER {link_id} Description: link_id Numeric connection identifier Response: BER {bd_addr} {ber} bd_addr Bluetooth address of the remote device Average Bit Error Rate on the link. Possible values are from 0.0000 to 100.0000.
5.22 RSSI The RSSI command returns the Receiver Signal Strength Indication of the link given as a parameter. 5.22.1 Syntax Synopsis: RSSI {link_id} Description: link_id Numeric connection identifier Response: RSSI {bd_addr} {rssi} bd_addr Bluetooth address of the remote device rssi Receiver Signal Strength Indication.
5.23 TXPOWER The TXPOWER command can be used check the TX output power level of an active Bluetooth link. 5.23.1 Syntax Synopsis: TXPOWER {link_id} Description: link_id Numeric connection identifier Response: TXPOWER {bd_addr} {txpower} bd_addr Bluetooth address of the remote device txpower User TX power level in dBm Events:...
5.24 PING The PING command sends a Bluetooth test packet to the other device, which sends the packet back and the round trip time of the packet is shown. 5.24.1 Syntax Synopsis: PING {link_id} Description: link_id Numeric connection identifier Response: RSSI {bd_addr} {round trip time} bd_addr Bluetooth address of the remote device...
5.25 ECHO The ECHO command sends a specified string of characters to the active link specified by the ‘link_id’ parameter. This command can be used, for example, with command SET CONTROL BIND to send an indication of activity over a Bluetooth link. 5.25.1 Syntax Synopsis: ECHO {link_id} [string]...
5.26 SLEEP The SLEEP command will force deep sleep on. After issuing this command, the module will enter deep sleep until a Bluetooth connection is received or something is received from the UART interface in command mode. The SLEEP command will also work when there are one or more active connections and iWRAP is in command mode.
5.27 PIO Command PIO is used to get and set PIO states and directions. There are 6 usable IO pins (PIO2-PIO7) on the WT11/12 module, 11 (PIO0-PIO10) on the WT32; thus the range for the mask and state parameters for the WT11/12 is 4-FF (excluding values that have bits 0 or 1 set), for the WT32 it is 0-07FF.
Page 68
mask Bit mask that defines the GPIO lines states Bit mask that defines the GPIO pin states Response: No response if command execution is successful. SYNTAX ERROR This event is raised if incorrect parameters are given Events: PIO {reg value} This event is raised 5.27.2 Examples Setting PIO7 (which lights the PIO7 LED on the evaluation kit if the corresponding switch...
5.28 VOLUME Command VOLUME is used to modify and read the module’s line out volume level. 5.28.1 Syntax Synopsis: VOLUME [{vol}] Description: New volume level value; leave blank to read current volume level. 0…9 Sets volume level: Range 0-9. down Decreases volume level by one.
5.29 TEMP This command reads the value of internal temperature sensor. This value should not be considered very reliable. The value can be compensated by modifying PS-key PSKEY_TEMPERATURE_CALIBRATION. 5.29.1 Syntax Synopsis: TEMP Description: None. Response: TEMP {temp} temp Temperature in Celsius Events: None.
5.30 BATTERY Command BATTERY is used to read the current voltage of the module battery. 5.30.1 Syntax Synopsis: BATTERY Description: None Response: None Events: BATTERY {mv} Current battery voltage in millivolts. 5.30.2 Examples Reading battery voltage. BATTERY BATTERY 3673...
5.31 BYPASSUART BYPASSUART command enabled the UART bypass mode, in which the UART traffic is passed to GPIO pins instead of iWRAP. Please refer to the modules data sheet for more information. A physical reset is needed to return to normal operation mode. 5.31.1 Syntax Synopsis: BYPASSUART...
5.33 BCSP_ENABLE Command BCSP_ENABLE is used to boot the device and enter BCSP mode; it is an alias for BOOT 1. See chapter 9.3 for a detailed explanation of iWRAP boot modes. 5.33.1 Syntax Synopsis: BCSP_ENABLE Description: None Response: No response Events: None...
5.35 BOOT The BOOT command is used to change the iWRAP’s boot mode. After issuing this command, the module will enter the selected boot mode. After resetting the module, it will boot in iWRAP mode again. The boot modes are explained in chapter. 5.35.1 Syntax Synopsis: BOOT [boot_mode]...
5.36 TEST The TEST command is used to give radio test commands to iWRAP. The commands are the same that can be given by using CSR BlueTest software. TEST commands must only be used for testing purposes, not for application functionality. 5.36.1 Syntax Synopsis: TEST {mode} [mode_specific_parameters]...
Page 78
cc range: 0 – 3 (default = 0) RXSTART {lo_freq} {highside} {attn} Enables the receiver in continuous reception at a designated frequency (lo_freq) with a choice of low high side modulation (highside) with designated attenuation setting (attn). highside range: 0 or 1 (default = false = 0) attn: range: 0 –...
Page 79
Plays a constant tone on the PCM port. freq range: 0 – 5 ampl range : 0-8 dc: 0 – 60096 (set to 0) SETPIO {mask} {bits} Sets PIO high or low according to given parameters. NOTE: This command sets the PIO regardless of other usage! mask: Bit mask specifying the PIOs that are to be set bits: the bit values...
5.37 TESTMODE The TESTMODE command is used to put the iWRAP into a Bluetooth test mode, where a Bluetooth tester can control the hardware. Reset must be done to recover normal operation. 5.37.1 Syntax Synopsis: TESTMODE Description: No description. Description: Response: TEST 0 Events:...
5.38 HELP Prints supported iWRAP commands. 5.38.1 Syntax Synopsis: HELP Description: No description Response: A list of supported iWRAP commands Events: None 5.38.2 Examples HELP HELP AUTH HELP BATTery HELP BER HELP Call HELP CLose HELP CLOCK HELP HELP HELP INFO HELP Inquiry HELP IC …...
5.39 INFO INFO displays information about iWRAP version and features. 5.39.1 Syntax Synopsis: INFO [CONFIG | BOOTMODE] Description: CONFIG Optional flag that that displays more detailed information about the firmware for example changed parameters. BOOTMODE Displays bootmode parameters Response: Information about iWRAP version and features. Events: None.
Page 83
Detailed information display: INFO CONFIG WRAP THOR AI (2.3.0 build 77) Copyright (c) 2003-2007 Bluegiga Technologies Inc. Compiled on Oct 15 2007 18:19:00, running on WRAP THOR module, psr v0 - BOCK3 version 27 (Mar 14 2007 15:19:59) (max acl/sco 7/1) - Bluetooth version 2.0, Power class 2 - Loader 4156, firmware 4532 (56-bit encryption) - up 0 days, 00:39, 0 connections (pool 1)
5.40 CONNECT iWRAP3 can act as a repeater / range extender for RFCOMM connections by using the CONNECT command which will transparently link two ongoing connections together as a connection between the two remote devices. 5.40.1 Syntax Synopsis: CONNECT {link_id_1} {link_id_2} Description: link_id_1 Numeric connection identifier as displayed by the LIST command.
6. SET With the SET command, you can display or configure different iWRAP configuration values. 6.1.1 Syntax of SET Commands Synopsis: SET [{category} {option} {value}] Description: Without any parameters, SET displays the current configuration. category Category of setting Changes different Bluetooth related settings. See SET BT more information about options.
Page 86
Response: None if issued with parameters SET {category} {option} {value} If no parameters given displays current iWRAP settings. Events: None 6.1.2 Examples Listing current settings: SET BT BDADDR 00:07:80:80:c2:37 SET BT NAME WT12 SET BT CLASS 50020c SET BT AUTH * 9078 SET BT LAP 9e8b33 SET BT PAGEMODE 4 2000 1 SET BT PAIR 00:07:cf:51:f6:8d 9c4e70d929a83812a00badba7379d7c2...
6.2 SET BT BDADDR SET BT BDADDR shows the local device’s Bluetooth address. 6.2.1 Syntax Synopsis: No description, since the value is read only. Description: No description Response: None Events: None List format: SET BT BDADDR {bd_addr} bd_addr Bluetooth device address of the local device Note: This value is read-only!
6.3 SET BT NAME SET BT NAME shows or sets the local device’s friendly name. 6.3.1 Syntax Synopsis: SET BT NAME {friendly_name} Description: friendly_name Friendly name of the local device Response: None Events: SYNTAX ERROR This event occurs if incorrect parameters are given List format: SET BT NAME {friendly_name} Note:...
6.4 SET BT CLASS SET BT CLASS shows or sets the local device’s Class-of-Device (CoD). Class of device is a parameter, which is received during the device discovery procedure, indicating the type of device and which services are supported. 6.4.1 Syntax Synopsis: SET BT CLASS {class_of_device} Description:...
6.5 SET BT AUTH SET BT AUTH shows or sets the local device’s PIN code. 6.5.1 Syntax Synopsis: SET BT AUTH {mode} {pin_code} Description: mode Pin code usage mode: Pin code will be displayed by “SET” command. Pin code will NOT be displayed by “SET” command. pin_code PIN code for authorized connections.
Page 91
Note: If command “SET BT AUTH *” is given, PIN code will be disabled and no encryption can be used during Bluetooth connections.
6.6 SET BT LAP This command configures the Inquiry Access code (IAC) that iWRAP uses. IAC is used in inquiries and inquiry responses. 6.6.1 Syntax Synopsis: SET BT LAP {iac} Description: Value for the inquiry access code. The following values are possible: 9e8b33 General/Unlimited Inquiry Access Code (GIAC).
Page 93
Note: IAC is very useful in cases where the module needs to be visible in the inquiry but only for dedicated devices, such as other iWRAP modules, but not for standard devices like PCs or mobile phones. When the value of IAC is left to default value (0x9e8b33) iWRAP will be visible for all devices capable of making an inquiry.
6.7 SET BT PAGEMODE SET BT PAGEMODE configures or displays the local device’s page mode. Page mode controls whether iWRAP can be seen in the inquiry and whether it can be connected. This command can also be used to change the page timeout. 6.7.1 Syntax Synopsis: SET BT PAGEMODE {page_mode} {page_timeout} {page_scan_mode}...
Page 95
Mode R0 means that iWRAP IS connectable all the time. High current consumption! Mode R1 means that iWRAP is connectable every 1.28 sec (the default value) Mode R2 means that iWRAP is connectable every 2.56 sec (lowest power consumption) Response: SYNTAX ERROR This event occurs if incorrect parameters are given Events:...
6.8 SET BT PAIR SET BT PAIR displays or configures the local device’s pairing information. 6.8.1 Syntax Synopsis: SET BT PAIR {bd_addr} {link_key} Description: bd_addr Bluetooth address of the paired device link_key Link key shared between the local and the paired device. If this value is empty, pairing for the given Bluetooth address will be removed.
6.9 SET BT ROLE This command configures or displays the local device’s role configuration. With the “SET BT ROLE” command, iWRAP’s master-slave behavior can be configured. This command can also be used to set the supervision timeout and link policy. 6.9.1 Syntax Synopsis: SET BT ROLE {ms_policy} {link_policy} {supervision_timeout}...
Page 98
This value disables all of the above modes supervision_timeout 0001 – FFFF Supervision timeout controls how long a Bluetooth link is kept open if the remote end does not answer. Supervision timeout is denoted as a hexadecimal number (HEX) and is calculated as in the example below: 12C0 (HEX) is 4800 (DEC).
6.10 SET BT SNIFF This command enables automatic sniff mode for Bluetooth connections. Notice that remote devices may not support sniff. 6.10.1 Syntax Synopsis: SET BT SNIFF {max}{min} [{attempt} {timeout}] SET BT SNIFF {avg} Description: Maximum acceptable interval in milliseconds Range: 0002 b FFFE;...
Page 100
timeout Number of Baseband receive slots for sniff timeout. Length = N * 1.25 msec Range for N: 0x0000 – 0x7FFF Time Range: 0 msec - 40.9 Seconds Mandatory Range for Controller: 0 to 0x0028 Response: None Events: SYNTAX ERROR This event occurs if incorrect parameters are given List format: SET BT SNIFF {max}{min} {attempt} {timeout}...
6.11 SET BT POWER This command changes the TX power parameters of the WRAP THOR module. 6.11.1 Syntax Synopsis: SET BT POWER [RESET] | [{default} {maximum} [inquiry]] Description: If no parameters are given, displays current TX power settings. RESET Returns default TX power values and resets iWRAP default Default TX power in dBm (used for CALL and NAME operations and when responding to inquiries)
6.11.2 Examples Change TX power to class 2 setting: SET BT POWER 0 4 0 Note: Please see the table below for details on setting the requirements for TX power: Power class: Max. TX power: Nominal TX power: Minimum TX power: 20 dBm 0dBm 4dBm...
6.12 SET BT IDENT This command changes the device identification information. Only the freeform description can be changed; the first four parameters exist for the sake of conformity. 6.12.1 Syntax Synopsis: SET BT IDENT {src}:{vendor_id} {product_id} {version} [descr] Description: This attribute indicates which organization assigned the VendorID attribute.
Page 104
List format: SET BT IDENT {src}:{vendor_id} {product_id} {version} [descr] 6.12.2 Examples Changing the description string: SET BT IDENT BT:47 f000 3.0.0 My Description String...
6.13 SET CONTROL AUTOCALL SET CONTROL AUTOCALL enables or disables the AUTOCALL functionality in iWRAP. When the AUTOCALL feature is enabled, iWRAP tries to form a connection with a paired (see “SET BT PAIR”) device until the connection is established. If the connection is lost or closed, iWRAP tries to reopen it.
Page 106
L2CAP psm 16-bit L2CAP psm Format: xxxx (hex) timeout Timeout between calls (in milliseconds) profile Defines the connection mode to be established. Possible modes are: RFCOMM Normal RFCOMM connection Opens a connection in the Hands Free device mode. HFP-AG Opens a connection in the Hands Free Audio Gateway mode. A2DP Opens a connection in the Advanced Audio Distribution Profile (A2DP) mode or Audio Video Remote Control Profile (AVRCP)
Page 107
List format: If AUTOCALL is not enabled, “SET CONTROL AUTOCALL” will not be displayed SET CONTROL AUTOCALL {target} {timeout} When AUTOCALL is enabled {profile} 6.13.2 Examples To enable AUTOCALL to Serial Port Profile (using UUID) with timeout of 5000 ms: SET CONTROL AUTOCALL 1101 5000 RFCOMM SET BT BDADDR 00:07:80:80:c2:37 SET BT NAME WT12...
6.14 SET CONTROL BAUD This command changes the local device’s UART settings. 6.14.1 Syntax Synopsis: SET CONTROL BAUD {baud_rate},8{parity}{stop_bits} Description: baud_rate UART baud rate in bps. See modules data sheet for suitable values. parity UART parity setting No parity Even parity Odd parity stop_bits Number of stop bits in UART communications...
Page 109
Events: SYNTAX ERROR This event occurs if incorrect parameters are given List format: SET CONTROL BAUD {baud_rate},8{parity}{stop_bits} 6.14.2 Examples Configuring local UART to 9600bps, 8 data bits, no parity and 1 stop bit SET CONTROL BAUD 9600,8N1...
6.15 SET CONTROL CD This command enables or disables the carrier detect signal (CD) in iWRAP. Carrier detect signal can be used to indicate that iWRAP has an active Bluetooth connection. With “SET CONTROL CD” command, one PIO line can be configured to act as a CD signal.
6.16 SET CONTROL CONFIG 6.16.1 Syntax This command enables or disables various functional features in iWRAP. These features are described below. Synopsis: SET CONTROL CONFIG [optional_configuration] {configuration_value} [LIST] Description: configuration_value This value is a bit field (represented as a hexadecimal value), which is used to control various features in iWRAP.
Page 112
Bit 6 Not used. Must be set to 0. Bit 7 Displays the PAIR event after successful pairing. Bit 8 Enables SCO links. This bit must be 1 if you use audio profiles. Bit 9 Must be set to 0. Bit 10 Must be set to 0.
Page 113
Bit 1 “Enhanced Inquiry Response”. If this bit is set, iWRAP display INQUIRY_EXTENDED reports during inquiry. LIST Static text that prints the configuration in human readable format. Response: SYNTAX ERROR Occurs if incorrect parameters are given CONTROL CONFIG If no parameters given [optional_configuration] {configuration_value} CONTROL...
6.17 SET CONTROL ECHO This command changes the echo mode of iWRAP. 6.17.1 Syntax Synopsis: SET CONTROL ECHO {echo_mask} Description: echo_mask Bit mask for controlling the display of echo and events Bit 0 If this bit is set, the start-up banner is visible. Bit 1 If this bit is set, characters are echoed back to client in command mode.
6.18 SET CONTROL ESCAPE 6.18.1 Syntax This command is used to change the escape character used to switch between command and data mode. This command also enables and disables DTR signaling. Synopsis: SET CONTROL ESCAPE {esc_char} {dtr_mask} {dtr_mode} Description: esc_char Decimal ASCII character to define the escape character used in the escape sequence.
Page 116
6.18.2 Examples How to disable default escape character “+” and configure DTR to PIO5. SET CONTROL ESCAPE – 20 1...
6.19 SET CONTROL INIT SET CONTROL INIT lists or changes the initialization command in iWRAP. This command is run when iWRAP is started or reset. 6.19.1 Syntax Synopsis: SET CONTROL INIT [command] Description: If no command is given, will erase the initialization command. command Any of the available iWRAP commands.
6.20 SET CONTROL MUX SET CONTROL MUX can be used to enable or disable the multiplexing mode. This chapter describes the usage of the command as well as the operation of multiplexing mode. 6.20.1 Syntax Synopsis: SET CONTROL MUX {mode} Description: mode Multiplexing mode...
To disable multiplexing mode: BF FF 00 11 53 45 54 20 43 4f 4e 54 52 4f 4c 20 4d 55 58 20 30 00 READY The command is “SET CONTROL MUX 0” in the frame format used by MUX mode. The command must be sent in hex format, not in ASCII format.
normal mode, the data is stored to small iWRAP buffers and received when the connections become active (data mode of the connection enabled). The next figure illustrates the host-iWRAP-host communications in multiplexing mode. <0xBF> <0xFF> <0x00> <2> <AT> <0x00> Host UART <0xBF>...
Page 121
//HOW TO CREATE A SIMPLE FRAME char outbuf[128]; //Buffer for frame char* cmd = “SET”; //ASCII command int link = 0xff, pos=0; //0xFF for control channel int len = strlen(cmd); //Calc. length of ASCII command //Generate packet outbuf[pos++]=0xbf; //SOF outbuf[pos++]=link; //Link (0xFF=Control, 0x00 = connection 1, etc.) outbuf[pos++]=0;...
6.21 SET CONTROL BIND With SET CONTROL BIND, it is possible to bind iWRAP commands to GPIO pins. 6.21.1 Syntax Synopsis: SET CONTROL BIND {pri} [io_mask] [direction] [command] Description: Command priority. Determines the order in which the commands bound to PIO are executed. WT12 and WT11 value range: PIO2-PIO7 WT32 value range: PIO0-PIO10 If only pri parameter is given the current bind will be removed.
Page 123
Response: No response 6.21.2 Examples Example usage of binding PIOs: SET CONTROL BIND 0 20 FALL CLOSE 0 SET CONTROL BIND 1 20 FALL SET BT PAIR * SET BT BDADDR 00:07:80:81:62:2a SET BT NAME EKWT11_PR SET BT CLASS 001f00 SET BT AUTH * 1234 SET BT LAP 9e8b33 SET BT PAGEMODE 4 2000 1...
6.22 SET CONTROL MSC With iWRAP firmware, it is possible to transmit all the UART modem signals over the SPP (Serial Port Profile) Bluetooth link. The signals DSR, DTR, RTS, CTS, RI and DCD can be specified to GPIO pins on the WRAP THOR modules. The SET CONTROL MSC command is used to do this.
Response: SYNTAX ERROR This event occurs if incorrect parameters are given. Events: None Note: The PIO pin is selected with a bit mask. For example, if you want to use PIO3, you will then have a bit mask where the third bit is 1, that is, 1000. This bit mask value is then given in the command in hexadecimal format.
6.23 SET CONTROL GAIN SET CONTROL GAIN is used to control the internal input and output gain. 6.23.1 Syntax Synopsis: SET CONTROL GAIN [{input} {output} [DEFAULT]] Description: If no parameters are given, returns the input and output gain ranges in decimal.
6.24 SET CONTROL VREGEN SET CONTROL VREGEN is used to set the behavior of the internal software-controlled regulator on the module. The PIO’s specified by the PIO mask parameter will be pulled high by the regulator as specified by the mode parameter. 6.24.1 Syntax Synopsis: SET CONTROL VREGEN {mode} {PIO mask}...
Page 128
Events: None List format: SET CONTROL VREGEN {mode} {PIO mask} 6.24.2 Examples Building a setting in which a switch is toggled to power on the module, and keep it powered on until the switch is first toggled back, then toggled up and down again (rising edge followed by falling edge);...
6.25 SET CONTROL MICBIAS SET CONTROL MICBIAS controls the linear regulator that drives current through the dedicated mic bias pin. 6.25.1 Syntax Synopsis: SET CONTROL MICBIAS [{voltage} {current}] Description: If no parameters are given, returns current mic bias settings. voltage Voltage driven through the mic bias pin.
Page 130
Response: SYNTAX ERROR This event occurs if incorrect parameters are given. Events: None List format: SET CONTROL MICBIAS {voltage} {current}...
6.26 SET CONTROL PCM This command configures the physical PCM hardware interface settings and PCM data format. 6.26.1 Syntax Synopsis: SET CONTROL PCM {config} {data} Description: If no parameters are given lists the current settings. config Value for the PCM interface configuration. Corresponds to PS-key: PSKEY_PCM_CONFIG32 data Value...
6.27 SET PROFILE The SET PROFILE command can be used to enable or disable the available Bluetooth profiles: SPP, OPP, HFP and HFP-AG, A2DP, AVRCP and HID. 6.27.1 Syntax Synopsis: SET PROFILE {profile_name} [SDP_name] Description: profile_name Specify the profile to be enabled or disabled. Possible profile acronyms are: Hands Free Profile HFP-AG...
Page 133
SDP_name Enables the profile with default SDP name. With A2DP enabled A2DP in sink mode. <string> Enables the profile with string used as SDP name. If this parameter is not given, the profile will be disabled. Response: No response 6.27.2 Examples Example of enabling HFP profile.
6.28 SET {link_id} ACTIVE This command disables all the power save modes for the defined, active Bluetooth link and sets it into active mode. 6.28.1 Syntax Synopsis: SET {link_id} ACTIVE Description: link_id Numeric connection identifier Events: None 6.28.2 Examples Changing from SNIFF to active: LIST LIST 1 LIST 0 CONNECTED RFCOMM 320 0 0 3 8d 8d 00:60:57:a6:56:49 1 OUTGOING SNIFF...
6.29 SET {link_id} MASTER This command attempts to switch the link to Piconet master. Notice that this may not be allowed by the remote end. 6.29.1 Syntax Synopsis: SET {link_id} MASTER Description: link_id Numeric connection identifier Events: None 6.29.2 Examples Changing from slave to master: LIST LIST 1...
6.30 SET {link_id} SLAVE This command attempts to switch the link to Piconet slave. Notice that this may not be allowed by the remote end. 6.30.1 Syntax Synopsis: SET {link_id} SLAVE Description: link_id Numeric connection identifier Events: None...
6.31 SET {link_id} SNIFF This command attempts to enable SNIFF mode for the defined Bluetooth link. Whether this command is successful or not, depends on if the remote end allows sniff to be used. 6.31.1 Syntax Synopsis: SET {link_id} SNIFF {max}{min} [{attempt} {timeout}] SET {link_id} SNIFF {avg} Description: link_id...
6.32 SET {link_id} MSC With this command, it is possible to send 07.10 Modem Status Command to the remote device without having the signals actually connected to the module. 6.32.1 Syntax Synopsis: SET {link_id} MSC {status} Description: link_id Numeric connection identifier of the link where the modem status is to be sent.
6.33 SET {link_id} SELECT With this command, you can define the active Bluetooth connection for the iWRAP command wrapped. This command is useful for example when two simultaneous Hands- Free connections or one Hands-Free connection and one A2DP connection is used 6.33.1 Syntax Synopsis: SET {link_id} SELECT...
7. IWRAP EVENTS Events are a mechanism that iWRAP uses to notify the user for completed commands, incoming connections, and so on. If iWRAP is in data mode (data is being transmitted and no multiplexing mode is used) the only possible event is NO CARRIER indicating that connection was closed or lost. Note: ...
7.1 CONNECT The CONNECT event is used to notify the user for a successful link establishment. 7.1.1 Syntax Synopsis: CONNECT {link_id} {SCO | RFCOMM | A2DP | HID | HFP | HFP-AG {target} [address]} Description: link_id Numeric connection identifier target Connected RFCOMM channel number or L2CAP psm address Address of the remote end.
7.2 INQUIRY_PARTIAL The INQUIRY_PARTIAL event is used to notify the user for a found Bluetooth device. This event precedes response for the INQUIRY command. 7.2.1 Syntax Synopsis: INQUIRY_PARTIAL {address} {class_of_device} [{cahced_name} {rssi}] Description: address Bluetooth address of the found device class_of_device C Bluetooth Class of Device of the found device cached_name...
7.3 NO CARRIER The NO CARRIER event is used to notify the user for a link loss or, alternatively, a failure in the link establishment. 7.3.1 Syntax Synopsis: NO CARRIER {link_id} ERROR {error_code} [message] Description: link_id Numeric connection identifier error_code Code describing the error message Optional verbose error message...
7.4 READY The READY event is used to notify the user for switching to command mode or to indicate that iWRAP is ready to be used after a reset or after a successful switch between normal or multiplexing mode has been done. 7.4.1 Syntax Synopsis: READY.
7.5 NAME The NAME event is used to notify the user for a successful lookup for Bluetooth friendly name of the remote device. 7.5.1 Syntax Synopsis: NAME {address} {“friendly_name”} Description: address Bluetooth device address of the device friendly_name Friendly name of the device...
7.6 NAME ERROR The NAME ERROR event is used to notify the user for a Bluetooth friendly name lookup failure. 7.6.1 Syntax Synopsis: NAME ERROR {error_code} {address} [message] Description: error_code Code describing the error address Bluetooth address of the device message Optional verbose error message...
7.7 PAIR The PAIR event is used to notify the user for a successful pairing. 7.7.1 Syntax Synopsis: PAIR {address} {key_type} {link_key} Description: address Bluetooth device address of the paired device key_type Type of link key Combination key Local unit key Remote unit key Unknown key link_key...
7.8 RING The RING event is used to notify the user for an incoming connection. Incoming connections are only accepted if there is no existing links. 7.8.1 Syntax Synopsis: RING {link_id} {address} {SCO | {channel} RFCOMM} Description: link_id Numeric connection identifier address Bluetooth device address of the device channel...
7.9 SYNTAX ERROR SYNTAX ERROR is not an actual event, but an error message describing a faulty typed command or an error in command parameters. 7.9.1 Syntax Synopsis: SYNTAX ERROR...
7.10 AUTH AUTH event indicates that someone is trying to pair with iWRAP. 7.10.1 Syntax Synopsis: AUTH {bd_addr}? Description: bd_addr Bluetooth device address of the remote device The AUTH event occurs only if interactive pairing is enabled with “SET CONTROL CONFIG”...
7.11 CLOCK CLOCK event indicates the Piconet clock value for a specific Bluetooth connection. 7.11.1 Syntax Synopsis: AUTH {bd_addr} {clock} Description: bd_addr Bluetooth device address of the remote device clock Piconet clock value All the devices in a Bluetooth Piconet are synchronized to a same clock (master clock). The CLOCK event displays the clock value and it can for example be used for time synchronization of the Piconet slaves and master.
7.12 IDENT IDENT event informs that a remote Bluetooth device has been identified by using the Device ID profile and reports the identification data sent by the remote device. 7.12.1 Syntax Synopsis: IDENT {src}:{vendor_id} {product_id} {version} “[descr]” Description: This attribute indicates which organization assigned the VendorID attribute.
7.13 IDENT ERROR IDENT ERROR event informs that a remote Bluetooth could not be identified by the Device ID profile. 7.13.1 Syntax Synopsis: IDENT ERROR {error_code} {address} [message] Description: error_code Code describing the error address Bluetooth address of the device message Optional verbose error message...
7.14 BATTERY The BATTERY event is used to report the current battery voltage to the user. 7.14.1 Syntax Synopsis: BATTERY {mv} Description: Current battery voltage in millivolts.
7.15 PIO The PIO event is used to report the current PIO data, direction and bias register states. 7.15.1 Syntax Synopsis: PIO {reg value} Description: Which register is read: GET for data, GETDIR for direction, GETBIAS for bias register. value Register’s value in hexadecimal.
7.16 VOLUME The VOLUME event is used to report the current line out volume to the user. 7.16.1 Syntax Synopsis: VOLUME {vol} Description: Current volume, range 0-9.
Page 158
HCI_ERROR_UNSUPPORTED_FEATURE 0x11 Unsupported Feature Parameter Value HCI_ERROR_ILLEGAL_FORMAT 0x12 Invalid HCI Command Parameter HCI_ERROR_OETC_USER 0x13 Remote User Terminated Connection HCI_ERROR_OETC_LOW_RESOURCE 0x14 Remote Device Terminated Connection due to Low Resources HCI_ERROR_OETC_POWERING_OFF 0x15 Remote Device Terminated Connection due to Power Off HCI_ERROR_CONN_TERM_LOCAL_HOST 0x16 Connection Terminated By Local Host HCI_ERROR_AUTH_REPEATED...
HCI_ERROR_LMP_PDU_NOT_ALLOWED 0x24 LMP PDU Not Allowed HCI_ERROR_ENC_MODE_NOT_ACCEPTABLE 0x25 Encryption Mode Not Acceptable HCI_ERROR_UNIT_KEY_USED 0x26 Link Key Can Not be Changed HCI_ERROR_QOS_NOT_SUPPORTED 0x27 Requested QoS Not Supported HCI_ERROR_INSTANT_PASSED 0x28 Instant Passed HCI_ERROR_PAIR_UNIT_KEY_NO_SUPPORT 0x29 Pairing With Unit Supported Table 10: HCI errors Please see Bluetooth 2.0+EDR core specification page 493 for more information about error codes.
9. GENERAL INFORMATION This chapter contains a lot of useful information about iWRAP and its usage. 9.1 Changing Parameters over RS232 with PSTool PSTool software allows the user to change the internal parameters (PS keys) of the module. Most of the parameters should not be touched, since they can affect the performance of the module.
9.2 Using BlueTest over RS232 BlueTest is a piece of software, which can be used to perform several built-in radio tests, such as Bit Error Rate (BER) measurements, TX power measurements and RX measurements. BlueTest also uses the BCSP protocol to talk to the module and can be used in a similar way as PSTool.
9.3 Switching to HCI Firmware New iWRAP firmware builds use a so called unified firmware (iWRAP firmware 2.1.0 and newer). This means that the firmware contains all iWRAP firmware, RFCOMM and HCI stacks. Selecting the active part is done by using PS keys and there is no need to reflash the actual firmware as with older versions of iWRAP.
9.4 Firmware Updates over SPI The SPI interface is dedicated to firmware updates. The Onboard Installation Kit (SPI cable) and a Windows™ software called iWRAP update client (or BlueTest) can be used to update / restore the firmware. iWRAP update client is an easier and the suggested way to do the firmware upgrade. instead of BlueFlash.
9.6 UART Hardware Flow Control Hardware flow control is enabled by default. It can be disabled by changing the value of PSKEY_UART_CONFIG_XXX (XXX = USR, H4, H5 or BCSP). With iWRAP, the PS key is PSKEY_UART_CONFIG_USR. If PSKEY_UART_CONFIG_USR is 08a8, HW flow control is enabled ...
9.8 Supported Bluetooth Profiles Overview 9.8.1 RFCOMM with TS07.10 The RFCOMM protocol emulates the serial cable line settings and status of an RS-232 serial port and is used for providing serial data transfer. RFCOMM connects to the lower layers of the Bluetooth protocol stack through the L2CAP layer. By providing serial-port emulation, RFCOMM supports legacy serial-port applications while also supporting the OBEX protocol among others.
Page 171
9.8.3 Serial Port Profile (SPP) A scenario would be using two devices, such as PCs or laptops, as virtual serial ports and then connecting the two devices via Bluetooth technology. The SPP defines two roles, Device A and Device B. ...
Page 172
9.8.5 Dial-up Networking Profile (DUN) DUN provides a standard to access the Internet and other dial-up services over Bluetooth technology. The most common scenario is accessing the Internet from a laptop by dialing up on a mobile phone wirelessly. It is based on SPP and provides for relatively easy conversion of existing products, through the many features that it has in common with the existing wired serial protocols for the same task.
Page 173
Source: Bluetooth SIG, URL: http://www.bluetooth.com/Bluetooth/Technology/Works/A2DP.htm 9.8.8 Audio Video Remote Control Profile AVRCP is designed to provide a standard interface to control TVs, hi-fi equipment, or others to allow a single remote control (or other device) to control all the A/V equipment to which a user has access.
9.9 Power Saving SNIFF mode: Once a Bluetooth device is connected to a Piconet, it can enter one of three power saving modes. In SNIFF mode, the activity of a Bluetooth device is lowered, enabling it to listen at a reduced rate to the Piconet. The interval or period between SNIFF is configurable. The SNIFF mode is the least power efficient of all three power saving modes.
9.10 Bluetooth profile UUIDs UUID: Bluetooth Profile: 0001 0003 RFCOMM 0008 OBEX 000C HTTP 000F BNEP 0100 L2CAP 1000 Service Discovery Server Service ClassID 1001 Browse Group Descriptor Service ClassID 1002 Public Browse Group 1101 Serial Port Profile 1102 LAN Access Using PPP 1103 Dial up Networking 1104...
Page 176
110D Advanced Audio Distribution Profile (A2DP) 110E A/V_Remote Control 110F Video Conferencing 1110 Intercom 1111 1112 Headset Audio Gateway 1113 1114 WAP_CLIENT 1115 Personal Area Networking User 1115 PANU 1116 Network Access Point 1116 1117 Group Network 1117 1118 Direct Printing 1119 Reference Printing 111A...
Page 177
1121 ReflectedUI 1122 Basic Printing 1123 Printing Status 1124 Human Interface Device Service 1125 Hardcopy Cable Replacement 1126 HCR_Print 1127 HCR_Scan 1128 Common_ISDN_Access 1129 Video Conferencing GW 112A UDI_MT 112B UDI_TA 112C Audio/Video 112D SIM_Access 112E Phonebook Access - PCE 112F Phonebook Access - PSE 1130...
1300 ESDP_UPNP_IP_PAN 1301 ESDP_UPNP_IP_LAP 1302 ESDP_UPNP_L2CAP 1303 Video Source 1304 Video Sink 1305 Video Distribution Table 13: UUIDs and Profiles For more information, please go to: https://programs.Bluetooth.org/apps/content/?doc_id=49709...
10. KNOWN ISSUES Issue Explanation Using multiple DLCs can crash Opening several connections to iWRAP using the same iWRAP channel may crash the firmware. UUID should be used instead of a channel. This is a bug in the CSR firmware. Listing remote SDP record may run When a service discovery is made by using the SDP out of memory...
Outgoing connections Outgoing HFP, HID, A2DP etc. connections can be made even if the profile is not locally enabled. Data received before CD signal goes There is a 30ms delay between RING event and CD signal. high In some rare cases data can be received from the Bluetooth connection is this 30ms slot.
11. TROUBLESHOOTING Q: I get no response from iWRAP? Make sure your terminal settings are correct. Use PSTool to check the UART settings from the WRAP THOR Bluetooth module and make similar settings to your terminal software. Check also your ECHO MODE settings. If you have set ECHO MODE to 0, you should not be able to see any responses.
12. IWRAP USAGE EXAMPLES This section contains various iWRAP configuration and usage examples. 12.1 Serial Port Profile – Slave mode This example shows how to set up iWRAP into a simple Serial Port Profile slave mode. In this mode iWRAP accepts Bluetooth connections and transmits data. The basic configuration steps are displayed in the figure below: A Bluetooh iWRAP...
Page 183
1. If sniff mode is not used master uses around three times lass current then slave 2. If iWRAP needs to host more then 2 connections (3 or 4) it needs to be master for all the connections i.e. master slave switch is needed when connections are received.
12.2 Serial Port Profile – Master mode This example shows how to set up iWRAP into a simple Serial Port Profile master mode. In this mode iWRAP opens Bluetooth connection(s) and transmits data. The basic configuration steps are displayed in the figure below: Figure 9: SPP master example In the initialization section, Bluetooth Serial Port Profile is enabled, Bluetooth pin code set and finally reset is needed to active the profile change.
12.3 Dial-up Networking The Dial-Up Networking (DUN) profile allows you for example to connect to phone phones and control their GSM modem with AT commands. The most common use cases for DUN are sending SMS messages or connecting to Internet via GPRS or 3G. The simple below shows how to open a Dial-Up Networking connection to a phone and how to send an AT command to the phone.
12.4 OBEX Object Push Profile Server This example shows how to set up a simple Object Push Profile (OPP) server for receiving files over Bluetooth. Figure 11: Receiving files through OPP SET PROFILE OPP on This command enables OBEX OPP profile in iWRAP needed for receiving files. In the example, the PIN code is disabled so that the phone does not prompt for the PIN when sending the file.
12.5 Hands-Free Audio Gateway Connection to a Headset Device This example shows how the Hands-Free audio gateway mode in iWRAP can be used to set up a Hands-Free connection to a headset device. Figure 13: iWRAP to headset Hands-Free connection...
Hands-Free profile consists of two connections: a control connection (RFCOMM) an audio connection (SCO). CALL {bd_addr} 111E HFP-AG opens a HFP control connection, which allows HFP messaging between iWRAP and the headset. The possible HFP messages are: Command Function AT command mapping ANSWER Answer to call callsetup 0, call 1...
The possible HFP-AG status reports mentioned in the example are described below: Event Explanation HFP-AG {link_id} READY Service Level Connection open, HFP ready link_id Numeric connection identifier HFP-AG {link_id} VOLUME {level} Volume level information link_id Numeric connection identifier level Volume level information HFP-AG {link_id} MIC {level} Headset microphone gain information link_id...
Page 191
“%s %d CALLING\r\n” Outgoing call “%s %d BUSY\r\n” The supported AT-commands for hands Free profile can be found from the specification document: https://www.Bluetooth.org/foundry/adopters/document/HFP_1.5_SPEC_V10 requested from support@bluegiga.com.
12.6 Hands-Free connection to a Mobile Phone iWRAP can act as a hands-free device and send audio to a mobile phone. The example below reveals how that is done. Host iWRAP Mobile Phone SET PROFILE HFP on SET BT AUTH * {pin} SET BT CLASS 200428 RESET boot prompt...
12.7 iWRAP to iWRAP Serial Port Profile + SCO connection iWRAP also supports SCO (audio) connections. This example shows how to open a simultaneous Serial Port Profile and SCO audio connection between two iWRAP modules. Host iWRAP iWRAP Host SET BT AUTH * {pin} SET CONTROL CD 80 SET BT AUTH * {pin} SET CONTROL BIND 0 80...
12.8 Wireless IO Replacement iWRAPs can be used to do wireless IO replacement, that is, to transmit the status of GPIO PINs over the SPP link. This means that if the status of the local IO changes, so does the status of the remote IO.
12.9 A2DP Sink This example shows how to set up iWRAP into A2DP source mode i.e. to audio transmitter. In this mode iWRAP can open Bluetooth A2DP connections to A2DP sink(s) or receive connections from them. The basic configuration steps are displayed in the figure below: A Bluetooh iWRAP Host...
12.10 A2DP Source This example shows how to set up iWRAP into A2DP sink mode i.e. to receive audio. In this mode iWRAP can accept Bluetooth A2DP connections or connect an A2DP source. The basic configuration steps are displayed in the figure below: Figure 19: A2DP source example When audio streaming needs to be enabled A2SP STRAMING START command needs to be given to iWRAP and on the other hand when streaming needs to be stopped A2DP...
12.11 AVRCP Connection This example shows how to set up an AVRCP connection from iWRAP to AVRCP target like a mobile phone. When AVRCP connection is set up remote control commands like play, pause etc. can be send from iWRAP to the remote device. The basic configuration steps are displayed in the figure below: Host iWRAP...
12.12 Human Interface Device (HID) Example This HID keyboard and mouse modes allows iWRAP to be used as a wireless Bluetooth keyboard or Bluetooth mousre. iWRAP can be connected to a PC, PDA or a mobile phone that supports HID host profile and then iWRAP can be used to simulate a keyboard or a mouse.
Page 203
The HID keyboard layout is US and the following key codes are supported. Code Description Left control + space Left control + a Left control + b Left control + c Left control + d Left control + e Left control + f Left control + g Backspace Enter...
Page 204
Left control + w Left control + x Left control + y Left control + z Left control + space 28-31 32-126 Corresponding ASCII character backspace Cursor up Cursor right Cursor down Cursor left Insert Delete Home Page up Page down Mouse buttons up Mouse up (10px) Mouse right (10px)
Mouse button 2 (first clear with 138) Mouse button 3 (first clear with 138) 146-158 raw mode* 160-255 Table 20: Available HID key codes and mouse events Raw mode enables sending of raw HID reports, one report at a time. After the rawmode byte (159) you need to give the length of the report which is in keyboard report’s case 10 and in mouse report’s case 5.
12.13 Over-the-Air Configuration iWRAP3 has Over-the-Air (OTA) configuration interface, which allows one to configure iWRAP settings over a Bluetooth SPP connection. OTA gives one access to standard iWRAP commands which also available over UART interface. This example shows how OTA interface can be accessed from another iWRAP device.
12.14 Bluetooth Networking with iWRAP and WRAP Access Server In this example, a Bluetooth network with WRAP Access Servers and iWRAP master modules is built. The network consists of several access servers and several iWRAP modules. The purpose of this network is to provide a transparent ‘always on’ connectivity from iWRAP modules to a PC over Bluetooth and Local Area Network.
Figure 25: Configuration for multiple slaves As you see, the configuration is similar to the configuration in the second example. The only difference is that now there are two pairings in iWRAP, that is, iWRAP is paired with two access servers. If there are several pairings in iWRAP and the autocall feature is enabled, a transparent inquiry is made.
13. SUPPORT For technical questions and problems, please contact: support@bluegiga.com Firmware, parameters, tools and documentation can be downloaded from: http://techforum.bluegiga.com iWRAP FAQ can be found from: http://techforum.bluegiga.com/faq...
14. RELATED DOCUMENTATION Please also take a look at the following documentation: iWRAP Update Client User Guide Firmware & PS-key Guide Bluetooth specification: http://www.bluetooth.org Visit also Tech Forum additional information design references: http://techforum.bluegiga.com.
15. CONTACT INFORMATION Sales: sales@bluegiga.com Technical support: support@bluegiga.com http://techforum.bluegiga.com Orders: orders@bluegiga.com Head Office / Finland Phone: +358-9-4355 060 Fax: +358-9-4355 0660 Street Address: Sinikalliontie 5 A 02630 ESPOO FINLAND Postal address: P.O. BOX 120 02631 ESPOO, FINLAND Sales Office / USA Phone: (781) 556-1039 Street address:...
Need help?
Do you have a question about the IWIP3G - IWRAP - IPHONE 3G and is the answer not in the manual?
Questions and answers