Do you have a question about the DT50-M and is the answer not in the manual?
Questions and answers
Summary of Contents for Diamond Tech DT50-M
Page 1
DT50-M AT Command Set Reference Guide V1.1 D T 5 0 - M C O M M A N D R E F E R E N C E G U I D E 1 . 1 P a g e...
Page 2
43 Broad Street Unit C103 Hudson, MA 01749 Tel: (866) 837-1931 Tel: (978) 461-1140 FAX: (978) 461-1146 http://www.diamondt.com/ Liability Diamond Technologies Inc. shall not be liable for technical or editorial errors or omissions contained herein, nor for incidental or consequential damages resulting from the use of this material. Those responsible for the use of this device must ensure that all necessary steps have been taken to verify that the applications meet all performance and safety requirements including any applicable laws, regulations, codes, and standards.
Revision History Version Date Description 8/5/2020 Original Version 6/13/2022 Added Sections 7.1.12, 7.1.13, 7.1.14 D T 5 0 - M C O M M A N D R E F E R E N C E G U I D E 1 . 1 P a g e 3 | 38...
Contents Revision History ............................3 1 Introduction ............................7 2 Data Mode and AT Mode ........................7 3 Default Serial Settings ........................... 7 4 AT Commands Over Bluetooth ......................7 5 Syntax ..............................8 5.1 Command Line Format ......................8 5.2 Data Types ..........................
Page 5
7.1 Data Mode AT Commands ...................... 17 7.1.1 Enter data mode O ........................ 17 7.1.2 Connect peer +UDCP ......................17 7.1.3 Close peer connection +UDCPC ..................... 19 7.1.4 Default remote peer +UDDRP....................19 7.1.5 Peer list +UDLP ........................20 7.1.6 Server configuration +UDSC ....................21 7.1.7 Server flags +UDSF ........................
Page 6
D T 5 0 - M C O M M A N D R E F E R E N C E G U I D E 1 . 1 P a g e 6 | 38...
1 Introduction 2 Data Mode and AT Mode The DT50 can be in two different modes AT mode and data mode. It starts 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 “/”...
A Bluetooth connection to the remote device (the device to configure) must exist. The Bluetooth connection can e.g. be established using another DT50, a device with a PC-card/compact flash or a device with embedded Bluetooth support. The remote DT50 must have turned on the support for configuration over Bluetooth, for more information see the "Write Allow Configuration Over Bluetooth"...
5.2 Data Types The definition of each command specifies the data types used for values associated with the command. There are four data types: • String • Integer • Enumerator • Bluetooth Device Address • Byte Array 5.2.1 String A string shall consist of a sequence of displayable characters from the ISO 8859-1 (8-bit ASCII) character set, except for characters "\"...
6 AT Commands Reference 6.1 General AT Commands 6.1.1 Attention AT AT Command Description Attention command determining the presence of the DT50. Response Description Successful response. ERROR Error response. 6.1.2 Store current configuration &W AT Command Description AT&W[<profile>] Commits all the settings to be stored in start up database.
6.1.4 Set to factory defined configuration +UFACTORY AT Command Description AT+UFACTORY Reset to factory defined defaults. A reboot is required before using the new settings. Response Description Successful response. 6.1.5 Circuit 108/2 (DTR) behavior &D AT Command Description AT&D[<value>] Controls the behavior of RS232 circuit 108/2 - Data Terminal Ready (DTR) - on changes between ASSERTED (logical 0 on UART_DSR signal) and DEASSERTED...
Response Description Successful response. ERROR Error response if <value> is invalid. Parameter Description value 0: ASSERT DSR 1(default and factory default value): ASSERT DSR line in data mode and DEASSERT the DSR line in command mode 2: ASSERT the DSR line when at least one remote peer is connected and DEASSERT DSR line when no remote peers are connected.
Successful response. ERROR Error response. Parameter Description esc_char 0...255 The escape sequence is the sequence that forces the module to switch from the data mode to command mode, or to enter configuration mode over the air. To enter configuration mode over the air, this must be enabled on the specific server or peer, and all three escape characters must be transmitted in a single frame.
6.1.10 Response formatting character S4 AT Command Description ATS4=<term> Writes response formatting character. This setting changes the decimal value of the character generated by the DCE as part of the header, trailer, and terminator for result codes and information text, along with the S3 parameter. If the value of S4 is changed in a command line, the result code issued in response to that command line will use the new value of S4.
AT+CPWROFF Reboot the DCE. During shutdown, the settings marked for storing to start up the database by &W are written in the non-volatile memory of the module. Response Description Successful response. 6.1.13 Module start mode +UMSM AT Command Description AT+UMSM=<start_mode> Writes start mode AT+UMSM? Reads start mode...
The least significant bit of the first octet of the <address> must be 0; that is, the <address> must be a unicast address. 6.1.15 System status +UMSTAT AT Command Description AT+UMSTAT[=<status_id>] Reads current status of the system. If <status_id> is omitted, all applicable ids will be listed.
Parameter Description baud_rate Factory default value: 115200 19200 - 5250000. The module will set a baud rate as close as possible to the requested baud rate. Recommended baud rates: 9600, 14400, 19200, 28800, 38400, 57600, 76800, 115200, 230400, 250000, 460800, 921600, 3000000. flow_control 1 (factory default): CTS/RTS used for flow control 2: CTS/RTS not used.
Page 18
AT+UDCP=<url> Connects to an enabled service on a remote device. When the host connects to a service on a remote device, it implicitly registers to receive the "Connection Closed" event. Response Description +UDCP:<peer_handle> Successful response. ERROR Error response. Parameter Description URL to the service on the remote peer.
o 1: enabled • <query_string> "keepAlive" is used to configure the tcp keepalive settings. It includes keepIdle, keepInterval, and keepCount separated by a "+" o keepIdle: time in milliseconds (ms) between keepalive packets o keepInterval: time in milliseconds between two successive keepalive retransmissions o keepCount: the number of retransmissions to be sent before disconnecting the remote end...
Response Description +UDDRP:<peer_id>,<url>, Successful read response. <connect_scheme> Successful write response. ERROR Error response. Parameter Description peer_id The peer ID can be 0-6. URL to the service on the remote peer. See Connect Peer +UDCP for more details and examples of valid URLs.
remote_address Remote address if available. Empty string if there is no remote address. 7.1.6 Server configuration +UDSC AT Command Description AT+UDSC=<id>,<type>[,<option1>[,<option2>][,<o Writes server configuration. ption3>]] AT+UDSC=<id>,<url> AT+UDSC[=<id>] Reads server configuration. Response Description +UDSC:<id>,<type>[,<option1>[,<option2>]] Successful read response. Successful write response. ERROR Error response.
Page 22
5: UUID 6: SPS 7: Reserved 8: ATP option1 For TCP and UDP, <option1> specifies the listening port. Valid values are 1 - 65535. For SPP, DUN, and UUID, <option1> specifies the service name. The service name can be maximum 15 characters. If an empty string is provided, the default service name is used ("SPP", "DUN", "UUID").
• 0 (default): IPv4 connections are accepted • 1: IPv6 connections are accepted 7.1.7 Server flags +UDSF Bit 0, remote configuration: When the remote configuration bit is set, the module will look for the escape sequence over the air (see S2 command). When the escape sequence is detected, the channel will enter command mode and parse AT commands.
1:inactivity timeout: <value> is the time in milliseconds before DCE disconnects all links when no data activity in the system is detected. • 0 (factory default): Disabled • > 0: Timeout in milliseconds 2: Bluetooth disconnect reset: <value> defines if the DCE shall reset on any dropped Bluetooth connection (not on an actively closed connection) •...
ERROR Error response. Parameter Description param_tag 0: Keep remote peer in the command mode • 0: Disconnect peers when entering the command mode • 1 (default): Keep connections when entering the command mode 1: The module will be reset to factory default settings if it detects the following sequence on the DTR line: 1 second silence, 5 transfers from DEASSERTED to ASSERTED within 1 second, and 1...
<protocol>,<local_address>,<local_port><remote_address>, <remote_port> Parameter Description peer_handle The peer handle identifies the connection. type 1: Bluetooth 2: IPv4 3: IPv6 profile 1: SPP 2: DUN 3: UUID 4: SPS 5: Reserved protocol 0: TCP 1: UDP address Bluetooth address. local_address (IPv4_Addr or IPv6_Addr) Local IP address associated to the peer (TCP connection only).
7.1.12 Read data in AT command Mode +UDATR Generic read command that can be used for any peer connection created with a url-scheme starting with "at-" (see +UDCP). AT Command Description AT+UDATR=<peer_handle>>,<data_format>,<max_data_length> Read received data from peer. Response Description +UDATR:<data_length> <data> When data format is 2 (binary).
+UUDCP:1,1,1,04D3B0285423p,1011 We try to read 5 bytes before something has been sent from remote side and see that we get +UDATR response that 0 bytes where read followed by +UUDATA event that tells us that 0 bytes are in the incoming buffer.
Page 29
prompt. After data prompt is received by the host it should send data_length number of bytes. Ok response is given after data_length of bytes has been received. Response Description > Prompt to start sending data, when data format is 2 (binary). Binary data will not be echoed.
+UUDCP:1,1,1,04D3B0285423p,1011 AT+UDATW=1,0,"Some Text" 7.1.14 Data Available +UUDATA Unsolicited response code (URC) notifying that there are data available to read from peer connection. Description Unsolicited Response Code +UUDATA:<peer_handle>,<data_length> Data from remote peer is available. Parameter Description peer_handle The connection handle identifies the connection.
Parameter Description discoverability_mode 1: GAP non-discoverable mode 2: GAP limited discoverable mode 3 (factory default): GAP general discoverable mode 8.1.2 Connectability mode +UBTCM AT Command Description AT+UBTCM? Reads the GAP connectability mode. AT+UBTCM=<connectability_mode> Writes the GAP connectability mode. Response Description +UBTCM:<connectability_mode>...
Page 32
Response Description +UBTSM:<security_mode>, Successful read response. <security_mode_BT2.0> Successful write response. ERROR Error response. Parameter Description security_mode 1 (factory default): Security Disabled. Should not be used in real life application. - Auto accept (No man-in-the-middle attack protection, encryption enabled) 2: Security Enabled - Just Works - Auto accept (no man-in-the-middle attack protection, encryption enabled).
It is recommended to use a pin code of at least eight characters of mixed type, for example, "12w35tg7". Factory default is "0". This is used together with the parameter security_mode_BT2. 8.1.5 Security type +UBTST AT Command Description AT+UBTST? Reads the security type for Bluetooth pairing. AT+UBTST=<security_type>...
1: Yes. The remote and local values are the same. 8.1.7 Inquiry (BR/EDR) +UBTI AT Command Description AT+UBTI[=<inquiry_type>,<inquiry_ Performs an inquiry procedure to find any length>]] discoverable devices in the vicinity. Response Description +UBTI:<bd_addr>,<rssi>,<cod>, This response is sent for every found device. <device_name>...
The discovery_type 1 and 2 will give the same result. 1 is kept for backward compatibility. 3: Limited inquiry. Displays devices in the Limited discoverability mode; each device is displayed only once. 4: All with no filter. Displays all found devices; devices can be displayed multiple times.
AT+UBTUB=<bd_addr> Removes a previously bonded device. Response Description Successful response. ERROR Error message. Parameter Description bd_addr Bluetooth device address of the device subject to unbond. The address FFFFFFFFFFFF will remove all the bonded devices. 8.1.11 Read bonded devices +UBTBD AT Command Description AT+UBTBD[=<mode>] Reads the bonded devices.
AT+UBTLC? Reads the Local Class of Device code. AT+UBTLC=<cod> Writes the Local Class of Device code. Response Description +UBTLC:<cod> Successful read response. Successful write response. ERROR Error message. Parameter Description Valid values for this parameter are specified in the Bluetooth Assigned Numbers Document, www.bluetooth.com.
+UBTMSR:<role> Successful response. ERROR Error message. Parameter Description role 0: Master 1: Slave bd_addr Address of the remote device. 8.1.15 Master slave role policy +UBTMSP AT Command Description AT+UBTMSP? Reads the role policy of the device. AT+UBTMSP=<role_policy> Writes the role policy of the device. Response Description +UBTMSP:<role_policy>...
Need help?
Do you have a question about the DT50-M and is the answer not in the manual?
Questions and answers