Version: E
Issued Date: 2021/07/07

User Guide(簡易使用手冊)產品名稱(Product)Demo Board for MDBT42Q-AT / PATin Peripheral / Slave role產品型號(Model No.)

MDBT42Q – AT – UART – S

韌體版本(FW Rev.)

1.4

Index1.

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.2.1. “Write” Commands................................................................................................ 8
4.2.2. “Read” Commands .............................................................................................. 11
4.2.3. Response (Default) ............................................................................................. 12
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 ......................................................................................... 175.3. How to Return to Flashed Default Setting........................................................... 17

6.

Test Report................................................................................................................... 18
6.1. Current Test ........................................................................................................ 18
6.2. Throughput Test .................................................................................................. 19

7.

Useful Links ................................................................................................................. 21

History of Firmware Revision ............................................................................................ 22
Release Note ....................................................................................................................... 24

1. Introduction
This document shows how to use the demo board (MDBT42Q-AT-UART-S) to test function of
MDBT42Q-AT & MDBT42Q-PAT.
MDBT42Q-AT-UART-S is designed for testing and debugging without building your own
board. The board is only available with MDBT42Q-AT (chip antenna) module. MDBT42Q-AT
will be pre-programmed with Raytac’s AT command firmware. If you don’t need suchpre-programming and is looking for nRF52810 module, please check MDBT42Q-192KV2 &MDBT42Q-P192KV2.
Please visit our website for spec sheet of every module mentioned above.

1.1.

Contents of the Set

Each set includes MDBT42Q-AT-UART-S x 1 and mini-USB cable x 1. Please contact us if
the set you receive is not complete.

or3

2. Hardware Description(1)

MDBT42Q-AT BLE module based on nRF52810.

(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 ×→ 3.3V ×

𝑅1
𝑅1 +𝑅2= Reference Voltage

180= 0.594 ≈ 0.6V
820 + 180

(6)

UART interface for data bridge or AT commands.

(7)

Wake-up key.

4

(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 MDBT42Q-AT.

(10)

LED for status indicator(11)

USB Power only5

3. Reference Circuit

6

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-

Set LED pattern indicating advertising or connecting status-

7 sets of UART baud rates-

Enable/disable UART flow control-

Enable/disable interface of UART hardware-

Support 8 programmable output GPIO-

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.

7

4.2.

AT Command Sets

4.2.1. “Write” Commands
No.

Command

Description(1)

AT+NAME(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(12)

AT+BAUDRATE460800(13)

AT+FLOWCONTROLDISDisable 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

Set device name,Max. length of 20 characterse.g. AT+NAME123 (device name 123, 3 characters)

Set UART baud rate at 230400 bps,n,8,1(recommended enabling flow control)
Set UART baud rate at 460800 bps,n,8,1(recommended enabling flow control)

8

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
Set advertising time (Hex)(28)

AT+ADVTIMEtttt

e.g. 0x001E (min. 30secs),
0x0E10 (Max. 3,600secs)
0x0000 (forever)(29)

AT+DCDCDISDisable DC to DC converter(30)

AT+DCDCEN

Enable DC to DC converter(31)

AT+CONNECTINTERVALMODE0(32)

AT+CONNECTINTERVALMODE1(33)

AT+CONNECTINTERVALMODE2

Set connection interval mode for iOS/Android APP usage(min. 20ms / Max. 40ms),
Set connection interval mode for nRF52832 Central usage(min. 8ms / Max. 8ms)
Set connection interval mode for iOS/Android APP usage(programmable: min. / Max. range is 8ms ~ 1,000ms)
Set connection interval time (Hex), available when
activating “AT+CONNECTINTERVALMODE2”(34)

AT+CONNECTINTERVALTIMEtttttttt

e.g. 0x0008 (8ms),
0x03E8 (1,000ms), conditions to be met:
“min. connection interval ≦ Max. connection interval”
Set LED advertising pattern (Hex), wheren = time when LED on, f = time when LED off(35)

AT+ADVPATTERNnnnnffff

e.g. 0x0064 (min. 100ms)
0x1388 (Max. 5000ms),
0x00000000 (off)0xFFFFFFFF (on)Set LED connecting pattern (Hex), wheren = time when LED on, f = time when LED off(36)

AT+CONNECTPATTERNnnnnffff

e.g. 0x0064 (min. 100ms)
0x1388 (Max. 5000ms)
0x00000000 (off)0xFFFFFFFF (on)

9

No.

Command

Description(37)

AT+SERIALNOnnnnnnnn(38)

AT+RESPONSEDISDisable response when sending “write” command(39)

AT+RESPONSEEN

Enable response when sending “write” command(40)

AT+DISCONNECT

Terminate the connection(41)

AT+DEFAULT

Back to default(42)

AT+SETGPIOnnHIGH(43)

AT+SETGPIOnnLOW(44)

AT+SETGPIOnnOFF(45)

AT+MACADDRnnnnnnnnnnnn

Set serial number
e.g. AB000001, fixed 8-character length

Set GPIO number p0.nn to high,where “nn” is range from 12 ~ 19 (Ascii)
Set GPIO number p0.nn to low,
where “nn” is range from 12 ~ 19 (Ascii)
Set GPIO number p0.nn to unused,
where “nn” is range from 12 ~ 19 (Ascii)
Set IC MAC address, where n is Hex.
Written order is from MSB byte to LSB byte.

104.2.2. “Read” Commands
No.

Command

Description(1)

AT?NAMETo 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?FLOWCONTROLTo retrieve UART status of flow control(6)

AT?TXPOWER

To retrieve RF TX power(7)

AT?XTALTo retrieve status of oscillator(8)

AT?CONNECTINDICATOR

To retrieve logic of pin for BT-connecting indicator(9)

AT?PHYMODETo 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?DCDCTo retrieve DC to DC converter status(13)

AT?CONNECTINTERVALMODE

To retrieve status of connection interval mode

(14)

AT?ADVPATTERN

To retrieve LED advertising pattern (Hex)(15)

AT?CONNECTPATTERN

To retrieve LED connecting pattern (Hex)(16)

AT?SERIALNO

To retrieve serial number(17)

AT?ADCVALUE

To retrieve 10bit ADC value(18)

AT?RESPONSE

To retrieve status of response(19)

AT?ALLPARAMETERS

To retrieve value of all parameters(20)

AT?CONNECTINTERVALTIME

To retrieve value of connection interval time under Mode 2

11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
0 baudrate9600 (default)(4)

AT?BAUDRATE(0 = 9600; 1 = 19200; 2 = 38400; 3 = 57600; 4 = 115200;
5 = 230400; 6 = 460800)(5)

AT?FLOWCONTROL(6)

AT?TXPOWER

0 flowcontrol dis (default)(0 = disabled; 1 = enabled)
0 txpower 4dbm (default)(0 = 4dBm; 1 = 0dBm; 2 = -4dBm; 3 = -8dBm, 4 = -20dBm)
0 xtal internal (default)(7)

AT?XTAL(0 = internal; 1 = external, and XTAL = 32.768KHz
oscillator)(8)

AT?CONNECTINDICATOR(9)

AT?PHYMODE(10)AT?WAKEUP(11)

AT?ADVTIME(12)AT?DCDC0 connect indicator low (default)(0 = output low; 1 = output high)
0 PHY mode 1Mbps (default)(0 = 1Mbps; 1 = 2Mbps)
0 wakeup low (default)(0 = low active; 1 = high active)
0000 (default: Hex, forever advertising with no timeout,
tttt: 0x0000)
0 dcdc dis (default)(0 = disabled; 1 = enabled)
0 connect interval mode 0 (default)(0 = fixed connection interval for iOS/Android APP usage(13)

AT?CONNECTINTERVALMODE

1 = fixed connection interval, for nRF52832 Central usage
2 = programmable connection interval for iOS/Android APP
usage)(14)

AT?ADVPATTERN

01F401F4 (default: Hex, 0.5sec on / 0.5sec off,
nnnn: 0x01F4, ffff: 0x01F4)

12

No.

Command

Response(15)

AT?CONNECTPATTERN(16)

AT?SERIALNO

Display “ no data! ” string (default)(17)

AT?ADCVALUE

Value varies from input voltage(18)

AT?RESPONSE(19)

AT?ALLPARAMETERS(20)

AT?CONNECTINTERVALTIME

00c80708 (default: Hex, 0.2sec on / 1.8sec off,
nnnn: 0x00c8, ffff: 0x0708)

1 response en (default)(0 = disable response; 1 = enable response)
Display value of all parameters, separated by "0x0d0x0a"
006400C8 (default: Hex, 100ms min. connection interval /200ms Max. connection interval, tttttttt: 0x006400C8)

13

4.3.

Default InfoNo.

Description

Default(1)

Device name

Raytac AT-UART(2)

Base UUID(3)

Service UUID

(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)

Advertising LED pattern

0.5sec on / 0.5sec off(15)

Connecting LED pattern

0.2sec on / 1.8secs off(16)

Serial number

Display “ no data! ” string(17)

ADC value(18)

State of response(19)

Programmable output GPIO

0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0
0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E
0x0001
TX characteristic: 0x0003; RX characteristic: 0x0002

Value varies from input voltage between
0x0000 ~ 0x03FF (Hex).
Enabled
P0.12, P0.13, P0.14, P0.15, P0.16, P0.17, P0.18
and P0.19 are unused

14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 thewhole time when sending AT commands.

2.

Send any AT commands you want. Please wait for at least 250 ms between sending
each command.
We recommend sending corresponding “Read” command (section 4.2.2) right after thedelay to know whether the writing is successful before moving on to step 3 to save yoursettings.
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 pin to turn off UART interface.

15⚫ When BT is connected for following commands ONLY
Write: AT+DISCONNECT, AT+SLEEP, AT+SETGPIOnnHIGH,
AT+SETGPIOnnLOW, AT+SETGPIOnnOFF
Read: AT?ADCVALUE
1.

Output low to UART PD pin to enable UART interface. Please keep it LOW during thewhole 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” or“AT+SETGPIOnnHIGH” or “AT+SETGPIOnnLOW” or “AT+SETGPIOnnOFF”.

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.

16

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 thewhole 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, pleasecheck “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 method1.

Output low to UART PD pin to enable UART interface. Please keep it LOW during thewhole time when sending AT commands.

2.

Send command “ AT+DEFAULT ”, then system will return to default setting.

17

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

High0.85 mA

0.3 mA

Low

1.56 mA

1 mA

High

0.45 mA

0.16 mA

Low

0.95 mA

0.68 mA

Logic of UART PD pin

Sleep Current

High

3 uA

Low

3 uA

DisableEnableSleep Mode

18

6.2.

Throughput Test

Here D.L. means “Data Length” and D.I. means “Data Interval” in the table.

⚫ MCU → Peripheral (MDBT42Q-AT/MDBT42Q-PAT) → Central → ConsoleCentralPeripheral

Baud

Flow

MCU D.L.

MCU D.I.

Total D.L.

Total

Data Rate

Connection Interval

Connection Interval

Rate

Control(bytes)(ms)(bytes)Trans. Time (sec)(k-bytes/sec)

64

60

262152273

min = 20ms

min = 20ms

Max = 75ms

Max = 40ms

244

250

999432

1,042

244

250

999432

1,042

64

8

262152

33

7.9

244

30

999432

124

8

244

30

999432

124

8

244

25

999432

103

9.7

64

60

262152

273

244

250

999432

1,042

244

250

999432

1,042

64

8

262152

33

7.9

244

30

999432

124

8

244

30

999432

124

8

244

15

999432

62

16.1

X
9600
V

min = 20ms

min = 20ms

Max = 75ms

Max = 40ms

X
115200V

min = 20ms

min = 20ms

Max = 75ms

Max = 40ms

0.96

X
460800V
X

min = Max = 8ms

min = Max = 8ms

9600
V

0.96

X
min = Max = 8ms

min = Max = 8ms

115200V
X

min = Max = 8ms

min = Max = 8ms

460800V

19⚫ MCU → Central → Peripheral (MDBT42Q-AT/MDBT42Q-PAT) → ConsoleCentralPeripheral

Baud

Flow

MCU D.L.

MCU D.I.

Total D.L.

Total

Data Rate

Connection Interval

Connection Interval

Rate

Control(bytes)(ms)(bytes)Trans. Time (sec)(k-bytes/sec)

64

60

262152273

min = 20ms

min = 20ms

Max = 75ms

Max = 40ms

244

250

999432

1,042

244

250

999432

1,042

64

8

262152

33

7.9

244

30

999432

124

8

244

30

999432

124

8

244

18

999432

74

13.5

64

60

262152

273

244

250

999432

1,042

244

250

999432

1,042

64

8

262152

33

7.9

244

30

999432

124

8

244

30

999432

124

8

244

15

999432

61

16.3

X
9600
V

min = 20ms

min = 20ms

Max = 75ms

Max = 40ms

X
115200V

min = 20ms

min = 20ms

Max = 75ms

Max = 40ms

0.96

X
460800V
X

min = Max = 8ms

min = Max = 8ms

9600
V

0.96

X
min = Max = 8ms

min = Max = 8ms

115200V
X

min = Max = 8ms

min = Max = 8ms

460800V

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 nRF52810 : https://www.nordicsemi.com/eng/Products/nRF52810
A brief introduction to nRF52810 and download links for Nordic’s developing softwareand SoftDevices.

21

History of Firmware Revision
FW

Compatible

ReleaseVer.

HW Build

Date

Description of Revision

Note

1.0

2018/04/24

1st release.

99-52810-02A

1.1

2018/06/01

1.

99-52810-02B

2.

UI changes:-

Add battery service.

-

Add ”AT?ADCVALUE” to get ADC value in BLE connecting status.

-

Add ”AT+DISCONNECT” to terminate the connection.

-

If response enabled, ”AT+” will response info.

-

Set forever advertising (no timeout) as default.

Add new AT commands:-

AT+RESPONSEDIS-AT+RESPONSEEN (Default)-

AT?RESPONSE-

AT?ALLPARAMETERS

1.2

2018/06/27

Fixed bugs of battery service.

99-52810-02C

1.3

2018/10/22

1.

Improved power consumption.

99-52810-02D

2.

UI Changes:-

3.

Add “AT+SLEEP” to sleep in connected state

Add new AT commands-

AT+CONNECTINTERVALMODE2-

AT+CONNECTINTERVALTIMEtttttttt

22

FW

Compatible

ReleaseVer.

HW Build

Date

1.3

1.4

2018/10/22

2019/04/09

Description of Revision(continued)-

AT?CONNECTINTERVALTIME-

AT+SETGPIOnnHIGH-

AT+SETGPIOnnLOW-

AT+SETGPIOnnOFF

4.

Modify detection for ADC value.

5.

Add function of setting MAC address by the user.

1. Fixed issues of reading MAC address.

Note99-52810-02D

99-52810-02E

2. Added an update process on DLE after connection.

23

Release Note⚫

2018/07/24 Version A: 1st release⚫

2018/10/30 Version B(1) Change model no. to “MDBT42Q-AT-UART-S”.
(2) Update Chapter 4: AT Command, Chapter 5: How to Control External MCU and
Chapter 6: Test Report to match new FW revision 1.3. See History of Firmware
Revision for more details.

⚫

2018/11/08

Version C(1) Correct circuit in Chapter 3: Reference Circuit.
⚫

2020/04/22 Version D:(1) See History of Firmware Revision for FW revision 1.4.

⚫

2021/07/07 Version E(1) Updated the photo of demo board in Chapter 1: Introduction.
(2) Updated the graph in Chapter 2: Hardware Description.
(3) Refined the description in Chapter 5: How to Control via External MCU.
(4) Adding information of current consumption in sleep mode in Chapter 6: Current Test.

24