BLUETOOTH AT COMMAND LIST List of available AT commands for serial Bluetooth devices AUTOMATION Data Sheet 7749_de_00 1 © PHOENIX CONTACT - 03/2008 Description The FL BLUETOOTH Serial Port Adapter (BT SPA) is a serial Bluetooth device that is suitable for industrial use. BT SPA supports Bluetooth specification 2.0 and has one 9pos. D-SUB port and one Bluetooth radio interface. A software tool is available for programming support, which visualizes the key settings.
BLUETOOTH AT COMMAND LIST – – After the escape sequence there must be silence for 1 second. This time can be changed using the AT*AMET command. The entire escape sequence must be sent within 200 ms. To move from AT mode to data mode, use the “AT*ADDM” command.
BLUETOOTH AT COMMAND LIST ample, the Bluetooth Device Address 0x112233AABBCC is represented as 112233AABBCC or 112233aabbcc. Note 4 that the Bluetooth Device Address is not delimited with by two double-qoute (“"“) characters. AT Commands Reference When using an AT command, please note the restrictions for the module which are noted below the respective AT command description. 4.1 Standard AT Commands Command “AT” AT Command AT Description Attention command determining the presence of a DCE, i.e.
BLUETOOTH AT COMMAND LIST Module FL BT SPA Constraint The Store_Factory_Settings are not available. Instead, the command will restore production settings. After the AT&F command has been sent, the module must be reset for the restored settings to take affect. Command “ATS2” AT Command ATS2= Command Parameters esc_char Description Changes the escape character to esc_char. Type integer Description esc_char is the ASCII value of the new escape character. E.g. 47 equals ‘/’.
BLUETOOTH AT COMMAND LIST 5 GAP Commands 5.1 Read_Discoverability_Mode (AT*AGDM?) AT Command AT*AGDM? Description This command reads the current GAP discoverability mode. Responses Description *AGDM:OK< Successful response. CR> ERROR Error response.
BLUETOOTH AT COMMAND LIST Read_Connectability_Mode (AT*AGCM?) AT Command AT*AGCM? Description This command reads the current GAP connectability mode. Responses Description *AGCM:OK< Successful response. CR> ERROR Error response.
BLUETOOTH AT COMMAND LIST Write_Pairing_Mode (AT*AGPM=) AT Command AT*AGPM=, Command Parameters pairing_mode Type enumerator store_in_startup_database enumerator Description Writes the GAP pairing mode. Value 1: GAP non-pairable mode. 2: GAP pairable mode (default value). 0: The setting will only be valid for the current power cycle. 1: The Serial Port Adapter will remember the setting between power cycles.
BLUETOOTH AT COMMAND LIST Responses OK ERROR Description Successful response. Error response. Name_Discovery (AT*AGND=) AT Command AT*AGND= Command Parameters bd_addr Type Bd_Addr Description Retrieves the device name of a remote device given its Bluetooth device address. Value Bluetooth device address of the device from which to retrieve the name.
BLUETOOTH AT COMMAND LIST Response Parameters no_of_devices bd_addr cod device_name_valid device_name Type integer Value Value in range {0..255}. Bd_Addr integer enumerator Number of devices discovered during the inquiry procedure. Bluetooth device address of a discovered device. See Read_Local_COD command. 1: device_Name parameter valid. string 0: Device was discovered, but its name could not be retrieved. device_name is parameter invalid and should be ignored. Name of discovered device.
BLUETOOTH AT COMMAND LIST Bond (AT*AGB=) AT Command AT*AGB= Command Parameters bd_addr Description Performs a GAP bond procedure with another Bluetooth device. During the bonding procedure the fixed PIN code is used, see the Write_Fixed_PIN and Read_Fixed_PIN commands. Note that to be able to perform bonding the remote device must be in pairable mode. Type Bd_Addr Value Bluetooth device address of the device to bond with.
BLUETOOTH AT COMMAND LIST Read_Bonded_Devices (AT*AGBD?) AT Command AT*AGBD? Description Read the bonded devices. Responses *AGBD:OK *AGBDE:,, ERROR Description Successful response Response Parameters no_of_bonded_devices bd_addr device_name_valid device_name This response is sent for every found device. Error message. Type integer Bd_Addr enumerator Value Number of bonded devices.
BLUETOOTH AT COMMAND LIST Write_Fixed_PIN (AT*AGFP=) AT Command Description AT*AGFP=, Writes the fixed PIN code used by the Serial Port Adapter during bond. Command Parameters pin_code Type string Value The PIN code is a string of one to sixteen alphanumerical characters. It is recommended to use a pin code of at least eight characters of mixed type, e.g. “12w35tg7”. store_in_startup_database enumerator The default value is “0”.
BLUETOOTH AT COMMAND LIST Responses OK ERROR Description Successful response. Error response. Module FL BT SPA Constraint The name is limited to a maximum of 31 characters. Read_Local_COD (AT*AGLC?) AT Command AT*AGLC? Description Reads the Local Class Of Device code. Responses *AGLC:OK ERROR Description Successful response. Error response.
BLUETOOTH AT COMMAND LIST Write_Local_COD (AT*AGLC=) AT Command AT*AGLC=, Command Parameters Type cod integer store_in_startup_database enumerator Description Writes the Local Class Of Device code. Value See Read_Local_COD command. The default value is 0. 0: The setting will only be valid for the current power cycle. 1: The Serial Port Adapter will remember the setting between power cycles. The settings database in the Serial Port Adapter will be updated.
BLUETOOTH AT COMMAND LIST Change_MasterSlaveRole (AT*AGCMSR=) AT Command AT*AGCMSR=, Description Changes the master-slave role. Changes the role of the Serial Port Adapter, master or slave, for the connection between the Serial Port Adapter and the remote device identified by the ‘bd_addr’ parameter. Note that the remote device does not have to accept the master/slave switch.
BLUETOOTH AT COMMAND LIST Write_MasterSlaveRole_Policy (AT*AGMSP=) AT Command AT*AGMSP=,< CR> Command Parameters role_policy Type enumerator store_in_startup_database enumerator Description Writes the role policy of the device. Value 0: Always attempt to become master on incoming connections. 1: Always let the connecting device select master/slave role on incoming connections (default value). 0: The setting will only be valid for the current power cycle.
BLUETOOTH AT COMMAND LIST 6 Service Search Commands Service_Search (AT*ARSS=) AT Command AT*ARSS=,, Command Parameters bd_addr role_and_profile Type Bd_Addr enumerator max_nbr_of_results integer Description Search for services on a remote device. Value Bluetooth device address of the device on which to search for services.
BLUETOOTH AT COMMAND LIST service_description_valid service_description service_ availability_valid enumerator string enumerator service_availability integer Ip_subnet_valid enumerator Ip_subnet string Module FL BT SPA 7 0: The service_description parameter could not be retrieved from the remote device and the value is not valid. 1: The service_description parameter could be retrieved from the remote device and the value is valid. Manufacturer description of the services a product can provide.
BLUETOOTH AT COMMAND LIST Connect_To_Serial_Service_Data_Mode (AT*ADCP=) AT Command AT*ADCP=, , , 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.
BLUETOOTH AT COMMAND LIST Responses OK ERROR Description Successful response. Error response. Read_Default_Client_Profile (AT*ADDCP?) AT Command AT*ADDCP? Description This command reads the default client profile. The default client profile is the profile that the Serial Port Adapter uses when it establishes a connection, in data mode, to the default remote peer(s). Responses Description *ADDCP:OK
BLUETOOTH AT COMMAND LIST Module FL BT SPA Constraint The LAN access profile is not supported. Read_Default_Server_Profile (AT*ADDSP?) AT Command AT*ADDSP? Description This command reads the default server profile. The default server profile is the profile that other devices can connect to when the Serial Port Adapter is in data mode. The default server profile is activated when the Serial Port Adapter is moved to data mode if no connection exists.
BLUETOOTH AT COMMAND LIST Responses OK ERROR Description Successful response. Error response. Module FL BT SPA Constraint The LAN access profile is not supported. If the current default server profile is “255: No profile”, the “store in startup database” parameter must be 1 and the module must be restarted for the command to take affect.
BLUETOOTH AT COMMAND LIST Write_No_Of_Remote_Peers (AT*ADNRP=) AT Command AT*ADNRP=, Description This command writes the number of remote peers defined. The number of remote peers may not be greater than the number returned by the Read_Max_No_Of_Remote_Peers command. After writing the number of remote peers the host must use the Write_Default_Remote_Peer command to write all the remote peers to the Serial Port Adapter.
BLUETOOTH AT COMMAND LIST Response Parameters bd_addr connect_scheme Type Bd_Addr integer update_remote_peer_on_i enumerator ncoming device_name 7749_de_00 string Value Bluetooth device address of the default 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 remote peer when in data mode.
BLUETOOTH AT COMMAND LIST Write_Default_Remote_Peer (AT*ADWDRP=) AT Command AT*ADWDRP=,, , , , Description This command writes the Bluetooth device address, connect scheme and device name of the currently selected default remote peer.
BLUETOOTH AT COMMAND LIST Module FL BT SPA Constraint Not supported. Instead use the watchdog functionality (see AT*AMWS). Write_Inactivity_Tick (AT*ADIT=) AT Command AT*ADIT=, Command Parameters inactivity_tick Type integer store_in_startup_database enumerator Description This command writes a new inactivity tick setting.
BLUETOOTH AT COMMAND LIST Read_Wireless_Multidrop_Configuration (AT*ADWM?) AT Command AT*ADWM? Description This request returns whether or not the Wireless Multidrop™ feature has been enabled. When the Wireless Multidrop™ has been enabled; all data sent to the Serial Port Adapter in data mode will be forwarded to all connected devices. Data received from a remote device will be forwarded to the host.
BLUETOOTH AT COMMAND LIST Write_Wireless_Multidrop_Configuration (AT*ADWM=) AT Command AT*ADWM=, , Command Parameters enabled auto_forward store_in_startup_database Type enumerator enumerator enumerator Description See Read_Wireless_Multidrop_Configuration. Value See Read_Wireless_Multidrop_Configuration. See Read_Wireless_Multidrop_Configuration. 0: The setting will only be valid for the current power cycle.
BLUETOOTH AT COMMAND LIST Response Parameters manufacturer sw_ver host_stack sw_ver link_manager_sw_ver bluetooth_hardware_manu facturer 9 Type string string string string string Value Serial Port Adapter manufacturer. Serial Port Adapter software version. Bluetooth host stack version. Bluetooth link manager version. Bluetooth hardware manufacturer.
BLUETOOTH AT COMMAND LIST stop_bits enumerator parity enumerator flow_control enumerator 1: 1 stop bit (default value) 2: 2 stop bits 1: no parity (default value) 2: odd parity 3: even parity 1: CTS/RTS used for flow control (default value) 2: CTS/RTS not used. Module FL BT SPA Constraint For the non-standard baud rates the 312500 and 625000 has an accuracy of 1.5% and 2.5 %. For all other baud rates the accuracy is no worse than 0.5 %.
BLUETOOTH AT COMMAND LIST Read_Serial_Interface_Type (AT*AMSIT?) AT Command AT*AMSIT? Description This command reads the serial interface type currently used. Responses *AMSIT: OK ERROR Description Successful response Response Parameters serial_interface_type Type enumerator Error message. Value 1: RS232 (default value) 2: RS422 3: RS485 4-255: Reserved for future use.
BLUETOOTH AT COMMAND LIST Response Parameters allow_configuration_over_ bluetooth Type enumerator Value 0: Configuration over Bluetooth is not allowed (default value). 1: Configuration over Bluetooth is allowed.
BLUETOOTH AT COMMAND LIST Write_Controller_Power_Save_Mode (AT*AMPM=) AT Command AT*AMPM=, Command Parameters Type mode enumerator store_in_startup_database enumerator Description This command writes a new power save mode setting to the Serial Port Adapter. Value See Read_Controller_Power_Save_Mode. 0: The setting will only be valid for the current power cycle. 1: The Serial Port Adapter will remember the setting between power cycles.
BLUETOOTH AT COMMAND LIST Write_Max_Output_Power (AT*AMMP=) AT Command AT*AMMP=, Command Parameters Type max_output_power integer store_in_startup_database enumerator Description Set the maximum output power to be used by the Serial Port Adapter when communicating. Value See Read_Max_Output_Power. 0: The setting will only be valid for the current power cycle. 1: The Serial Port Adapter will remember the setting between power cycles.
BLUETOOTH AT COMMAND LIST Write_Esc_Sequence_Timing (AT*AMET=) AT Command AT*AMET=, , Command Parameters min_before_time min_after_time store_in_startup_database Type integer integer enumerator Description For an escape sequence to be valid, a period of no data activity is required before and after the escape sequence. This command sets the minimum time of no data activity required before and after the escape sequence.
BLUETOOTH AT COMMAND LIST bt_connect_timeout integer Max connection time in seconds before a connection is terminated. 0: Disabled (default value) bt_disconnect_reset reset integer > 0: Timeout in seconds 0: Disabled (default value) integer 1: An SPA enabled, as a server will reset on a terminated connection. Will always read a value of 0. If written, 1 means reset of module. Other parameters are then ignored.
BLUETOOTH AT COMMAND LIST Read_DTR_DSR_Settings (AT*AMDS?) AT Command AT*AMDS? Description Read current DTR/DSR configuration. Responses *AMDS: , OK ERROR Description Successful response Response Parameters dtr_cfg Type integer Error message. Value Configuration of module behavior on the UART DTR pin. 1: DTR is activated when module is started. (default value) dsr_cfg integer 2: DTR is active if there is a Bluetooth connection.
BLUETOOTH AT COMMAND LIST Read_Link_Policy (AT*AMLP?) AT Command AT*AMLP? Description Read current Link Policy. Responses *AMLP: , OK ERROR Description Successful response Response Parameters link_policy parameter Type integer integer Error message. Value See Write_Link_Policy command. See Write_Link_Policy command.
BLUETOOTH AT COMMAND LIST Response Parameters link_policy Type integer Value Link policy configurations: 0: Default, No sniff, All packet sizes.
BLUETOOTH AT COMMAND LIST parameter integer This parameter has different meaning for different link policies. Link policies with sniff (4-8): Bit 0: Exit sniff on data activity. Only used when link policy supports sniff. If set the SPA will try to temporarily exit sniff when receiving data on the serial interface. When no data has been received on the serial interface for 1s, then the link will be put back into sniff mode. If not set, then the link will always be in sniff.
BLUETOOTH AT COMMAND LIST Responses OK ERROR Description Successful response Error message. Read_Feature_Mask (AT*AMRFM=) AT Command AT*AMRFM= Description Read current feature mask. Responses *AMRFM: , OK ERROR Description Successful response Response Parameters feature_mask_id mask_value Type integer integer Error message. Value See Write_Feature_Mask command.
BLUETOOTH AT COMMAND LIST Responses OK ERROR Description Successful response Error message. Read_Channel_Map (AT*AMCM?) AT Command AT*AMCM? Description Read channel map.
BLUETOOTH AT COMMAND LIST channel32to47 Integer channel48to63 Integer channel64to78 Integer store_in_startup_database enumerator Bit mask used to enable or disable channels 32 to 47 (Bit 0 – Channel 32). Default value is 0xFFFF. Bit mask used to enable or disable channels 48 to 63 (Bit 0 = Channel 48). Default value is 0xFFFF. Bit mask used to enable or disable channels 64 to 78 (Bit 0 = Channel 64). Default value is 0x7FFF. 0: The setting will only be valid for the current power cycle.