background image

  

 

 

 

iWRAP

3

 

U s e r   G u i d e  

V e r s i o n   1 . 3  

F r i d a y ,   S e p t e m b e r   2 6 ,   2 0 0 8  

 

 

Summary of Contents for IWIP3G - IWRAP - IPHONE 3G

Page 1: ...iWRAP3 U s e r G u i d e V e r s i o n 1 3 F r i d a y S e p t e m b e r 2 6 2 0 0 8...

Page 2: ...tailed herein at any time without notice and does not make any commitment to update the information contained herein Bluegiga Technologies products are not authorized for use as critical components in...

Page 3: ...5 OPP mode 18 3 6 A2DP mode 18 3 7 AVRCP mode 18 4 Technical Details 19 5 iWRAP Command listing 21 5 1 Typographical Conventions 26 5 2 AT 27 5 3 INQUIRY 28 5 4 IC 32 5 5 NAME 34 5 6 PAIR 35 5 7 AUTH...

Page 4: ...8 VOLUME 69 5 29 TEMP 70 5 30 BATTERY 71 5 31 BYPASSUART 72 5 32 DEFRAG 73 5 33 BCSP_ENABLE 74 5 34 RESET 75 5 35 BOOT 76 5 36 TEST 77 5 37 TESTMODE 80 5 38 HELP 81 5 39 INFO 82 5 40 CONNECT 84 6 SET...

Page 5: ...6 20 SET CONTROL MUX 118 6 21 SET CONTROL BIND 122 6 22 SET CONTROL MSC 124 6 23 SET CONTROL GAIN 126 6 24 SET CONTROL VREGEN 127 6 25 SET CONTROL MICBIAS 129 6 26 SET CONTROL PCM 131 6 27 SET PROFIL...

Page 6: ...ging Parameters over RS232 with PSTool 164 9 2 Using BlueTest over RS232 165 9 3 Switching to HCI Firmware 166 9 4 Firmware Updates over SPI 167 9 5 Firmware Updates over UART 167 9 6 UART Hardware Fl...

Page 7: ...Access Server 207 13 Support 209 14 Related Documentation 210 15 Contact Information 211 List of Tables Table 1 iWRAP modes transitions explained 16 Table 2 Technical details 19 Table 3 Supported gene...

Page 8: ...Table 16 HFP AG status messages 190 Table 17 Supported HFP commands 193 Table 18 HFP AG status messages 194 Table 19 Available AVRCP commands 201 Table 20 Available HID key codes and mouse events 205...

Page 9: ...through OPP 186 Figure 12 Receiving a vCard over OPP 187 Figure 13 iWRAP to headset Hands Free connection 188 Figure 14 HFP connection to a mobile phone 192 Figure 15 Simultaneous SPP and SCO connecti...

Page 10: ...vanced Audio Distribution Profile AIO Analog Input Output AVRCP Audio Video Remote Control Profile BDR Basic Data Rate Bluetooth Set of technologies providing audio and data transfer over short range...

Page 11: ...n Layer Protocol MSC Modem Status Control OBEX OBject EXchange Protocol OPP Object Push Profile RFCOMM Serial cable emulation protocol element of Bluetooth SNIFF mode Bluetooth low power mode SPP Seri...

Page 12: ...e host can access Bluetooth functionality without paying any attention to the complexity which lies in the Bluetooth protocol stack GPIO interface can be used for event monitoring command execution an...

Page 13: ...events 2 If there is no need to control iWRAP or the host system does not need have a processor iWRAP can be configured to be totally transparent and autonomous in which case it only accepts connectio...

Page 14: ...onnected to your PC s serial port By default iWRAP uses the following UART settings Baud rate 115200bps Data bits 8 Stop bits 1 Parity bit No parity HW Flow Control Enabled When you power up your WRAP...

Page 15: ...ion settings and is the default mode when there are no Bluetooth connections Data mode on the other hand is used to transmit and receive data over a Bluetooth link and it s only available if there is...

Page 16: ...connection In this mode ASCII commands can be given to iWRAP Data Mode User switches the mode either by sending the escape sequence or command SELECT command Table 1 iWRAP modes transitions explained...

Page 17: ...active connections as well the amount of buffered data 3 2 Data Mode Data mode is the default mode when there are one or more Bluetooth In data mode all data is sent transparently from UART interface...

Page 18: ...he command mode i e when a HFP connection is opened or received no state transition occurs but iWRAP stays in the command mode where all HFP messaging is done Please refer to HFP profile usage for mor...

Page 19: ...ms Typical A2DP delay 150 200ms A2DP coding encoding methods SBC MP3 AAC APT x and FastStream PIN code length Configurable from 0 to 16 characters Encryption length Configurable from 0 to 128 bits MAX...

Page 20: ...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...

Page 21: ...2 Reads Bit Error Rate BOOT iWRAP 2 2 0 WT12 WT11 WT32 Boots module into different modes BYPASSUART iWRAP 3 0 WT12 WT11 WT32 Enables UART bypass CALL iWRAP 2 1 0 WT12 WT11 WT32 Opens Bluetooth connect...

Page 22: ...Reads RSSI of a connection SCO ENABLE iWRAP 2 2 0 WT12 WT11 WT32 Enables SCO connections SCO OPEN iWRAP 2 2 0 WT12 WT11 WT32 Opens SCO connection SDP iWRAP 2 2 0 WT12 WT11 WT32 Browse SDP records SDP...

Page 23: ...WT12 WT11 WT32 Set DI data SET BT LAP iWRAP 2 2 0 WT12 WT11 WT32 Set inquiry access code SET BT OPP iWRAP 2 2 0 WT12 WT11 WT32 Enable OPP profile SET BT PAGEMODE iWRAP 2 1 0 WT12 WT11 WT32 Set page mo...

Page 24: ...on a Bluetooth link SET link_id PARK only iWRAP 2 2 0 WT12 WT11 WT32 Enable Park state on a Bluetooth link Table 5 Supported link control commands Command iWRAP version HW version Short description PR...

Page 25: ...ho mode CONTROL GAIN iWRAP 3 0 WT32 Manage ADC and DAC gains CONTROL INIT iWRAP 2 1 0 WT12 WT11 WT32 Manage start up command CONTROL MICBIAS iWRAP 3 0 WT32 Control MIC bias settings CONTROL MSC iWRAP...

Page 26: ...er hand are described like this Description parameter Description Responses to the command are described as in the table below Response RESPONSE parameters parameter Description Events generated by co...

Page 27: ...2 2 Examples Sending AT to iWRAP AT OK Tip Most iWRAP commands do not produce replies telling that command was successful or execution has finished AT command can be used to provide this functionalit...

Page 28: ...al flag to automatically request the friendly name for found devices See command NAME for more information about the remote name request LAP Optional flag for specifying that inquiry access code will...

Page 29: ...t Extended Inquiry Response EIR Notes It can take up to 10 24 seconds for a Bluetooth device to answer an inquiry scan and thus the timeout value should be at least 8 if it is necessary to find every...

Page 30: ...0c INQUIRY 00 10 c6 62 bb 9b 1e010c INQUIRY 00 14 a4 8b 76 9e 72010c NAME 00 10 c6 3a d8 b7 TOM NAME 00 10 c6 62 bb 9b CSLTJANI NAME 00 14 a4 8b 76 9e SWLTMIKKO_3 An INQUIRY command with LAP in use IN...

Page 31: ...31 INQUIRY 3 INQUIRY 00 18 42 f1 a5 be 5a020c INQUIRY 00 17 e4 ef f9 01 50020c INQUIRY 00 07 80 87 68 ec 200428...

Page 32: ..._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 None 5 4 2 Examples Canceling an INQUI...

Page 33: ...33 Note IC command cancels the inquiry only if issued before the INQUIRY num_of_devices message...

Page 34: ...nse No response Events NAME These events are delivered after INQUIRY if the NAME flag is present NAME_ERROR These events are delivered if name resolution fails 5 5 2 Examples Successful name resolutio...

Page 35: ...led with SET CONTROL CONFIG and pairing is successful SYNTAX ERROR If incorrect parameters are given AUTH This event occurs if interactive pairing is enabled with SET CONTROL CONFIG 5 6 2 Examples Suc...

Page 36: ...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...

Page 37: ...is enabled with SET CONTROL CONFIG and pairing is successful 5 7 2 Examples Pairing with AUTH command initiated from remote device AUTH 00 07 80 80 12 34 AUTH 00 07 80 80 12 34 1234 Remote device ask...

Page 38: ...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_cod...

Page 39: ...dress Bluetooth address of the remote device target RFCOMM HFP or HFP AG HID or A2DP target for the connection The target can be one of the following channel RFCOMM channel number HFP channel number H...

Page 40: ...deo Remote Control Profile AVRCP mode L2CAP psm for A2DP is 19 and for AVRCP 17 HID Opens a connection in the HID keyboard mode or HID mouse mode L2CAP psm for HID is 11 L2CAP Opens a generic L2CAP co...

Page 41: ...on to 00 07 80 80 52 27 using RFCOMM channel 1 CALL 00 07 80 80 52 27 1 RFCOMM CALL 0 CONNECT 0 RFCOMM 1 Unsuccessful SPP connection attempt to 00 07 80 80 52 26 CALL 00 07 80 80 52 26 1101 RFCOMM CAL...

Page 42: ...ter 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 RFCOMM...

Page 43: ...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...

Page 44: ...direction powermode role crypt buffer link_id Numeric connection identifier mode RFCOMM Connection type is RDCOMM L2CAP Connection type is L2CAP SCO Connection type is SCO blocksize RFCOMM L2CAP or SC...

Page 45: ...wer mode for the link The possible values are ACTIVE Link is in active mode SNIFF Link is in sniff mode HOLD Link is in hold mode PARK Link is in park mode role Role of the link The possible values ar...

Page 46: ...rial port status bits 8d is a normal value remote_msc Remote serial port status bits 8d is a normal value addr Bluetooth device address of the remote device channel RFCOMM channel number at remote dev...

Page 47: ...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 Tells the amount of...

Page 48: ...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...

Page 49: ...d iWRAP goes to data mode of the link link_id Events SYNTAX ERROR This event occurs if an invalid link_id is given 5 11 2 Examples Changing between links LIST LIST 2 LIST 0 CONNECTED RFCOMM 668 0 0 24...

Page 50: ...all the services the remote device supports Response SDP bd_addr I SERVICENAME S service_name I PROTOCOLDESCRIPTORLIST U L2CAP U RFCOMM I channel SDP bd_addr Bluetooth address of the remote device se...

Page 51: ...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 specificatio...

Page 52: ...se SDP channel channel RFCOMM channel where the service is bound to Events None 5 13 2 Examples Adding a Dial Up Networking profile SDP ADD 1103 Dial Up Networking SDP 2 Note The service record will b...

Page 53: ...ul response is received IDENT ERROR IDENT ERROR event is raised if identification fails 5 14 2 Examples Succesfully using IDENT to identify a remote Bluetooth device IDENT 00 07 80 00 a5 a5 IDENT 00 0...

Page 54: ...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 CALL 00 07 80 12 34 56 25 L2CAP device 2 CALL 0 CONNECT 0 L2CA...

Page 55: ...for general RFCOMM connections 5 16 1 Syntax Synopsis RFCOMM action Description action CREATE Creates a generic RFCOMM channel Response RFCOMM channel channel RFCOMM channel number Events None 5 16 2...

Page 56: ...ntax 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 SET CONTROL INIT can be used to au...

Page 57: ...ore 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 CONNECT If SCO connection was opened successfull...

Page 58: ...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...

Page 59: ...bd_addr clock CLOCK event occurs if valid link_id is used SYNTAX ERROR If incorrect parameters are given 5 19 2 Examples Reading Piconet clock value CLOCK 0 CLOCK 00 07 80 12 34 56 3bb630 Note Piconet...

Page 60: ...escription 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_POWERI...

Page 61: ...ber bd_addr Bluetooth address of the remote device ber Average Bit Error Rate on the link Possible values are from 0 0000 to 100 0000 Events None 5 21 2 Examples Checking the Bit Error Rate of an act...

Page 62: ...er Response RSSI bd_addr rssi bd_addr Bluetooth address of the remote device rssi Receiver Signal Strength Indication Possible values are from 20 to 128 20 Good link 128 Poor link Events None 5 22 2 E...

Page 63: ...d Numeric connection identifier Response TXPOWER bd_addr txpower bd_addr Bluetooth address of the remote device txpower User TX power level in dBm Events None 5 23 2 Examples Checking the TX power lev...

Page 64: ...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 round trip time Round t...

Page 65: ...d 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 Description link_id Numeric connection identifier string...

Page 66: ...re one or more active connections and iWRAP is in command mode Deep sleep is an aggressive power saving mode for WRAP THOR modules 5 26 1 Syntax Synopsis SLEEP Description None Response None Events No...

Page 67: ...s are input pins i e controlled externally such as the PIO buttons on the WT32 evaluation board GETBIAS Read the contents of the PIO bias register Bits that are set denote pins that are pulled up down...

Page 68: ...h is an input pin and thus cannot be set locally by default PIO SET 80 FF 80 in hex is 10000000 in binary so only the 8th bit is affected parameters 80 80 etc would yield the same result PIO GET PIO G...

Page 69: ...volume level 5 28 1 Syntax Synopsis VOLUME vol Description vol 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 up Inc...

Page 70: ...ot 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 Celsiu...

Page 71: ...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 ba...

Page 72: ...n 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...

Page 73: ...73 5 32 DEFRAG This command defragments persistent store memory The command resets iWRAP 5 32 1 Syntax Synopsis DEFRAG Description None Response No response Events None...

Page 74: ...SP_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 Re...

Page 75: ...75 5 34 RESET Command RESET is used to reset iWRAP 5 34 1 Syntax Synopsis RESET Description No description Response No response...

Page 76: ...in iWRAP mode again The boot modes are explained in chapter 5 35 1 Syntax Synopsis BOOT boot_mode Description boot_mode 0000 iWRAP 0001 HCI BCSP 115800 8n1 0003 HCI USB 0004 HCI H4 115200 8n1 Respons...

Page 77: ...ter in continuous transmission at a designated frequency lo_freq with a designated output power level and designated tone modulation frequency mod_freq lo_freq range 2402 2480 MHz level range 0xff00 0...

Page 78: ...mal 4 wire configuration If pcm_mode 1 module is master in normal 4 wire configuration If pcm_mode 2 module is master in Manchester encoded 2 wire configuration PCMEXTLB pcm_mode Sets the PCM to exter...

Page 79: ...y are interpreted as decimals GETPIO Gets the status of all the PIO lines Description Response OK for successful execution ERROR for unsuccessful execution 5 36 2 Examples TEST TXSTART 2441 0xFF3F 0 O...

Page 80: ...ed 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 descripti...

Page 81: ...nds 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...

Page 82: ...ed parameters BOOTMODE Displays bootmode parameters Response Information about iWRAP version and features Events None 5 39 2 Examples INFO WRAP THOR AI 2 1 0 build 20 Copyright c 2003 2006 Bluegiga Te...

Page 83: ...s 2 Loader 4156 firmware 4532 56 bit encryption up 0 days 00 39 0 connections pool 1 User configuration 028b 0000 0bb8 028c 0000 0020 0001 0008 02a3 0031 0032 0033 0034 02a4 1d80 02a6 0007 02a7 0020 0...

Page 84: ...isplayed by the LIST command Response None Events None 5 40 2 Examples Changing PAGEMODE to 3 to be able to accept the second call receiving two calls escaping to command mode with checking for active...

Page 85: ...for more information about options CONTROL Changes different iWRAP settings See SET CONTROL for more information about options PROFILE Activates or deactivates Bluetooth profiles link_id This command...

Page 86: ...T 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 SET BT PAIR 00 14 a4 8b 76 9e 90357318b338170...

Page 87: ...e 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...

Page 88: ...ponse None Events SYNTAX ERROR This event occurs if incorrect parameters are given List format SET BT NAME friendly_name Note The maximum length of a friendly name is 16 characters in iWRAP 2 0 2 and...

Page 89: ...ription class_of_device CoD of the local device Response None Events SYNTAX ERROR This event occurs if incorrect parameters are given List format SET BT CLASS class_of_device Note The class of device...

Page 90: ...will NOT be displayed by SET command pin_code PIN code for authorized connections Authorization is required if this option is present The PIN code can be from 0 to 16 characters Response SYNTAX ERROR...

Page 91: ...91 Note If command SET BT AUTH is given PIN code will be disabled and no encryption can be used during Bluetooth connections...

Page 92: ...ription iac Value for the inquiry access code The following values are possible 9e8b33 General Unlimited Inquiry Access Code GIAC This is the default value 9e8b00 Limited Dedicated Inquiry Access Code...

Page 93: ...When the value of IAC is left to default value 0x9e8b33 iWRAP will be visible for all devices capable of making an inquiry On the other hand when IAC is set to 0x9e8b00 LIAC only devices capable of m...

Page 94: ...inquiry but does NOT answers calls 2 iWRAP is NOT visible in the inquiry but answers calls 3 iWRAP is visible in the inquiry and answers calls 4 Just like mode 3 if there are NO connections If there a...

Page 95: ...le every 1 28 sec the default value 2 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 N...

Page 96: ...pty pairing for the given Bluetooth address will be removed Link key is 32hex values long Response SYNTAX ERROR This event occurs if incorrect parameters are given Events None List format SET BT PAIR...

Page 97: ...ave switch when calling but iWRAP does not request it when answering default value 1 This value allows master slave switch when calling and iWRAP requests it when answering 2 If this value is set mast...

Page 98: ...ed as in the example below 12C0 HEX is 4800 DEC Multiply it by 0 625 and you get the supervision timeout in milliseconds In this case it is 3000 ms 4800 0 625ms In other words the remote end can be si...

Page 99: ...Mandatory Range 0006 to 0540 Time N 0 625 msec Time Range 1 25 msec to 40 9 sec min Minimum acceptable interval in milliseconds Range 0002 to FFFE only even values are valid Mandatory Range 0006 to 05...

Page 100: ...parameters are given List format SET BT SNIFF max min attempt timeout Note SET BT SNIFF disables automatic sniff mode default settings You can not change sniff mode on the fly with SET BT SNIFF but y...

Page 101: ...s iWRAP default Default TX power in dBm used for CALL and NAME operations and when responding to inquiries maximum Maximum TX power in dBm inquiry Transmit power in dBm used for INQUIRY operation This...

Page 102: ...ements for TX power Power class Max TX power Nominal TX power Minimum TX power 1 20 dBm N A 0dBm 2 4dBm 0dBm 6 dBm 3 0dbm N A N A Table 8 Power classes as defined in Bluetooth specification The values...

Page 103: ...USB Implementer s Forum vendor_id Intended to uniquely identify the vendor of the device The Bluetooth SIG or the USB IF assigns VendorIDs Bluegiga s VendorID is 47 product_id Intended to distinguish...

Page 104: ...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...

Page 105: ...inquiry transparent to the user is made and the first paired device found is connected 6 13 1 Syntax Synopsis SET CONTROL AUTOCALL target timeout profile Description target RFCOMM HFP or HFP AG HID o...

Page 106: ...de 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 L2CAP ps...

Page 107: ...T CONTROL AUTOCALL 1101 5000 RFCOMM SET CONTROL BAUD 115200 8n1 SET CONTROL CD 00 0 SET CONTROL ECHO 7 SET CONTROL ESCAPE 43 00 1 SET Disabling AUTOCALL SET CONTROL AUTOCALL SET SET BT BDADDR 00 07 80...

Page 108: ...is 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 n No parity e Even parity o Odd parit...

Page 109: ...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 SE...

Page 110: ...d_mask datamode Description cd_mask This is a bit mask which defines the GPIO lines used for CD signaling For example value 20 HEX must be used for PIO5 20 HEX 100000 BIN For PIO6 the value is 40 40 H...

Page 111: ...e the clock states of devices discovered in inquiry This may speed up connection establishment if the connected device has responded to inquiry Bit 2 Interlaced inquiry scan If this bit is set interla...

Page 112: ...hen 17th pairing occurs max number of pairings is 16 Bit 13 If this bit is set CLOCK event will be displayed on CONNET and RING events Bit 14 If this bit is set UART will be optimized for low latency...

Page 113: ...nse SYNTAX ERROR Occurs if incorrect parameters are given SET CONTROL CONFIG optional_configuration configuration_value If no parameters given SET CONTROL CONFIG optional_configuration configuration_v...

Page 114: ...oed back to client in command mode Bit 2 This bit indicates if set events are displayed in command mode Events SYNTAX ERROR This event occurs if incorrect parameters are given List format SET CONTROL...

Page 115: ...pe character used in the escape sequence Use to disable escape sequence the default value is 43 which is dtr_mask Bit mask for selecting I O pins used for DTR For example for IO5 the bit mask is 00100...

Page 116: ...116 6 18 2 Examples How to disable default escape character and configure DTR to PIO5 SET CONTROL ESCAPE 20 1...

Page 117: ...P commands This command is automatically executed every time iWRAP starts after power on RESET or watchdog event Events None List format SET CONTROL INIT command 6 19 2 Examples To remove all pairings...

Page 118: ...on mode Multiplexing mode 0 Multiplexing mode disabled Normal data command mode enabled 1 Multiplexing mode enabled Multiplexing protocol must be used to talk to iWRAP Events READY READY event occurs...

Page 119: ...is enabled all the commands and data sent from host to iWRAP must be sent by using the frame format described above instead of plain ASCII commands Also the responses and data coming from iWRAP to th...

Page 120: ...ice communications At the moment four 4 simultaneous connections can be used in multiplexing mode Tips In MUX mode the processor of the module is highly utilized and on the edge of its performance Thi...

Page 121: ...rol 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 Flags outbuf pos len Length Insert...

Page 122: ...e PIO0 PIO10 If only pri parameter is given the current bind will be removed io_mask Determines which PIO is to be bind This is a hexadecimal value Example Set PIO5 100000bin 5th bit is one 20hex dire...

Page 123: ...1 SET BT ROLE 0 f 7d00 SET BT SNIFF 0 20 1 8 SET CONTROL BAUD 115200 8n1 SET CONTROL BIND 0 20 F close 0 SET CONTROL BIND 1 20 F set bt pair SET CONTROL CD 80 0 SET CONTROL ECHO 7 SET CONTROL ESCAPE...

Page 124: ...an be DTE or nDTE and DCE or nDCE NOTE DTE means that remote Bluetooth device is DTE so iWRAP is DCE and device connected to iWRAP is DTE nDTE and nDCE means that the signals are active low not active...

Page 125: ...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 1000 bin 8 hex If MUX mode is in use physical PIO statuses do...

Page 126: ...decimal input Input gain Range 0 17 hex output Output gain Range 0 17 hex DEFAULT If given set given input and output gain as default values and save them in the persistent store Response SYNTAX ERRO...

Page 127: ...y not depending on your setup keep the module powered on until its power source is disconnected or regulator mode is switched 1 Regulator is enabled on rising edge of VREG_ENA and holds the PIO voltag...

Page 128: ...ntil the switch is first toggled back then toggled up and down again rising edge followed by falling edge PIO2 is pulled high to hold up an external regulator SET CONTROL VREGEN 2 4 4 in hexadecimal i...

Page 129: ...ough the mic bias pin Range 0 F hex The setting values and their corresponding typical voltage and current ranges are in the table below Value Voltage V Current mA 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1...

Page 130: ...130 Response SYNTAX ERROR This event occurs if incorrect parameters are given Events None List format SET CONTROL MICBIAS voltage current...

Page 131: ...e PCM interface configuration Corresponds to PS key PSKEY_PCM_CONFIG32 data Value for PCM data format Corresponds to PS key PSKEY_PCM_FORMAT Response SYNTAX ERROR This event occurs if incorrect parame...

Page 132: ...e Specify the profile to be enabled or disabled Possible profile acronyms are HFP Hands Free Profile HFP AG Hands Free Profile Audio Gateway SPP Serial Port Profile OPP Object Push Profile server A2DP...

Page 133: ...LAP 9e8b33 SET BT PAGEMODE 4 2000 1 SET BT ROLE 0 f 7d00 SET BT SNIFF 0 20 1 8 SET CONTROL BAUD 115200 8n1 SET CONTROL CD 80 0 SET CONTROL ECHO 7 SET CONTROL ESCAPE 43 00 1 SET CONTROL MSC DTE 00 00...

Page 134: ...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...

Page 135: ...yntax 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 LIST 0 CONNECTED RFCOMM 320 0 0 3 8d 8d 00 60...

Page 136: ...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 id...

Page 137: ...SNIFF max min attempt timeout or SET link_id SNIFF avg Description link_id Numeric connection identifier max Maximum acceptable interval in milliseconds min Minimum acceptable interval in milliseconds...

Page 138: ...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 status Status of the s...

Page 139: ...escription link_id Numeric connection identifier of the link where the modem status is to be sent Response No response Note iWRAP uses an internal command parser wrapped with some Bluetooth profiles l...

Page 140: ...ransmitted and no multiplexing mode is used the only possible event is NO CARRIER indicating that connection was closed or lost Note iWRAP is designed so that unwanted events can be safely ignored Eve...

Page 141: ...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 This is displayed onl...

Page 142: ...me rssi Description address Bluetooth address of the found device class_of_device C Bluetooth Class of Device of the found device cached_name User friendly name of the found device if already known rs...

Page 143: ...er 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 C...

Page 144: ...ed 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 Syn...

Page 145: ...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 fri...

Page 146: ...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...

Page 147: ...paired device key_type Type of link key 0 Combination key 1 Local unit key 2 Remote unit key ff Unknown key link_key Link key shared between the local and the paired device Note The PAIR event is enab...

Page 148: ...nnection 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 Bl...

Page 149: ...149 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...

Page 150: ...hat 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 enab...

Page 151: ...iption 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...

Page 152: ...values BT for the Bluetooth Special Interest Group SIG or USB for the USB Implementer s Forum vendor_id Intended to uniquely identify the vendor of the device The Bluetooth SIG or the USB IF assigns V...

Page 153: ...emote 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 addres...

Page 154: ...154 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 mv Current battery voltage in millivolts...

Page 155: ...report the current PIO data direction and bias register states 7 15 1 Syntax Synopsis PIO reg value Description reg Which register is read GET for data GETDIR for direction GETBIAS for bias register...

Page 156: ...156 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 vol Current volume range 0 9...

Page 157: ...r key missing HCI_ERROR_MEMORY_FULL 0x07 Memory capacity exceeded HCI_ERROR_CONN_TIMEOUT 0x08 Connection timeout HCI_ERROR_MAX_NR_OF_CONNS 0x09 Connection Limit Exceeded HCI_ERROR_MAX_NR_OF_SCO 0x0a S...

Page 158: ...NOT_ALLOWED 0x18 Pairing Not Allowed HCI_ERROR_UNKNOWN_LMP_PDU 0x19 Unknown LMP PDU HCI_ERROR_UNSUPPORTED_REM_FEATURE 0x1a Unsupported Remote Feature Unsupported LMP Feature HCI_ERROR_SCO_OFFSET_REJEC...

Page 159: ...T_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 Wi...

Page 160: ...IMEOUT 0x05 SDC_OPEN_SEARCH_FAILED_REJ_PS 0x06 SDC_OPEN_SEARCH_FAILED_REJ_SECURITY 0x07 SDP search failed because of security SDC_OPEN_SEARCH_FAILED_REJ_RESOURCES 0x08 SDC_OPEN_SEARCH_FAILED_SIGNAL_TI...

Page 161: ...C_SEARCH_SIZE_TOO_BIG 0x1b SDC_RESPONSE_OUT_OF_MEMORY 0x1c SDC_RESPONSE_TERMINATED 0x1d SDC_OPEN_SEARCH_FAILED_PAGE_TIMEOUT 305 SDP search failed because of page timeout SDC_OPEN_SEARCH_FAILED_REJ_TIM...

Page 162: ...REJ_NOT_READY 0x05 RFC_CONNECTION_FAILED 0x06 RFC_CONNECTION_TIMEOUT 0x07 RFC_NORMAL_DISCONNECT 0x08 RFC_ABNORMAL_DISCONNECT 0x09 RFC_CONFIG_UNACCEPTABLE 0x0a RFC_CONFIG_REJECTED 0x0b RFC_CONFIG_INVAL...

Page 163: ...FC_INVALID_SERVER_CHANNEL 0x21 RFC_UNKNOWN_MUX_ID 0x22 RFC_LOCAL_ENTITY_TERMINATED_CONNECTION 0x23 RFC_UNKNOWN_PRIMITIVE 0x24 RFC_MAX_PAYLOAD_EXCEEDED 0x25 RFC_INCONSISTENT_PARAMETERS 0x26 RFC_INSUFFI...

Page 164: ...nd is able to interpret it BCSP can be used to change the internal parameters and is also supported by the PSTool software To change the internal parameters proceed as follows 1 Connect an RS2323 cabl...

Page 165: ...nts and RX measurements BlueTest also uses the BCSP protocol to talk to the module and can be used in a similar way as PSTool i To use BlueTest 1 Connect an RS2323 cable between the WTxx module and yo...

Page 166: ...Switching can be done by using PSTool software 1 Connect the WTxx Bluetooth module as instructed in chapter 9 1 2 Change the following parameters to switch to HCI mode a PSKEY_INITIAL_BOOTMODE i 0000...

Page 167: ...RT The firmware can also be updated over the UART or RS232 interface A method called Device Firmware Upgrade DFU is needed Bluegiga has a DFU Wizard tool which allows the updates to be made from a Win...

Page 168: ...If the flow control is enabled from PS keys but no flow control is used the following steps should be implemented in the hardware design CTS pin must be grounded RTS pin must be left floating WARNING...

Page 169: ...169 9 7 RS232 Connections Diagram Figure 7 RS232 connections...

Page 170: ...network Bluetooth wireless technology is used for the path between the device and a network connection device like a modem RFCOMM is only concerned with the connection between the devices in the direc...

Page 171: ...d receive calls for a hand free device The HFP defines two roles that of an Audio Gateway AG and a Hands Free unit HF Audio Gateway AG This is the device that is the gateway of the audio both for inpu...

Page 172: ...s to and must interoperate with the server and client device roles that GOEP defines It is called push because the transfers are always instigated by the sender client not the receiver server OPP focu...

Page 173: ...fically for A V control only Source Bluetooth SIG URL http www bluetooth com Bluetooth Technology Works AVRCP htm 9 8 9 Human Interface Device Profile The HID profile defines the protocols procedures...

Page 174: ...r efficient of all three power saving modes Deep sleep iWRAP supports a also a power saving mode called deep sleep In deep sleep state the main processor is put into reduced operation mode and this ra...

Page 175: ...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 IrMC Sync 1105 OBEX Object Push Profile 1...

Page 176: ...114 WAP_CLIENT 1115 Personal Area Networking User 1115 PANU 1116 Network Access Point 1116 NAP 1117 Group Network 1117 GN 1118 Direct Printing 1119 Reference Printing 111A Imaging 111B Imaging Respond...

Page 177: ...27 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 Phonebook Access 1200 P...

Page 178: ...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...

Page 179: ...ed connections can not be opened This is a bug in the CSR firmware HW flow control If HW flow control is not used and iWRAP buffers are filled either in data or command mode the firmware will hang and...

Page 180: ...be made even if the profile is not locally enabled 379 Data received before CD signal goes high There is a 30ms delay between RING event and CD signal In some rare cases data can be received from the...

Page 181: ...TROL BAUD it does not affect the baud rate you need to use with PSTool if you want to access parameters This baud rate is defined by the UART baud rate key AutoBCSP requires that iWRAP baud rate is sa...

Page 182: ...ofile is enabled Bluetooth pin code set and finally reset is needed to active the profile change The example above illustrates the simplest setup which could be tweaked with a lot of different iWRAP s...

Page 183: ...interface If iWRAP needs to be controlled totally transparent i e only the actual data should be sent to the host mode should be set to 0 SET CONTROL CD Carrier detect signal can be used to indicate...

Page 184: ...t is needed to active the profile change Again lot of iWRAP settings exists to modify the basic master functionality The same settings apply for master mode as for salve mode and they are not discusse...

Page 185: ...mmands tunnel CALL link_id Pairing connection successful Pairing CONNECT link_id RFCOMM channel Mode switch to data mode AT OK Figure 10 How to open a DUN connection to a mobile phone In iWRAP the Blu...

Page 186: ...eiving files In the example the PIN code is disabled so that the phone does not prompt for the PIN when sending the file When file reception starts iWRAP will produce an event Synopsis PUT size mime f...

Page 187: ...187 Example trace of file reception via OPP Figure 12 Receiving a vCard over OPP...

Page 188: ...onnection 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 One time initialization Figure 13 iWRA...

Page 189: ...0 call 0 OK Send OK result to Hands Free ok RING count number Notify Hands Free for incoming call Optional parameter count indicates the amount of ring indications Optional parameter number displays t...

Page 190: ...FP AG link_id MIC level Headset microphone gain information link_id Numeric connection identifier level Volume level information HFP AG link_id RINGING Incoming call headset ringing link_id Numeric co...

Page 191: ...going 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 or requested fr...

Page 192: ...tion HFP initialization HFP status reports HFP link_id READY ATDnumber CONNECT link_id SCO HFP status reports Active HFP conncetion SET BT CLASS 200428 Pairing Accept connection HFP status reports Ope...

Page 193: ...raw AT command Sends the raw AT command to the headset Table 17 Supported HFP commands The possible HFP status reports mentioned in the example are described below Event Explanation HFP link_id STATUS...

Page 194: ...er HFP link_id CALLERID number entry Caller ID link_id Numeric connection identifier number Phone number entry Phone book entry HFP link_id UNKNOWN data Unrecognized AT command link_id Numeric connect...

Page 195: ...ET CONTROL CD 80 This configuration enables Carrier Detect CD signal to PIO7 The purpose is to raise PIO7 when the Serial Port Profile connection becomes active SCO ENABLE This command is needed to ge...

Page 196: ...0 80 0 0 0 0 Change PIO5 status Mode switch to data mode PIO7 status changes PIO7 status changes MSC status update Figure 16 Wireless IO replacement connection The example above was done with WT12 eva...

Page 197: ...197 Figure 17 MSC signal directions...

Page 198: ...A2DP connection Stop audio stream NO CARRIER link_id ERROR error_code message SET BT CLASS 200428 RING link_id 1 bd_addr 25 A2DP NO CARRIER link_id ERROR error_code message Start audio stream A2DP ST...

Page 199: ...nections or connect an A2DP source The basic configuration steps are displayed in the figure below One time Initialization Figure 19 A2DP source example When audio streaming needs to be enabled A2SP S...

Page 200: ...to the remote device The basic configuration steps are displayed in the figure below AVRCP target Host iWRAP One time Initialization SET PROFILE A2DP SINK SET BT AUTH pin RESET boot prompt Open AVRCP...

Page 201: ...top AVRCP PLAY Play AVRCP PAUSE Pause AVRCP REWIND Rewind AVRCP FAST_FORWARD Fast Forward AVRCP FORWARD Forward next song AVRCP BACKWARD Backward previous song AVRCP raw AVRCP command in raw hex mode...

Page 202: ...OL CONFIG 800 Mode switch to data mode RING link_id bd_addr psm HID Mode switch to command mode AUTH bd_addr pin PIN displayed by PC Select HID data connecton Figure 21 HID keyboard example In the con...

Page 203: ...Left control b 3 Left control c 4 Left control d 5 Left control e 6 Left control f 7 Left control g 8 Backspace 9 Tab 10 Enter 11 Left control k 12 Left control l 13 Enter 14 Left control n 15 Left co...

Page 204: ...126 Corresponding ASCII character 127 backspace 128 Cursor up 129 Cursor right 130 Cursor down 131 Cursor left 132 Insert 133 Delete 134 Home 135 End 136 Page up 137 Page down 138 Mouse buttons up 13...

Page 205: ...wmode 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 The reports must use the following format Keyboard report 0xa1 0x01 modifier...

Page 206: ...L2CAP U RFCOMM I 02 SDP WRAP THOR AI 3 0 0 build 106 Copyright c 2003 2008 Bluegiga Technologies Inc READY Open OTA connection Accept OTA connection Transparent OTA connection iWRAP command tunnel Ope...

Page 207: ...configuration in iWRAP is similar to the one in our second example Also the WRAP Access Servers must be configured correctly The application providing the connectivity between the PC and iWRAPs is kno...

Page 208: ...iry is made When the first paired device is found in the inquiry iWRAP ends the inquiry and tries to connect to this device If the connection is successful iWRAP stays connected until the connection i...

Page 209: ...chnical 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 techf...

Page 210: ...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 for additional information and desi...

Page 211: ...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...

Reviews: