Sunteți pe pagina 1din 25

connectBlue

802.15.4 SERIAL PORT ADAPTER AT COMMAND SPECIFICATION


Document Revision Published: Jul 02, 2010 16:26 Document version: 2

Copyright 2010 connectBlue AB. The contents of this document can be changed by connectBlue AB without prior notice and do not constitute any binding undertakings from connectBlue AB. connectBlue AB is not responsible under any circumstances for direct, indirect, unexpected damage or consequent damage that is caused by this document. All rights reserved. All brand and product names are trademarks or service marks of their respective owners.

Copyright 2010 connectBlue AB

Page 1 of 25

connectBlue

Copyright 2010 connectBlue AB

Page 2 of 25

connectBlue

1 Table of Content
Table of Content Introduction Related Documents Data Mode and AT Mode Restoring Default Configuration Restoring Serial Settings Restoring Factory Settings Configuration and Operation Default Serial Settings Non-volatile settings LED Indication AT Commands over Air Radio Channels Searching for other devices Client or Server Remote peer ZigBee Mapping of Bluetooth Functionality Address Device Name Class of Device GAP Modes Inquiry Device Discovery Name Discovery Bonding / Pairing Paging / Scan Connection Radio Channel Profiles Security Power Saving Modes Examples Creating Serial Connections and Sending Data AT Command Syntax Command Line Format Data Types AT Command Reference Standard AT Commands AT Attention Command AT&F Restore to Factory Settings ATE Echo On/Off ATS2 Escape Character ATS General Settings S Register Manipulation Link Layer Commands AT*AGDM Discoverability Mode AT*AGCM Connectability Mode AT*AGPM Pairing Mode AT*AGSM Security Mode AT*AGFP Fixed PIN AT*AGLN Local Name AT*AGLC Local Cod AT*AGCH Channel Number AT*AGRSS RSSI Value AT*AGND Name Discovery AT*AGI Inquiry AT*AGBD Bonded devices AT*AGUB Unbond Data Mode Commands AT*ADDM Enter Data Mode AT*ADCP Connect to Serial Service AT*ADCC Close Serial Connection AT*ADCP Default Client Profile AT*ADSP Default Server Profile AT*ADNRP Number of Remote Peers AT*ADRDRP Read Default Remote Peer AT*ADWDRP Write Default Remote Peer Informational Commands AT*AILBA Read Device Address AT*AILTI Read Type Information AT*AILVI Reads Local Version Information Miscellaneous Commands AT*AMRS Serial Settings AT*AMET Escape Sequence Timing

Copyright 2010 connectBlue AB

Page 3 of 25

connectBlue
AT*AMWS Watchdog Settings AT*AMPM Power Saving Mode AT*AMMP Max output power AT*AMRFM Read Feature Mask AT*AMWFM Write Feature Mask AT*ACCB Configuration over Air Events ADCCO Connection Closed Model Compatibility

2 Introduction
The IEEE 802.15.4 serial port adapter is implemented to be as similar as possible to the Bluetooth serial port adapter regarding concepts and AT commands. Since many of the Bluetooth concepts are not directly mapped to the IEEE 802.15.4 technology some innovative thinking has been applied. The advantage is, of course, that both the Bluetooth and IEEE 802.15.4 serial port adapter can be used in the same customer application with very limited consideration. This also applies to the connectBlue AB WLAN serial port adapter. All of them are designed to be mechanically, electrically and functionally compatible. The section Model Compatibility describes the differences in the AT command sets between the IEEE 802.15.2 Serial Port Adapter and the Bluetooth Serial Port Adapter. This chapter gives an overview of the differences in functionality between the products.

2.1 Related Documents


The Serial Port Adapter AT Commands document, this document, contains a description of the AT commands supported in the Serial Port Adapter. It also contains information on how to use the AT commands to create applications. The OEM Serial Port Adapter Electrical & Mechanical Data sheet contains important information about the OEM Serial Port Adapter. Read this document if you are using the OEM Serial Port Adapter.

3 Data Mode and AT Mode


The Serial Port Adapter operates in two different modes, AT mode and data mode. The module starts up in data mode and can be requested to move to AT mode by sending an escape sequence. The default escape sequence consists of three consecutive forward slash characters '/'. The escape sequence character can be changed using the ATS2 command. Pressing the restore-button on the Serial Port Adapter, when it is powered up, restores the default escape character. The following criteria must be met for the module to interpret the sequence as a valid escape sequence: Before the escape sequence there must be no data for 1 second. This time can be changed using the AT*AMET Escape Sequence Timing Settings command. After the escape sequence there must be no data for 1 second. This time can be changed using the AT*AMET Escape Sequence Timing Settings command. The entire escape sequence must be sent within 200 ms. To move from AT mode to data mode, use the AT*ADDM Enter Data Mode command.

Any connection that you have with the Serial Port Adapter can be used to enter AT mode. The procedure is the same as described above. By default, it is only possible to enter AT mode from the serial connection. This behavior can be changed using the AT command AT*ACCB Allow Configuration over Air.

4 Restoring Default Configuration


4.1 Restoring Serial Settings
In some situations it is necessary to restore the serial settings and the escape character and timing to their default values. The following settings can be restored using the procedure described below: Serial settings: 57600 baud, 8 data bits, no parity, 1 stop bit, hardware flow control. Serial interface type: RS232. AT escape sequence: '///'. Escape sequence timing: 1000 ms of no data transmission required before and after the escape sequence for the escape sequence to be valid.

Copyright 2010 connectBlue AB

Page 4 of 25

connectBlue

The serial settings are restored by applying a logic low signal on the Switch-1 input on the module during startup. If the module is mounted on a Module Adapter, this is done in the following way: Remove power from the Serial Port Adapter. Press and hold the default serial settings button on the Serial Port Adapter. Apply power to the Serial Port Adapter. Now the default serial settings and escape configuration are restored.

4.2 Restoring Factory Settings


The factory setting is the configuration of the serial port adapter set when it is produced. To restore the factory settings configuration use the "AT&F" command. After the "AT&F" command has been executed the serial port adapter must be reset for the factory settings to be applied. Note that this command shall not be used at every startup to restore the factory settings. Instead it is better not to write to the startup database at all.

5 Configuration and Operation


5.1 Default Serial Settings
The default serial settings are: 57600 Baud 8 Data bits No parity 1 Stop bit Hardware flow control enabled Pressing the restore-button on the Serial Port Adapter, when it is powered up, restores the default serial settings. The module does not support auto baud rate. The serial settings are configured using the AT command AT*AMRS.

5.2 Non-volatile settings


There are several AT commands that can be used to configure the module which an enumerator parameter called <store>. If this parameter is set to 1 the setting will be applied directly and will also apply after a power off/on cycle. If this parameter is set to 0 the setting will be applied immediately but it will not be applied when the module starts up in the next power cycle.

5.3 LED Indication


The LED indicates what mode is currently active and what activity that is currently in progress. The following color indications are used: Green: The current mode is data mode and no connection attempt is in pro-gress. Orange: The current mode is AT mode. Purple: A connection attempt is in progress. Blue: A connection is currently active. Blue Blinking: A connection is active and data is transmitted or received over air. Red Blinking: Buffer overflow, parity or framing error detected on the UART.

5.4 AT Commands over Air


It is possible to configure and control a remote Serial Port Adapter using AT commands over air. The criterias for using AT commands over air are: A connection to the remote device (the device to configure) must exist. The remote device must have allow configuration over air enabled. By default this is disabled. See the AT command AT*ACCB for for further information. The same escape sequence rules apply to AT over air as for AT over cable, for more information see the section about Data Mode and AT Mode. Note that the same escape sequence is used for cable and IEEE 802.15.4. Therefore, one of the Serial Port Adapters must have its escape sequence changed using the ATS2 command. This is to keep the first Serial Port Adapter to enter AT mode instead of the remote Serial Port Adapter.

5.5 Radio Channels


The IEEE 802.15.4 Serial Port Adapter supports the 16 channels in the 2450 MHz band. The 915 MHz band and the 868 MHz band are not supported. Serial Port Adapters must be configured to use the same channel to be able to communicate. The radio channel is configured using the AT command AT*AGCH.

Copyright 2010 connectBlue AB

Page 5 of 25

connectBlue

5.6 Searching for other devices


The Inquiry command AT*AGI is used to search for other devices. The Inquiry command returns the device address of all the devices in the vicinity that are in discoverable mode. The IEEE Serial Port Adapter will only search in the currently configured channel. Only IEEE 802.15.4 devices responding with the extended address is listed by the Inquiry command.

5.7 Client or Server


Configure the Serial Port Adapter as server if it shall accept incoming connections. The Serial Port Adapter is configured as server using the AT command AT*ADSP. Configure the Serial Port Adapter as client if it shall initiate connections. The Serial Port Adapter is configured as client using the AT command AT*ADCP. The Serial Port Adapter can be configured as both client and server.

5.8 Remote peer


Which device a Serial Port Adapter configured as client shall connect to is configured using the remote peer. The remote peer is configured using the AT command write default remote peer, AT*ADWDRP.

5.9 ZigBee
The IEEE 802.15.4 Serial Port Adapter does not support ZigBee. It is not able to communicate with ZigBee devices.

5.10 Mapping of Bluetooth Functionality


5.10.1 Address The address of a Bluetooth device is composed of 48bits. Example: 0012F3004523 The address of a IEEE 802.15.4 device is composed of 64bits. Example: 0012F3FFFF0795a7 The The IEEE 802.15.4 Serial Port Adapter always uses extended addresses. 5.10.2 Device Name IEEE 802.15.4 has no attribute that corresponds to the Bluetooth device name. In the IEEE 802.15.4 Serial Port Adapter the concept of a user friendly device name has been kept. You can request the name of a remote device using a name discovery. 5.10.3 Class of Device The Class of Device (COD) concept is not used in either IEEE 802.15.4 or the IEEE 802.15.4 Serial Port Adapter. A dummy AT command exists to read and write the COD for compatibility with the Bluetooth Serial Port Adapter. 5.10.4 GAP Modes Connectability - The IEEE 802.15.4 Serial Port Adapter implements connectable and and non-connectable modes by simply always denying connection requests when non-connectable. Discover ability - The IEEE 802.15.4 Serial Port Adapter implements discoverable and and non-discoverable modes by not sending beacon when receiving a beacon request when non-discoverable. Pair ability - The IEEE 802.15.4 Serial Port Adapter does not implement pair ability mode. A dummy AT command for reading and writing pair ability mode exists in the IEEE 802.15.4 Serial Port Adapter for compatibility for with the Bluetooth Serial Port Adapter. 5.10.5 Inquiry The Bluetooth inquiry procedure is implemented using beacon requests and corresponding beacons. Note that only IEEE 802.15.4 devices answering the beacon request with an extended address in the beacon will be listed as a found device. Only devices configured to use the same channel will be found. 5.10.6 Device Discovery Device Discovery is not implemented in either IEEE 802.15.4 or the IEEE 802.15.4 Serial Port Adapter.

Copyright 2010 connectBlue AB

Page 6 of 25

connectBlue

5.10.7 Name Discovery A name discovery procedure like the one supported in Bluetooth is implemented in the IEEE 802.15.4 Serial Port Adapter. 5.10.8 Bonding / Pairing The concept of bonding or pairing does not exist for the IEEE 802.15.4 Serial Port Adapter. Instead authentication and key generation is done for every new connection. 5.10.9 Paging / Scan Since the IEEE 802.15.4 Serial Port Adapter operates on one specific channel no paging is required to set up a connection. The IEEE Serial Port Adapter always has its radio in receiving mode when not transmitting. 5.10.10 Connection The IEEE 802.15.4 Serial Port Adapter implements a connection concept which provides reliable data transfer in both directions. It does not support any of the network topologies described in the IEEE 802.15.4. After a successful connection setup two IEEE Serial Port Adapters are connected. The device that initiated the connection setup is the master of the connection and is polling the slave. If either the master or slave stops receiving acknowledgements or data from the the remote device for a certain time the connection is considered lost. This corresponds to the Bluetooth link supervision timeout. 5.10.11 Radio Channel The Bluetooth radio uses frequency hopping over several channels while the IEEE 802.15.4 radio uses one specific channel. Compared to the Bluetooth serial port adapter the channel must be specified on the IEEE 802.15.4 serial port adapter. The channel is specified using the AT command AT*AGCH. The IEEE 802.15.4 serial port adapter. will never operate outside the channel specified by the write channel command. The adaptive frequency hopping supported in Bluetooth is not supported by IEEE 802.15.4. This means that the channel must be selected carefully so that other radio technologies are not disturbed by the IEEE 802.15.4 radio. 5.10.12 Profiles The IEEE 802.15.4 Serial Port Adapter currently implements the concepts of the Bluetooth Serial Port Profile.

5.11 Security
Security is based on authentication during connection establishment and encryption of transferred data. Data is encrypted using AES128 as described in the security section in the IEEE 802.15.2 specification. Authentication and key generation is designed as a four-way handshake with HMAC. Inspiration for the authentication and key generation procedure has been taken from the IEEE 802.11i standard. 5.11.0.1 Security Modes A device can be in two different security modes, security enabled (authentication and encryption turned on) and security disabled (authentication and encryption turned off). If at least one of the two devices wanting to communicate has security enabled, security will be used. Use the security mode command AT*AGMS to set the security mode for the device. 5.11.0.2 Bonding and Pairing Compared to the Bluetooth Serial Port Adapters the concepts of pairing and bonding do not exist. Instead authentication and key generation is done on every new connection when security is enabled.

5.12 Power Saving Modes


A typical Bluetooth chip supports different sleep modes where it is e.g. possible to wake the chip up on an incoming connection or by activating an IO pin. In IEEE 802.15.4 the concept of saving power is quite different. Since the 802.15.4 serial port adapter must simulate a Bluetooth connection where data can be transmitted in both directions, it not obvious how to implement the different power modes. Therefore, the current implementation of the 802.15.4 serial port adapter does not support any low power modes. The radio needs to actively listen at all times which means that the power consumption for the serial port adapter application is currently quite high compared to the Bluetooth serial port adapter low power modes.

Copyright 2010 connectBlue AB

Page 7 of 25

connectBlue

5.13 Examples
5.13.1 Creating Serial Connections and Sending Data

6 AT Command Syntax
6.1 Command Line Format
Each command line sent from the DTE to the DCE is made up of a prefix, body and terminator. As prefix for the Serial Port Adapter AT commands, only "AT" (ASCII 065, 084) and "at" (ASCII 097, 116) can be used. There is no distinction between upper and lower case characters. The body is a string of characters in the range ASCII 032-255. Control characters other than <CR> (carriage return; ASCII 013) and <BS> (back space; ASCII 008) in a command line are ignored. The terminator is <CR>. Commands denoted with a "*" character are extended AT commands, i.e. Serial Port Adapter specific AT commands. Multiple commands in the same command line are not supported. Each command has to be terminated by a <CR> before a new command can be sent. A command can either be: Read commands without parameters: AT<command>?<CR> Write commands without parameters: AT<command><CR> Read and write commands with parameters: AT<command>=<parameter1>, parameter2>, ...<parameterN><CR> Responses are sent back to the host and can be any of the following: Successful final message: <CR><LF>OK<CR><LF> Successful intermediate/final message with parameters follows an OK mes-sage in some commands. In these cases the OK message works as a con-firm message only. <CR><LF><result_response>:<parameter1>, parameter2>, ...<parameterN> Error message: <CR><LF>ERROR<CR><LF>

6.2 Data Types


The definition of each command specifies the data types used for values associated with the command. The different data types are listed in the table below: Type String Deecription A string shall consist of a sequence of displayable characters from the ISO 8859-1 (8-bit ASCII) character set, except for characters "\" and """ and charac-ters below 32 (space). A string constant shall be delimited by two double-qoute (""") characters, e.g. "Donald Duck". If the double-quote character (""") is to be used within a string, e.g. "My friend "Bono" is a singer", they have to be represented as "\22". If the back-slash character ("\") is to be used within a string constant, it has to be represented as "\5C". An empty string is represented by two adjacent delimiters, "". An integer value consists of a sequence of characters all in the range {0..9. Numeric constants are expressed in decimal format only. An enumerator value is actually an integer, where all its possible values are specified in each case. Only the defined values are accepted for the command in question. This type is used to represent the extended IEEE Device Address. The type is composed of eight fields, each representing a hexadecimal value using two characters. For example, the Device Address 0x112233AABBCCDDEE is rep-resented as 112233AABBCCDDEE or 112233aabbccddee. Note that the Device Address is not delimited with by two double-qoute (""") characters.

Integer Enumerator Address

Copyright 2010 connectBlue AB

Page 8 of 25

connectBlue

7 AT Command Reference
7.1 Standard AT Commands
7.1.1 AT Attention Command Syntax AT<CR> Description Attention command determining the presence of a DCE, i.e. the OZSPA311. Description Successful response Error response

Responses <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

7.1.2 AT&F Restore to Factory Settings Syntax AT&F<CR> Responses <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Description This command instructs the unit to set all parameters to their defaults as specified by the manufacturer. Description Successful response Error response

7.1.3 ATE Echo On/Off Syntax ATE<echo_on><CR> Parameters echo_on Type Enumerator Description Set whether or not the Serial Port Adapter shall echo incoming characters. Description 0 = Unit does not echo characters during command state and online command state. 1 = Unit echoes characters during command state and online command state. Responses <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Description Successful write response Error response

7.1.4 ATS2 Escape Character Syntax ATS2=<esc_char><CR> ATS2? Parameters esc_char Responses <CR>>LF>esc_char<CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Type Integer Description Write the escape character used to switch the unit from data mode to AT mode. Read escape character Description 0...255 (Note: The escape sequence will be the value repeated three times. I.e. "///".) Description Successful read response Successful write response Error response

Copyright 2010 connectBlue AB

Page 9 of 25

connectBlue

7.1.5 ATS General Settings S Register Manipulation Syntax ATS<register>=<value><CR> ATS<register>? Parameters register value Responses <CR><LF>value<CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Register 2000 Description Poll interval in milliseconds. The poll interval determines how often the master of a connection polls its slaves. A longer interval increases the latency of the connection but decreases the radio activity on the channel when no data is transferred on the connection. Min 100 Max 2000 Default 100 Type Integer Integer Description Write to a general settings S register. Read from a general settings S register. Description Any of the registers described below. Valid values for each register is listed below. Description Successful read response Successful write response Error response

2100

Trimming interval seconds. The trimming interval determines how often the internal clocks are calibrated. Min 0 Max 60 Default 30

7.2 Link Layer Commands


7.2.1 AT*AGDM Discoverability Mode Syntax AT*AGDM=<mode>,<store><CR> AT*AGDM? Parameters mode store Type Enumerator Enumerator Description Write discoverability mode. Read discoverability mode. Description 1 = Non-discoverable 3 = Discoverable (default) 0 = Do not store 1 = Store (will store between reboots) Description Successful read response Successful response Error response

Responses <CR><LF>*AGDM:<amode><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

Copyright 2010 connectBlue AB

Page 10 of 25

connectBlue

7.2.2 AT*AGCM Connectability Mode Syntax AT*AGCM=<mode>,<store><CR> AT*AGAM?<CR> Parameters mode store Type Enumerator Enumerator Description Write connectability mode. Read connectability mode Description 1 = Non-connectable 2 = Connectable (default) 0 = Do not store 1 = Store (will store between reboots) Description Successful read response Successful response Error response

Responses <CR><LF>*AGCM:<mode><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

7.2.3 AT*AGPM Pairing Mode Syntax AT*AGPM=<mode>,<store><CR> AT*AGPM?<CR> Parameters mode store Type Enumerator Enumerator Description Write pairing mode. Read pairing mode Description 1 = Non-pairable mode 2 = Pairable mode (default value) 0 = Do not store 1 = Store (will store between reboots) Description Successful read response Successful response Error response

Responses <CR><LF>*AGPM:<mode><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint

Dummy implementation for compatibility with Bluetooth SPA. Hence, the command exists but it does not affect the behavior of the 802.15.4 SPA.

7.2.4 AT*AGSM Security Mode Syntax AT*AGSM=<mode>,<store><CR> AT*AGSM?<CR> Parameters mode Type Enumerator Description Write security mode. Read security mode Description 1: Link level authentication and encryption disabled. (default) 2: Link level authentication and encryption enabled. store Enumerator 0 = Do not store 1 = Store (will store between reboots)

Copyright 2010 connectBlue AB

Page 11 of 25

connectBlue

Responses <CR><LF>*AGSM:<smode><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

Description Successful read response Successful response Error response

7.2.5 AT*AGFP Fixed PIN Syntax AT*AGFP=<pin>,<store><CR> AT*AGFP?<CR> Parameters pin store Type String Enumerator Description Write PIN code. Read PIN code. Description The PIN code is a string of one to sixteen al-phanumerical characters.It is recommended to use a pin code of at least eight characters of mixed type, e.g. "12w35tg7".The default value is "0". 0 = Do not store 1 = Store (will store between reboots) Description Successful read response Successful response Error response

Responses <CR><LF>*AGFP:<pin><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

7.2.6 AT*AGLN Local Name Syntax AT*AGLN=<name>,<store><CR> AT*AGLN?<CR> Parameters name store Type String Enumerator Description Write local name Read local name Description Max 32 characters. The default name is "cB-OZS311". 0 = Do not store 1 = Store (will store between reboots) Description Successful read response Successful response Error response

Responses <CR><LF>*AGLN:<name><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

7.2.7 AT*AGLC Local Cod Syntax AT*AGLC=<cod>,<store><CR> AT*AGLC?<CR> Parameters cod store Type Integer Enumerator Description Write the Class Of Device code Read the Class Of Device code Description Class of device 0 = Do not store 1 = Store (will store between reboots) Description

Responses

Copyright 2010 connectBlue AB

Page 12 of 25

connectBlue

<CR><LF>*AGLC:<cod><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint

Successful read response Successful response Error response

Dummy implementation for compatibility with Bluetooth SPA. Hence, the command exists but it does not affect the behavior of the 802.15.4 SPA.

7.2.8 AT*AGCH Channel Number Syntax AT*AGCH=<channel>,<store><CR> AT*AGCH? Parameters channel Type Integer Description Write IEEE 802.15.4 channel number. Read IEEE 802.15.4 channel number. Description Min = 11 Max = 26 Default = 21 0 = Do not store 1 = Store (will store between reboots) Description Successful read response Successful response Error response

store

Enumerator

Responses <CR><LF>*AGCH:<channel><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

7.2.9 AT*AGRSS RSSI Value Syntax AT*AGRSS? Description This request returns the current received signal strength, RSSI, for the connection between the Serial Port Adapter and the remote device identified by the 'dev_addr' parameter.Note that this command can only be used on an exist-ing connection that has been established using the AT*ADCP command and only while still in AT mode.The RSSI is measured in steps of 1 dBm with an uncertainty of 5dBm. Type Integer Description RSSI value. Where value is dBm value + 128, i.e. 128 = 0dBm. If no connection is established, the response is an error response. Description Successful response Error response

Parameters rssi

Responses <CR><LF>*AGRSS:<rssi><CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

7.2.10 AT*AGND Name Discovery Syntax AT*AGND=<address><CR> Parameters address name Responses Type String String Description Retrieves the device name of a remote device given its device address

Description Address of remote device. String of maximum 32 characters (8-bit ASCII). Description

Copyright 2010 connectBlue AB

Page 13 of 25

connectBlue

<CR><LF>*AGND:<name><CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

Successful response Error response

7.2.11 AT*AGI Inquiry Syntax AT*AGI=<type>,<length>, <max_no_of_devices_to_find><CR> Parameters type length max_no_of_devices_to_find adddess cod Responses <CR><LF>*AGI:<address>,<cod> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint Returned class of device (cod) is always 0. Type Enumerator Integer Integer Address Integer Description 2: General inquiry Maximum amount of time specified before the inquiry is halted. Range: 1 - 48 Time = inquiry_length*1.28 secondsRange in seconds: 1.28-61.44 0: No limitation on the number of devices to find. 1-255: Maximum number of devices to find. Device address of a found device. Always 0. For compatibility with Bluetooth SPAs Description Performs an inquiry procedure to find any discoverable devices in the vicinity.

Description This response is sent for every found device. Successful response. Error message.

7.2.12 AT*AGBD Bonded devices Syntax AT*AGBD?<CR> Parameters no_of_bonded_devices address name_valid name Responses <CR><LF>*AGBD:<no_of_devices><CR><LF>OK<CR><LF> *AGBDE:<dev_addr>,<name_valid>,<name> <CR><LF> <CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint Bonding / pairing does not exist on the IEEE 802.15.4 Serial Port Adapter. This command is kept for backwards compatibility with the Bluetooth Serial Port Adapters. The last device that the Serial Port Adapter was connected to will be listed. Description Read bonded devices. Type Integer Address Enumerator String Description Number of bonded devices. Address of bonded device Always 1. Device is bonded but its device name is not valid. Always the empty string "" Description Successful response This response is sent for every found device. Error response

Copyright 2010 connectBlue AB

Page 14 of 25

connectBlue

7.2.13 AT*AGUB Unbond Syntax AT*AGUB=<address><CR> Parameters address Responses <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint cB-OZS311 Bonding / pairing does not exist on the IEEE 802.15.4 Serial Port Adapter. This command is kept for backwards compatibility with the Bluetooth Serial Port Adapters. Type Address Description This command un-bonds a previously bonded device.

Description Device address of the device subject to un-bond. Description Successful response Error response

7.3 Data Mode Commands


7.3.1 AT*ADDM Enter Data Mode Syntax AT*ADDM<CR> Responses <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Description Enter data mode. Description Successful response Error response

7.3.2 AT*ADCP Connect to Serial Service Syntax AT*ADCP=<address>, <profile>, <server_channel>, <must_be_master><CR> Parameters address profile server_channel must_be_master handle Responses <CR><LF>*ADCP:<handle><CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint server_channel and must_be_master parameters are ignored. These are kept for backwards compatibility with the Bleutooth Serial Port Adapter. Type Address Enumerator Integer Enumerator Integer Description Connect to a serial service enabled on a remote device. This request is used to connect to profiles based on the Serial Port Profile. The connection shall be used in data mode. When the host connects to a service on a remote device it implicitly registers to receive the Serial_Connection_Data_Mode_Closed event.

Description Address of remote device 0 = Serial profile Reserved reserved Connection handle. The connection handle is used when closing the connection. Description Successful response Error response

Copyright 2010 connectBlue AB

Page 15 of 25

connectBlue

7.3.3 AT*ADCC Close Serial Connection Syntax AT*ADCC=<handle><CR> Parameters handle Responses <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Type Integer Description Close an existing connection.

Description The connection handle identifies the connection. Description Successful response. Error response.

7.3.4 AT*ADCP Default Client Profile Syntax AT*ADDCP=<profile>,<store> AT*ADDCP?<CR> Parameters profile Type Enumerator Description Write Client Profile. Read Client Profile. Description Client profile. 0: Serial Port Profile 255: No profile (default) 0 = Do not store 1 = Store (will store between reboots) Description Successful write response. Successful read response. Error response.

store

Enumerator

Responses <CR><LF>OK<CR><LF> <CR><LF>*ADDCP:<role_and_profile><CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint Only Serial Port Profile or No profile supported.

7.3.5 AT*ADSP Default Server Profile Syntax AT*ADDSP=<profile>,<store> AT*ADDCP?<CR> Parameters profile Type Enumerator Description Write Server Profile. Read Server Profile. Description Client profile. 0: Serial Port Profile (default) 255: No profile 0 = Do not store 1 = Store (will store between reboots) Description Successful write response. Successful read response. Error response.

store

Enumerator

Responses <CR><LF>OK<CR><LF> <CR><LF>*ADDSP:<profile><CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

Copyright 2010 connectBlue AB

Page 16 of 25

connectBlue

Model cB-OZS311

Constraint Only Serial Port Profile or No profile supported.

7.3.6 AT*ADNRP Number of Remote Peers Syntax AT*ADNRP=<nr_of_peers>,<store><CR> AT*ADNRP? Parameters nr_of_peers store Type Integer Integer Description The number of remote peers. 0 is default. 0 = Do not store 1 = Store (will store between reboots) Description Successful read response Successful response Error response Description Write number of remote peers. Read number of remote peers.

Responses <CR><LF>*ADMRP:<nr_of_peers><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

7.3.7 AT*ADRDRP Read Default Remote Peer Syntax AT*ADRDRP=<peer_id><CR> Parameters peer_id address connection_scheme Type Integer Address Integer Description Read the configuration for a remote peer with the given id. Description Any value between 0 and mximum remote peers supported. Address of remote peer. This parameter is a bit field. Bit 0 is the least significant bit. Each bit is defined as follows: Bit 0: Connect on data. Try to connect to default remote peer on data traffic. Bit 1: Always connected. Always try to be connected to the default re-mote peer when in data mode. Bit 2-15: Reserved for future use. Advanced: Bit 16-23: Always connected period.This field can be used to define the period for connection attempts for always connected (Bit 1 set). If not set or set to 0 then the default period 10s is used. Time in seconds. Bit 24-31: Reserved for future use. 1: Every time a remote device connects to the selected DefaultServerProfile, update the re-mote peer device address to the device address of the connecting device. The new remote peer device address will be stored in the startup database. Only one of all the remote peers can use this feature. 0: Do not update the remote peer device ad-dress on incoming connections. A string with a user defined name of the peer. Max length is 32 characters. Description Successful response

update_on_incoming

Enumerator

name Responses

String

<CR><LF>*ADRDRP:<address>, <connection_scheme>, <update_on_incoming>, <name>, <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint

Error response.

Compared to the Bluetooth Serial Port Adapters connect to name or easy connect are not supported.

Copyright 2010 connectBlue AB

Page 17 of 25

connectBlue

7.3.8 AT*ADWDRP Write Default Remote Peer Syntax AT*ADWDRP= <peer_id>, <address>, <connection_scheme>, <store_on_incoming>, <name>, <store> Parameters peer_id address connection_scheme Type Integer Address Integer Description Any value between 0 and maximum remote peers supported. Address of remote peer. This parameter is a bit field. Bit 0 is the least significant bit. Each bit is defined as follows: Bit 0: Connect on data. Try to connect to default remote peer on data traffic. Bit 1: Always connected. Always try to be connected to the default re-mote peer when in data mode. Bit 2-15: Reserved for future use. Advanced: Bit 16-23: Always connected period This field can be used to define the period for connection attempts for always connected (Bit 1 set). If not set or set to 0 then the default period 10s is used. Time in seconds. Bit 24-31: Reserved for future use. 1: Every time a remote device connects to the selected DefaultServerProfile, update the re-mote peer device address to the device address of the connecting device. The new remote peer device address will be stored in the startup database. Only one of all the remote peers can use this feature. 0: Do not update the remote peer device ad-dress on incoming connections. A string with a user defined name of the peer. Max length is 32 characters. 0 = Do not store 1 = Store (will store between reboots) Description Successful response Error response Description Write configuration for a remote peer.

update_on_incoming

Enumerator

name store

String Integer

Responses <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint

Compared to the Bluetooth Serial Port Adapters external connect, connect to name or easy connect are not supported.

7.4 Informational Commands 7.5 AT*AILBA Read Device Address


Syntax AT*AILBA?<CR> Parameters address Responses <CR><LF>*AILBA:<address> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Description Read the address of the device. Description The address of the device Description Successful read response. Error response

Type Address

Copyright 2010 connectBlue AB

Page 18 of 25

connectBlue

7.5.1 AT*AILTI Read Type Information Syntax AT*AILTI?<CR> Parameters major_id minor_id Responses <CR><LF>*AILTI:<major_id,<minor_id>> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Error response Description Read the type of device. Description 3 = IEEE 802.15.4 Serial Port Adapter 1 = OZSPA311 Description Successful response.

Type Enumerator Enumerator

7.5.2 AT*AILVI Reads Local Version Information Syntax AT*AILVI?<CR> Parameters manufacturer spa_sw_version mac_driver_version lm_version radio_manufacturer Responses <CR><LF>*AILVI:<manufacturer>,<spa_sw_version>, <mac_driver_version>,<lm_version>, <radio_manufacturer><CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Error response Description Read local version information Type String String String String String Description Serial Port Adapter manufacturer. Serial Port Adapter software version. MAC driver version. Reserved, always "". IEEE 802.15.4 hardware manufacturer. Description Successful response

7.6 Miscellaneous Commands


7.6.1 AT*AMRS Serial Settings Syntax AT*AMRS= <baud_rate>, <data_bits>, <stop_bits>, <parity>, <flow_control>, <change_after_confirm >, <store><CR> AT*AMRS? Parameters Read the serial settings. Type Description Description Write the serial settings.

Copyright 2010 connectBlue AB

Page 19 of 25

connectBlue

baud_rate

Enumerator

Baud rate 1 = 300 2 = 1200 3 = 2400 4 = 4800 5 = 9600 6 = 19200 7 = 38400 8 = 57600 (default) 1 = 8 data bits (default) 2 = 7 data bits 1 = 1 bit (default) 2 = 2 bits 1 = None (default) 2 = Odd 3 = Even Flow control settings 1 = cts/rts (default) 2 = None 0: The Serial Port Adapter will not change serial settings until after the next power cycle. 1: The Serial Port Adapter will change serial settings after it has sent the OK to the Host. 0 = Do not store 1 = Store (will store between reboots)

data_bits stop_bits parity

Enumerator Enumerator Enumerator

flow_control

Enumerator

change_after_confirm store

Enumerator Enumerator

Responses <CR><LF>*AMRS:<baud_rate>, <data_bits>, <stop_bits>, <parity>, <flow_control> <CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint

Description Successful read response

Successful write response Error response

Non standard or special baud rates not supported. Maximum baudrate is 57600.

7.6.2 AT*AMET Escape Sequence Timing Syntax AT*AMET=<min_time_before>, <min_time_after>,<store><CR> AT*AMET? Parameters min_time_before Type Integer Description Write the escape sequence timing settings. For an escape sequence to be valid, a period of no data activity is required before and after the escape sequence. This command reads the minimum time of no data activity required before and after the escape sequence. Read the escape sequence timing settings. Description Min 50 Max 5000ms 1000 default Min 50 Max 5000ms 1000 default 0 = Do not store 1 = Store (will store between reboots) Description

min_time_after

Integer

store

Integer

Responses

Copyright 2010 connectBlue AB

Page 20 of 25

connectBlue

<CR><LF>*AMET:<min_time_before>, <min_time_after><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

Successful read response Successful write response Error response

7.6.3 AT*AMWS Watchdog Settings Syntax AT*AMWS=<write_timeout>, <inactivity_timeout>, <connect_timeout>, <disconnect_reset>, <reset>, <store><CR> AT*AMWS?<CR> Parameters write_timeout Type Integer Read the watchdog settings Description Time in seconds before SPA disconnects when a write operation fails. 0: Disabled (default value) > 0: Timeout in seconds Time in seconds before SPA disconnects if no activity. 0: Disabled (default value) > 0: Timeout in seconds Max connection time in seconds before a connection is terminated. 0: Disabled (default value) > 0: Timeout in seconds 0: Disabled (default value) 1: An SPA enabled as a server will reset on a terminated connection. If set to 1 the SPA will reset immediately. All other parameters will be ignored. 0 = Do not store 1 = Store (will store between reboots) Description Successful read response Description Write the watchdog settings. The watchdog functionality will disconnect from a remote peer if one of the given conditions are met.

inactivity_timeout

Integer

connect_timeout

Integer

disconnect_reset reset store

Integer Integer Integer

Responses <CR><LF>*AMWS: <write_timeout>, <inactivity_timeout>, <connect_timeout>, <disconnect_reset>, <reset><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

Successful write response Error response

7.6.4 AT*AMPM Power Saving Mode Syntax AT*AMPM=<power_mode>,<store><CR> AT*AMPM? Parameters power_mode Type Enumerator Description 1 = Online 2 = Sleep mode (default) 3 = Stop mode 0 = Do not store 1 = Store (will store between reboots) Description Successful read response Description Write the power saving mode Read the power saving mode

store

Enumerator

Responses <CR><LF>*AMPM:<power_mode><CR><LF>OK<CR><LF>

Copyright 2010 connectBlue AB

Page 21 of 25

connectBlue

<CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

Successful response Error response

7.6.5 AT*AMMP Max output power Syntax AT*AMMP=<max_power>,<store><CR> AT*AMPM? Parameters max_power Type Integer Description Actual output power in dBm + 128. 255: Use the highest output power supported by the Serial Port Adapter as the maximum output power (default value) 0 = Do not store 1 = Store (will store between reboots) Description Successful read response Successful response Error response Description Write max output power setting. Read max output power setting.

store

Enumerator

Responses <CR><LF>*AMPM:<max_power><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

7.6.6 AT*AMRFM Read Feature Mask Syntax AT*AMRFM=<mask_id><CR> Parameters mask_id mask_value Responses <CR><LF>*AMRFM:<mask_id>,<mask_value> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint Dummy implementation for compatibility with Bluetooth SPA. Error response Type Integer Integer Description Read feature mask. This command is deprecated and only kept for compatibility reasons.

Description Only mask id 1 is supported. Dummy value. Description Successful response

7.6.7 AT*AMWFM Write Feature Mask Syntax AT*AMWFM=<mask_id>,<mask_value>, <store><CR> Parameters mask_id mask_value Responses <CR><LF>OK<CR><LF> Type Integer Integer Description See AT*AMRFM Read Feature Mask command See AT*AMRFM Read Feature Mask command Description Successful response Description Write feature mask. This command is deprecated and only kept for compatibility with the Bluetooth module.

Copyright 2010 connectBlue AB

Page 22 of 25

connectBlue

<CR><LF>ERROR<CR><LF> Model cB-OZS311 Constraint

Error response

Dummy implementation for compatibility with Bluetooth SPA.

7.6.8 AT*ACCB Configuration over Air Syntax AT*ACCB=<allow>,<store><CR> AT*ACCB? Parameters allow store Type Enumerator Enumerator Description Write allow configuration over air. Read allow configuration over air. Description 0 = AT mode can only be entered from the serial interface (default) 1 = AT mode can be entered from both the serrial interface and any connected remote peer 0 = Do not store 1 = Store (will store between reboots) Description Successful read response Successful write response Error response

Responses <CR><LF>*ACCB:<allow><CR><LF>OK<CR><LF> <CR><LF>OK<CR><LF> <CR><LF>ERROR<CR><LF>

7.7 Events
7.7.1 ADCCO Connection Closed Syntax *ADCCO:<connection_handle>,<reason><CR><LF> Description A connection to a remote device has been disconnected. This event will only occur when a connection established using AT*ADCP is disconnected when the device is still in AT mode.

Parameters connection_handle reason

Type Integer Enumerator

Value Hanlde identifying the connection. 0: Disconnected by command 1: Disconnected by link loss 255: Reason unknown

8 Model Compatibility
The following table describes what AT commands and events that differ from the IEEE 802.15.4 SPA compared to the Bluetooth SPA. Command AT AT* ATZ AT&F ATS2 ATS ATE Supported in OZSPA311 Yes No No No Yes Yes Yes New compared to Bluetooth SPA. General settings registers are used for configuration of some parameters. Comment

Copyright 2010 connectBlue AB

Page 23 of 25

connectBlue

AT*AGDM AT*AGCM AT*AGPM AT*AGSM AT*AGCH AT*AGND AT*AGDD AT*AGI AT*AGB AT*AGUB AT*AGBD AT*AGFP AT*AGLN AT*AGLC AT*AGGMSR AT*AGCMSR AT*AGMSP AT*AGRSS AT*ARSS AT*ADDM AT*ADCP AT*ADCC AT*ADDCP AT*ADDSP AT*ADMRP AT*ADNRP AT*ADRDRP AT*ADWDRP AT*ADIT AT*ADWM AT*AILBA AT*AILVI AT*AILTI AT*AMRS AT*AMSIT AT*ACF AT*ACACF AT*ACDF AT*ACCB

Yes Yes Yes Yes Yes Yes No Yes No Yes Yes Yes Yes Yes No No No Yes No Yes Yes Yes Yes Yes No Yes Yes Yes No No Yes Yes Yes Yes No No No No Yes Not all baud rates supported by the Bluetooth SPA is supported by the IEEE 802.15.4 SPA. Only basic connection schemes are supported. Only basic connection schemes are supported. Only the serial port profile concept is supported by the IEEE 802.15.4 SPA. Only the serial port profile concept is supported by the IEEE 802.15.4 SPA. Class of device concept does not exist for the IEEE 802.15.4 SPA. Dummy implementation for backward compatibility with the Bluetooth SPA. Bonding/Pairing concept do not exist for the IEEE 802.15.4 SPA. Dummy implementation for backward compatibility with the Bluetooth SPA. Bonding/Pairing concept do not exist for the IEEE 802.15.4 SPA. Dummy implementation for backward compatibility with the Bluetooth SPA. New compared to Bluetooth SPA. Bonding/Pairing concept do not exist for the IEEE 802.15.4 SPA. Dummy implementation for backward compatibility with the Bluetooth SPA.

Copyright 2010 connectBlue AB

Page 24 of 25

connectBlue

AT*AMPM AT*AMMP AT*AMET AT*AMBOR AT*AMBO AT*AMLO AT*AMSF AT*AMWS AT*AMDS AT*AMLP AT*AMWFM AT*AMRFM *ADCCO

No Yes No No No No No Yes No No Yes Yes Yes Dummy implementation for backward compatibility with the Bluetooth SPA. Dummy implementation for backward compatibility with the Bluetooth SPA.

Copyright 2010 connectBlue AB

Page 25 of 25

S-ar putea să vă placă și