0% found this document useful (0 votes)
80 views

HC12 AT Commands Guide With Examples

Uploaded by

icase.arm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

HC12 AT Commands Guide With Examples

Uploaded by

icase.arm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

HC-12 AT Commands List and Usage

This document provides a comprehensive guide to the AT commands used with the HC-12
communication module, including a list of commands, configuration details.

Command Description Default Value Example Usage

AT Test if the module responds. N/A AT

AT+RX Enter receive mode (default communication N/A AT+RX


mode).

AT+VERSION Check the firmware version of the module. N/A AT+VERSION

AT+Bxxxx Set the baud rate for serial communication 9600 bps AT+B9600

AT+Cxxxx Set the communication channel (frequency) 433.4 MHz AT+C001

AT+FUx Set the communication mode (FU1, FU2, FU3 AT+FU3


FU3, FU4)

AT+Px Set the transmission power level (P1 to P8) P8 (20dBm AT+P5

AT+SLEEP Put the module into sleep mode to save N/A AT+SLEEP
power.

AT+DEFAULT Restore the factory default settings. N/A AT+DEFAULT

AT+UPDATE Update the module’s firmware (only for N/A AT+UPDATE


factory use).

How to Use AT Commands with ESP32


1. Connect the HC-12 to the ESP32 as follows:
- GND -> GND

- VCC -> 3.3V

- RX -> GPIO 19

- TX -> GPIO 18

- SET -> GPIO 5

AT Commands Usage Examples

Example 1: Change Baud Rate


To change the baud rate of the HC-12 module, use the command 'AT+Bxxxx'. For example, to
set the baud rate to 9600, enter the following in the Serial Monitor:

AT+B9600

Response: OK+B9600

Example 2: Set Channel


To set the communication channel (frequency), use the command 'AT+RFy', where 'y' is the
channel number (1-127). For example, to set the channel to 10, enter the following:

AT+RF010

Response: OK+RF010

Example 3: Set Transmission Power


To set the transmission power level, use the command 'AT+Px', where 'x' is a number from
1 to 8 (8 being the highest). For example, to set the power level to 5, use:

AT+P5

Response: OK+P5

AT+C002
433.4 MHz+(2−1)×0.4 MHz=433.8 MHz

AT+C001 1 433.4
AT+C002 2 433.8

AT+C003 3 434.2

AT+C004 4 434.6

AT+C005 5 435.0

AT+C006 6 435.4

AT+C007 7 435.8

AT+C008 8 436.2

AT+C009 9 436.6

AT+C010 10 437.0

AT+C011 11 437.4

AT+C012 12 437.8

AT+C013 13 438.2

AT+C014 14 438.6

AT+C015 15 439.0

AT+C016 16 439.4

AT+C017 17 439.8

AT+C018 18 440.2

AT+C019 19 440.6

AT+C020 20 441.0

AT+C021 21 441.4

AT+C022 22 441.8

AT+C023 23 442.2

AT+C024 24 442.6

AT+C025 25 443.0

AT+C026 26 443.4
AT+C027 27 443.8

AT+C028 28 444.2

AT+C029 29 444.6

AT+C030 30 445.0

AT+C031 31 445.4

AT+C032 32 445.8

AT+C033 33 446.2

AT+C034 34 446.6

AT+C035 35 447.0

AT+C036 36 447.4

AT+C037 37 447.8

AT+C038 38 448.2

AT+C039 39 448.6

AT+C040 40 449.0

AT+C041 41 449.4

AT+C042 42 449.8

AT+C043 43 450.2

AT+C044 44 450.6

AT+C045 45 451.0

AT+C046 46 451.4

AT+C047 47 451.8

AT+C048 48 452.2

AT+C049 49 452.6

AT+C050 50 453.0
AT+C051 51 453.4

AT+C052 52 453.8

AT+C053 53 454.2

AT+C054 54 454.6

AT+C055 55 455.0

AT+C056 56 455.4

AT+C057 57 455.8

AT+C058 58 456.2

AT+C059 59 456.6

AT+C060 60 457.0

AT+C061 61 457.4

AT+C062 62 457.8

AT+C063 63 458.2

AT+C064 64 458.6

AT+C065 65 459.0

AT+C066 66 459.4

AT+C067 67 459.8

AT+C068 68 460.2

AT+C069 69 460.6

AT+C070 70 461.0

AT+C071 71 461.4

AT+C072 72 461.8

AT+C073 73 462.2

AT+C074 74 462.6
AT+C075 75 463.0

AT+C076 76 463.4

AT+C077 77 463.8

AT+C078 78 464.2

AT+C079 79 464.6

AT+C080 80 465.0

AT+C081 81 465.4

AT+C082 82 465.8

AT+C083 83 466.2

AT+C084 84 466.6

AT+C085 85 467.0

AT+C086 86 467.4

AT+C087 87 467.8

AT+C088 88 468.2

AT+C089 89 468.6

AT+C090 90 469.0

AT+C091 91 469.4

AT+C092 92 469.8

AT+C093 93 470.2

AT+C094 94 470.6

AT+C095 95 471.0

AT+C096 96 471.4

AT+C097 97 471.8

AT+C098 98 472.2
AT+C099 99 472.6

AT+C100 100 473.0

You might also like