ASCII Interface 2.0.0 Manual $Revision: 1.
ASCII Interface 2.0.0 Manual by Bluegiga Technologies Copyright © 2004 Bluegiga Technologies Bluegiga Technologies assumes no responsibility for any errors, which may appear in this manual. Furthermore, Bluegiga Technologies reserves the right to alter the hardware, software, and/or specifications detailed herein at any time without notice, and does not make any commitment to update the information contained herein.
Table of Contents Preface ..................................................................................................................................... i Typographical Conventions........................................................................................ i 1. Usage ...................................................................................................................................1 2. Operational Modes........................................................................
iv
Preface WRAP THOR ASCII Interface is firmware which allows easy access to Bluetooth functionality. It makes the radio interface totally transparent and host system can control connections with simple ASCII commands strings. This makes transition to wireless world easy as no specific Bluetooth know-how has to be obtained. Typographical Conventions Different typographical conventions used in this manual are described in this chapter.
Preface ii
Chapter 1. Usage ASCII Interface is terminal controlled firmware which means it can be used with any terminal emulation software, such as Hyperterminal in Windows or Minicom in Linux. Initial port settings for ASCII interface are 115200,8n1 (baud rate 115200 bps, 8 data bits, no parity, one stop bit) and hardware flow control enabled. When you power-on the module or evaluation kit you should see the command prompt appear on the terminal emulation software.
Chapter 1.
Chapter 2. Operational Modes ASCII Interface has two operational modes, command mode and data mode. Command mode is default mode when there is no connections. It is possible to switch between modes at any time when there are any connections. Data mode is not available if there is no connections (because there is not any data available).
Chapter 2.
Chapter 3. Commands This chapter describes different commands used to control the behaviour of ASCII Interface. Every command is typed into one line and is executed by line feed (CR+LF, ASCII13+ASCII10). ASCII Interface is case insensitive ie. command may be entered in upper-, lower- or even mixed case letters. CALL Command CALL is used to initiate connections to the remote device. Connections are closed using command CLOSE. Currently open connections can be viewed using command LIST.
Chapter 3. Commands link_id Numeric connection identifier Events • CONNECT event is delivered after successful CALL command. • NO CARRIER event is delivered if CALL fails. Examples Example 3-1. Creating successful connection to 00:07:80:bf:bf:01 channel 1 CALL 00:07:80:bf:bf:01 1 RFCOMM CALL 0 CONNECT 0 RFCOMM 1 Example 3-2. Creating successful connection to 00:07:80:bf:bf:01 Serial Port Profile (UUID16 SPP = 1101) CALL 00:07:80:bf:bf:01 1101 RFCOMM CALL 0 CONNECT 0 RFCOMM 2 Example 3-3.
Chapter 3. Commands Synopsis INQUIRY {timeout} [NAME] Description timeout The maximum amount of time (in units of 1.28 seconds) before the inquiry process is halted Note: It may take up to 10.24 seconds for Bluetooth device to answer inquiry scan and thus timeout value should be at least 8 if it is necessary to find every device in the area.
Chapter 3. Commands Example 3-5. Inquiry with friendly name request INQUIRY 10 NAME INQUIRY_PARTIAL 00:07:80:bf:bf:01 001f00 INQUIRY_PARTIAL 00:07:80:80:05:65 920300 INQUIRY_PARTIAL 00:07:80:80:32:e0 920300 INQUIRY 3 INQUIRY 00:07:80:bf:bf:01 001f00 INQUIRY 00:07:80:80:05:65 920300 INQUIRY 00:07:80:80:32:e0 920300 NAME 00:07:80:bf:bf:01 "AI bf:01" NAME 00:07:80:80:05:65 "WRAP AS" NAME 00:07:80:80:32:e0 "WRAP THOR" LIST Command LIST shows information about connections currently open.
Chapter 3. Commands "INCOMING" Link is initiated by the remote device powermode Power mode for the link "ACTIVE" Link is in active mode "SNIFF" Link is in sniff mode "HOLD" Link is in hold mode "PARK" Link is in park mode role Role of the link "MASTER" ASCII Interface is the master device of this link "SLAVE" ASCII Interface is the slave device of this link crypt Encryption state of the link "PLAIN" Link is not encrypted "ENCRYPTED" Link is encrypted Events None. Examples Example 3-6.
Chapter 3. Commands LIST 1 CONNECTED RFCOMM 669 0 0 18 8d 8d 00:07:80:80:32:0e 1 OUTGOING ACTIVE MASTER ENCRYPTED NAME Command NAME is used retrieve friendly name of the device. Synopsis NAME {address} Description addr Bluetooth device address of the device. Response None. Events • NAME event is delivered when friendly name is known. • NAME ERROR event is delivered if friendly name lookup fails. Examples Example 3-7.
Chapter 3. Commands Synopsis SELECT {link_id} Description link_id Numeric connection identifier Response None. ASCII Interface goes to data mode with the link link_id. Events None. SET SET displays or sets configuration values of ASCII Interface. Synopsis SET [{category} {option} {value}] Description Without any parameters SET displays current configuration. category Category of setting "BT" Changes different Bluetooth related settings. See SET BT for more information about options.
Chapter 3. Commands None. Events None. SET BT Bluetooth related settings. SET BT BDADDR List format SET BT BDADDR {addr} addr Bluetooth device address of local device Note: This value is read-only. SET BT NAME List format SET BT NAME {friendly_name} Set format SET BT NAME [friendly_name] friendly_name Friendly name of local device Warning If friendly_name is left empty some device may have problems showing device.
Chapter 3. Commands Set format SET BT CLASS {class_of_device} class_of_device Bluetooth Class of Device of local device SET BT AUTH List format SET BT AUTH * {pin_code} Note: SET BT AUTH is not visible if pin_code is disabled. Set format SET BT AUTH * [pin_code] pin_code Pin code for authorized connections. Authorization is required if this option is present. SET BT PAIR List format SET BT PAIR {addr} {link_key} Note: SET BT PAIR is not visible if there are not paired devices.
Chapter 3. Commands link_key Link key for authenticated connection To remove device from list of known devices left link_key parameter empty. Tip: To remove every known device use * as addr (SET BT PAIR *). SET CONTROL Common ASCII Interface settings.
Chapter 3. Commands "1" One stop bit "2" Two stop bits SET CONTROL ECHO List format SET CONTROL ECHO {echo_mask} Set format SET CONTROL ECHO {echo_mask} echo_mask Bit mask for controlling echo and events displaying Bit 0 If set start-up banner is visible Bit 1 If set characters are echoed back to client in command mode Bit 2 If set events are displayed when in command mode Default value for SET CONTROL ECHO is 7 (bits 0..2 set).
Chapter 3. Commands Set format SET CONTROL INIT [command] command Any ASCII Interface command string. This command is automatically executed every time ASCII Interface starts (after power-on, RESET or watchdog event) TESTMODE Command TESTMODE enables Bluetooth Test Mode in which Bluetooth Testers may be used to test radio environment. Synopsis TESTMODE Response TEST 0 Events None.
Chapter 4. Events Events are mechanism that ASCII Interface uses to notify the User for completed commands, incoming connections, etc. If ASCII Interface is in data mode only possible event is NO CARRIER event for corresponding link. Events may be masked away by removing Bit 2 on command SET CONTROL ECHO. Note: ASCII Interface is designed so that unwanted events can be safely ignored. Events CONNECT, NO CARRIER and RING change the mode of operation and therefore they cannot be ignored.
Chapter 4. Events See also INQUIRY NO CARRIER NO CARRIER event is used to notify for link loss or alternatively failure in link estab- lishment. Synopsis NO CARRIER {link_id} RFCOMM {error_code} [message] Description link_id Numeric connection identifier error_code Code describing error message Optional verbose error message See also CALL, CLOSE, LIST, RING READY READY event is used to notify for switching to command mode. Synopsis READY.
Chapter 4. Events See also INQUIRY, NAME NAME ERROR NAME ERROR event is used to notify for Bluetooth friendly name lookup failure. Synopsis NAME ERROR {error_code} {addr} [message] Description error_code Code describing error. addr Bluetooth device address of the device. message Optional verbose error message. See also INQUIRY, NAME RING event is used to notify for incoming connection. Incoming connections are accepted only if there is no existing links.
Chapter 4.
Chapter 5. Troubleshooting This chapter introduces some usual error situations with possible solutions. Before contacting Bluegiga Technologies Technical Support at please carefully check through this chapter. Problem Possible solutions ASCII Interface does not start or output is just some garbage Check your cable and terminal emulation settings. Default terminal settings are 115200,8n1 (baud rate 115200 bps, 8 data bits, no parity, one stop bit).
Chapter 5.
Appendix A.
Appendix A.