RAYTAC MDBT42Q-AT-UART-S User manual

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

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 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....................................................................................................................... 23

3
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 such
pre-programming and is looking for nRF52810 module, please check MDBT42Q-192K &
MDBT42Q-P192K.
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.

4
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
(6) UART interface for data bridge orAT commands.
(7) Wake-up key.

5
(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 only

6
3.Reference Circuit

7
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
- Support maximum MTU 247bytes / data payload up to maximum 244 bytes

8
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

9
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”
(35)
AT+ADVPATTERNnnnnffff
Set LED advertising pattern (Hex), where
n = time when LED on, f = time when LED off
e.g. 0x0064 (min. 100ms)
0x1388 (Max. 5000ms),
0x00000000 (off)
0xFFFFFFFF (on)
(36)
AT+CONNECTPATTERNnnnnffff
Set LED connecting pattern (Hex), where
n = time when LED on, f = time when LED off
e.g. 0x0064 (min. 100ms)
0x1388 (Max. 5000ms)
0x00000000 (off)
0xFFFFFFFF (on)

10
No.
Command
Description
(37)
AT+SERIALNOnnnnnnnn
Set serial number
e.g. AB000001, fixed 8-character length
(38)
AT+RESPONSEDIS
Disable 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
Set GPIO number p0.nn to high,
where “nn” is range from 12 ~ 19 (Ascii)
(43)
AT+SETGPIOnnLOW
Set GPIO number p0.nn to low,
where “nn” is range from 12 ~ 19 (Ascii)
(44)
AT+SETGPIOnnOFF
Set GPIO number p0.nn to unused,
where “nn” is range from 12 ~ 19 (Ascii)
(45)
AT+MACADDRnnnnnnnnnnnn
Set IC MAC address, where n is Hex.
Written order is from MSB byte to LSB byte.

11
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?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

12
4.2.3.Response (Default)
No.
Command
Response
Description
(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)
(14)
AT?ADVPATTERN
01F401F4 (default: Hex, 0.5sec on / 0.5sec off,
nnnn: 0x01F4, ffff: 0x01F4)

13
No.
Command
Response
Description
(15)
AT?CONNECTPATTERN
00c80708 (default: Hex, 0.2sec on / 1.8sec off,
nnnn: 0x00c8, ffff: 0x0708)
(16)
AT?SERIALNO
Display “ no data! ” string (default)
(17)
AT?ADCVALUE
Value varies from input voltage
(18)
AT?RESPONSE
1 response en (default)
(0 = disable response; 1 = enable response)
(19)
AT?ALLPARAMETERS
Display value of all parameters, separated by "0x0d0x0a"
(20)
AT?CONNECTINTERVALTIME
006400C8 (default: Hex, 100ms min. connection interval /
200ms Max. connection interval, tttttttt: 0x006400C8)

14
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)
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
Value varies from input voltage between
0x0000 ~ 0x03FF (Hex).
(18)
State of response
Enabled
(19)
Programmable output GPIO
P0.12, P0.13, P0.14, P0.15, P0.16, P0.17, P0.18
and P0.19 are unused

15
5.How to Control External MCU
5.1. How to Send AT Commands
⚫When BT is NOT connected (for all commands)
1. Output low to P0.10 (UART PD pin) to enable UART interface. Please keep it enabling
during the whole time when sendingAT commands.
2. Send any AT commands you want.
3. Send command “ AT+RESET ” to save all your settings.
4. Output high or NC to P0.10 (UART PD pin) to turn off UART interface.
⚫When BT is connected (for AT?ADCVALUE, AT+DISCONNECT,
AT+SLEEP, AT+SETGPIOnnHIGH, AT+SETGPIOnnLOW and
AT+SETGPIOnnOFF only)
1. Output low to P0.10 (UART PD pin) to enable UART interface. Please keep it enabling
during the whole time when sendingAT commands.
2. Output low to P0.11 (flash default pin) to enable receivingAT 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 P0.10 (UART PD pin) to turn off UART interface.
5. Output high or NC to P0.11 (flash default pin) to disable receiving AT commands when
BT is connected.

16
5.2. How to Transmit Data
* Only when BT is connected *
1. Output low to P0.10 (UART PD pin) to enable UART interface. Please keep it enabling
during the whole time when transmitting data.
2. Output high or NC to P0.10 (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 P0.03 (indicator pin) first to check if BT is NOT in connection.
2. Output a low pulse to P0.11 (flash default pin), then system will return to default setting.
⚫Use Software method
1. Output low to P0.10 (UART PD pin) to enable UART interface. Please keep in enabling
during the whole time when sendingAT 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
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

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 → 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
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

19
⚫MCU →Central →Peripheral (MDBT42Q-AT/MDBT42Q-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 nRF52810 : https://www.nordicsemi.com/eng/Products/nRF52810
A brief introduction to nRF52810 and download links for Nordic’s developing software
and SoftDevices.
Table of contents
Other RAYTAC Motherboard manuals