Computer Access Technology BT004APA-X Bluetooth Protocal Analyzer and Test Generator User Manual WAND Manual 1 of 2

Computer Access Technology Corporation Bluetooth Protocal Analyzer and Test Generator WAND Manual 1 of 2

Contents

WAND Manual 1 of 2

2403 Walsh Avenue, Santa Clara, CA  95051-1302  Tel: +1/408.727.6600  Fax: +1/408.727.6622Document Revision 1.22June 18, 2002 730-0019-00CATC Merlin’s Wand™ 1.22Bluetooth™ Test GeneratorUser’s Manual
CATC MERLIN’S WAND 1.22User’s ManualiiPart number: 730-0019-00CATC Merlin’s Wand 1.22 Bluetooth Test Generator User’s Manual, Document Revision 1.22Document DisclaimerThe information contained in this document has been carefully checked and is believed to be reliable. However, no responsibility can be assumed for inaccuracies that may not have been detected.CATC reserves the right to revise the information presented in this document without notice or penalty.Trademarks and ServicemarksCATC, Merlin’s Wand, and Merlin are trademarks of Computer Access Technology Corporation. Bluetooth is a trademark owned by Bluetooth SIG, Inc. and is used by Computer Access Technology Corporation under license.Microsoft, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.RadioShack is a registered trademark of RadioShack Corporation.GN Netcom is a registered trademark of GN Netcom, Inc.Motorola is a registered trademark of Motorola, Inc.Belkin is a registered trademark of Belkin Components.Coby is a registered trademark of Coby Electronics Corporation.Plantronics is a registered trademark of Plantronics, Inc.Intel, Pentium, and Celeron are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. AMD, Athlon, Duron, and AMD-K6 are trademarks of Advanced Micro Devices, Inc.All other trademarks are property of their respective companies.CopyrightCopyright 2002, Computer Access Technology Corporation (CATC). All rights reserved.This document may be printed and reproduced without additional permission, but all copies should contain this copyright notice.
 iiiCATC MERLIN’S WAND 1.22User’s ManualMerlin’s Wand Conformance StatementsFCC Conformance StatementThis equipment has been tested and found to comply with the limits for both a Class A and Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial or residential environment. This equipment generates, uses, and can radiate radio frequency energy, and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications. The end user of this product should be aware that any changes or modifications made to this equipment without the approval of CATC could result in the product not meeting the Class A or Class B limits, in which case the FCC could void the user's authority to operate the equipment.Important NoticeThis equipment contains Transmitter Module FCC ID PNI8001001. To comply with FCC RF exposure requirements (sections 1.1307 and 1.310 of the Rules) only the antenna supplied by CATC must be used for this device. The antenna must be located at least 20 centimeters away from all persons.EU Conformance StatementThis equipment complies with the R&TT Directive 1999/5/EC.   It has been tested and found to comply with EN55022:1998 Class B (EN61000-3-2:1998, EN61000-3-3:1995), EN55024:1998 (EN61000-4-2:1995, EN61000-4-3:1995, EN61000-4-4:1995, EN61000-4-5:1995, EN61000-4-6:1995, EN61000-4-11:1994), and EN60950:1999. The transmitter module was tested and found to comply with ETS 300 328 (1997).
CATC MERLIN’S WAND 1.22User’s Manualiv
 vCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSTABLE OF CONTENTSDocument Disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iiTrademarks and Servicemarks  . . . . . . . . . . . . . . . . . . . . . . . . . iiCopyright  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iiFCC Conformance Statement . . . . . . . . . . . . . . . . . . . . . . . . .  iiiImportant Notice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  iiiEU Conformance Statement . . . . . . . . . . . . . . . . . . . . . . . . . .  iiiTable of Contents  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vChapter 1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Applications  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Merlin’s Wand User Interface. . . . . . . . . . . . . . . . . . . . . . . . . . 2Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Audio Connections - Important Information  . . . . . . . . . . . . . . 4Limitations  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Chapter 2 Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Setting Up Merlin’s Wand  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Installing the Software and Starting the Program . . . . . . . . . . . 8Install from CD-ROM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Install from installation download  . . . . . . . . . . . . . . . . . . . 9Start the program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Displaying the On-Screen Help  . . . . . . . . . . . . . . . . . . . . . . . . 9Application Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Toolbars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Merlin’s Wand Toolbar   . . . . . . . . . . . . . . . . . . . . . . . . . . 14Merlin Bluetooth Analyzer Toolbar . . . . . . . . . . . . . . . . . 15Tool Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Merlin’s Wand Keyboard Shortcuts . . . . . . . . . . . . . . . . . . . . 15License Keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16License Information  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Chapter 3 Bluetooth Wizard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Starting Bluetooth Wizard  . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Connect to a Device: Headset. . . . . . . . . . . . . . . . . . . . . . . . . 18Connect to a Device: Headset Audio Gateway. . . . . . . . . . . . 22Connect to a Device: Object Push  . . . . . . . . . . . . . . . . . . . . . 27Device Emulation: Headset  . . . . . . . . . . . . . . . . . . . . . . . . . . 30Device Emulation: Headset Audio Gateway  . . . . . . . . . . . . . 33Device Emulation:  Object Push. . . . . . . . . . . . . . . . . . . . . . . 35
viCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSRestarting the Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Chapter 4 Command Generator  . . . . . . . . . . . . . . . . . . . . . . . . . 39Layout of the Command Generator  . . . . . . . . . . . . . . . . . . . . 39Using Command Generator  . . . . . . . . . . . . . . . . . . . . . . . . . . 40Customizing the List of HCI Commands . . . . . . . . . . . . . 41Tables of Available Commands  . . . . . . . . . . . . . . . . . . . . . . . 42HCI Commands  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Link Control Commands  . . . . . . . . . . . . . . . . . . . . . . . . . 42Link Policy Commands  . . . . . . . . . . . . . . . . . . . . . . . . . . 44Host Controller & Baseband Commands . . . . . . . . . . . . . 44Informational Commands . . . . . . . . . . . . . . . . . . . . . . . . . 46Status Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Testing Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47CATC-Specific Commands. . . . . . . . . . . . . . . . . . . . . . . . 47L2CAP Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48SDP Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48RFCOMM Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49TCS Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50OBEX Commands  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Chapter 5 Script Manager  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Layout of the Script Manager Window. . . . . . . . . . . . . . . . . . 53Running Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Writing Scripts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Sample Scripts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56sample.script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Sample-2.script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Script Controlling Merlin Interface  . . . . . . . . . . . . . . . . . 60Chapter 6 Device Search and Device List Pop-Up Menu  . . . . . 63Device Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Device List Pop-Up Menu  . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Create an ACL Connection. . . . . . . . . . . . . . . . . . . . . . . . 64Establish an Audio Connection. . . . . . . . . . . . . . . . . . . . . 65Display Device Information . . . . . . . . . . . . . . . . . . . . . . . 66Delete a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Disconnect All  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Chapter 7 Data Transfer Manager and Data Pipes . . . . . . . . . . 69Creating Data Pipes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Using Data Pipes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Transfer Data Using Command Generator . . . . . . . . . . . . 71Access Pipes Using Script Manager . . . . . . . . . . . . . . . . . 72Receive Pipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
 viiCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSClosing Pipes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73Saving Data Pipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73Saving Data Transmit Pipe Lists. . . . . . . . . . . . . . . . . . . . 74Saving a Default List  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Saving Data Receive Pipes . . . . . . . . . . . . . . . . . . . . . . . . 74Deleting Pipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Opening Pipe Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Renaming Pipes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Modifying Pipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Chapter 8 Using Merlin to Record Merlin’s Wand Traffic . . . . 77Set Up a Remote Machine  . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Windows 98/Me Operating Systems. . . . . . . . . . . . . . . . . 77Windows NT®/2000 Operating Systems . . . . . . . . . . . . . 78Set Up Connection Options  . . . . . . . . . . . . . . . . . . . . . . . . . . 80Start Merlin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Connect to Merlin with Merlin’s Wand  . . . . . . . . . . . . . . . . . 81Set Merlin Recording Options  . . . . . . . . . . . . . . . . . . . . . . . . 81Set Merlin Display Options  . . . . . . . . . . . . . . . . . . . . . . . . . . 83Set Merlin Encryption Options . . . . . . . . . . . . . . . . . . . . . . . . 84Start a Merlin Recording Session . . . . . . . . . . . . . . . . . . . . . . 85Stop a Merlin Recording Session . . . . . . . . . . . . . . . . . . . . . . 85Disconnect from Merlin Bluetooth Protocol Analyzer. . . . . . 85Troubleshooting  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86“Server Busy” When Attempting to Launch Merlin  . . . . 86“Server  Execution  Failed”  When  Attempting  to  LaunchMerlin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86“The  Object  Exporter  Specified  Was  Not  Found”  WhenAttempting to Launch Merlin . . . . . . . . . . . . . . . . . . . . . . 86Chapter 9 Contact and Warranty Information  . . . . . . . . . . . . . 89Contact Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Warranty and License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Appendix A: Command Generator Command Descriptions. . . . 91HCI Command Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . 91HCI Link Control Commands. . . . . . . . . . . . . . . . . . . . . . . . . 91Accept_Connection_Request . . . . . . . . . . . . . . . . . . . . . . 91Add_SCO_Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Authentication_Requested  . . . . . . . . . . . . . . . . . . . . . . . . 92Change_Connection_Link_Key . . . . . . . . . . . . . . . . . . . . 92Change_Connection_Packet_Type . . . . . . . . . . . . . . . . . . 92Create_Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Disconnect  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
viiiCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSExit_Periodic_Inquiry_Mode . . . . . . . . . . . . . . . . . . . . . . 93Inquiry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Inquiry_Cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Periodic_Inquiry_Mode  . . . . . . . . . . . . . . . . . . . . . . . . . . 94PIN_Code_Request_Negative_Reply. . . . . . . . . . . . . . . . 95PIN_Code_Request_Reply . . . . . . . . . . . . . . . . . . . . . . . . 95Read_Clock_Offset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95PIN_Code_Request_Negative_Reply. . . . . . . . . . . . . . . . 95PIN_Code_Request_Reply . . . . . . . . . . . . . . . . . . . . . . . . 95Read_Clock_Offset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Read_Remote_Supported_Features . . . . . . . . . . . . . . . . . 96Read_Remote_Version_Information  . . . . . . . . . . . . . . . . 96Reject_Connection_Request. . . . . . . . . . . . . . . . . . . . . . . 96Remote_Name_Request . . . . . . . . . . . . . . . . . . . . . . . . . . 96Set_Connection_Encryption . . . . . . . . . . . . . . . . . . . . . . . 97HCI Link Policy Commands. . . . . . . . . . . . . . . . . . . . . . . . . . 98Exit_Park_Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Exit_Sniff_Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Hold_Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Park_Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98QoS_Setup  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Read_Link_Policy_Settings . . . . . . . . . . . . . . . . . . . . . . . 99Role_Discovery  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Sniff_Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Switch_Role . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Write_Link_Policy_Settings. . . . . . . . . . . . . . . . . . . . . . 100HCI Host Controller & Baseband Commands . . . . . . . . . . . 101Change_Local_Name . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Delete_Stored_Link_Key . . . . . . . . . . . . . . . . . . . . . . . . 101Host_Buffer_Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Read_Authentication_Enable . . . . . . . . . . . . . . . . . . . . . 102Read_Class_of_Device. . . . . . . . . . . . . . . . . . . . . . . . . . 102Read_Connection_Accept_Timeout . . . . . . . . . . . . . . . . 103Read_Current_IAC_LAP . . . . . . . . . . . . . . . . . . . . . . . . 103Read_Encryption_Mode . . . . . . . . . . . . . . . . . . . . . . . . . 103Read_Link_Supervision_Timeout  . . . . . . . . . . . . . . . . . 104Read_Local_Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Read_Number_Of_Supported_IAC . . . . . . . . . . . . . . . . 104Read_Page_Scan_Mode . . . . . . . . . . . . . . . . . . . . . . . . . 104Read_Page_Scan_Period_Mode. . . . . . . . . . . . . . . . . . . 105Read_Page_Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Read_PIN_Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Read_Scan_Enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
 ixCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSRead_SCO_Flow_Control_Enable. . . . . . . . . . . . . . . . . 106Read_Stored_Link_Key . . . . . . . . . . . . . . . . . . . . . . . . . 106Read_Voice_Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Set_Event_Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Set_Event_Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Write_Authentication_Enable. . . . . . . . . . . . . . . . . . . . . 109Write_Class_of_Device  . . . . . . . . . . . . . . . . . . . . . . . . . 109Write_Connection_Accept_Timeout  . . . . . . . . . . . . . . . 110Write_Current_IAC_LAP. . . . . . . . . . . . . . . . . . . . . . . . 110Write_Encryption_Mode  . . . . . . . . . . . . . . . . . . . . . . . . 111Write_Link_Supervision_Timeout . . . . . . . . . . . . . . . . . 111Write_Page_Timeout  . . . . . . . . . . . . . . . . . . . . . . . . . . . 112Write_PIN_Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112Write_Scan_Enable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Write_Stored_Link_Key. . . . . . . . . . . . . . . . . . . . . . . . . 113Write_Voice_Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113HCI Informational Commands . . . . . . . . . . . . . . . . . . . . . . . 114Read_BD_ADDR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Read_Buffer_Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Read_Country_Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Read_Local_Supported_Features . . . . . . . . . . . . . . . . . . 115Read_Local_Version_Information . . . . . . . . . . . . . . . . . 115HCI Testing Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Enable_Device_Under_Test_Mode  . . . . . . . . . . . . . . . . 115Read_Loopback_Mode. . . . . . . . . . . . . . . . . . . . . . . . . . 116Write_Loopback_Mode  . . . . . . . . . . . . . . . . . . . . . . . . . 116CATC-Specific HCI Commands. . . . . . . . . . . . . . . . . . . . . . 116CATC_BER_Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116CATC_Change_Headset_Gain . . . . . . . . . . . . . . . . . . . . 117CATC_Read_Headset_Gain . . . . . . . . . . . . . . . . . . . . . . 117CATC_Read_Revision_Information. . . . . . . . . . . . . . . . 118CATC_Self_Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118CATC_Write_Country_Code . . . . . . . . . . . . . . . . . . . . . 118Other HCI Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118L2CAP Command Descriptions . . . . . . . . . . . . . . . . . . . . . . 119ConfigurationResponse. . . . . . . . . . . . . . . . . . . . . . . . . . 119ConfigurationSetup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119ConnectRequest  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120ConnectResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120DeregisterPsm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120DisconnectRequest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120EchoRequest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
xCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSInfoRequest. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121RegisterPsm  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121SendData. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122Other L2CAP Events  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122SDP Command Descriptions  . . . . . . . . . . . . . . . . . . . . . . . . 122AddProfileServiceRecord . . . . . . . . . . . . . . . . . . . . . . . . 122AddServiceRecord  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123ProfileServiceSearch. . . . . . . . . . . . . . . . . . . . . . . . . . . . 123RequestServiceAttribute . . . . . . . . . . . . . . . . . . . . . . . . . 124RequestServiceSearch. . . . . . . . . . . . . . . . . . . . . . . . . . . 125RequestServiceSearchAttribute  . . . . . . . . . . . . . . . . . . . 125ResetDatabase. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125RFCOMM Command Descriptions . . . . . . . . . . . . . . . . . . . 126AcceptChannel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126AcceptPortSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126AdvanceCredit  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126CloseClientChannel  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127CreditFlowEnabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127DeregisterServerChannel  . . . . . . . . . . . . . . . . . . . . . . . . 127OpenClientChannel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128RegisterServerChannel . . . . . . . . . . . . . . . . . . . . . . . . . . 128RequestPortSettings  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128RequestPortStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129SendData. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129SendTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130SetLineStatus  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130SetModemStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131SendATCommand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Other RFCOMM Events  . . . . . . . . . . . . . . . . . . . . . . . . . . . 132TCS Command Descriptions  . . . . . . . . . . . . . . . . . . . . . . . . 132RegisterIntercomProfile . . . . . . . . . . . . . . . . . . . . . . . . . 132Open_TCS_Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Start_TCS_Call. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Disconnect_TCS_Call  . . . . . . . . . . . . . . . . . . . . . . . . . . 133Send_Info_Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133OBEX Command Descriptions. . . . . . . . . . . . . . . . . . . . . . . 134ClientConnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134ClientDisconnect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134ClientGet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134ClientPut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135ClientSetPath  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135ServerDeinit  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135ServerInit  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
 xiCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSServerSetPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Appendix B: Command Generator Examples. . . . . . . . . . . . . . . 137Device Discovery and Remote Name Request . . . . . . . . . . . 138Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Establish Baseband Connection . . . . . . . . . . . . . . . . . . . . . . 139Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Baseband Disconnection. . . . . . . . . . . . . . . . . . . . . . . . . . . . 140Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140Create Audio Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . 141Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141L2CAP Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142L2CAP Channel Disconnect. . . . . . . . . . . . . . . . . . . . . . . . . 144Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144SDP Profile Service Search  . . . . . . . . . . . . . . . . . . . . . . . . . 145Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145SDP Reset Database and Add Profile Service Record . . . . . 146Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146RFCOMM Client Channel Establishment  . . . . . . . . . . . . . . 147Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147RFCOMM Client Channel Disconnection . . . . . . . . . . . . . . 148Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148RFCOMM Register Server Channel. . . . . . . . . . . . . . . . . . . 149Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149Establish TCS Connection  . . . . . . . . . . . . . . . . . . . . . . . . . . 150Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150OBEX Server Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152OBEX Client Connection and Client Get & Put. . . . . . . . . . 153Procedure  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153Appendix C: Merlin’s Wand Scripting Commands . . . . . . . . . . 155 Bluetooth Addresses  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Basic Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155Main()   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155Clock()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156Connect()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156Disconnect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157DoInquiry()   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157GetDeviceClass()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158GetRemoteDeviceName()  . . . . . . . . . . . . . . . . . . . . . . . 158MessageBox()   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159SetDeviceClass()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
xiiCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSSleep()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Pipe Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160ClosePipe() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160DeletePipe()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161OpenPipe()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161ReadPipe()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162WritePipe() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 HCI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164HCIAcceptConnectionRequest()  . . . . . . . . . . . . . . . . . . 164HCIAddSCOConnection() . . . . . . . . . . . . . . . . . . . . . . . 164HCIAuthenticationRequested()  . . . . . . . . . . . . . . . . . . . 165HCICatcBerTest()   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165HCICatcChangeHeadsetGain()  . . . . . . . . . . . . . . . . . . . 166HCICatcEnterTestMode()   . . . . . . . . . . . . . . . . . . . . . . . 168HCICatcReadHeadsetGain()  . . . . . . . . . . . . . . . . . . . . . 168HCICatcReadRevisionInformation()  . . . . . . . . . . . . . . . 169HCICatcSelfTest()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170HCICatcTestControl()  . . . . . . . . . . . . . . . . . . . . . . . . . . 170HCICatcWriteCountryCode()   . . . . . . . . . . . . . . . . . . . . 171HCIChangeConnectionLinkKey()  . . . . . . . . . . . . . . . . . 171HCIChangeConnectionPacketType() . . . . . . . . . . . . . . . 172HCIChangeLocalName()  . . . . . . . . . . . . . . . . . . . . . . . . 173HCIDeleteStoredLinkKey() . . . . . . . . . . . . . . . . . . . . . . 173HCIEnableDeviceUnderTestMode()  . . . . . . . . . . . . . . . 174HCIExitParkMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175HCIExitSniffMode()   . . . . . . . . . . . . . . . . . . . . . . . . . . . 175HCIHoldMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176HCIMasterLinkKey() . . . . . . . . . . . . . . . . . . . . . . . . . . . 177HCIParkMode()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177HCIPINCodeRequestNegativeReply()   . . . . . . . . . . . . . 178HCIPINCodeRequestReply() . . . . . . . . . . . . . . . . . . . . . 179HCIQoSSetup()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180HCIReadAuthenticationEnable() . . . . . . . . . . . . . . . . . . 181HCIReadBDADDR() . . . . . . . . . . . . . . . . . . . . . . . . . . . 182HCIReadBufferSize()   . . . . . . . . . . . . . . . . . . . . . . . . . . 182HCIReadClockOffset()   . . . . . . . . . . . . . . . . . . . . . . . . . 184HCIReadConnectionAcceptTimeout() . . . . . . . . . . . . . . 184HCIReadCountryCode()   . . . . . . . . . . . . . . . . . . . . . . . . 185HCIReadCurrentIACLAP()  . . . . . . . . . . . . . . . . . . . . . . 186HCIReadEncryptionMode() . . . . . . . . . . . . . . . . . . . . . . 187HCIReadLinkPolicySettings()  . . . . . . . . . . . . . . . . . . . . 187HCIReadLinkSupervisionTimeout()  . . . . . . . . . . . . . . . 188HCIReadLocalName()  . . . . . . . . . . . . . . . . . . . . . . . . . . 189
 xiiiCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSHCIReadLocalSupportedFeatures() . . . . . . . . . . . . . . . . 189HCIReadLocalVersionInformation()  . . . . . . . . . . . . . . . 190HCIReadLoopbackMode()   . . . . . . . . . . . . . . . . . . . . . . 191HCIReadNumberOfSupportedIAC()  . . . . . . . . . . . . . . . 192HCIReadPageScanMode() . . . . . . . . . . . . . . . . . . . . . . . 192HCIReadPageScanPeriodMode()   . . . . . . . . . . . . . . . . . 193HCIReadPageTimeout()   . . . . . . . . . . . . . . . . . . . . . . . . 194HCIReadPINType()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195HCIReadRemoteSupportedFeatures()  . . . . . . . . . . . . . . 195HCIReadRemoteVersionInformation()   . . . . . . . . . . . . . 196HCIReadScanEnable() . . . . . . . . . . . . . . . . . . . . . . . . . . 197HCIReadSCOFlowControlEnable()   . . . . . . . . . . . . . . . 198HCIReadStoredLinkKey()  . . . . . . . . . . . . . . . . . . . . . . . 198HCIReadVoiceSetting()  . . . . . . . . . . . . . . . . . . . . . . . . . 200HCIRejectConnectionRequest()   . . . . . . . . . . . . . . . . . . 200HCIRemoveSCOConnection()   . . . . . . . . . . . . . . . . . . . 201HCIReset()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201HCIRoleDiscovery()   . . . . . . . . . . . . . . . . . . . . . . . . . . . 202HCISetConnectionEncryption() . . . . . . . . . . . . . . . . . . . 202HCISetEventFilter() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203HCISniffMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204HCISwitchRole()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205HCIWriteAuthenticationEnable()   . . . . . . . . . . . . . . . . . 206HCIWriteConnectionAcceptTimeout()  . . . . . . . . . . . . . 207HCIWriteCurrentIACLAP()   . . . . . . . . . . . . . . . . . . . . . 207HCIWriteEncryptionMode()  . . . . . . . . . . . . . . . . . . . . . 208HCIWriteLinkPolicySettings()   . . . . . . . . . . . . . . . . . . . 209HCIWriteLinkSupervisionTimeout() . . . . . . . . . . . . . . . 209HCIWriteLoopbackMode()  . . . . . . . . . . . . . . . . . . . . . . 210HCIWritePageTimeout()  . . . . . . . . . . . . . . . . . . . . . . . . 211HCIWritePINType() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211HCIWriteScanEnable()   . . . . . . . . . . . . . . . . . . . . . . . . . 212HCIWriteStoredLinkKey()   . . . . . . . . . . . . . . . . . . . . . . 212HCIWriteVoiceSettings()  . . . . . . . . . . . . . . . . . . . . . . . . 213 OBEX Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214OBEXClientConnect() . . . . . . . . . . . . . . . . . . . . . . . . . . 214OBEXClientDeinit()   . . . . . . . . . . . . . . . . . . . . . . . . . . . 214OBEXClientDisconnect()   . . . . . . . . . . . . . . . . . . . . . . . 215OBEXClientGet()   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215OBEXClientInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216OBEXClientPut() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217OBEXClientSetPath()  . . . . . . . . . . . . . . . . . . . . . . . . . . 218OBEXServerDeinit()  . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
xivCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSOBEXServerSetPath(Path)   . . . . . . . . . . . . . . . . . . . . . . 220 RFCOMM Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221RFCloseClientChannel()  . . . . . . . . . . . . . . . . . . . . . . . . 221RFOpenClientChannel()   . . . . . . . . . . . . . . . . . . . . . . . . 221RFRegisterServerChannel() . . . . . . . . . . . . . . . . . . . . . . 222RFSendData()   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223RFSendDataFromPipe() . . . . . . . . . . . . . . . . . . . . . . . . . 223RFReceiveData()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224RFWaitForConnection()   . . . . . . . . . . . . . . . . . . . . . . . . 225RFAcceptChannel()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226RFAcceptPortSettings()  . . . . . . . . . . . . . . . . . . . . . . . . . 226RFCreditFlowEnabled() . . . . . . . . . . . . . . . . . . . . . . . . . 227RFRequestPortSettings()  . . . . . . . . . . . . . . . . . . . . . . . . 228RFRequestPortStatus() . . . . . . . . . . . . . . . . . . . . . . . . . . 229RFSetLineStatus()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230RFSetModemStatus() . . . . . . . . . . . . . . . . . . . . . . . . . . . 231RFSendTest()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232RFAdvanceCredit()   . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233TCS Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233TCSRegisterProfile()  . . . . . . . . . . . . . . . . . . . . . . . . . . . 233TCSOpenChannel()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234TCSStartCall()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234TCSDisconnectCall() . . . . . . . . . . . . . . . . . . . . . . . . . . . 235TCSSendInfoMessage() . . . . . . . . . . . . . . . . . . . . . . . . . 236 L2CAP Commands  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238L2CAPConfigurationSetup()  . . . . . . . . . . . . . . . . . . . . . 238L2CAPConfigurationResponse() . . . . . . . . . . . . . . . . . . 239L2CAPConnectRequest()   . . . . . . . . . . . . . . . . . . . . . . . 240L2CAPConnectResponse()  . . . . . . . . . . . . . . . . . . . . . . 241L2CAPDeregisterAllPsm()  . . . . . . . . . . . . . . . . . . . . . . 241L2CAPDisconnectRequest()  . . . . . . . . . . . . . . . . . . . . . 242L2CAPEchoRequest()  . . . . . . . . . . . . . . . . . . . . . . . . . . 242L2CAPInfoRequest()  . . . . . . . . . . . . . . . . . . . . . . . . . . . 243L2CAPRegisterPsm()   . . . . . . . . . . . . . . . . . . . . . . . . . . 244L2CAPSendData()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244L2CAPSendDataFromPipe()  . . . . . . . . . . . . . . . . . . . . . 245L2CAPWaitForConnection()  . . . . . . . . . . . . . . . . . . . . . 245 SDP Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246SDPAddProfileServiceRecord() . . . . . . . . . . . . . . . . . . . 246SDPQueryProfile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247SDPResetDatabase()   . . . . . . . . . . . . . . . . . . . . . . . . . . . 247SDPAddServiceRecord()  . . . . . . . . . . . . . . . . . . . . . . . . 248 Merlin Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
 xvCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSMerlinResetAllEncryptionOptions()  . . . . . . . . . . . . . . . 249MerlinSetDisplayOptions()  . . . . . . . . . . . . . . . . . . . . . . 249MerlinSetEncryptionLinkKey() . . . . . . . . . . . . . . . . . . . 250MerlinSetEncryptionPIN() . . . . . . . . . . . . . . . . . . . . . . . 250MerlinSetRecordingOptions()  . . . . . . . . . . . . . . . . . . . . 251MerlinStart()   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251MerlinStartRecording()  . . . . . . . . . . . . . . . . . . . . . . . . . 252MerlinStop() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252MerlinStopRecording()   . . . . . . . . . . . . . . . . . . . . . . . . . 253Appendix D: CATC Scripting Language . . . . . . . . . . . . . . . . . . . 255Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255Literals  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256Escape Sequences   . . . . . . . . . . . . . . . . . . . . . . . . . . 256Lists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257Raw Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257Null . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257Global Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258Local Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258Constants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259select expression  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261Operator Precedence and Associativity  . . . . . . . . . . 262Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268Keywords  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269Expression Statements  . . . . . . . . . . . . . . . . . . . . . . . . . . 269if Statements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270if-else Statements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270while Statements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270for Statements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271return Statements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272Compound Statements  . . . . . . . . . . . . . . . . . . . . . . . . . . 273Preprocessing  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275Primitives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276Call() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277Format()  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277Format Conversion Characters   . . . . . . . . . . . . . . . . 278GetNBits(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
xviCATC MERLIN’S WAND 1.22User’s Manual TABLE OF CONTENTSNextNBits(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280Resolve(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280Trace(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
 1CATC MERLIN’S WAND 1.22 CHAPTER 1User’s Manual Overview1.  OverviewThe CATC Merlin's Wand™ Bluetooth™ Test Generator is the newest member in CATC's industry-leading line of high performance, serial communication protocol analysis tools and test equipment. Preceded by CATC's Merlin™, a Bluetooth Protocol Analyzer, Merlin's Wand has been designed as an intelligent Bluetooth wireless technology device that can be used as a verification/validation tester or as an engineering debug and analysis tool. Through its software interface, designers and test technicians will be able to quickly and easily issue protocol commands and test sequences to analyze or validate designs to ensure compliance to the Bluetooth specification. Merlin’s Wand can be used in conjunction with the Merlin protocol analyzer, allowing for real-time captures of test sequence results, as is required by the Bluetooth SIG to provide evidence of product compliance to the specification. 1.1  ApplicationsMerlin's Wand is a combination of hardware and Microsoft® Windows®-based application software. The hardware/software combination is capable of acting as a standard Bluetooth master or slave device within a piconet. By allowing this capability, Merlin's Wand can be used to establish or participate in a piconet and to send or receive data within the piconet. Through the Merlin’s Wand Bluetooth Wizard, users can quickly and easily manage Bluetooth wireless traffic generation. Additionally, via its Command Generator, Merlin's Wand can issue individual Bluetooth commands to a device under test, allowing a designer to focus his or her effort on a specific function or group of functions related to the device. Furthermore, users can quickly create test sequences with Script Manager, thus eliminating the difficulties normally associated with the creation of complex test sequences.
2CATC MERLIN’S WAND 1.22 CHAPTER 1User’s Manual Overview1.2  Merlin’s Wand User InterfaceThe Merlin’s Wand user interface consists of the Main window, the Logs window at the bottom of the screen, and the Device Status window on the left side of the screen.The application’s primary tools are run within the Main window: Bluetooth Wizard, Command Generator, and Script Manager. If Command Generator and Script Manager are not enabled on your Merlin’s Wand system, you will need to obtain License Keys from CATC in order to use them.Each tool offers a different means of generating traffic. Note: Only one tool can be run at a time.Bluetooth Wizard is a point-and-click tool for creating connections and transferring data between Merlin’s Wand and other Bluetooth devices. This tool requires little Bluetooth wireless technology experience and allows you to generate Bluetooth traffic without having to execute specific Bluetooth commands. Bluetooth Wizard is described in Chapter 3, Bluetooth Wizard, on page 17.
 3CATC MERLIN’S WAND 1.22 CHAPTER 1User’s Manual OverviewCommand Generator is a tool that presents a menu of protocol commands that can be selected and executed in virtually any sequence. Command Generator thus offers maximum control over the traffic generation process, but also requires familiarity with the Bluetooth commands. Command Generator is described in Chapter 4, Command Generator, on page 39.Script Manager is a tool that provides an editor for writing and/or executing scripts that will generate Bluetooth wireless traffic. With Script Manager, new scripts can be written and saved, or existing scripts may be opened, edited, and run. Script Manager is described in Chapter 5, Script Manager, on page 53.1.3  Key Features• Plug-and-play USB connection between test system and test module• External antenna can be removed to create wired piconet• Audio connector for connecting audio devices, such as headsets• Can operate as either a master or slave device in a piconet• Graphical interface allows for easy selection of command parameters• Wizard provided to reduce learning curve and memorization of command sequences• Test modes provide for these Bluetooth wireless technology protocols: HCI, L2CAP, SDP, RFCOMM, TCS, and OBEX• Scripting capability for establishment of predefined test sequences• System information report provides details regarding device under test
4CATC MERLIN’S WAND 1.22 CHAPTER 1User’s Manual Overview• Can be used with Merlin protocol analyzer• Power-on self-diagnostics• No external power required -- obtains power from USB connection• One year warranty and online customer supportPlease refer to the Bluetooth Specification, version 1.1 for details on the Bluetooth wireless technology protocol. The Bluetooth specification is available from the Bluetooth SIG at its web site http://www.Bluetooth.com.1.4  Audio Connections - Important InformationMerlin’s Wand has a 2.5 mm audio stereo jack for plugging in headsets.Headsets need to have a 2.5 mm plug with the following pinout:1) Microphone (signal from headset; bias power of 2.5 V and maximum 1 mA provided by Merlin's Wand on the same pin)2) Speaker (signal to headset; speaker impedance needs to be >16 Ohm)3) GroundThe following headsets have been successfully tested with Merlin’s Wand:•RadioShack® 43-1957 Super Lightweight Hands-Free Headset•GN Netcom® GNX Mobile M200•Motorola® Retractable Hands-Free Headset Model # 98196G •Belkin® Universal 2.5 mm Personal Hands-Free Kit F8V920-PL•Coby® CV-M20 Earphone with Built-In Microphone•Plantronics® CHS122N Hands-Free Headset•Plantronics M110 Headset for Cordless and Mobile Phones
 5CATC MERLIN’S WAND 1.22 CHAPTER 1User’s Manual Overview1.5  Limitations• The only Inquiry Access Code (IAC) supported at inquiry and inquiry scan is the General Inquiry Access Code (GIAC)• The Scan_Enable parameter value of 0x01 (inquiry scan enabled and page disabled) is not supported• Page scan intervals and inquiry scan intervals other than 1.28s are not supported• Page scan windows and inquiry scan windows other than 11.25ms are not supported• Optional page scan modes are not supported• More than one SCO connection at a time is not supported
6CATC MERLIN’S WAND 1.22 CHAPTER 1User’s Manual Overview1.6  SpecificationsThe following specifications describe a Merlin’s Wand System. PackageEnvironmental Conditions Host CompatibilityWorks with any PC equipped with a functioning USB port and a Microsoft Windows 98 SE, Windows Me, Windows 2000, or Windows XP operating system.Hardware Interfaces Standard USB Interface -- connects to the host computer2.4 GHz (ISM band) External Antenna.2.5 mm audio stereo jackProduct Warranty CATC offers a one-year limited warranty on its products.Dimensions: 3.4 x 2.6 x 1 inches(8.6 x 6.6 x 2.54 centimeters)Connectors: Host connection (USB, type ‘B’)Audio connection (2.5 millimeter audio stereo jack)Weight: 3.0 oz. (84 g)Operating Range: 0 to 55 °C (32 to 131 °F)Storage Range: -20 to 80 °C (-4 to 176 °F)Humidity: 10 to 90%, non-condensing
 7CATC MERLIN’S WAND 1.22 CHAPTER 2User’s Manual Getting Started2.  Getting Started This chapter describes how to install Merlin’s Wand and its software. Both install easily in just a few minutes. The Merlin’s Wand software can be installed on most Windows-based personal computer systems.2.1  System RequirementsThe following is the recommended configuration for the computer that runs the Merlin’s Wand application and is connected to the Merlin’s Wand hardware unit.•Operating system: Microsoft® Windows® 98 SE, Windows 2000, Windows Me, or Windows XP operating system.Occasionally, after unplugging the Merlin's Wand hardware on a Windows 2000 system, subsequent attempts to plug in the device cause the computer to recognize the unit as a “USB device” rather than as “Merlin's Wand.” If this occurs, you will need to restart the computer so that it will recognize the device properly. To avoid the problem, upgrade to the latest Windows 2000 service pack available from Microsoft.•Required setup: Microsoft Internet Explorer 5 or later must be installed.•Processor: For optimum performance, use processors of the Intel® Pentium® III or Pentium 4 family, the AMD® Athlon® or Duron® family, or other compatible processors with clock speed of 500mHz or higher. Must have, as a minimum, a processor from the Intel Pentium II or Celeron® family, AMD-K6® family, or equivalent with clock speed of 300mHz.•Memory: Minimum of 64 MB of RAM is recommended; more memory generally improves responsiveness.•Hard disk: Minimum 20 GB hard disk is required for installation. Additional disk space is needed for storing user-generated script files and log files that are saved by the user.•Display: Resolution of 1024 x 768 with at least 16-bit color is recommended (resolution of 800 x 600 with 16-bit color is a minimum).•Connectivity: A USB interface is required to connect the  computer to the Merlin’s Wand hardware unit.
8CATC MERLIN’S WAND 1.22 CHAPTER 2User’s Manual Getting Started2.2  Setting Up Merlin’s WandThe Merlin’s Wand hardware can be set up using the installation CD-ROM or from installation files downloaded from the CATC website.Step 1 Attach the external antenna to the Merlin’s Wand hardware unit by screwing it onto the connector labelled ANT.Step 2 Plug one end of the USB cable into the USB port on the Merlin’s Wand hardware, and plug the other end of the USB cable into a USB port on the host computer.Windows should automatically detect the Merlin’s Wand hardware and open the Windows Hardware Wizard to install Merlin’s Wand. If the installation doesn’t finish automatically, proceed to Step 3.Step 3 Follow the Hardware Wizard’s on-screen instructions to complete the installation. If the wizard prompts you for driver information, insert the Merlin’s Wand installation CD-ROM and direct the wizard to the directory <drive>:\software\MerlinWand122. Substitute the drive letter of the CD-ROM drive for <drive>.  For example, if the CD-ROM drive is drive D, navigate to D:\software\MerlinWand122.Note: If you are using installation files downloaded from the CATC website, you will need to direct the wizard to the Disk 1 directory of the installation files so that it can locate the driver.2.3  Installing the Software and Starting the ProgramThe Merlin’s Wand software can be installed from the installation CD-ROM or from installation files downloaded from the CATC website.Install from CD-ROMStep 1 Insert the Merlin’s Wand installation CD-ROM into the CD-ROM drive of the computer that will be connected to the Merlin’s Wand hardware.The autorun program should start automatically. If it doesn’t start, use Windows Explorer or My Computer to navigate to the CD-ROM drive directory and double-click the file autorun.exe, and proceed to Step 2. If it still doesn’t start, navigate to the \software\MerlinWand122 directory on the CD-ROM, double-click the file Setup.exe, and proceed to Step 3.Step 2 Choose Install Software to start the setup program.Step 3 Follow the on-screen instructions to complete the
 9CATC MERLIN’S WAND 1.22 CHAPTER 2User’s Manual Getting Startedinstallation.Install from installation downloadStep 1 Select Start > Run... from the Windows taskbar and click the Browse button, then navigate to the Disk 1 directory of the Merlin’s Wand installation download. Select the file Setup.exe and click Open.Step 2 Follow the on-screen instructions to complete the installation.Start the programOnce the software has been installed, be sure that the Merlin’s Wand hardware is connected to the PC via the USB cable before starting the Merlin’s Wand application. Otherwise, the application will provide a warning message telling you that the Wand could not be found.To start the application, select Start > Programs > CATC > CATC Merlin’s Wand. Note that this is the default location for the Merlin’s Wand application. If it was installed in a different folder, select that folder from the Programs menu.2.4  Displaying the On-Screen HelpAccess the on-screen Help included with the Merlin’s Wand application by selecting Help > Help... from the menu bar.
10CATC MERLIN’S WAND 1.22 CHAPTER 2User’s Manual Getting Started2.5  Application LayoutThe Merlin’s Wand window is made up of the following:• The Main window, where the primary tools are run: Bluetooth Wizard, Command Generator, and Script Manager.    •Bluetooth Wizard -- A simple, easy-to-use tool that guides you through the process of establishing connections and generating traffic between Merlin’s Wand and other Bluetooth wireless technology devices.•Command Generator -- A tool that allows Bluetooth commands to be issued in any chosen sequence. If Command Generator isn't enabled on your Merlin’s Wand system, a License Key must be obtained from CATC before it can be used.•Script Manager -- A notepad-like tool for writing and launching scripts that cause Merlin’s Wand to generate traffic. This tool is an optional feature. If Script Manager isn't enabled on your Merlin’s Wand system, a License Key must be obtained from CATC before it can be used.
 11CATC MERLIN’S WAND 1.22 CHAPTER 2User’s Manual Getting StartedNote: When switching between Bluetooth Wizard, Command Generator and Script Manager, all connections that have been established between Merlin’s Wand and another Bluetooth device should be closed. However, expert users may choose to leave the connections open. If a connection is left open and you attempt to switch tools, Merlin’s Wand will prompt you to close the connections. Choosing Disconnect All will close the connections. Choosing Cancel will leave the connections open, but some commands might not work properly in the other tool. When switching to Bluetooth Wizard, any open connections must be closed.• The Device Status window is on the left side of the interface. It contains three tabs: Device List, Piconet, and Merlin’s Wand Info.•Device List - Displays a list of devices that Merlin’s Wand has discovered. It also contains information about the devices found, such as the Bluetooth address, the state, the role, the class, and the device’s local name. This window is open by default. These symbols in the list indicate a device’s state: C= Connected; i= In Range. Right-clicking on a listed device opens the Device List Pop-Up Menu. The menu presents the following options: Connect, Add Audio Connection, Get Device Information, Delete, and Disconnect All. For details on using the Pop-Up Menu, see Chapter 6, Device Search and Device List Pop-Up Menu, on page 63.•Piconet - Displays a hierarchical list of all connections between Merlin’s Wand and other devices. At the top of the list is the address of the connected device; below it are the various channels established between Merlin’s Wand and the device. Symbols: C= Connection; H= HCIACL; S=HCISCO; L=L2CAP; R= RFCOMM; O=OBEX.
12CATC MERLIN’S WAND 1.22 CHAPTER 2User’s Manual Getting Started•Merlin’s Wand Info - Displays details about Merlin’s Wand.• At the bottom of the interface is the Logs window, which contains tabs for the Event Log and the Script Log:•Event Log - Maintains a log of the commands issued by Merlin’s Wand and the events that ensue, such as a reply by another device.•Script Log - Maintains a record of the commands issued by Script Manager and the events resulting from these commands. If line numbers are referenced in the Script Log, double-clicking on the line number will move the cursor to that line in the Script Manager window.2.6  MenusThe menu bar at the top of the application window contains the following menus of pull-down commands:Table 1: Menu Bar CommandsFile MenuCommand FunctionNew Script Creates a new script fileOpen Script... Opens a script fileClose Script Closes a script fileSave Script Saves a script file
 13CATC MERLIN’S WAND 1.22 CHAPTER 2User’s Manual Getting StartedSave Script As... Saves a script file with a specified namePrint Setup... Sets up the current or a new printerPrint Script... Prints a script fileExit Exits the Merlin's Wand programEdit MenuCommand FunctionUndo Undoes last changeCut Cuts textCopy Copies textPaste Pastes copied or cut textSelect All Selects all textFind... Finds specified stringFind Next Repeats last find actionReplace... Searches for a string and replaces it with a new stringView MenuCommand FunctionMerlin’s Wand Toolbar Shows or hides the Merlin's Wand toolbarMerlin Analyzer Toolbar Shows or hides the Merlin Analyzer toolbarDevice Status Shows or hides the Device Status windowLogs Shows or hides the Logs windowStatus Bar Shows or hides the status barLog MenuCommand FunctionCopy Selected Log Text Copies selected log text to the clipboardSelect All Log Text Selects all log text in the open log windowClear Log Window Clears all text from the open log windowSave Log As... Saves log file to new name and/or directoryPrint Log... Prints all text from the open log windowTools MenuCommand FunctionDevice Search Opens the Device Search dialog boxBluetooth Wizard Opens Bluetooth WizardCommand Generator Opens Command GeneratorScript Manager Opens Script ManagerTable 1: Menu Bar Commands (Continued)
14CATC MERLIN’S WAND 1.22 CHAPTER 2User’s Manual Getting Started2.7  ToolbarsThere are two toolbars in the Merlin’s Wand user interface: Merlin’s Wand toolbar and Merlin Analyzer toolbar. The Toolbar buttons provide access to frequently-used program functions. Tool tips describe icon functionality as the mouse pointer is moved over an item. Merlin’s Wand Toolbar Data Transfer Manager Opens Data Transfer ManagerHelp MenuCommand FunctionHelp... Displays online HelpUpdate License... Opens the Update License dialog, which is used to install License Keys. License Keys must be obtained from CATC.Display License Information...Displays maintenance expiration and features data for Merlin's Wand.About Merlin’s Wand Displays version information about Merlin's Wand.Device SearchOpens Device Search dialogBluetooth WizardOpens Bluetooth Wizard Command GeneratorOpens Command Generator Script ManagerOpens Script Manager Data Transfer ManagerOpens Data Transfer Manager dialogTable 1: Menu Bar Commands (Continued)
 15CATC MERLIN’S WAND 1.22 CHAPTER 2User’s Manual Getting StartedMerlin Bluetooth Analyzer Toolbar2.8  Tool TipsFor most of the buttons and menus, tool tips provide useful information. To display a tool tip, position the mouse pointer over an item. If a tooltip exists for the item, it will pop up in a moment.2.9  Merlin’s Wand Keyboard ShortcutsSeveral frequently-used operations are bound to keyboard shortcuts. Connect/Disconnect Merlin Bluetooth AnalyzerConnects to or disconnects from Merlin Bluetooth AnalyzerSet Merlin Recording OptionsDisplays the Open dialog to choose the Recording Options file for Merlin Bluetooth AnalyzerSet Merlin Display OptionsDisplays the Open dialog to choose the Display Options file for Merlin Bluetooth AnalyzerStart RecordingStarts a Merlin Bluetooth Analyzer recording sessionStop RecordingStops a Merlin Bluetooth Analyzer recording sessionSet Merlin Encryption OptionsOpens the Encryption Setup windowTable 2: Keyboard ShortcutsKey Combination Operation Key Combination OperationCtrl + A Select all Ctrl + V PasteCtrl + C Copy Ctrl + W Close scriptCtrl + F Find Ctrl + X CutCtrl + G Go to Ctrl + Z UndoCtrl + H Replace Home Jump to first character of lineCtrl + I Indent End Jump to last character of lineCtrl + N New script Ctrl + Home Jump to first character of file
16CATC MERLIN’S WAND 1.22 CHAPTER 2User’s Manual Getting Started2.10  License KeysLicense Keys are necessary to enable software maintenance, and may be necessary to use the Command Generator and Script Manager tools.  If these tools are not enabled, a message will appear if you attempt to access them, stating that a License Key is necessary in order to use them.  License Keys must be obtained from CATC.Follow these steps to install License Keys:Step 1 Select Help > Update License… from the menu bar.The Update License dialog will come up.Step 2 Enter the path and filename for the License Key or use the Browse button to navigate to the directory that contains the License Key.  Select the .lic file, and then click Update Device.2.11  License InformationLicensing information for Merlin's Wand may be viewed by selecting Help > Display License Information... from the menu bar.  The License Information window will open, displaying the maintenance expiration and features data for Merlin's Wand.Ctrl + O Open script Ctrl + End Jump to last character of fileCtrl + P Print script... Ctrl + Backspace Delete previous wordCtrl + R Run script F3 Find nextCtrl + S Save script Alt + F4 Shut down Merlin’s Wand applicationTable 2: Keyboard Shortcuts (Continued)Key Combination Operation Key Combination Operation
 17CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth Wizard3.  Bluetooth WizardOnce Merlin’s Wand is installed and running, it is ready to generate traffic.The easiest way to generate traffic is to use Bluetooth Wizard, a point-and-click tool for creating connections and transferring data between Merlin's Wand and other Bluetooth wireless technology devices. This tool requires little Bluetooth experience and allows the user to generate Bluetooth traffic without having to execute specific Bluetooth commands. Bluetooth Wizard manages the entire traffic generation process. Merely follow the on-screen instructions and Merlin's Wand will execute the Bluetooth commands needed to make the connection.3.1  Starting Bluetooth WizardStep 1 Click the Bluetooth Wizard icon   or select Tools > Bluetooth Wizard from the menu.Bluetooth Wizard will open in the Main Window, displaying the following screen:When you start Bluetooth Wizard, Merlin’s Wand gives you the choice of connecting to a device or emulating a device:Emulate a Device -- Choose this option to configure Merlin's Wand to emulate a Bluetooth wireless device. Merlin's Wand can emulate two types of devices: Bluetooth headsets that comply with the Headset Audio Gateway profile and devices that comply with the Object Push profile (i.e., devices that are capable of transferring files).
18CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardConnect to Device -- Choose this option to configure Merlin's Wand to seek out other Bluetooth devices, connect to one of them, and possibly exchange data with that device. Merlin's Wand can connect to and exchange data with two types of devices: Bluetooth wireless headsets that support the Headset Audio Gateway profile and devices that comply with the Object Push profile.3.2  Connect to a Device: HeadsetThe following steps show how to configure Merlin’s Wand to connect to and transfer audio with a Bluetooth headset using the Headset profile. An audio headset is connected to Merlin’s Wand in order to transmit audio between Merlin’s Wand and a Bluetooth headset. A second Merlin’s Wand with an audio headset attached can also be used.Step 1 Turn on the Bluetooth headset that Merlin’s Wand will be connecting to over the air (i.e., the target device).Step 2 Attach a headset to the audio connector on Merlin’s Wand.Step 3 Click the Bluetooth Wizard icon   on the toolbar or select Tools > Bluetooth Wizard from the Menu Bar.The Bluetooth Wizard opening screen opens in the Main Window:Step 4  Click the button marked Connect to Device.
 19CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardClicking this button causes Merlin’s Wand to perform a General Inquiry and collect information on local devices. The Select Device screen opens, displaying the devices that are found.Step 5 From the list, select the device address to which you want Merlin’s Wand to connect, and then click Next.
20CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardMerlin's Wand will query the selected device to determine its profile. When the query is complete, the Select Profile screen will open and display a list of profiles found.Step 6 Select Headset Gateway, then click Next.The Connection Status screen will open, indicating that Merlin's Wand is not connected to the device.:
 21CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardStep 7 Select Connect.The Connection Status screen will change to show that Merlin's Wand has established an RFCOMM connection with the device. Merlin’s Wand will automatically ring the target device and wait for an answer. Pressing the Ring button will cause Merlin’s Wand to ring the device again. Note The Speaker and Microphone Volume levels can be adjusted by moving the sliders up or down. The level is indicated by a number, from 0 to 15, to the left of each slider.Note If you cannot establish a connection, you can re-attempt the connection by either pressing Back and re-running the previous two steps, or by pressing the Connect button again.Step 8 When the target device answers, Merlin’s Wand will
22CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth Wizardestablish an SCO connection with it.Step 9 (Optional) Click the Disconnect button on the Connection Status screen to close the connection.The connection between Merlin's Wand and the device will terminate, and the Connect button will again be available. Selecting Connect will reestablish the connection.3.3  Connect to a Device: Headset Audio GatewayThe following steps show how to configure Merlin's Wand to connect to and transfer audio with a Bluetooth headset using the Headset Audio Gateway profile. An audio headset is connected to Merlin’s Wand in order to transmit audio between Merlin’s Wand and a Bluetooth headset. A second Merlin’s Wand with an audio headset attached can also be used.Step 1 Turn on the Bluetooth headset that Merlin’s Wand will be connecting to over the air (i.e., the target device).Step 2 Attach a headset to the audio connector on Merlin’s Wand.Step 3 Click the Bluetooth Wizard icon   on the toolbar or select Tools > Bluetooth Wizard from the Menu Bar.
 23CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardThe Bluetooth Wizard opening screen opens in the Main Window:Step 4  Click the button marked Connect to Device.Clicking this button causes Merlin’s Wand to perform a General Inquiry and collect information on local devices. The Select Device screen opens, displaying the devices that are found.
24CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardNote the messages that appear in the Event Log.  These messages provide details about the actions and responses taken in each step.Step 5 From the list, select the device address to which you want Merlin’s Wand to connect, and then click Next.Merlin's Wand will query the selected device to determine its profile. When the query is complete, the Select Profile screen will open and display a list of profiles found.Step 6 Select Headset Audio Gateway, then click Next.
 25CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardThe Connection Status screen will open, indicating that Merlin's Wand is not connected to the device.:Step 7 Select Connect.The Connection Status screen will change to show that Merlin's Wand is connected to the device.
26CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardThe Speaker and Microphone Volume levels can be adjusted by moving the sliders up or down. The level is indicated by a number, from 0 to 15, to the left of each slider. Note If you cannot establish a connection, you can re-attempt the connection by either pressing Back and re-running the previous two steps, or by pressing the Connect button again.Step 8 To verify that Merlin's Wand and the Bluetooth device are successfully connected, speak into the microphone on one device and listen for audio on the other.At this point, the audio signal should transfer to the headset. Listen to the headset to see if the data transfer is successful. Step 9 (Optional) Click the Disconnect button on the Connection Status screen to close the connection.The connection between Merlin's Wand and the device will terminate, and the Connect button will again be available. Selecting Connect will reestablish the connection.
 27CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth Wizard3.4  Connect to a Device: Object Push Merlin's Wand can be configured to transfer files to a Bluetooth wireless device that complies with the Object Push profile. This section shows how to configure Merlin's Wand to connect and transfer files to a Bluetooth device that supports Object Push. Step 1 Turn on the target device (the device that will receive the data). The target device will act as the slave unit in this example.Step 2 Start Bluetooth Wizard by clicking the Bluetooth Wizard icon   or by selecting Tools > Bluetooth Wizard from the menu bar.Bluetooth Wizard will open in the Main Window.Step 3 Click the Connect to Device button on the Bluetooth Wizard opening screen.Merlin's Wand will perform a General Inquiry and collect information on local Bluetooth devices. When the search is complete, the Select Device screen will appear with a list of available devices. For details about the actions and responses in each step of the Inquiry, view the Event Log.Step 4 Select the device address to which you want Merlin’s Wand
28CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth Wizardto connect, and then double-click or press Next.Merlin's Wand will query the selected device to determine its profile. When the query is complete, the Select Profile screen will open and display a list of profiles found. Step 5 Select Object Push from the list of displayed profiles, and then double-click or press Next.The Select Data for Transfer screen will open:
 29CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardStep 6 On the Select Data for Transfer screen, there are options to transfer a file or to transfer text.To transfer a file: Select the radio button next to “Transfer this file.” Type in a filename or locate the file by clicking the browse button   to access the Open dialog. By default, the filename in the “Send data to the following file on the receiving device” box matches the name of the file to be transferred. If desired, enter a different filename in that box. When the desired file and target file's name have been entered, proceed to Step 7.To transfer text: Select the radio button next to “Transfer this text.” Enter text in the text box. By default, the filename in the “Send data to the following file on the receiving device” box is “mw001.txt.” If desired, enter a different target filename. When the desired text and target file's name have been entered, proceed to Step 7.Step 7 Click Next.The Transferring File screen will appear. First, a connection with the remote device will be established, then data will begin transferring. A progress bar will show what percentage of the transfer has gone through. Click Stop Transfer to abort a transfer at any time.
30CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardWhen the transfer is complete, Merlin’s Wand will disconnect from the target device:At this point, you can click Back to transfer a different file, click Retransmit to send the file again, or click Restart Wizard to start a new Bluetooth Wizard session.3.5  Device Emulation: HeadsetMerlin's Wand can be configured to emulate a wireless device that conforms to the Bluetooth Headset profile. The following steps show how to set up Merlin's Wand as a Headset device and connect to it with a remote Bluetooth headset.Step 1 Start Bluetooth Wizard by clicking its icon   or by selecting Tools > Bluetooth Wizard from the toolbar.The Bluetooth Wizard screen will open in the Main Window.Step 2 Click Emulate Device.
 31CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardThe Select Profile screen will open.Step 3 Select Headset, then press Next.The Emulation Status screen will open, indicating that Merlin's Wand has been configured to emulate a device that supports the Headset profile and is awaiting connection from a device. Step 4 Direct a remote Bluetooth device to connect to Merlin's Wand.
32CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardOnce the connection is established, the Emulation Status screen will indicate that Merlin's Wand has an RFCOMM connection to the device.Step 5 Click the Answer button to make an SCO connection with the remote device.If the connection attempt is succesful, the screen will change to indicate that an SCO connection has been established.
 33CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardStep 6 (Optional) Click the Hang Up button to close the connection.The connection between Merlin's Wand and the device will terminate.3.6  Device Emulation: Headset Audio GatewayMerlin's Wand can be configured to emulate a wireless device that conforms to the Bluetooth Headset Audio Gateway profile. The following steps show how to set up Merlin's Wand as a Headset Audio Gateway device and connect to it with a remote Bluetooth headset.Step 1 Start Bluetooth Wizard by clicking its icon   or by selecting Tools > Bluetooth Wizard from the toolbar.The Bluetooth Wizard screen will open in the Main Window.Step 2 Click Emulate Device.The Select Profile screen will open.Step 3 Select Headset Audio Gateway, then press Next.
34CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardThe Emulation Status screen will open, indicating that Merlin's Wand has been configured to emulate a device that supports the Headset Audio Gateway profile and is awaiting connection from a device. Step 4 Direct a remote Bluetooth device to connect to Merlin's Wand.Once the connection is established, the Emulation Status screen will indicate that Merlin's Wand is currently connected to the device.
 35CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardStep 5 To verify that Merlin's Wand and the remote device are successfully connected, speak into the microphone on one device and listen for audio on the other.3.7  Device Emulation:  Object PushMerlin's Wand can emulate the file transfer capabilities of wireless devices that support the Object Push profile through the Object Push option. Object Push emulation allows other devices to transfer files to Merlin's Wand. Step 1 Start   Bluetooth Wizard.Step 2 Click the Emulate Device button on the Bluetooth Wizard opening screen.The Select Profile screen will open.Step 3 Select Object Push, then press Next.
36CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardThe Emulation Status screen will open, indicating that Merlin's Wand has been configured to emulate a Bluetooth device that supports the Object Push profile and is awaiting connection from a device. It is now ready to receive files. If desired, the folder in which transferred files are stored can be changed. To change it, click the Change button and select a new directory in the Browse for Folder dialog.Step 4 Initiate file transfer from the Bluetooth device.Note: If the Bluetooth device is another Merlin's Wand, follow the steps in “Connect to a Device: Object Push” on page 27.
 37CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth WizardThe Emulation Status screen will show the file transfer progress:When the transfer is complete, the Emulation Status screen will show that Merlin's Wand is waiting for a connection after having successfully received the file.
38CATC MERLIN’S WAND 1.22 CHAPTER 3User’s Manual Bluetooth Wizard3.8  Restarting the WizardWhen working within Bluetooth Wizard, a new session may be started at any time.Step 1 Click the Restart Wizard button on any screen.•If Merlin's Wand is currently emulating a connected device, the connection will be broken, and Bluetooth Wizard will return to the default Bluetooth Wizard screen.•If Merlin's Wand is currently connected to a device, a dialog box will ask if the connection should be terminated. Clicking the Ye s  button will cause the connection to be broken, and Bluetooth Wizard will return to the default Bluetooth Wizard screen. Clicking the No button will cancel the Restart Wizard request.
 39CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command Generator4.  Command GeneratorThe Command Generator is a tool in Merlin’s Wand that presents a menu of protocol commands so that you can select and execute any command in virtually any sequence. Command Generator thus gives maximum control over the traffic generation process. Command Generator requires that you build connections from the Baseband level on up. This means that to establish an OBEX connection, for example, you will need to first start with Baseband and work your way up the protocol stack. You cannot simply start at a higher protocol. The utility displays a window with tabs for these protocols: HCI (which induces Baseband, LMP and Module-Specific Commands), L2CAP, SDP, RFCOMM, TCS, and OBEX. Clicking a tab or a name in the protocol stack graphic opens a window and presents a menu of commands for that protocol.4.1  Layout of the Command GeneratorThe Command Generator utility is composed of the following:Tabs -- There is a tab for each of six protocols: HCI, L2CAP, SDP, RFCOMM, TCS, and OBEX. Clicking a tab displays the Command Menu for the chosen protocol.Command Menus -- A list of commands is provided for each protocol.
40CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorParameters Combo Boxes -- Parameters can be entered via the six combo boxes. One or more of the boxes may be activated, depending on which command is currently selected in the Command Menu. Parameters may either be typed into the box or chosen from a pull-down list within the box.Execute -- Pressing the Execute button   will cause Merlin's Wand to run the selected command.Command Generator Tips -- Detailed tips for each command are accessible by positioning the mouse over the question mark   icon. A pop-up window that contains detailed information about the selected command will appear.Command Description Box -- A short description will display in the Command Description Box when a command is selected from a Command Menu.Protocol Stack Graphic -- At the bottom of Command Generator is the Protocol Stack Graphic, which illustrates the layers that make up the Bluetooth protocol stack. The protocols in the graphic are also clickable buttons that can be used to access the command menus for each protocol.HCI Customized List Button -- The HCI tab has an additional button   to the left of the Execute button. It provides access to an interface that allows the user to customize the list of commands displayed in the HCI command menu.4.2  Using Command GeneratorNote: If Command Generator isn’t enabled on your Merlin’s Wand system, you will need to obtain a License Key from CATC before you can use it. See “License Keys” on page 16 for details. To execute commands with Command Generator:Step 1 Click the Command Generator button   on the toolbar or select the command Tools > Command Generator from the menu bar.The Command Generator utility will open.
 41CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorStep 2 Choose a protocol to work with by clicking one of the five tabs or a layer in the Protocol Stack Graphic.The list of available commands for the chosen protocol will display in the Command Menu. Note: The HCI tab is displayed by default.Step 3 Select a command from the Command Menu.A description of the command will display in the Command Description Box. If the selected command is not supported, the message in the Command Description Box will read “Not supported.”Step 4 Enter parameters, if required, in the Parameters Combo Boxes. Parameter boxes will be activated as appropriate for the command, with the parameter name(s) appearing to the right of the box(es). Data can be typed directly into the Parameters Combo Boxes, and some of the boxes may offer drop-down lists from which to select the appropriate parameter.Note: Numeric values should be entered as hexadecimal unless otherwise specified.Step 5 Click the Execute button to run the command.Note: While Command Generator offers maximum control over Merlin's Wand, there are times when command choices may be limited. Some lower-level connections may prevent access to commands for higher-level protocols. For example, if an L2CAP connection has been established between Merlin's Wand and a device, it is not possible to work with OBEX commands in Command Generator. Merlin's Wand will display a message to indicate that L2CAP connections must be closed before working with OBEX commands. Once the L2CAP connection is closed, the OBEX commands will be accessible.Customizing the List of HCI CommandsThe list of commands in the HCI command menu in Command Generator may be customized to display only certain commands. Since there are over 100 commands available in the HCI menu, this feature is a handy way to eliminate scrolling through a lengthy list to find commands.
42CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorClicking the HCI Customized List button  , which is located to the left of the Execute button in Command Generator, will open the Command Group interface.To remove commands from the customized HCI command list, select the radio button beside one of the groups listed in the “Command groups” section of the interface, then press the Remove button  . The selected command(s) will move into the “Other HCI commands” list.To add commands to the customized list, select the radio button next to the group of commands that should be moved, then press the Add button . The selected command(s) will be moved from “Other HCI commands” to the customized HCI command list.4.3  Tables of Available CommandsThe following tables summarize the commands in Command Generator.For detailed descriptions of the commands, see Appendix A: Command Generator Command Descriptions, on page 91.Note “N/A” means Not Applicable. This indicates that the specified command does not have a parameter.HCI CommandsLink Control Commands Two sections of Link Control Commands are presented. The first section lists commands that are supported by Merlin’s Wand. The second section presents commands that are not supported.
 43CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorSupportedNot supported Commands ParametersAccept_Connection_Request N/AAdd_SCO_Connection HCI_HandlePacket TypeAuthentication_Requested HCI_HandleChange_Connection_Link_Key HCI_HandleChange_Connection_Packet_Type HCI_HandlePacket_TypeCreate_Connection BD_ADDRDisconnect HCI_HandleExit_Periodic_Inquiry_Mode N/AInquiry Inquiry_LengthNum_ResponsesInquiry_Cancel N/APeriodic_Inquiry_Mode Max Period LengthMin Period LengthInquiry LengthNum of ResponsesPIN_Code_Request_Negative_Reply BD_ADDRPIN_Code_Request_Reply PIN CodeBD_ADDRRead_Clock_Offset HCI_HandleRead_Remote_Supported_Features HCI_HandleRead_Remote_Version_Information HCI_HandleReject_Connection_Request N/ARemote_Name_Request BD ADDRPage Scan Rep ModePage Scan ModeClock OffsetSet_Connection_Encryption HCI_HandleEncryption_EnableCommandsLink_Key_Request_Negative_ReplyLink_Key_Request_ReplyMaster_Link_Key
44CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorLink Policy CommandsSupportedNot supportedAll Link Policy commands are supported in Command Generator.Host Controller & Baseband CommandsSupportedCommands ParametersExit_Park_Mode HCI_HandleExit_Sniff_Mode HCI_HandleHold_Mode HCI_HandleMax_IntervalMin_IntervalPark_Mode HCI_HandleBeacon_Max_IntervalBeacon_Min_IntervalQoS_Setup HCI_HandleServiceTypeTokenRatePeakBandwidthLatencyDelayVariationRead_Link_Policy_Settings HCI_HandleRole_Discovery HCI_HandleSniff_Mode HCI_HandleMax_IntervalMin_IntervalAttemptTimeoutSwitch_Role BD_ADDRWrite_Link_Policy_Settings HCI_HandleLink_Policy_SettingsCommands ParametersChange_Local_Name NameDelete_Stored_Link_Key BD_ADDRDelete_All_FlagHost_Buffer_Size ACL_Data_LengthSCO_Data_LengthTotal_Num_ACLTotal_Num_SCORead_Authentication_Enable N/A
 45CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorRead_Class_of_Device N/ARead_Connection_Accept_Timeout N/ARead_Current_IAC_LAP N/ARead_Encryption_Mode N/ARead_Local_Name N/ARead_Link_Supervision_Timeout HCI_HandleRead_Number_Of_Supported_IAC N/ARead_Page_Scan_Mode N/ARead_Page_Scan_Period_Mode N/ARead_Page_Timeout N/ARead_PIN_Type N/ARead_Scan_Enable N/ARead_SCO_Flow_Control_Enable N/ARead_Stored_Link_Key BD_ADDRRead_All_FlagRead_Voice_Setting N/AReset N/ASet_Event_Filter FilterTypeFilterConditionTypeConditionSet_Event_Mask Event_MaskWrite_Authentication_Enable Authentication_EnableWrite_Class_of_Device CoDWrite_Connection_Accept_Timeout TimeoutWrite_Current_IAC_LAP IAC_LAPIAC_LAPIAC_LAPIAC_LAPIAC_LAPIAC_LAPWrite_Encryption_Mode Encryption ModeWrite_Link_Supervision_Timeout HCI_HandleTimeoutWrite_Page_Timeout TimeoutWrite_PIN_Type PIN_TypeWrite_Scan_Enable Scan_EnableWrite_Stored_Link_Key BD_ADDRLink_KeyWrite_Voice_Settings HCI_HandleVoice_SettingCommands Parameters
46CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorNot SupportedInformational CommandsSupportedNot SupportedThere are no unsupported Informational commands.Status CommandsSupportedThere are no supported Status commands.CommandsCreate_New_Unit_KeyFlushHost_Number_Of_Completed_PacketsRead_Automatic_Flush_TimeoutRead_Hold_Mode_ActivityRead_Inquiry_Scan_ActivityRead_Num_Broadcast_RetransmissionsRead_Page_Scan_ActivityRead_Transmit_Power_LevelSet_Host_Controller_To_Host_Flow_ControlWrite_Automatic_Flush_TimeoutWrite_Hold_Mode_ActivityWrite_Inquiry_Scan_ActivityWrite_Num_Broadcast_RetransmissionsWrite_Page_Scan_ActivityWrite_Page_Scan_ModeWrite_Page_Scan_Period_ModeWrite_SCO_Flow_Control_EnableCommands ParametersRead_BD_ADDR N/ARead_Buffer_Size N/ARead_Country_Code N/ARead_Local_Supported_Features N/ARead_Local_Version_Information N/A
 47CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorNot SupportedTesting CommandsSupportedNot SupportedThere are no unsupported Testing commands.CATC-Specific CommandsSupportedNot supportedCommandsGet_Link_QualityRead_Failed_Contact_CounterReset_Failed_Contact_CounterRead_RSSICommands ParametersEnable_Device_Under_Test_Mode N/ARead_Loopback_Mode N/AWrite_Loopback_Mode Loopback_ModeCommands ParametersCATC_BER HCI_HandleNumber_Of_PacketsBER_Packet_TypeTest_Data_TypeTest_DataBER_IntervalCATC_Change_Headset_Gain DeviceGainCATC_Read_Headset_Gain DeviceCATC_Read_Revision_Information N/ACATC_Self_Test N/ACATC_Write_Country_Code Country_CodeCommandsCATC_Enter_Test_ModeCATC_Test_Control
48CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorL2CAP CommandsSupportedNot SupportedSDP CommandsSupported Commands ParametersConfigurationResponse ReasonConfigurationSetup ServiceTypeTokenRateTokenBucketSizePeakBandWidthLatencyDelayVariationConnectRequest HCI_HandlePSMReceive MTUConnectResponse ResponseDeregisterPsm PSMDisconnectRequest CID EchoRequest HCI_HandleDataInfoRequest HCI_HandleRegisterPsm PSMReceive MTUSendData CIDData PipeCommandsGetRegisteredGroupsGroupDestroyGroupRegisterCommands ParametersAddProfileServiceRecord ProfileServerChannelAddServiceRecord FilenameRecord NameServer ChannelProfileServiceSearch HCI_HandleProfile
 49CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorNot SupportedAll SDP commands in Command Generator are supported.RFCOMM CommandsSupportedRequestServiceAttribute HCI_HandleServiceRecordHandleAttributeIDAttributeIDAttributeIDRequestServiceSearch HCI_HandleServiceClassIDServiceClassIDServiceClassIDRequestServiceSearchAttribute HCI_HandleServiceClassIDServiceClassIDServiceClassIDResetDatabase N/ACommands ParametersAcceptChannel AcceptAcceptPortSettings AcceptAdvanceCredit (HCI/DLCI)CreditCloseClientChannel (HCI/DLCI)CreditFlowEnabled (HCI/DLCI)DeregisterServerChannel ServerChannelOpenClientChannel HCI_HandleServerChannelMaxFrameSizeCreditRegisterServerChannel N/ARequestPortSettings (HCI/DLCI)BaudRateDataFormatFlowControlXonXoffRequestPortStatus (HCI/DLCI)SendATCommand (HCI/DLCI)AT_CommandCommands Parameters
50CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorNot SupportedAll RFCOMM commands in Command Generator are supported.TCS CommandsSupportedNot SupportedCurrent TCS implementation in Merlin’s Wand supports only the Intercom profile. The Cordless profile that uses TCS is not currently supported by Merlin’s Wand.OBEX CommandsSupportedSendData (HCI/DLCI)Data PipeSendTest (HCI/DLCI)SetLineStatus (HCI/DLCI)LineStatusSetModemStatus (HCI/DLCI)ModemSignalsBreak LengthCommands ParametersRegister_Intercom_Profile N/AOpen_TCS_Channel HCI_HandleStart_TCS_Call N/ADisconnect_TCS_Call N/ASend_Info_Message Phone_Number            Commands ParametersClientConnect BD_ADDRClientDisconnect N/AClientGet ObjectClientPut FilenameClientSetPath PathFlagsServerDeinit N/AServerInit N/AServerSetPath PathCommands Parameters
 51CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command GeneratorNot SupportedThere are no unsupported OBEX commands in Command Generator.
52CATC MERLIN’S WAND 1.22 CHAPTER 4User’s Manual Command Generator
 53CATC MERLIN’S WAND 1.22 CHAPTER 5User’s Manual Script Manager5.  Script ManagerScript Manager is a tool within Merlin’s Wand that presents a text editor window for writing and executing scripts. Scripts can be used to automate Bluetooth command sequences, making the testing process more efficient.This chapter introduces the Script Manager interface. There are a number of commands available to you for writing scripts in Merlin’s Wand. Command descriptions can be found in Appendix C: Merlin’s Wand Scripting Commands, on page 155. 5.1  Layout of the Script Manager WindowThe Script Manager utility is composed of the following:Work Area -- The Work Area is a text editor for writing new scripts or displaying and editing opened scripts.Run Button -- Clicking the Run button saves (if needed) and executes the script that is currently displayed in the Work Area. While the script is running, the label on this button changes to Stop.New Button -- Clicking the New button brings up a new script template in the Work Area, so that a new script may be composed. If a modified script is open when the New button is clicked, Script Manager will ask if it should be saved.Open Button -- Clicking the Open button brings up the Open dialog, so that a script can be loaded into the Work Area. If a modified script is open when the Open button is clicked, Script Manager will ask if it should be saved.
54CATC MERLIN’S WAND 1.22 CHAPTER 5User’s Manual Script ManagerSave Button -- Clicking the Save button saves the script that is currently open in the Work Area.Go To Button -- Clicking the Go To button opens the Go To dialog box. Here, users may enter a line number to go to a specific part of an open script. Line numbers are displayed on the bottom right of the Merlin's Wand application, on the status bar.Script Name and Path -- The name and path of the script that is currently open in the Work Area are displayed along the top of the Script Manager screen. Script Manager Menu -- Right-clicking within the Work Area brings up the Script Manager menu. All filing and editing commands that can be performed in Script Manager can be accessed via this menu.5.2  Running ScriptsNote: If Script Manager isn’t enabled on your Merlin’s Wand system, you will need to obtain a License Key from CATC before you can use it. See “License Keys” on page 16 for details.Step 1 Open Script Manager by clicking the Script Manager icon  on the toolbar or by selecting Tools > Script Manager from the menu bar.Script Manager will open. Step 2 Open the script by clicking the Open button in the Script Manager window or by selecting File > Open Script… from the menu bar.The Open dialog will appear.
 55CATC MERLIN’S WAND 1.22 CHAPTER 5User’s Manual Script ManagerStep 3 Navigate to the desired file and click Open.The script will display in Script Manager's Work Area.Step 4 Click Run.Script execution will begin, and the label of the Run button will change to Stop. Pressing the Stop button terminates execution of the script.The script's output can be viewed in the Script Log. If line numbers are referenced in the Script Log, double-clicking on the line number will move the cursor to that line in Script Manager.When the script has finished, the Stop button label will change back to Run.5.3  Writing ScriptsCustomized scripts can be written directly in Script Manager using Merlin’s Wand Scripting Commands. This allows for automating sequences of commands. There are over 100 commands available for writing custom test sequences, including basic commands and commands for: pipes, HCI,
56CATC MERLIN’S WAND 1.22 CHAPTER 5User’s Manual Script ManagerL2CAP, SDP, RFCOMM, OBEX, and Merlin. Detailed descriptions of the commands can be found in Appendix C: Merlin’s Wand Scripting Commands, on page 155.Step 1 Open Script Manager by clicking the Script Manager icon  on the toolbar or by selecting Tools > Script Manager from the menu bar.By default, Script Manager opens an “untitled” script template in the Work Area for composing a new script. If Script Manager were already open, the Work Area could be cleared by pressing the New button in Script Manager or by selecting File > New Script from the menu bar.Step 2 Write the script in Script Manager's Work Area.Step 3 Save the script via the Save Script As… command on the File menu or by clicking the Save button.The Save As dialog will open. Enter a name for the script and save it as a Merlin's Wand Script file (*.script).Step 4 If desired, Close the script by selecting File > Close Script from the menu bar.5.4  Sample ScriptsTwo sample scripts have been provided with Merlin's Wand to demonstrate how Script Manager works. Running sample.script will cause Merlin's Wand to attempt to connect to another device. Sample-2.script demonstrates using RFCOMM to wait for and receive data, as well as demonstrating the use of pipes. The default location of the scripts is the directory where the application is installed, which is usually C:\Program Files\CATC\Merlin's Wand. An additional script, Script Controlling Merlin Interface, is included in this section. It shows how to use a script to control the CATC Merlin Bluetooth Analyzer via Merlin’s Wand.
 57CATC MERLIN’S WAND 1.22 CHAPTER 5User’s Manual Script Managersample.scriptThis script demonstrates several common Merlin’s Wand functions.Main(){Trace("Registering a server channel...\n");rfChannel = RFRegisterServerChannel();Trace("Server channel: ", rfChannel, "\n\n");# Add a profile if we got a server channelif(rfChannel != "Failure"){result = SDPAddProfileServiceRecord(rfChannel, "ObjectPush");Trace("SDPAddProfileServiceRecord returned ", result, "\n");}Trace("Performing inquiry...\n");Devices = DoInquiry();Trace(Devices, "\n");class = GetDeviceClass();Trace("Device class is: ", class, "\n");# Set a new device classSetDeviceClass(0x010203);class = GetDeviceClass();Trace("Device class is now: ", class, "\n");# Get the namesindex = 0;while(device = Devices[index]){deviceName = GetRemoteDeviceName(device);Trace("Device ", index, ": ", deviceName, "\n");index = index + 1;}# Read the current accessible modeTrace("Current accessible mode is: ", HCIReadScanEnable(), "\n");# Set the accessible moderesult = HCIWriteScanEnable("GENERAL_ACCESSIBLE");Trace("HCIWriteScanEnable returned ", result, "\n");
58CATC MERLIN’S WAND 1.22 CHAPTER 5User’s Manual Script Manager# Read the new accessible modeTrace("Current accessible mode is: ", HCIReadScanEnable(), "\n");Trace("Connecting to ", Devices[0], "\n");# Connect to the first device in the list.ACLHandle = Connect(Devices[0]);Trace("ACL Handle: ", ACLHandle, "\n");# Get some SDP query informationTrace("\nSDP query results:\n");serverChannel = SDPQueryProfile(Devices[0], "Headset");Trace("Headset: Server channel is: ", serverChannel, "\n\n");# Establish an RFCOMM connectionTrace("\nEstablishing RFCOMM connection:\n");result = RFOpenClientChannel(Devices[0], serverChannel);Trace("RFCOMM connection: ", result[0], "\n");DLCI = result[1];# Send some data over our new RFCOMM connectiondata = "ATDT5551212";Trace("Sending ", data, " to ", Devices[0], "...\n");result = RFSendData(Devices[0], DLCI, data);Trace("RFSendData returned ", result, "\n\n");# Close the RFCOMM connectionresult = RFCloseClientChannel(Devices[0], DLCI);Trace("RFCOMM disconnection: ", result, "\n");Trace("\nAttempting to make an SCO connection...\n");result = HCIAddSCOConnection(Devices[0], ["DM1", "HV1"]);Trace("HCIAddSCOConnection returned ", result, "\n");Trace("\nWaiting 2 seconds...\n");# Wait for 2 secondsSleep(2000);# Close the SCO connectionTrace("Close SCO connection: ", HCIRemoveSCOConnection(Devices[0]), "\n");# Disconnect from the devicestatus = Disconnect(Devices[0]);
 59CATC MERLIN’S WAND 1.22 CHAPTER 5User’s Manual Script ManagerTrace("Disconnect returned: ", status, "\n\n");}Sample-2.script# Sample2.script## Demonstrates using RFCOMM to wait for and receive data as well as the use of pipes.## A Transmit pipe called "SamplePipe" should be created in the Data Transfer Manager# before the script is run. This pipe should contain a small amount of data that will be sent # back to the host whenever data is received by the script.Main(){# Do some pipe tests.result = DeletePipe("TestPipe", "receive");Trace("DeletePipe returned ", result, "\n");result = OpenPipe("TestPipe", "receive");Trace("OpenPipe returned ", result, "\n");# WritePipe only supports receive pipes.result = WritePipe("TestPipe", "This is some data.");Trace("WritePipe returned ", result, "\n");result = ClosePipe("TestPipe", "receive");Trace("ClosePipe returned ", result, "\n");result = OpenPipe("TestPipe", "receive");Trace("OpenPipe (2) returned ", result, "\n");result = ReadPipe("TestPipe", "receive", 100);Trace("ReadPipe returned ", result, "\n");#result = ClosePipe("TestPipe", "receive");#Trace("ClosePipe (2) returned ", result, "\n");channel = RFRegisterServerChannel();Trace("Listening on server channel ", channel, "...\n");result = OpenPipe("DataIn", "receive");Trace("OpenPipe returned ", result, "\n");# Wait for a connectionstatus = RFWaitForConnection();
60CATC MERLIN’S WAND 1.22 CHAPTER 5User’s Manual Script ManagerTrace("RFWaitForConnection returned ", status, "\n");while(1){results = RFReceiveData();Trace("RFReceiveData returned ", results[0], "\n");if(results[0] != "Success"){ClosePipe("DataIn", "receive");Trace("Exiting.\n");return results[0];}Trace("Received ", results[1], " bytes:\n");Trace(results[2]);Trace("\n");result = WritePipe("DataIn", results[2]);Trace("WritePipe returned ", result, "\n");# Send some data back from a pipe.result = RFSendDataFromPipe("CONNECTED_DEVICE", channel, "SamplePipe");Trace("SendData returned ", result, "\n");}}Script Controlling Merlin InterfaceThis script demonstrates how to control various Merlin functions via a Merlin’s Wand script.Main(){result = MerlinStart();Sleep(2000);if(result == "Failure")return result;Trace("Merlin started\n");MerlinSetRecordingOptions("C:\\Program Files\\CATC\\Merlin\\1.rec");Trace("MerlinSetRecordingOptions\n");MerlinSetDisplayOptions("C:\\Program Files\\CATC\\Merlin\\1.opt");Trace("MerlinSetDisplayOptions\n");result = MerlinSetEncryptionPIN('000102030405', "1234");if(result != "Success")
 61CATC MERLIN’S WAND 1.22 CHAPTER 5User’s Manual Script Managerreturn result;Trace("MerlinSetEncryptionPIN\n");result = MerlinSetEncryptionLinkKey('000102030405', "123456");if(result != "Success")return result;Trace("MerlinSetEncryptionLinkKey\n");result = MerlinStartRecording();if(result != "Success")return result;Trace("MerlinStartRecording\n");Sleep(10000);MerlinStopRecording();Trace("MerlinStopRecording\n");MerlinResetAllEncryptionOptions();MerlinStop();Trace("MerlinStop\n");}
62CATC MERLIN’S WAND 1.22 CHAPTER 5User’s Manual Script Manager
 63CATC MERLIN’S WAND 1.22 CHAPTER 6User’s Manual Device Search and Device List Pop-Up Menu6.  Device Search and Device List Pop-Up MenuThe Device Search and Device List Pop-Up Menu tools offer shortcut methods for steps that are commonly performed at the beginning of the connection process. They can be used for some commands that would otherwise need to be done in Command Generator.6.1  Device SearchMerlin's Wand can perform an inquiry to find local Bluetooth wireless technology devices via the Device Search tool. Information about the devices that are found are then shown in the Device List.To perform a Device Search:Step 1 Open the Device Search dialog by clicking the Device Search icon   on the toolbar or by selecting Tools > Device Search from the menu bar.The Device Search dialog will open.Device Search presents the following search options:Search Time -- Sets the duration of the inquiry, in seconds. The default search time is five seconds.Number of Responses -- Sets the maximum number of responses for which data should be collected. The default number of responses is ten.Read Remote Device Name -- Selecting this option will cause Merlin's Wand to collect name information from the remote devices it finds. This option is not selected by default.Note: The reading of names occurs after the search has finished; therefore, processing the entire search will take longer if this option is selected. For example, if the Search Time is set to 5 seconds, and 30 devices are found within 5 seconds, the entire search process will take much longer than 5 seconds because each device will be contacted individually and asked for its name. This could add considerable time to the search, especially if some of the devices found in the search have gone out of range or been turned off.
64CATC MERLIN’S WAND 1.22 CHAPTER 6User’s Manual Device Search and Device List Pop-Up MenuStep 2 (Optional) Set the values for Search Time, Number of Responses and Read Remote Device Name.Step 3 Click Do Inquiry.Merlin's Wand will search for devices.Step 4 To see the results of the search, click the Device List tab in the Device Status window. To see the commands and responses from the Inquiry, view the Event Log in the Logs window.6.2  Device List Pop-Up MenuThe Device List Pop-Up Menu presents options for setting up ACL and audio (SCO) connections, displaying remote device information, and terminating connections. The Pop-Up Menu can be accessed by right-clicking on one or more devices in the Device List. It can be used as an alternative to Bluetooth Wizard, Command Generator, and Script Manager for performing some commands.Note: The Device List Pop-Up Menu is not accessible while the Bluetooth Wizard is running.Create an ACL ConnectionAn HCI ACL connection to a remote device can be established via the Device List Pop-Up Menu.
 65CATC MERLIN’S WAND 1.22 CHAPTER 6User’s Manual Device Search and Device List Pop-Up MenuNote: The following instructions assume that a Device Search has been performed and devices are displayed in the Device List. For information about performing a device search, please see Section 6.1, “Device Search,” on page 63.Step 1 Open the Pop-Up Menu by right-clicking on the target device in the Device List.The Device List Pop-Up Menu will open.Step 2 Choose Connect from the menu.The status of the target device should change from In Range to Connected in the Device List. The Piconet tab should now indicate that Merlin's Wand has an ACL connection to the target device.Establish an Audio ConnectionAn HCI SCO connection to a device that supports audio connections can be established via the Device List Pop-Up menu.Note: In order to verify that Merlin's Wand and a Bluetooth wireless audio device are successfully connected, a headset will need to be plugged into the audio port on Merlin's Wand. Be sure that the headset is plugged in before initializing the connection between Merlin's Wand and a Bluetooth device. Note: The following instructions assume that a Device Search has been performed and devices are displayed in the Device List. For information about performing a device search, please see Section 6.1, “Device Search,” on page 63.Step 1 Open the Pop-Up Menu by right-clicking on the target device in the Device List.The Device List Pop-Up Menu will open.Step 2 Choose Connect from the
66CATC MERLIN’S WAND 1.22 CHAPTER 6User’s Manual Device Search and Device List Pop-Up Menumenu.The status of the target device should change from In Range to Connected in the Device List. The Piconet tab should now indicate that Merlin's Wand has an ACL connection to the target device.Step 3 Reopen the Pop-Up Menu by right-clicking on the target device in the Device List.The Device List Pop-Up Menu will open. If the remote device supports audio connections and Merlin's Wand is connected to it, then the Add Audio Connection command should be available.Step 4 Select Add Audio Connection from the menu.The status of the target device will not change in the Device List; however, the Piconet tab should indicate that Merlin's Wand has an SCO connection to the device.Step 5 To verify that Merlin's Wand and the Bluetooth device are successfully connected, speak into the microphone on one device and listen for audio on the other.Display Device InformationNote: The following instructions assume that Merlin's Wand is currently connected to a remote device.Step 1 Open the Pop-Up Menu by right-clicking on the target device in the Device List.The Device List Pop-Up Menu will open.
 67CATC MERLIN’S WAND 1.22 CHAPTER 6User’s Manual Device Search and Device List Pop-Up MenuStep 2 Select Get Device Information.The Supported Services and Protocols window will open. The Service Name, Supported Protocols, and Value for the target device will be displayed in the window.Delete a DeviceDevices that are not connected may be removed from the Device List via the Device List Pop-Up Menu. This is useful when there are many devices displayed in the Device List -- non-target devices can be deleted from the list, making it easier to navigate. This option can also be used to remove devices that are no longer in range, but are still displayed in the list.Step 1 Open the Pop-Up Menu by right-clicking on one or more devices.The Device List Pop-Up Menu will open.Note: To delete more than one device at a time, either(a) Select non-consecutive devices by Ctrl + clicking on each device to be deleted, or(b) Select consecutive devices by Shift + clicking on the first and last devices to be deleted,then right-click on one of the selected devices.Step 2 Select Delete.The device(s) will be removed from the Device List.
68CATC MERLIN’S WAND 1.22 CHAPTER 6User’s Manual Device Search and Device List Pop-Up MenuDisconnect AllA fast and easy way to terminate all connections that Merlin's Wand has established with remote devices is to use the Disconnect All… command on the Device List Pop-Up Menu.Step 1 Open the Pop-Up Menu by right-clicking on a device.Step 2 Select Disconnect All…The Existing Connections dialog will open, displaying all pending connections.Step 3 Click the Disconnect All button in the Existing Connections dialog to close the connections, or click Cancel to leave them open.Note: When switching between Bluetooth Wizard, Command Generator and Script Manager, all connections that have been established between Merlin's Wand and another Bluetooth device should be closed. However, expert users may choose to leave the connections open. If a connection is left open and you attempt to switch tools, Merlin's Wand will prompt you to close the connections. Choosing Disconnect All will close the connections. Choosing Cancel will leave the connections open, but some commands might not work properly in the other tool. When switching to Bluetooth Wizard, any open connections must be closed.
 69CATC MERLIN’S WAND 1.22 CHAPTER 7User’s Manual Data Transfer Manager and Data Pipes7.  Data Transfer Manager and Data PipesData Transfer Manager is a special tool for creating pipes. A pipe is a file or message that has been specially prepared for transmission over an RFCOMM or L2CAP channel. Pipes are necessary with these protocols because RFCOMM and L2CAP only transfer raw data. Pipes are set up to designate the source of the raw data -- either a file or text entered by the user.Data Transfer Manager is designed to work in conjunction with Command Generator and Script Manager. Use Data Transfer Manager to prepare data, then use Command Generator or Script Manager to transfer it.Data Transfer Manager is also used to view any data that is being received by Merlin's Wand over L2CAP or RFCOMM channels. If data is being received, the Data Transfer Manager window will automatically create a Receive Pipe and display the arriving data.Data Transfer Manager contains the following elements:Data Transmit page -- The Data Transmit page is used to create pipes. Pipes can be created from files or text. For more information on data transmit pipes, see Section 7.1, “Creating Data Pipes,” on page 69 and Section 7.2, “Using Data Pipes,” on page 70.Data Receive page -- The Data Receive page is used to view data that has been received by Merlin's Wand. For more information, see Section 7.3, “Receive Pipes,” on page 72.7.1  Creating Data PipesData Transfer Manager is used to prepare data for transmission over RFCOMM and L2CAP channels. To prepare the data, pipe files are created.Step 1 Open Data Transfer Manager by clicking on the Data Transfer Manager icon   on the Toolbar or selecting Tools > Data Transfer Manager from the menu bar.
70CATC MERLIN’S WAND 1.22 CHAPTER 7User’s Manual Data Transfer Manager and Data PipesData Transfer Manager will open, displaying the Data Transmit page.Step 2 Name the pipe by typing a name into the text box labeled Pipe Name.Step 3 To create a pipe from a file:Select the From file radio button. Type in a filename and path or navigate to the desired file by clicking the browse button   to bring up the Open dialog.To create a pipe from text:Select the From text radio button and type text into the box to its right.Step 4 Click the Create Pipe button.The pipe will be created, and its name, type and length will be displayed in the list at the top of the Data Transmit page.7.2  Using Data PipesData Transfer Manager works in conjunction with Command Generator and Script Manager to provide an easy way to transfer files between Merlin's Wand and a Bluetooth wireless device over an RFCOMM or L2CAP channel.
 71CATC MERLIN’S WAND 1.22 CHAPTER 7User’s Manual Data Transfer Manager and Data PipesTransfer Data Using Command GeneratorNote: A data pipe needs to be created in Data Transfer Manager before the data can be transferred. See Section 7.1, “Creating Data Pipes,” on page 69 to learn how to do this.Step 1 Open Command Generator by clicking on the Command Generator icon   on the Toolbar or selecting Tools > Command Generator from the menu bar.Step 2 Establish an RFCOMM or L2CAP connection with the target device.To establish an RFCOMM connection:(a) Using the Device List pop-up menu, create an ACL connection. To find out how to do this, see “Create an ACL Connection” on page 64.(b) In Command Generator, open the RFCOMM tab.(c) Select OpenClientChannel from the list of commands. Enter the HCI_Handle (this is shown on the Piconet tab) and ServerChannel parameters. The default values for MaxFrameSize and Credit can be used. When the parameter values are all entered, press Execute.The RFCOMM connection will show up in the Piconet.To establish an L2CAP connection:(a) Using the Device List pop-up menu, create an ACL connection. To find out how to do this, see “Create an ACL Connection” on page 64.(b) In Command Generator, open the L2CAP tab.(c) Select RegisterPsm from the list of commands. Enter the PSM and Receive MTU parameters, then press Execute. Note: RegisterPsm must also be executed for the target device. (d) Select ConnectRequest from the list of commands. Enter the HCI_Handle, PSM, and Receive MTU parameters, then press Execute.The L2CAP connection will display on the Piconet tab.Step 3 Select SendData from the RFCOMM or L2CAP menu, depending on which type of connection was established in Step 2.The first two Parameters Combo Boxes will become activated, indicating that the (HCI / DLCI) for RFCOMM, or CID for L2CAP, and Data Pipe parameters are required for this command.Step 4 Enter or select the appropriate (HCI / DLCI) or CID channel and Data Pipe name in the Parameters Combo
72CATC MERLIN’S WAND 1.22 CHAPTER 7User’s Manual Data Transfer Manager and Data PipesBoxes.Step 5 Click the Execute button to send the data pipe.The Event Log will show the transfer of data from Merlin's Wand to the target device.Access Pipes Using Script ManagerThere are functions available in the scripting API to access pipes. They are: OpenPipe, ClosePipe, ReadPipe, WritePipe, and DeletePipe. Please see Section C.3, “Pipe Commands,” on page 160 for more information.For a demonstration of using RFCOMM to wait for and receive a data pipe, see Sample-2.script in Script Manager. Note: A data pipe needs to be created in Data Transfer Manager before the data can be transferred. See Section 7.1, “Creating Data Pipes,” on page 69 to learn how to do this.7.3  Receive PipesReceive pipes are created automatically in the Data Receive page of Data Transfer Manager when Merlin's Wand receives data from an L2CAP or RFCOMM connection.A receive pipe is a pipe that is used to receive data until the connection terminates. At that point, the pipe can be closed, saved to a file, or deleted. Note that unless a receive pipe is closed, any additional data that's received will be put into that pipe, even if the new data represents a different file transfer. To ensure that different files will be put into separate pipes, each pipe should be closed after a connection has completed. This way, a new receive pipe will be created when subsequent data arrives.
 73CATC MERLIN’S WAND 1.22 CHAPTER 7User’s Manual Data Transfer Manager and Data Pipes7.4  Closing PipesReceive pipes on the Data Receive page of Data Transfer Manager can be closed. Closing a receive pipe prevents additional data from being placed in it. Closing it also allows its contents to be viewed in the bottom window of the Data Receive page. For any pipe that isn't closed, this message will appear in the window: “This pipe is open for writing and cannot be viewed.”To close a receive pipe:Step 1 Select the pipe that is to be closed.Step 2 Click Close Pipe.The pipe will be closed, and its contents will be shown in the bottom window.7.5  Saving Data PipesData Transfer Manager can save data pipes that are prepared for transmission as well as data pipes that are received.
74CATC MERLIN’S WAND 1.22 CHAPTER 7User’s Manual Data Transfer Manager and Data PipesSaving Data Transmit Pipe ListsStep 1 (Optional) Delete all pipes. If pipes are already displayed on the Data Transmit page of Data Transfer Manager, any newly created pipes will be added to the displayed list. To create an entirely new list of pipes, the currently displayed list should be deleted.Note: The default pipe list is automatically loaded into the Data Transmit page when the Merlin's Wand application is opened. If no list has been saved as default, then no list will be loaded.If the application hasn't been shut down since the last time that Data Transfer Manager was used, then the last list that was open in the Data Transmit page will be displayed the next time the tool is opened.Step 2 Create one or more data pipes.Step 3 Click Save Pipe List... to bring up the Save As dialog. Enter a file name and save the list as a Merlin's Wand Pipe File [*.pipe].Saving a Default ListStep 1 Create one or more data pipes or open a pipe list.Step 2 Click Save List As Default.The list will be saved as default.pipe. That list is loaded into the Data Transmit page when the Merlin's Wand application is opened. However, if the user exits Data Transfer Manager but doesn't exit the application, the last list that was open in the Data Transmit page will be the one displayed when the tool is next accessed.Saving Data Receive PipesStep 1 Select a pipe in the Data Receive page of Data Transfer manager.Step 2 Click Save Pipe to File.The Save As dialog will come up. Enter a file name, including the file type extension, then click Save.7.6  Deleting PipesNote: Deleting pipes removes them from the list displayed in Data Transfer Manager. If the pipes were previously saved in a pipe list file, deleting them in Data Transfer Manager won't delete them from the file. To delete pipes from a pipe list file, first delete the pipes, then save the pipe list.
 75CATC MERLIN’S WAND 1.22 CHAPTER 7User’s Manual Data Transfer Manager and Data PipesTo delete a pipe:Step 1 Select the pipe to be deleted.Step 2 Click Delete Pipe.The pipe will be deleted from the displayed pipe list.To delete all pipes:Step 1 Click Delete All Pipes.A warning dialog will come up, asking, “Are you sure you want to delete all pipes from the list?” Click Yes  to delete the pipes.All pipes will be cleared from the display.7.7  Opening Pipe ListsTo open a pipe list in the Data Transmit page of Data Transfer Manager:Step 1 Click Open Pipe List...Note: If pipes are already displayed, a dialog box will ask, “Delete current pipes before adding new pipes from pipe list file?” Choose Yes to delete the displayed pipes, or click No to leave those pipes displayed.The Open dialog will come up.Step 2 Select a file, then click Open.The selected list will be displayed on the Data Transmit page.7.8  Renaming PipesTo rename a pipe displayed in the Data Transmit page of Data Transfer Manager:Step 1 Select the pipe to be renamed.Step 2 Click Rename Pipe...The Rename Pipe dialog will appear.Step 3 Enter a new name for the pipe, then click OK.Note: Renaming a pipe changes its name in Data Transfer Manager. To change a pipe's name in a pipe list file, first rename the pipe, then save the pipe list.
76CATC MERLIN’S WAND 1.22 CHAPTER 7User’s Manual Data Transfer Manager and Data Pipes7.9  Modifying PipesExisting pipes may be modified on the Data Transmit page of Data Transfer Manager. A pipe created from a file can be modified either by associating it with a different file or by changing it to a text-based pipe. A pipe created from text can be modified either by editing the text or by changing the pipe to a file-based pipe.Note: Modifying pipes changes them in Data Transfer Manager. However, if the pipes were previously saved in a pipe list file, modifying them in Data Transfer Manager won't change them in the saved file. To modify pipes in a pipe list file, first modify the pipes, then save the pipe list.Step 1 Select the pipe that is to be modified.Step 2 To associate a pipe with a different file or change a text-based pipe to a file-based pipe:•With the “From file” radio button selected, enter a new filename and path or navigate to the new file by clicking the browse button   to bring up the Open dialog. Select a new file and click Open.To modify text or change a file-based pipe to a text-based pipe:•With the “From text” radio button selected, change, add or delete text in the text entry box.Step 3 Click Modify Pipe to implement the changes.
 77CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand Traffic8. Using Merlin to Record Merlin’s Wand TrafficIt’s possible to control the CATC Merlin Bluetooth Protocol Analyzer via Merlin’s Wand. The two can be used together to capture real-time test sequence results, as is required by the Bluetooth SIG to provide evidence of product compliance to the specification.Merlin's Wand has built-in functionality for controlling the Merlin protocol analyzer. Through Merlin's Wand, a Bluetooth recording session can be set up on Merlin, even if the Merlin application runs on a remote computer.8.1 Set Up a Remote MachineIf Merlin’s Wand will be used to run Merlin on a remote machine, DCOM and accessibility properties on the remote machine must be properly configured. The configuration procedures differ slightly for different operating systems.Note: If Merlin’s Wand will be used only to run Merlin on the same computer that is running Merlin’s Wand, skip to “Connect to Merlin with Merlin’s Wand” on page 81.Windows 98/Me Operating SystemsUse this procedure to configure DCOM properties to run a Merlin analyzer remotely on a machine running Windows 98 or Windows Me. All the steps should be performed on the remote machine.Step 1 Open the Merlin application on the remote machine in order to register it with COM, and then close the application.Step 2 Download and install dcom98.exe and dcm95cfg.exe DCOM configuration utilities from Microsoft. They are available via the following links:http://download.microsoft.com/msdownload/dcom/98/x86/en/dcom98.exehttp://download.microsoft.com/msdownload/dcom/98/x86/en/dcm95cfg.exeStep 3 Select Start > Run from the Windows taskbar.The Run dialog will open.Step 4 Enter “dcomcnfg” in the Open combo box and press OK.The Distributed COM Configuration Properties dialog will open.
78CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand TrafficStep 5 On the Applications tab, select Merlin from the list of applications.Step 6 Select the Default Properties tab and make sure that “Enable Distributed COM on this computer” is checked.Step 7 Select the Default Security tab and make sure that “Enable remote connection” is checked.Step 8 Click OK.Windows NT®/2000 Operating SystemsUse this procedure to configure DCOM and accessibility properties to run a Merlin analyzer remotely on a machine running Windows NT 4.0 or Windows 2000. All the steps should be performed on the remote machine.Step 1 Open the Merlin application on the remote machine in order to register it with COM, and then close the application.Step 2 Select Start > Run from the Windows taskbar.The Run dialog will open.Step 3 Enter “dcomcnfg” in the Open combo box and press OK.The Distributed COM Configuration Properties dialog will open.Step 4 On the Applications tab, select Merlin from the list of applications.Step 5 Click the Properties button.The Merlin Properties dialog will open.Step 6 Go to the Security tab.Step 7 Select the “Use custom launch permissions” radio button and click the associated Edit... button.The Registry Value Permissions dialog will open.Step 8 Make sure Allow Launch is selected in the Type of Access drop-down list.Step 9 Click Add...The Add Users and Groups dialog will open.Step 10 Select names from the Names list and click Add to include them in the Add Names list.Step 11 When all desired user names have been added, click OK.Step 12 Click OK on each of the three dialogs that are still open.
 79CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand TrafficStep 13 For Windows NT:(a) Select Start > Settings > Control Panel on the Windows taskbar.The Control Panel window will open.(b) Double-click on Services.The Services dialog will open.(c) Select Remote Procedure Call (RPC) Locator and select Action > Properties from the menu bar.The Remote Procedure Call (RPC) Locator Properties dialog will open.(d) Click Start on the General tab, then click OK.The status for Remote Procedure Call (RPC) Locator should now be set to “Started” in the Services dialog.(e) Select Remote Procedure Call (RPC) Service and select Action > Properties from the menu bar.The Remote Procedure Call (RPC) Service Properties dialog will open.(f) Click Start on the General tab, then click OK.The status for Remote Procedure Call (RPC) Service should now be set to “Started” in the Services dialog.For Windows 2000:(a) Select Start > Settings > Control Panel on the Windows taskbar.The Control Panel window will open.(b) Double-click on Administrative Tools.The Administrative Tools window will open.(c) Double-click on Services.The Services dialog will open.(d) Select Remote Procedure Call (RPC) and select Action > Properties from the menu bar.The Remote Procedure Call (RPC) Properties dialog will open.(e) Click Start on the General tab, then click OK.The status for Remote Procedure Call (RPC) should now be set to “Started” in the Services dialog.(f) Select Remote Procedure Call (RPC) Locator and select Action > Properties from the menu bar.The Remote Procedure Call (RPC) Locator Properties dialog will open.(g) Click Start on the General tab, then click OK.The status for Remote Procedure Call (RPC) Locator should now be set to “Started” in the Services dialog.
80CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand Traffic8.2 Set Up Connection OptionsIn addition to establishing connections, the Connect/Disconnect Merlin Bluetooth Analyzer button   provides several options for configuring the connection between Merlin's Wand and Merlin. To see the options, click on the options arrow on the right side of the button.Run Merlin on a Local MachineTo run Merlin on a local machine, click the options arrow on the right side of the Connect/Disconnect Merlin button and make sure that “Run on local” is selected in the Connect/Disconnect options menu. When selected, a checkmark appears next to it.Add a Remote MachineMerlin's Wand can be configured to control a Merlin analyzer that is running on a remote computer. Before Merlin's Wand can connect to Merlin, the remote machine that runs Merlin must be added to the Connect/Disconnect options menu in Merlin's Wand.Step 1 Click the options arrow on the right side of the Connect/Disconnect Merlin button and select “Add remote machine...” from the options menu.The Remote Machine dialog will open.Step 2 Enter the Internet machine name or IP address for the machine on which Merlin is running and click OK.Note: If the machine name is used and Merlin's Wand is subsequently unable to connect to Merlin, then the IP address must be used instead.
 81CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand TrafficThe machine name/IP address will now be listed on the Connect/Disconnect options menu. By default, it will be selected, as indicated by the checkmark that appears to the left of the name/IP address.8.3 Start MerlinThis step is required only when running Merlin on a remote machine that uses Windows 98 or Windows Me. In such cases, Merlin’s Wand cannot start or stop the Merlin application, although it can control Merlin once it is running. Be sure to start Merlin before connecting to it on a machine running Windows 98 or Windows Me.8.4 Connect to Merlin with Merlin’s WandNote: Before Merlin's Wand can connect to Merlin, the connection options, DCOM, and accessibility properties may need to be configured. Please refer to “Set Up Connection Options” on page 80 and “Set Up a Remote Machine” on page 77 for more information.Step 1 To connect to Merlin Bluetooth Protocol Analyzer, click on the Connect/Disconnect   button.Merlin's Wand will connect to Merlin. The status bar at the bottom of the Merlin's Wand application will indicate that Merlin is connected, along with the Merlin software version. The Connect/Disconnect button will remain “pressed down”   while Merlin's Wand and Merlin are connected.8.5 Set Merlin Recording OptionsThe recording options file [*.rec] that Merlin should use can be specified through Merlin's Wand. If a recording options file isn't specified through Merlin's Wand, Merlin will use either its default .rec file or the options file that was last loaded into the current instance of Merlin.Note: The .rec file has to be configured and saved in Merlin before it can be specified through Merlin's Wand. Step 1 Share the folder that contains the file.(a) In Windows Explorer or My Computer, navigate to the folder that contains the options file.
82CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand Traffic(b) Right-click on the folder and select Properties, or select File > Properties from the menu bar.The Properties dialog will open.(c) Go to the Sharing tab in the Properties dialog.(d) Enable the “Share this folder” option and make sure that the folder is accessible by both the machine running Merlin and the machine running Merlin's Wand.(e) Click OK.Step 2 Click the Set Recording Options   button.The Open dialog will be displayed.Step 3 Use the Look in field at the top of the dialog box to browse to the desired file via Network Neighborhood-or-In the File name field, type \\ followed by the name of the computer on which the file is located (for example, \\Computer1). Press Enter to display all shared folders, then navigate to the desired file.Note: A full network path must be used in order to specify the options file through Merlin's Wand, whether the file is local to the machine running Merlin or located on a different computer.
 83CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand TrafficStep 4 Click Open.The path and filename of the recording options file will now be listed on the Set Recording Options drop-down menu. By default, that file will be selected, as indicated by the checkmark that appears to the left of the path and filename.8.6 Set Merlin Display OptionsThe display options file [*.opt] that Merlin should use can be specified through Merlin's Wand. If a display options file isn't specified through Merlin's Wand, Merlin will use either its default .opt file or the options file that was last loaded into the current instance of Merlin.Note: The .opt file has to be configured and saved in Merlin before it can be specified through Merlin's Wand. Step 1 Share the folder that contains the file.(a) In Windows Explorer or My Computer, navigate to the folder that contains the options file.(b) Right-click on the folder and select Properties, or select File > Properties from the menu bar.The Properties dialog will open.(c) Go to the Sharing tab in the Properties dialog.(d) Enable the “Share this folder” option and make sure that the folder is accessible by both the machine running Merlin and the machine running Merlin's Wand.(e) Click OK.
84CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand TrafficStep 2 Click the Set Display Options   button.The Open dialog will be displayed.Step 3 Use the Look in field at the top of the dialog box to browse to the desired file via Network Neighborhood-or-In the File name field, type \\ followed by the name of the computer on which the file is located (for example, \\Computer1). Press Enter to display all shared folders, then navigate to the desired file.Note: A full network path must be used in order to specify the options file through Merlin's Wand, whether the file is local to the machine running Merlin or located on a different computer.Step 4 Click Open.The path and filename of the display options file will now be listed on the Set Display Options drop-down menu. By default, that file will be selected, as indicated by the checkmark that appears to the left of the path and filename.8.7 Set Merlin Encryption OptionsMerlin's Wand can set up Merlin to decode encrypted transmissions.Step 1 Open the Encryption Setup dialog by pressing the Set Merlin encryption options   button.
 85CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand TrafficThe Encryption Setup dialog will open.Step 2 Select the Slave Device Address from the drop-down list, or enter it into the combo box.Step 3 Enter the PIN Number for the slave device in the PIN Code text box.orEnter the Link Key for the master-slave connection in the Link Key text box.Step 4 Press the Set button to apply the encryption setup.8.8 Start a Merlin Recording SessionTo begin a Merlin Bluetooth Analyzer recording session, press the Record  button on the Merlin toolbar.8.9 Stop a Merlin Recording SessionTo stop a Merlin Bluetooth Analyzer recording session, press the Stop   button on the Merlin toolbar.8.10 Disconnect from Merlin Bluetooth Protocol AnalyzerTo disconnect from Merlin Bluetooth Protocol Analyzer, click on the Connect/Disconnect   button.Merlin's Wand will disconnect from Merlin.
86CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand Traffic8.11 Troubleshooting“Server Busy” When Attempting to Launch Merlin“Server Busy" message appears when attempting to launch Merlin on a remote Windows 98 or Windows Me system.• Make sure Merlin is running on the remote machine before clicking the Connect/Disconnect Merlin   button in Merlin’s Wand.  Merlin’s Wand cannot start or stop Merlin on a remote Windows 98 or Windows Me system; it can only control Merlin once Merlin is running on the remote machine. • Make sure DCOM is properly installed and configured on the remote machine, as described in the section DCOM Configuration for Windows 98/Me Systems.• If the message box won't go away, close Merlin’s Wand (press Ctrl+Alt+Delete and close the program directly or through the Task Manager).  Then, restart Merlin’s Wand and be sure to start Merlin on the remote machine before retrying the operation.“Server Busy” message appears when attempting to launch Merlin on a remote Windows NT or Windows 2000 system.• This message may appear the first time Merlin is launched on the remote machine.  It can be safely ignored.  Merlin will start normally on the remote machine.  Clicking the “Switch To” button in the message box will cause the message to disappear and the Start menu to appear. Return to Merlin’s Wand and proceed normally.“Server Execution Failed” When Attempting to Launch Merlin“Server execution failed” message appears when attempting to launch Merlin on a remote Windows 98 or Windows Me system.• Make sure Merlin is running on the remote machine before clicking the Connect/Disconnect Merlin button in Merlin’s Wand.“The Object Exporter Specified Was Not Found” When Attempting to Launch Merlin“The object exporter specified was not found” message appears when attempting to launch Merlin from a Windows 2000 system.• If Merlin is already running on the remote machine, try to close it.  If a message appears indicating that an automation client is connected to the application, close Merlin on the remote machine, close Merlin’s Wand on
 87CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand Trafficthe local machine, and try again.  If the problem persists, restart the remote machine.• Make sure the local computer (the Windows 2000 system running Merlin’s Wand) can reach the remote machine by using its full computer name, such as <computername.domain>.  Open a command prompt and use the PING command to determine this.  If the local computer cannot communicate with the remote machine, consult a system administrator for assistance.• If the remote machine is running TCP/IP, make sure it has an assigned IP address.  Consult a system administrator for assistance in determining this and, if necessary, assigning an IP address.
88CATC MERLIN’S WAND 1.22 CHAPTER 8User’s Manual Using Merlin to Record Merlin’s Wand Traffic
 89CATC MERLIN’S WAND 1.22 CHAPTER 9User’s Manual Contact and Warranty Information9.  Contact and Warranty Information9.1  Contact InformationMailing addressComputer Access Technology CorporationCustomer Support2403 Walsh AvenueSanta Clara, CA 95051-1302USAOnline supporthttp://www.catc.com/E-mail addresssupport@catc.comTelephone support+1/800.909.2282 (USA and Canada)+1/408.727.6600 (worldwide)Fax+1/408.727.6622 (worldwide)Sales informationsales@catc.com9.2  Warranty and LicenseComputer Access Technology Corporation (hereafter CATC) warrants this product to be free from defects in material, content, and workmanship, and agrees to repair or replace any part of the enclosed unit that proves defective under these terms and conditions. Parts and labor are warranted for one year from the date of first purchase.The CATC software is licensed for use on a single personal computer. The software may be copied for backup purposes only.This warranty covers all defects in material or workmanship. It does not cover accidents, misuse, neglect, unauthorized product modification, or acts of nature. Except as expressly provided above, CATC makes no warranties or conditions, express, implied, or statutory, including without limitation the implied warranties of merchantability and fitness for a particular purpose.
90CATC MERLIN’S WAND 1.22 CHAPTER 9User’s Manual Contact and Warranty InformationCATC shall not be liable for damage to other property caused by any defects in this product, damages based upon inconvenience, loss of use of the product, loss of time or data, commercial loss, or any other damages, whether special, incidental, consequential, or otherwise, whether under theory of contract, tort (including negligence), indemnity, product liability, or otherwise. In no event shall CATC's liability exceed the total amount paid to CATC for this product.CATC reserves the right to revise these specifications without notice or penalty.
 91CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsAppendix A: Command Generator Command DescriptionsA.1  HCI Command DescriptionsNote “N/A” means Not Applicable. This indicates that the specified command does not have a parameter.HCI Link Control CommandsAccept_Connection_RequestUsed to accept a new incoming connection request. Execute this command before connection request from another device. By default, all connection requests are accepted. Add_SCO_ConnectionWill cause the link manager to create an SCO connection in addition to the existing ACL connection.Command Parameters Examples CommentsN/AReturn EventsAccept_Connection_Request_CompleteCommand Parameters Examples CommentsHCI_Handle 0x0001Packet Type 0x0080 Possible packet types:HV1=0x0020HV2=0x0040HV3=0x0080Return EventsAdd_SCO_Connection_CompleteAdd_SCO_Connection_Error
92CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsAuthentication_RequestedUsed to initiate authentication between the two devices associated with the specified HCI_Handle.Change_Connection_Link_KeyUsed to force both connected devices to generate a new link key.Change_Connection_Packet_TypeUsed to change which packet types can be used for a connection that is currently established.Command Parameters Examples CommentsHCI_Handle 0x0001Return EventsAuthentication_ErrorAuthentication_CompleteCommand Parameters Examples CommentsHCI_Handle 0x0001 Range: 0x0000-0x0EFF Return EventsChange_Connection_Link_Key_ErrorChange_Connection_Link_Key_CompleteCommand Parameters Examples CommentsHCI_Handle 0x0001Packet_Type 0x0008 Range: 0x0000-0x0EFF0x0008 = DM10x0010 = DH10x0400 = DM30x0800 = DH30x4000 = DM50x8000 = DH5Return EventsChange_Connection_Packet_Type_ErrorChange_Connection_Packet_Type_Complete
 93CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsCreate_ConnectionCreate_Connection will cause the link manager to create an ACL connection to the Bluetooth wireless device with the BD_ADDR specified by the command parameters.DisconnectDisconnect is used to terminate an existing connection.Exit_Periodic_Inquiry_ModeExit_Periodic_Inquiry_Mode is used to end the Periodic Inquiry mode when Merlin’s Wand is in Periodic Inquiry mode.InquiryInquiry will cause Merlin’s Wand to enter Inquiry mode and discover other nearby Bluetooth devices.Command Parameters Examples CommentsBD_ADDR 010203040506 Enter in HEX as shown.Return EventsCreate_Connection_CompleteCreate_Connection_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001Return EventsDisconnection_CompleteDisconnection_FailedCommand Parameters Examples CommentsN/AReturn EventsExit_Periodic_Inquiry_Mode_CompleteExit_Periodic_Inquiry_Mode_ErrorCommand Parameters Examples CommentsInquiry_Length 8Num_Responses 10
94CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsInquiry_CancelInquiry_Cancel will cause Merlin’s Wand to stop the current Inquiry if the Bluetooth device is in Inquiry mode.Periodic_Inquiry_ModePeriodic_Inquiry_Mode is used to configure Merlin’s Wand to perform a periodic Inquiry based on a specified period range. Note: Max_Period_Length  > Min_Period_Length > Inquiry Length.Return EventsInquiry_CompleteInquiry_ResultInquiry_ErrorCommand Parameters Examples CommentsN/AReturn EventsInquiry_CanceledInquiry_ErrorCommand Parameters Examples CommentsMax Period Length  10 Range: 0x03 – 0xFFFFMin Period Length 9 Range: 0x02 – 0xFFFEInquiry Length 8 Range: 0x01 – 0x30Num of Responses 10 Range: 0-255 (0=Unlimited number of responses)Return EventsPeriodic_Inquiry_Mode_CompletePeriodic_Inquiry_Mode_Error
 95CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsPIN_Code_Request_Negative_ReplyPIN_Code_Request_Negative_Reply is used to reply to a PIN Code Request event from the Host Controller when the Host cannot specify a PIN code to use for a connection. This command should be executed before PIN_Code_Request event is received. By default, the PIN_Code_Request event is rejected.PIN_Code_Request_ReplyPIN_Code_Request_Reply is used to reply to a PIN Code Request event from the Host Controller and specifies the PIN code to use for a connection. This command should be executed before Pin_Code Request event is received. By default, the Pin_Code Request event is rejected.Read_Clock_OffsetRead_Clock_Offset allows the Host to read the clock offset of remote devices.Command Parameters Examples CommentsBD_ADDR 0x010203040506Return EventsCommand_CompleteCommand Parameters Examples CommentsPIN_Code 1234 PIN_Code is a string character that can be up to 128 bits in lengthBD_ADDR 0x010203040506Return EventsCommand_CompleteCommand Parameters Examples CommentsHCI_Handle 0x0001Return EventsRead_Clock_Offset_CompleteRead_Clock_Offset_ErrorPIN_Code_Request_Negative_ReplyPIN_Code_Request_Negative_Reply is used to reply to a PIN Code Request event from the Host Controller when the Host cannot specify a PIN code to use for a connection. This command should be executed before PIN_Code_Request event is received. By default, the PIN_Code_Request event is rejected.PIN_Code_Request_ReplyPIN_Code_Request_Reply is used to reply to a PIN Code Request event from the Host Controller and specifies the PIN code to use for a connection. This command should be executed before Pin_Code Request event is received. By default, the Pin_Code Request event is rejected.Read_Clock_OffsetRead_Clock_Offset allows the Host to read the clock offset of remote devices.Command Parameters Examples CommentsBD_ADDR 0x010203040506Return EventsCommand_CompleteCommand Parameters Examples CommentsPIN_Code 1234 PIN_Code is a string character that can be up to 128 bits in lengthBD_ADDR 0x010203040506Return EventsCommand_CompleteCommand Parameters Examples CommentsHCI_Handle 0x0001Return EventsRead_Clock_Offset_CompleteRead_Clock_Offset_Error
96CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsRead_Remote_Supported_FeaturesRead_Remote_Supported_Features requests a list of the supported features of a remote device.Read_Remote_Version_InformationRead_Remote_Version_Information command will read the values for the version information for the remote Bluetooth device.Reject_Connection_RequestReject_Connection_Request is used to decline a new incoming connection request. Execute this command before connection request from another device. By default, all connection requests are accepted.Remote_Name_RequestRemote_Name_Request is used to obtain the user-friendly name of another Bluetooth device.The BD_ADDR command parameter is used to identify the device for which the user-friendly name is to be obtained. The Page_Scan_Repetition_Mode and Page_Scan_Mode command parameters specify the page scan modes supported by the remote device with the BD_ADDR. This is the information that was acquired during the inquiry Command Parameters Examples CommentsHCI_Handle 0x0001Return EventsRead_Remote_Supported_Features_CompleteRead_Remote_Supported_Features_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001Return EventsRead_Remote_Version_Information_CompleteRead_Remote_Version_Information_ErrorCommand Parameters Examples CommentsN/AReturn EventsReject_Connection_Request_Complete
 97CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command Descriptionsprocess. The Clock_Offset parameter is the difference between its own clock and the clock of the remote device with BD_ADDR. Only bits 2 through 16 of the difference are used and they are mapped to this parameter as bits 0 through 14 respectively. A Clock_Offset_Valid_Flag, located in bit 15 of the Clock_Offset command parameter, is used to indicate if the Clock Offset is valid or not.Set_Connection_EncryptionSet_Connection_Encryption is used to enable and disable the link-level encryption.Command Parameters Examples CommentsBD ADDR 0x010203040506Page Scan Rep Mode 0x0 0x00=R0; 0x01=R1; 0x02=R2Page Scan Mode 0x0 0x00=Mandatory Page Scan Mode0x01=Optional Page Scan Mode I0x02=Optional Page Scan Mode II0x03=Optional Page Scan Mode IIIClock Offset 0x0 Bit Format:Bit 14.0 = Bit 16.2 of                  CLKslave -                 CLKmaster.Bit 15 = Clock_Offset_Valid_Flag    where0= Invalid Clock Offset1=Valid Clock OffsetReturn EventsRemote_Name_Request_CompleteRemote_Name_Request_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001Encryption_Enable 1 Range: 0 or 1Return EventsSet_Connection_Encryption_CompleteSet_Connection_Encryption_Error
98CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsHCI Link Policy CommandsExit_Park_ModeStops park mode and enters active mode for the specified ACL link.Exit_Sniff_ModeStops Sniff mode and enters active mode for the specified ACL link.Hold_ModePlaces the specified ACL link into Hold Mode.Park_ModePlaces the specified ACL link into Park mode.Command Parameters Examples CommentsHCI_Handle 0x0001Return EventsMode_ChangeExit_Park_Mode_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001Return EventsMode_ChangeExit_Sniff_Mode_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001Max_Interval 0xFFFF 0x0001 - 0xFFFFMin_Interval 0x01 0x0001 - 0xFFFFReturn EventsMode_ChangeHold_Mode_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001Beacon_Max_Interval 0xFFFF 0x0001 - 0xFFFFBeacon_Min_Interval 0x01 0x0001 - 0xFFFF
 99CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsQoS_SetupUsed to specify Quality of Service parameters for a connection handle.Read_Link_Policy_SettingsReads Link Policy setting for the specified ACL link.Role_DiscoveryDescription:Role_Discovery is used for a Bluetooth device to determine which role the device is performing (Master or Slave) for a particular connection.Return EventsMode_ChangePark_Mode_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001ServiceType 0x01 0=No traffic; 1=Best effort;2=GuaranteedTokenRate 0 Token rate in Bytes/secondPeakBandwidth 0 Bytes per secondLatency 0xFFFFFFFF In microsecondsDelayVariation 0xFFFFFFFF In microsecondsReturn EventsQuality_of_Service_Setup_CompleteQuality_of_Service_Setup_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001Return EventsRead_Link_Policy_Settings_CompleteRead_Link_Policy_Settings_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001
100CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsSniff_ModePlaces the specified ACL link into Sniff mode.Switch_RoleSwitches the current role (master/slave) of the calling device with the role of the device specified.Write_Link_Policy_SettingsWrites link policy settings for the specified ACL link.Return EventsRole_Discovery_CompleteRole_Discovery_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001Max_Interval 0xFFFF 0x0001 - 0xFFFFMin_Interval 0x01 0x0001 - 0xFFFFAttempt 0x3FF6 0x0001 - 0x7FFFTimeout 0x7FFF 0x0000 - 0x7FFFReturn EventsMode_ChangeSniff_Mode_ErrorCommand Parameters Examples CommentsBD_ADDR 0x010203040506Return EventsRole_Change_CompleteRole_Change_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001Link_Policy_Settings 0xF 0x0000: Disable all LM modes0x0001: Enable master/slave switch0x0002: Enable Hold Mode0x0004: Enable Sniff Mode0x0008: Enable Park Mode0xF: Enable all (Default)
 101CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsHCI Host Controller & Baseband CommandsChange_Local_NameChange_Local_Name allows the user-friendly name to be modified for the Merlin’s Wand.Delete_Stored_Link_KeyDelete_Stored_Link_Key removes one or all link keys stored in the Merlin’s Wand.Return EventsWrite_Link_Policy_Settings_CompleteWrite_Link_Policy_Settings_ErrorCommand Parameters Examples CommentsName Merlin’s Wand Maximum string length =32 charactersReturn EventsChange_Local_Name_CompleteChange_Local_Name_ErrorCommand Parameters Examples CommentsBD_ADDR 0x010203040506Delete_All_Flag 01 00=Delete only the Link Key for specified BD_ADDR01=Delete all stored Link KeysReturn EventsDelete_Stored_Link_Key_CompleteDelete_Stored_Link_Key_Error
102CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsHost_Buffer_SizeUsed by the Merlin’s Wand to notify the Merlin’s Wand Host Controller about its buffer sizes for ACL and SCO data. The Merlin’s Wand Host Controller will segment the data to be transmitted from the Host Controller to Merlin’s Wand, so that data contained in HCI Data Packets will not exceed these sizes.Read_Authentication_EnableRead_Authentication_Enable will read the value for the Authentication_Enable parameter, which controls whether Merlin’s Wand will require authentication for each connection with other Bluetooth devices.Read_Class_of_DeviceRead_Class_of_Device will read the value for the Class_of_Device parameter for Merlin’s Wand, which is used to indicate its capabilities to other devices.Command Parameters Examples CommentsACL_Data_Length 0x2A0 Only ACL is validSCO_Data_Length 0xFF The value of the Host_SCO_Data_Packet_Length must be > 399Total_Num_ACL 10Total_Num_SCO 0xFFReturn EventsHost_Buffer_Size_CompleteHost_Buffer_Size_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_Authentication_Enable_CompleteRead_Authentication_Enable_ErrorCommand Parameters Examples CommentsN/A
 103CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsRead_Connection_Accept_TimeoutRead_Connection_Accept_Timeout will read the value for the Connection_Accept_Timeout parameter so that Merlin’s Wand can automatically deny a connection request after a specified period has occurred, and to refuse a new connection.Read_Current_IAC_LAPRead_Current_IAC_LAP will read the LAP(s) used to create the Inquiry Access Codes (IAC) that Merlin’s Wand is simultaneously scanning for during Inquiry Scans.Read_Encryption_ModeRead_Encryption_Mode will read the value for the Encryption_Mode parameter, which controls whether Merlin’s Wand will require encryption for each connection with other Bluetooth devices.Return EventsRead_Class_of_Device_CompleteRead_Class_of_Device_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_Connection_Accept_Timeout_CompleteRead_Connection_Accept_Timeout_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_Current_IAC_LAP_CompleteRead_Current_IAC_LAP_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_Encryption_Mode_CompleteRead_Encryption_Mode_Error
104CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsRead_Link_Supervision_TimeoutReads link supervision timeout setting for the specified ACL link.Read_Local_NameRead_Local_Name reads the stored user-friendly name for Merlin’s Wand.Read_Number_Of_Supported_IACThis command will read the value for the number of Inquiry Access Codes (IAC) that Merlin’s Wand can simultaneously listen for during an Inquiry Scan.Read_Page_Scan_ModeRead_Page_Scan_Mode command is used to read the current Page_Scan_Mode of Merlin’s Wand.Command Parameters Examples CommentsHCI_Handle 0x0001Return EventsRead_Link_Supervision_Timeout_CompleteRead_Link_Supervision_Timeout_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_Local_Name_CompleteRead_Local_Name_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_Number_Of_Supported_IAC_CompleteRead_Number_Of_Supported_IAC_ErrorCommand Parameters Examples CommentsN/A
 105CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsRead_Page_Scan_Period_ModeRead_Page_Scan_Period_Mode is used to read the Page_Scan_Period_Mode of Merlin’s Wand.Read_Page_TimeoutRead_Page_Timeout will read the value for the Page_Reply_Timeout configuration parameter, which allows Merlin’s Wand to define the amount of time a connection request will wait for the remote device to respond before the local device returns a connection failure.Read_PIN_TypeRead_PIN_Type will read the PIN type specified in the host controller of Merlin’s Wand.Return EventsRead_Page_Scan_Mode_CompleteRead_Page_Scan_Mode_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_Page_Scan_Period_Mode_CompleteRead_Page_Scan_Period_Mode_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_Page_Timeout_CompleteRead_Page_Timeout_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_PIN_Type_CompleteRead_PIN_Type_Error
106CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsRead_Scan_EnableRead_Scan_Enable will read the value for the Scan_Enable configuration parameter, which controls whether or not Merlin’s Wand will periodically scan for page attempts and/or inquiry requests from other Bluetooth devices.Read_SCO_Flow_Control_EnableThe Read_SCO_Flow_Control_Enable command provides the ability to read the SCO_Flow_Control_Enable setting. By using this setting, Merlin can decide if the Merlin’s Wand Host Controller will send Number Of Completed Packets events for SCO HCI_Handles.Read_Stored_Link_KeyRead_Stored_Link_Key will read one or all link keys stored in the Merlin’s Wand Host Controller.Command Parameters Examples CommentsN/AReturn EventsRead_Scan_Enable_CompleteRead_Scan_Enable_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_SCO_Flow_Control_Enable_CompleteRead_SCO_Flow_Control_Enable_ErrorCommand Parameters Examples CommentsBD_ADDR 0x010203040506Read_All_Flag 01 00=Return Link Key for specified BD_ADDR01=Return all stored Link KeysReturn EventsRead_Stored_Link_Key_CompleteRead_Stored_Link_Key_Error
 107CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsRead_Voice_SettingRead_Voice_Setting will read the values for the Voice_Setting parameter in Merlin’s Wand, which controls all the various settings for the voice connections.ResetResets the Bluetooth Host Controller, Link Manager, and the radio module of Merlin’s Wand. After executing this command, the application has to be restarted.Set_Event_FilterSet_Event_Filter is used by the Host to specify different event filters. The Host may issue this command multiple times to request various conditions for the same type of event filter and for different types of event filters.Command Parameters Examples CommentsN/AReturn EventsRead_Voice_Setting_CompleteRead_Voice_Setting_ErrorCommand Parameters Examples CommentsN/A Will reset to default values for the parametersReturn EventsReset_CompleteCommand Parameters Examples CommentsFilterType 0x00 0x00=Clear All Filters0x01=Inquiry Result0x02=Connection SetupFilterConditionType 0x00 0x00=New device responded to the Inquiry process0x01= Device with a specific Class of Device responded to the Inquiry process.0x02=Device with specific BD_ADDR responded to the Inquiry process.
108CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsSet_Event_MaskSet_Event_Mask is used to control which events are generated by the HCI for the Host.Condition 0x01 0x00=Allow Connections from all devices0x01=Allow Connections from a device with a specific Class of Device0x02=Allow Connections from a device with a specific BD_ADDRReturn EventsSet_Event_Filter_CompleteSet_Event_Filter_ErrorCommand Parameters Examples CommentsEvent_Mask NO_EVENTS                          0x0000INQUIRY_RESULT                0x0001INQUIRY_COMPLETE        0x0002INQUIRY_CANCELED        0x0004LINK_CONNECT_IND        0x0008SCO_CONNECT_IND          0x0010LINK_DISCONNECT           0x0020LINK_CONNECT_CNF        0x0040LINK_CON_RESTRICT       0x0080MODE_CHANGE                  0x0100ACCESSIBLE_CHANGE      0x0200AUTHENTICATED               0x0400ENCRYPTION_CHANGE    0x0800SECURITY_CHANGE          0x1000ROLE_CHANGE                   0x2000SCO_DISCONNECT             0x4000SCO_CONNECT_CNF          0x8000ALL_EVENTS                        0xffffReturn EventsSet_Event_Mask_CompleteSet_Event_Mask_ErrorCommand Parameters Examples Comments
 109CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsWrite_Authentication_EnableThis command will write the value for the Authentication_Enable parameter, which controls whether Merlin’s Wand will require authentication for each connection with other Bluetooth devices.Write_Class_of_DeviceWrite_Class_of_Device will write the value for the Class_of_Device parameter, which is used to indicate its capabilities to other devices.Command Parameters Examples CommentsAuthentication_Enable 0x0 0x00=Authentication disabled. Default0x01=Authentication enabled for all connectionReturn EventsWrite_Authentication_Enable_CompleteWrite_Authentication_Enable_ErrorCommand Parameters Examples CommentsCoD 0x000000 Class of Device for the deviceReturn EventsWrite_Class_of_Device_CompleteWrite_Class_of_Device_Error
110CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsWrite_Connection_Accept_TimeoutWrite_Connection_Accept_Timeout will write the value for the Connection_Accept_Timeout configuration parameter, which allows Merlin’s Wand to automatically deny a connection request after a specified period has occurred, and to refuse a new connection.Write_Current_IAC_LAPWill write the LAP(s) used to create the Inquiry Access Codes (IAC) that the local Bluetooth device is simultaneously scanning for during Inquiry Scans.Command Parameters Examples CommentsTimeout 0x00 Connection Accept Timeout measured in Number of Baseband slots.Interval Length = N * 0.625 msec (1 Baseband slot)Range for N: 0x0001 – 0xB540Time Range: 0.625 msec - 29 secondsDefault: N = 0x1FA0 Time = 5 SecReturn EventsWrite_Connection_Accept_Timeout_CompleteWrite_Connection_Accept_Timeout_ErrorCommand Parameters Examples CommentsIAC_LAP 0x9E8B33 0x9E8B00-0x9E8B3FIAC_LAP 0x9E8B00-0x9E8B3FIAC_LAP 0x9E8B00-0x9E8B3FIAC_LAP 0x9E8B00-0x9E8B3FIAC_LAP 0x9E8B00-0x9E8B3FIAC_LAP 0x9E8B00-0x9E8B3FReturn EventsWrite_Current_IAC_LAP_CompleteWrite_Current_IAC_LAP_Error
 111CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsWrite_Encryption_ModeWrite_Encryption_Mode command will write the value for the Encryption_Mode parameter, which controls whether Merlin’s Wand will require encryption for each connection with other Bluetooth devices.Write_Link_Supervision_TimeoutWrites link supervision timeout setting for the specified ACL link.Command Parameters Examples CommentsEncryption Mode 0x0 0x00=Encryption disabled. Default0x01=Encryption only for point-to-point packets0x02=Encryption for both point-to-point and broadcast packetsReturn EventsWrite_Encryption_Mode_CompleteWrite_Encryption_Mode_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001Timeout 0x7D00 0x0001 - 0xFFFFReturn EventsWrite_Link_Supervision_Timeout_CompleteWrite_Link_Supervision_Timeout_Error
112CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsWrite_Page_TimeoutWrite_Page_Timeout command will write the value for the Page_Reply_Timeout configuration parameter, which allows Merlin’s Wand to define the amount of time a connection request will wait for the remote device to respond before the local device returns a connection failure.Write_PIN_TypeWrite_PIN_Type will specify whether the Host supports variable PIN or only fixed PINs.Command Parameters Examples CommentsTimeout 0x10 0=Illegal Page Timeout. Must be larger than 0N = 0xXXXX Page Timeout measured in Number of Baseband slots.Interval Length = N * 0.625 msec (1 Baseband slot)Range for N: 0x0001 – 0xFFFFTime Range: 0.625 msec -40.9 SecondsDefault: N = 0x2000 Time = 5.12 SecReturn EventsWrite_Page_Timeout_CompleteWrite_Page_Timeout_ErrorCommand Parameters Examples CommentsPIN_Type 0 0x00=Variable PIN0x01=Fixed PINReturn EventsWrite_PIN_Type_CompleteWrite_PIN_Type_Error
 113CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsWrite_Scan_EnableThe Write_Scan_Enable command will write the value for the Scan_Enable configuration parameter into Merlin’s Wand, which controls whether or not Merlin’s Wand will periodically scan for page attempts and/or inquiry requests from other Bluetooth devices.Write_Stored_Link_KeyWrite_Stored_Link_Key command will write a link key to the Merlin’s Wand host controller.Write_Voice_SettingThe Write_Voice_Setting command will write the values for the Voice_Setting parameter into Merlin’s Wand, which controls all the various as settings for the voice connections. Command Parameters Examples CommentsScan_Enable 3 0x00=No Scans enabled. 0x01=Inquiry Scan enabled Page Scan disabled.0x02=Inquiry Scan disabled. Page Scan enabled.0x03=Inquiry Scan enabled Page Scan enabled. (Default)Return EventsWrite_Scan_Enable_CompleteWrite_Scan_Enable_ErrorCommand Parameters Examples CommentsBD_ADDR 0x010203040506Link_Key 0x01020304Return EventsWrite_Stored_Link_Key_CompleteWrite_Stored_Link_Key_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001Voice_Setting 0x0062 0x0060=CVSD coding 0x0061=u-Law coding0x0062=A-law coding
114CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsHCI Informational CommandsRead_BD_ADDRRead_BD_ADDR will read the value of Merlin’s Wand’s address. The BD_ADDR is a 48-bit unique identifier for a Bluetooth device.Read_Buffer_SizeRead_Buffer_Size returns the size of the HCI buffers in Merlin’s Wand. These buffers are used by Merlin’s Wand’s Host Controller to buffer data that is to be transmitted.Read_Country_CodeRead_Country_Code command will read the value for the Country_Code status parameter in Merlin’s Wand. The Country_Code defines which range of frequency band of the ISM 2.4 GHz band will be used by the device.Return EventsWrite_Voice_Setting_CompleteWrite_Voice_Setting_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_BD_ADDR_CompleteRead_BD_ADDR_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_Buffer_Size_CompleteRead_Buffer_Size_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_Country_Code_CompleteRead_Country_Code_Error
 115CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsRead_Local_Supported_FeaturesRead_Local_Supported_Features will request a list of the supported features for Merlin’s Wand.Read_Local_Version_InformationRead_Local_Version_Information command will read the values for the version information for Merlin’s Wand.HCI Testing CommandsEnable_Device_Under_Test_ModeThe Enable_Device_Under_Test_Mode command will allow Merlin’s Wand to enter test mode via LMP test commands. Merlin’s Wand issues this command when it wants to become the DUT for the Testing scenarios as described in the Bluetooth Test Mode.Command Parameters Examples CommentsN/AReturn EventsRead_Local_Supported_Features_CompleteRead_Local_Supported_Features_ErrorCommand Parameters Examples CommentsN/AReturn EventsRead_Local_Version_Information_CompleteRead_Local_Version_Information_ErrorCommand Parameters Examples CommentsN/AReturn EventsEnable_Device_Under_Test_Mode_CompleteEnable_Device_Under_Test_Mode_Error
116CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsRead_Loopback_ModeRead_Loopback_Mode will read the value for the setting of the Merlin’s Wand Host Controller’s Loopback_Mode. The setting of the Loopback_Mode will determine the path of information.Write_Loopback_ModeThe Write_Loopback_Mode will write the value for the setting of the Host Controller’s Loopback_Mode into Merlin’s Wand. CATC-Specific HCI CommandsCATC_BER_TestThis command will measure Bit Error Rate (BER) when fully loaded DH1, DH3, DH5, DM1, DM3 or DM5 packets are sent from master to slave on the link. Command Parameters Examples CommentsN/AReturn EventsRead_Loopback_Mode_CompleteRead_Loopback_Mode_ErrorCommand Parameters Examples CommentsLoopback_Mode 0 0x00=No Loopback mode enabled. Default0x01=Enable Local Loopback0x02=Enable Remote LoopbackReturn EventsWrite_Loopback_Mode_CompleteWrite_Loopback_Mode_ErrorCommand Parameters Examples CommentsHCI_HandleNumber_Of_Packets 0000 0x0000=Unlimited number of packets will be sent0x0001=0xFFFF number of packets will be sent
 117CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsCATC_Change_Headset_GainControls the gain of the microphone or speaker of the headset. CATC_Read_Headset_GainReads the gain of the microphone or speaker of the headset. BER_Packet_Type 03 0x00=DH10x01=DH30x02=DH50x03=DM10x04=DM30x05=DM5Test_Data_Type 00 0x00=Send PBRS (same as in Bluetooth test mode)0x01=Every octet that is sent equals Test_DataTest_Data FF Data to sendBER_Interval 10 A packet is sent every BER_Interval frameReturn EventsCATC_BER_Test_CompleteCATC_BER_Test_ErrorCommand Parameters Examples CommentsDevice “Speaker” “Microphone” or “Speaker” (“Speaker” is default)Gain 0 0x00 - 0x0FReturn EventsCATC_Change_Headset_Gain_CompleteCATC_Change_Headset_Gain_ErrorCommand Parameters Examples CommentsDevice “Speaker” “Microphone” or “Speaker” (“Speaker” is default)Return EventsCATC_Read_Headset_Gain_CompleteCATC_Read_Headset_Gain_ErrorCommand Parameters Examples Comments
118CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsCATC_Read_Revision_InformationMerlin’s Wand uses this command to read the revision number of the Merlin’s Wand baseband controller. CATC_Self_TestThis command will perform self-test of Merlin’s Wand.CATC_Write_Country_CodeWrites the value of the Country_Code. Note: this command will not take effect until the device is reset.A.2  Other HCI Events Command Parameters Examples CommentsN/AReturn EventsCATC_Read_Revision_Information_CompleteCATC_Read_Revision_Information_ErrorCommand Parameters Examples CommentsN/AReturn EventsCATC_Self_Test_CompleteCATC_Self_Test_ErrorCommand Parameters Examples CommentsCountry_Code 0x00 0x00 North America and Europe (default)0x01 FranceReturn EventsCATC_Write_Country_Code_CompleteCATC_Write_Country_Code_ErrorEventsCommand_CompletePIN_Code_RequestParing_Complete
 119CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsA.3  L2CAP Command DescriptionsConfigurationResponseResponse to an incoming configuration request.ConfigurationSetupSets L2CAP connection options.Encryption_ChangeDisconnect_CompleteLink_Key_Request_CompleteCommand Parameters Examples CommentsReason “Accept” “Accept” (Default)“Reject”“Reject - unacceptable params”“Reject - unknown options”Return EventsConfigurationResponse_CompleteCommand Parameters Examples CommentsServiceType 0x01TokenRate 0x00TokenBucketSize 0x00PeakBandWidth 0x00Latency 0xFFFFFFFFDelayVariation 0xFFFFFFFFReturn EventsConfigurationSetup_CompleteErrorEvents
120CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsConnectRequestRequests establishment of an L2CAP channel in the remote Bluetooth device.ConnectResponseIndicates the response to the incoming connection request.This command should be executed before Connection Request. DeregisterPsmDeregisters the specified PSM.DisconnectRequestRequests the disconnection of the specified L2CAP channel.Command Parameters Examples CommentsHCI_Handle 0x0001PSM 0x1001Receive MTU 0x1B6Return EventsConnection_CompleteConnection_FailedCommand Parameters Examples CommentsResponse Accept (Default)Reject_PendingReject_PSM_Not_SupportedReject_Security_BlockReject_No_ResourcesReturn EventsConnectResponse_CompleteCommand Parameters Examples CommentsPSM 0x1001Return EventsDeregisterPsm_CompleteDeregisterPsm_FailedCommand Parameters Examples CommentsCID 0x0040
 121CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsEchoRequestSends an Echo Request over the L2CAP channel.InfoRequestSends an Info Request over the L2CAP channel. Info requests are used to exchange implementation-specific information regarding L2CAP’s capabilities.RegisterPsmRegisters a PSM identifier with L2CAP. Once registered, the protocol can initiate connections and data transfers as well as receive connection requests and data.Return EventsDisconnection_CompleteDisconnection_FailedCommand Parameters Examples CommentsHCI_Handle 0x0001Data “echo”Return EventsEchoRequest_CompleteEchoRequest_FailedCommand Parameters Examples CommentsHCI_Handle 0x0001Return EventsInfoRequest_CompleteInfoRequest_FailedCommand Parameters Examples CommentsPSM 0x1001Receive MTU 0x1B6Return EventsRegisterPsm_CompleteRegisterPsm_Failed
122CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsSendDataSends data on the specified L2CAP channel.A.4  Other L2CAP EventsA.5  SDP Command DescriptionsAddProfileServiceRecordThis command will add a pre-defined Service Record according to one of the Bluetooth wireless technology profiles to the SDP database.Command Parameters Examples CommentsCID 0x0040Data Pipe “Pipe1” Data_Pipe should be created in the Data Transfer Manager.Return EventsSendData_CompleteSendData_FailedEventsConnection_IndicationDisconnection_IndicationData_IndicationWrite_Configuration_CompleteCommand_CompleteErrorCommand Parameters Examples CommentsProfile HeadSet The following are values of the Profile parameter:HeadsetAudioGatewayHeadsetSerialPortDialupFaxLANFileTransferObjectPushSyncSyncCommandInterComCordless
 123CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsAddServiceRecordThis command will add a pre-defined Service Record according to one of the Bluetooth wireless technology profiles to the SDP database.ProfileServiceSearchThis command will search for support of one of the Bluetooth wireless technology profiles.ServerChannel 0x01 Server channel has to be entered for all profiles except for InterCom and Cordless.Return EventsAddProfileServiceRecord_CompleteAddProfileServiceRecord_ErrorCommand Parameters Examples CommentsFilename “C:/Records.sdp” Click the “...” button to choose a file. Choosing a file will automatically load the records within that file, and those record names will be in the drop-down for Record Name.Record Name “FTP Test Record” Record Names loaded from the Filename file will be in the drop-down for this parameter.ServerChannel To leave the server channel as is, enter 0 or leave this blank.Return EventsAddServiceRecord_CompleteAddServiceRecord_FailedCommand Parameters Examples CommentsHCI_Handle 0x0001Command Parameters Examples Comments
124CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsRequestServiceAttributeThis command will retrieve specific attribute values from a specific service record. The Service Record Handle from a specific Service Record and a list of AttributeIDs to be retrieved from that Service Record are supplied as parameters. Up to three AttributeIDs can be searched in one request. Service Record Handle is usually retrieved by using RequestServiceSearch command.Profile HeadSet The following are values of the Profile parameter:HeadsetAudioGatewayHeadsetSerialPortDialupFaxLANFileTransferObjectPushSyncSyncCommandInterComCordlessReturn EventsProfileServiceSearch_CompleteProfileServiceSearch_FailedCommand Parameters Examples CommentsHCI_Handle 0x0001ServiceRecordHandle 0x00010000AttributeID 0x1108 You can specify between 0 and 3 AttributeIDs.AttributeID 0x1203AttributeIDReturn EventsRequestServiceAttribute_ResponseSearch_FailedCommand Parameters Examples Comments
 125CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsRequestServiceSearchThis command will locate Service Records that match the ServiceSearch Pattern of Service Class IDs. The SDP server will return all Service Record Handles of Service Records that match the given Service Search Pattern. Up to three ServiceClassIDs can be searched in one request.RequestServiceSearchAttributeThis command combines the capabilities of the RequestServiceAttribute and RequestServiceSearch into a single request. This command will retrieve all Attribute values that match the ServiceSearch pattern.ResetDatabaseThis command will remove all Service Records from the database in Merlin’s Wand. Command Parameters Examples CommentsHCI_Handle 0x0001ServiceClassID 0x1204 Between 0 and 3 Service Class IDs can be specified.ServiceClassID 0x1110ServiceClassID 0x1000Return EventsRequestServiceSearch_ResponseSearch_FailedCommand Parameters Examples CommentsHCI_HandleServiceClassID Note that all Attributes are requested since a range of 0x0000-0xFFFF is specified by default.ServiceClassIDServiceClassIDReturn EventsRequestServiceSearchAttribute_ResponseSearch_FailedCommand Parameters Examples CommentsN/A
126CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsA.6  RFCOMM Command DescriptionsAcceptChannelThis command will accept or reject incoming request to open an RFCOMM channel from RFCOMM server. This command should be executed before RFCOMM connection request from another device. By default, all connection requests are accepted.AcceptPortSettingsThis command will accept or reject PortSettings received during RequestPortSettings event. This command should be executed before PortSettings request from another device. By default, all requests are accepted. AdvanceCreditAdvances a specified number of credits to a particular RFCOMM connection. Return EventsResetDatabase_CompleteResetDatabase_FailedCommand Parameters Examples CommentsAccept TRUE (Values: TRUE/FALSE)Return EventsAcceptChannel_CompleteCommand Parameters Examples CommentsAccept TRUE (Values: TRUE/FALSE)Return EventsAcceptPortSettings_CompleteCommand Parameters Examples Comments(HCI / DLCI) (0x0001, 0x02)Credit 20 Number of credits to advance
 127CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsCloseClientChannelThis command will close an established RFCOMM channel between Merlin’s Wand and a remotely connected device.CreditFlowEnabledThis command is used to check if credit-based flow control has been negotiated for the current RFCOMM session.DeregisterServerChannelDeregisters an RFCOMM server channel.Return EventsAdvanceCredit_CompleteAdvanceCredit_ErrorCommand Parameters Examples Comments(HCI/DLCI) (0x0001, 0x02) The DLCI value is returned by the OpenClientChannel commandReturn EventsCloseClientChannel_CompleteCloseClientChannel_ErrorCommand Parameters Examples Comments(HCI/DLCI) (0x0001, 0x02) The DLCI value is returned by the OpenClientChannel commandReturn EventsCreditFlowEnabled_CompleteCommand Parameters Examples CommentsServerChannel 0x01 ServerChannel must first be registered via RegisterServerChannel command.Return EventsDeregisterServerChannel_CompleteDeregisterServerChannel_Error
128CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsOpenClientChannelThis command will open an RFCOMM channel.RegisterServerChannelThis command will register ServerChannel with an RFCOMM server so that the server can respond to incoming OpenClientChannel requests.RequestPortSettingsThis command will request a change to the current PortSettings.Command Parameters Examples CommentsHCI_Handle 0x0001ServerChannel 0x01 Range: 1-30MaxFrameSize 0x7F Range: 23-32767 Default is 127Credit 0x20 The number of frames that the sender has availableReturn EventsOpenClientChannel_CompleteOpenClientChannel_FailedCommand Parameters Examples CommentsN/AReturn EventsRegisterServerChannel_CompleteRegisterServerChannel_ErrorCommand Parameters Examples Comments(HCI/DLCI) (0x0001, 0x02) For values, see below.BaudRate 9600DataFormat 0x02FlowControl 0x00Xon 0x11Xoff 0x13Return EventsRequestPortSettings_CompleteRequestPortSettings_Failed
 129CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsParameter Values:•BaudRate: Specifies the baud rate. Note that the baud rate setting does not actually affect RFCOMM throughput.Values: 2400, 4800, 7200, 9600, 19200, 38400, 57600, 115200, 230400•DataFormat: The following values identify the number of data bits.Valu es:  0x00 -- DATA_BITS_50x02 -- DATA_BITS_60x01 -- DATA_BITS_70x03 -- DATA_BITS_8•Flow Control:Valu e s:0x00 -- FLOW_CTRL_NONE0x01 -- XON_ON_INPUT0x02 -- XON_ON_OUTPUT0x04 -- RTR_ON_INPUT0x08 -- RTR_ON_OUTPUT0x10 -- RTC_ON_INPUT0x20 -- RTC_ON_OUTPUTXon:Value: Default Xon char -- 0x11•Xoff:Value: Default Xoff char -- 0x13RequestPortStatusThis command will request the status of the PortSettings for the remote device.SendDataCauses Merlin’s Wand to send data by pipe value to remote device over the specified channel. Command Parameters Examples Comments(HCI/DLCI) (0x0001, 0x02)Return EventsRequestPortStatus_CompleteRequestPortStatus_ErrorCommand Parameters Examples Comments(HCI/DLCI) (0x0001, 0x02)
130CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsSendTestThis command causes Merlin’s Wand to sent a test frame to a remote device over the specified channel.SetLineStatusThis command will send the LineStatus command to the remote device. It allows the RFCOMM user to communicate overrun framing and parity errors to the remote device.Data Pipe Pipe1 Data Pipe should be created in the Data Transfer ManagerReturn EventsSendData_CompleteSendData_FailedCommand Parameters Examples Comments(HCI/DLCI) (0x0001, 0x02)Return EventsSendTest_CompleteSendTest_FailedCommand Parameters Examples Comments(HCI/DLCI) (0x0001, 0x02) LineStatus Values:LineStatus 0x0F 0x01 -- Set to indicate an error.0x02 -- Set to indicate an overrun error.0x04 -- Set to indicate a parity error.0x08 -- Set to indicate a framing error.Return EventsSetLineStatus_CompleteSetLineStatus_FailedCommand Parameters Examples Comments
 131CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsSetModemStatusThis command will send the ModemStatus to the remote device. It allows the user to send Flow Control and V.24 signals to the remote device.SendATCommandThis command will send a selected AT command. Command Parameters Examples Comments(HCI/DLCI) (0x0001, 0x02)ModemSignals 0x8C Modem Signal Values:0x8c - Ready to communicate, ready to receive, and data valid0x02 (FLOW) - Set when sender is unable to receive frames0x04 (RTC) - Set when sender is ready to communicate.0x08 (RTR) - Set when sender is ready to receive data.0x40 (IC) - Set when a call is incoming.0x80 (DV) - Set when valid data is being sent.BreakLength 0x00 0-15 indicates the length of the break signal in 200ms units.0 indicates no break signal.Return EventsSetModemStatus_CompleteSetModemStatus_FailedCommand Parameters Examples Comments(HCI/DLCI) (0x0001, 0x02)AT_Command RING Values:AT + CKPD = 200: Headset Button pressed. AT + VGM = 1: Microphone gain.+VGM = 1: Microphone gain 1.RINGOKERRORBUSYCONNECTNO_CARRIERNO_DIAL_TONE
132CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsA.7  Other RFCOMM Events A.8  TCS Command DescriptionsRegisterIntercomProfileRegisters an Intercom identifier with TCS. Once registered, the protocol can initiate connections as well as receive connection requests.Open_TCS_ChannelThis command opens an L2CAP channel with TCS PSM and initializes a TCS state machine into NULL state. Return EventsSend_AT_Command_CompleteSend_AT_Command_ErrorEventsOpenClientChannel_RequestCloseClientChannel_IndicationData_IndicationPortNegotiation_IndicationRequestPortStatus_IndicationModemStatus_IndicationLineStatus_IndicationFlow_Off_IndicationFlow_On_IndicationCommand Parameters Examples CommentsN/AReturn EventsRegister_Intercom_Profile_CompleteRegister_Intercom_Profile_ErrorCommand Parameters Examples CommentsHCI_Handle 0x0001
 133CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsStart_TCS_CallThis command must be called right after TCSOpenChannel. It automatically sends a sequence of TCS messages according to the Intercom profile specification of the TCS state machine. After successful execution of this command, TCS state machine is in ACTIVE state and SCO connection is opened.  Disconnect_TCS_CallThis command is called to close an existing TCS connection according to the Intercom profile specification of the TCS state machine, close the L2CAP connection, and close the SCO connection.  Send_Info_MessageThis command can be called after a TCS channel is opened. It sends an INFORMATION TCS message with a called party number.  Return EventsOpen_TCS_Channel_CompleteOpen_TCS_Channel_FailedCommand Parameters Examples CommentsN/AReturn EventsStart_TCS_Call_CompleteStart_TCS_Call_ErrorCommand Parameters Examples CommentsN/AReturn EventsDisconnect_TCS_Call_CompleteDisconnect_TCS_Call_ErrorCommand Parameters Examples CommentsPhone_Number 408 727 6600 Phone number may contain up to 10 digits.Return EventsSend_Info_CompleteSend_Info_Error
134CATC MERLIN’S WAND 1.22 APPENDIX AUser’s Manual Command Generator Command DescriptionsA.9  OBEX Command DescriptionsClientConnectThis command will create an OBEX connection with a remote device.ClientDisconnectThis command will cause the remote device to close the established OBEX channel.ClientGetThis command will initiate an OBEX Get operation in the remote device for the object named in the store handle. This operation is only valid over an OBEX connection.Command Parameters Examples CommentsBD_ADDR 0x010203040506 An HCI Connection has to be established before calling this command.Return EventsClientConnect_CompleteClientConnect_ErrorCommand Parameters Examples CommentsN/AReturn EventsClientDisconnect_CompleteClientDisconnect_ErrorCommand Parameters Examples CommentsObject “VCard.vcf”Return EventsClientGet_CompleteClientGet_Error

Navigation menu