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
- 1. Main User Manual
- 2. WAND Manual 1 of 2
- 3. WAND Manual 2 of 2
WAND Manual 1 of 2








































































![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");](https://usermanual.wiki/Computer-Access-Technology/BT004APA-X.WAND-Manual-1-of-2/User-Guide-272616-Page-73.png)
![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]);](https://usermanual.wiki/Computer-Access-Technology/BT004APA-X.WAND-Manual-1-of-2/User-Guide-272616-Page-74.png)

![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")](https://usermanual.wiki/Computer-Access-Technology/BT004APA-X.WAND-Manual-1-of-2/User-Guide-272616-Page-76.png)













![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.](https://usermanual.wiki/Computer-Access-Technology/BT004APA-X.WAND-Manual-1-of-2/User-Guide-272616-Page-90.png)






![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.](https://usermanual.wiki/Computer-Access-Technology/BT004APA-X.WAND-Manual-1-of-2/User-Guide-272616-Page-97.png)

![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.](https://usermanual.wiki/Computer-Access-Technology/BT004APA-X.WAND-Manual-1-of-2/User-Guide-272616-Page-99.png)


















































