RAYTAC MDBT42T-AT-UART-S User manual

Version: B
Issued Date: 2020/11/27
User Guide
(簡易使用手冊)
產品名稱 (Product): Demo Board for MDBT42T-AT / PAT
產品型號 (Model No.): MDBT42T – AT – UART – S
韌體版本 (FW Revision): 1.0

Index
1. Introduction ................................................................................................................... 3
1.1. Contents of the Set ............................................................................................... 3
2. Hardware Description ................................................................................................... 4
3. Reference Circuit........................................................................................................... 6
4. AT Command ................................................................................................................. 7
4.1. List of supported commands................................................................................. 7
4.2. AT Command Sets................................................................................................ 8
4.3. Default Info ......................................................................................................... 14
5. How to Control via External MCU .............................................................................. 15
5.1. How to Send AT Commands............................................................................... 15
5.2. How to Transmit Data ......................................................................................... 16
5.3. How to Return to Flashed Default Setting........................................................... 16
6. Test Report................................................................................................................... 17
6.1. Current Test ........................................................................................................ 17
6.2. Throughput Test.................................................................................................. 18
7. Useful Links ................................................................................................................. 20
History of Firmware Revision............................................................................................ 21
Release Note....................................................................................................................... 22

1.Introduction
This document shows how to use the demo board (MDBT42T-AT-UART-S) to test function of
MDBT42T-AT & MDBT42T-PAT.
MDBT42T-AT-UART-S is designed for testing and debugging without building your own
board. The board is only available with MDBT42T-AT (chip antenna) module. MDBT42T-AT
will be pre-programmed with Raytac’s AT command firmware. If you don’t need such pre-
programming and is looking for nRF52805 module, please check MDBT42T-192K &
MDBT42T-P192K.
Please visit our website for spec sheet of every module mentioned above.
1.1. Contents of the Set
Each set includes MDBT42T-AT-UART-S x 1 and mini-USB cable x 1. Please contact us if
the set you receive is not complete.

2.Hardware Description
(1) MDBT42T-AT BLE module based on nRF52805.
(2) 32.768KHz crystal for external LF.
(3) 10uH & 15nH inductor for DC-to-DC mode.
(4) Interface to connect to external MCU.
(5) ADC input for battery detection only. Reference voltage is 0.6V.
Example:
formula: Input Voltage

(6) UART interface for data bridge or AT commands.
(7) Wake-up key.
(8) Debug interface, connecting to Nordic’s nRF5X DK.
Important: Please be careful not to “erase” the module during testing. Raytac’s
AT command firmware will not be shared. You may need to send the unit to us
for re-programming when module’s FW is erased.
(9) 3.3V LDO to power up MDBT42T-AT.
(10) LED for status indicator
(11) USB Power only

3.Reference Circuit

4.AT Command
4.1. List of supported commands
- Setting of device name
-Choose data rate of 1Mbps or 2Mbps on-air
-Set TX output power in 5 levels.
-Set advertising time
-Set connection interval under Mode 2
-Enable/disable advertising
-7 sets of UART baud rates
-Enable/disable UART flow control
-Enable/disable interface of UART hardware
-Power-down mode for power saving and GPIO wake-up
-Support DC-to-DC and LDO power mode
-Use internal or external 32.768KHz oscillator
-Recover-to-default setting with hardware and software method
-System reset of hardware and software
-Set serial number and retrieve
-Set or retrieve MAC Address
-Retrieve ADC value for battery detection, delivering the information through battery
service.
-Support maximum MTU 247bytes / data payload up to maximum 244 bytes

4.2. AT Command Sets
4.2.1.“Write”Commands
No.
Command
Description
(1)
AT+NAME
Set device name,Max. length of 20 characters
e.g. AT+NAME123 (device name 123, 3 characters)
(2)
AT+RESET
Set to reset system
(3)
AT+ADVSTART
Set to start advertising
(4)
AT+ADVSTOP
Set to stop advertising
(5)
AT+SLEEP
Set to get into deep sleep mode
(6)
AT+BAUDRATE9600
Set UART baud rate at 9600 bps,n,8,1
(7)
AT+BAUDRATE19200
Set UART baud rate at 19200 bps,n,8,1
(8)
AT+BAUDRATE38400
Set UART baud rate at 38400 bps,n,8,1
(9)
AT+BAUDRATE57600
Set UART baud rate at 57600 bps,n,8,1
(10)
AT+BAUDRATE115200
Set UART baud rate at 115200 bps,n,8,1
(11)
AT+BAUDRATE230400
Set UART baud rate at 230400 bps,n,8,1
(recommended enabling flow control)
(12)
AT+BAUDRATE460800
Set UART baud rate at 460800 bps,n,8,1
(recommended enabling flow control)
(13)
AT+FLOWCONTROLDIS
Disable UART flow control
(14)
AT+FLOWCONTROLEN
Enable UART flow control
(15)
AT+TXPOWER4DBM
Set RF TX power at + 4dBm
(16)
AT+TXPOWER0DBM
Set RF TX power at 0dBm
(17)
AT+TXPOWER-4DBM
Set RF TX power at - 4dBm
(18)
AT+TXPOWER-8DBM
Set RF TX power at - 8dBm
(19)
AT+TXPOWER-20DBM
Set RF TX power to - 20dBm
(20)
AT+XTALINTERNAL
Use internal RC 32.768KHZ low frequency oscillator
(21)
AT+XTALEXTERNAL
Use external crystal 32.768KHZ low frequency oscillator
(22)
AT+CONNECTINDICATORLOW
Set logic low output when connecting BT
(23)
AT+CONNECTINDICATORHIGH
Set logic high output when connecting BT
(24)
AT+PHYMODE1MBPS
Set PHY mode at 1Mbps

No.
Command
Description
(25)
AT+PHYMODE2MBPS
Set PHY mode at 2Mbps
(26)
AT+WAKEUPLOW
Set logic low at wake-up when in deep sleep
(27)
AT+WAKEUPHIGH
Set logic high at wake-up when in deep sleep
(28)
AT+ADVTIMEtttt
Set advertising time (Hex)
e.g. 0x001E (min. 30secs),
0x0E10 (Max. 3,600secs)
0x0000 (forever)
(29)
AT+DCDCDIS
Disable DC to DC converter
(30)
AT+DCDCEN
Enable DC to DC converter
(31)
AT+CONNECTINTERVALMODE0
Set connection interval mode for iOS/Android APP usage
(min. 20ms / Max. 40ms),
(32)
AT+CONNECTINTERVALMODE1
Set connection interval mode for nRF52832 Central usage
(min. 8ms / Max. 8ms)
(33)
AT+CONNECTINTERVALMODE2
Set connection interval mode for iOS/Android APP usage
(programmable: min. / Max. range is 8ms ~ 1,000ms)
(34)
AT+CONNECTINTERVALTIMEtttttttt
Set connection interval time (Hex), available when
activating “AT+CONNECTINTERVALMODE2”
e.g. 0x0008 (8ms),
0x03E8 (1,000ms), conditions to be met:
“min. connection interval ≦ Max. connection interval”

No.
Command
Description
(35)
AT+SERIALNOnnnnnnnn
Set serial number
e.g. AB000001, fixed 8-character length
(36)
AT+RESPONSEDIS
Disable response when sending “write” command
(37)
AT+RESPONSEEN
Enable response when sending “write” command
(38)
AT+DISCONNECT
Terminate the connection
(39)
AT+DEFAULT
Back to default
(40)
AT+MACADDRnnnnnnnnnnnn
Set IC MAC address, where n is Hex.
Written order is from MSB byte to LSB byte.
*** Important ***
Flow control function cannot be activated when use external 32.768 Khz crystal
oscillator. A “fail” response will return.
Status of Flow Control
Disable
Enable
Internal RC oscillator
External crystal oscillator
fail

4.2.2.“Read”Commands
No.
Command
Description
(1)
AT?NAME
To retrieve device name
(2)
AT?VERSION
To retrieve firmware version
(3)
AT?MACADDR
To retrieve IC MAC address
(4)
AT?BAUDRATE
To retrieve current UART baud rate
(5)
AT?FLOWCONTROL
To retrieve UART status of flow control
(6)
AT?TXPOWER
To retrieve RF TX power
(7)
AT?XTAL
To retrieve status of oscillator
(8)
AT?CONNECTINDICATOR
To retrieve logic of pin for BT-connecting indicator
(9)
AT?PHYMODE
To retrieve status of PHY mode
(10)
AT?WAKEUP
To retrieve logic of wake-up pin
(11)
AT?ADVTIME
To retrieve advertising time (Hex)
(12)
AT?DCDC
To retrieve DC to DC converter status
(13)
AT?CONNECTINTERVALMODE
To retrieve status of connection interval mode
(14)
AT?SERIALNO
To retrieve serial number
(15)
AT?ADCVALUE
To retrieve 10bit ADC value
(16)
AT?RESPONSE
To retrieve status of response
(17)
AT?ALLPARAMETERS
To retrieve value of all parameters
(18)
AT?CONNECTINTERVALTIME
To retrieve value of connection interval time under Mode 2

4.2.3.Response (Default)
No.
Command
Response
(1)
AT?NAME
Raytac AT-UART (default)
(2)
AT?VERSION
e.g. version: 1.0
(3)
AT?MACADDR
e.g. D352BDE1E414
(4)
AT?BAUDRATE
0 baudrate9600 (default)
(0 = 9600; 1 = 19200; 2 = 38400; 3 = 57600; 4 = 115200;
5 = 230400; 6 = 460800)
(5)
AT?FLOWCONTROL
0 flowcontrol dis (default)
(0 = disabled; 1 = enabled)
(6)
AT?TXPOWER
0 txpower 4dbm (default)
(0 = 4dBm; 1 = 0dBm; 2 = -4dBm; 3 = -8dBm, 4 = -20dBm)
(7)
AT?XTAL
0 xtal internal (default)
(0 = internal; 1 = external, and XTAL = 32.768KHz
oscillator)
(8)
AT?CONNECTINDICATOR
0 connect indicator low (default)
(0 = output low; 1 = output high)
(9)
AT?PHYMODE
0 PHY mode 1Mbps (default)
(0 = 1Mbps; 1 = 2Mbps)
(10)
AT?WAKEUP
0 wakeup low (default)
(0 = low active; 1 = high active)
(11)
AT?ADVTIME
0000 (default: Hex, forever advertising with no timeout,
tttt: 0x0000)
(12)
AT?DCDC
0 dcdc dis (default)
(0 = disabled; 1 = enabled)
(13)
AT?CONNECTINTERVALMODE
0 connect interval mode 0 (default)
(0 = fixed connection interval for iOS/Android APP usage
1 = fixed connection interval,for nRF52832 Central usage
2 = programmable connection interval for iOS/Android APP
usage)

No.
Command
Response
(14)
AT?SERIALNO
Display “ no data! ” string (default)
(15)
AT?ADCVALUE
Value varies from input voltage
(16)
AT?RESPONSE
1 response en (default)
(0 = disable response; 1 = enable response)
(17)
AT?ALLPARAMETERS
Display value of all parameters, separated by "0x0d0x0a"
(18)
AT?CONNECTINTERVALTIME
006400C8 (default: Hex, 100ms min. connection interval /
200ms Max. connection interval, tttttttt: 0x006400C8)

4.3. Default Info
No.
Description
Default
(1)
Device name
Raytac AT-UART
(2)
Base UUID
0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0
0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E
(3)
Service UUID
0x0001
TX characteristic: 0x0003; RX characteristic: 0x0002
(4)
Baud rate
9600bps,n,8,1
(5)
Status of flow control
Disabled
(6)
RF TX power
+4dBm
(7)
32.768Khz oscillator
Using internal RC with 1000ms calibration time
(8)
Logic of BT connecting indicator
Output set as logic low when BT is connecting
(9)
PHY mode
1Mbps
(10)
Logic of wake-up pin
Set logic low to wake up in deep sleep
(11)
Advertising time
Forever advertising with no timeout
(12)
Status of DC-to-DC converter
Disabled
(13)
Connection interval mode
Set at min. 20ms and Max. 40ms for iOS/Android usage
(14)
Serial number
Display “ no data! ” string
(15)
ADC value
Value varies from input voltage between
0x0000 ~ 0x03FF (Hex).
(16)
State of response
Enabled

5.How to Control via External MCU
5.1. How to Send AT Commands
⚫When BT is NOT connected, for ALL commands
1. Output low to UART PD pin to enable UART interface. Please keep it low during the
whole time when sending AT commands.
2. Send any AT commands you want. Please wait for at least 250 ms between sending
each command.
We recommended sending corresponding “Read” command (section 4.2.2 ) right after
the delay to know whether the writing is successful before moving on to step 3 to save
your settings.
Please prolong the delay (over 250 ms) when writing or/and reading is not successful.
3. Send command “ AT+RESET ” (not HW reset) to save all your settings.
4. Output high or NC to UART PD pinto turn off UART interface.
⚫When BT is connected for following commands ONLY
Write: AT+DISCONNECT, AT+SLEEP
Read: AT?ADCVALUE
1. Output low to UART PD pin to enable UART interface. Please keep it low during the
whole time when sending AT commands.
2. Output low to flash default pin to enable receiving AT commands when BT is connected.
Please keep it low during the whole time when sending AT commands.
3. Send “AT?ADCVALUE” or “AT+DISCONNECT” or “AT+SLEEP”
4. Output high or NC to UART PD pin to turn off UART interface.
5. Output high or NC to flash default pin to disable the module to receive AT commands
when BT is connected.

5.2. How to Transmit Data
* Only when BT is connected *
1. Output low to UART PD pin to enable UART interface. Please keep it low during the
whole time when transmitting data.
2. Output high or NC to UART PD pin to turn off UART interface.
5.3. How to Return to Flashed Default Setting
* Only when BT is NOT connected *
* Note that default baud rate is “9600bps,n,8,1”. For other default, please
check “4.3 Default Info”
⚫Use Hardware Method
1. Read indicator pin first to check if BT is NOT in connection.
2. Output a low pulse to flash default pin, then system will return to default setting.
⚫Use Software method
1. Output low to UART PD pin to enable UART interface. Please keep in low during the
whole time when sending AT commands.
2. Send command “ AT+DEFAULT ”, then system will return to default setting.

6.Test Report
All testing is done under PHY mode at 1M bps.
6.1. Current Test
DC/DC
Logic of UART PD pin
Advertising Current
Connected Current
Disable
High
0.85 mA
0.3 mA
Low
1.56 mA
1 mA
Enable
High
0.45 mA
0.16 mA
Low
0.95 mA
0.68 mA

6.2. Throughput Test
Here D.L. means “Data Length” and D.I. means “Data Interval” in the table.
⚫MCU → Peripheral (MDBT42T-AT/MDBT42T-PAT) → Central → Console
Central
Connection Interval
Peripheral
Connection Interval
Baud
Rate
Flow
Control
MCU D.L.
(bytes)
MCU D.I.
(ms)
Total D.L.
(bytes)
Total
Tras. Time (sec)
Data Rate
(k-bytes/sec)
min = 20ms
Max = 75ms
min = 20ms
Max = 40ms
9600
X
64
60
262152
273
0.96
244
250
999432
1,042
V
244
250
999432
1,042
min = 20ms
Max = 75ms
min = 20ms
Max = 40ms
115200
X
64
8
262152
33
7.9
244
30
999432
124
8
V
244
30
999432
124
8
min = 20ms
Max = 75ms
min = 20ms
Max = 40ms
460800
X
244
25
999432
103
9.7
V
min = Max = 8ms
min = Max = 8ms
9600
X
64
60
262152
273
0.96
244
250
999432
1,042
V
244
250
999432
1,042
min = Max = 8ms
min = Max = 8ms
115200
X
64
8
262152
33
7.9
244
30
999432
124
8
V
244
30
999432
124
8
min = Max = 8ms
min = Max = 8ms
460800
X
244
15
999432
62
16.1
V

⚫MCU →Central →Peripheral (MDBT42T-AT/MDBT42T-PAT) →Console
Central
Connection Interval
Peripheral
Connection Interval
Baud
Rate
Flow
Control
MCU D.L.
(bytes)
MCU D.I.
(ms)
Total D.L.
(bytes)
Total
Trans. Time (sec)
Data Rate
(k-bytes/sec)
min = 20ms
Max = 75ms
min = 20ms
Max = 40ms
9600
X
64
60
262152
273
0.96
244
250
999432
1,042
V
244
250
999432
1,042
min = 20ms
Max = 75ms
min = 20ms
Max = 40ms
115200
X
64
8
262152
33
7.9
244
30
999432
124
8
V
244
30
999432
124
8
min = 20ms
Max = 75ms
min = 20ms
Max = 40ms
460800
X
244
18
999432
74
13.5
V
min = Max = 8ms
min = Max = 8ms
9600
X
64
60
262152
273
0.96
244
250
999432
1,042
V
244
250
999432
1,042
min = Max = 8ms
min = Max = 8ms
115200
X
64
8
262152
33
7.9
244
30
999432
124
8
V
244
30
999432
124
8
min = Max = 8ms
min = Max = 8ms
460800
X
244
15
999432
61
16.3
V

20
7.Useful Links
⚫Nordic Infocenter: https://infocenter.nordicsemi.com/index.jsp
All the necessary technical files and software development kits of Nordic’s chip are on
this website.
⚫Nordic Developer Zone: https://devzone.nordicsemi.com/questions/
A highly recommended website for firmware developer. Interact with other developers
and Nordic’s employees will help with your questions. The site also includes tutorials in
detail to help you get started.
⚫Official Page of nRF52805 : https://www.nordicsemi.com/Products/Low-power-short-
range-wireless/nRF52805
A brief introduction to nRF52805 and download links for Nordic’s developing software
and SoftDevices.
Table of contents
Other RAYTAC Motherboard manuals