BFQ4004
Dual-band Wi-Fi Module
AT Command Reference
July 2020
Overview¶
BFQ4004 AT Firmware, officially launched by BeeFi Technologies (hereafter “BeeFi”), is available for download and can be used directly. Users may also find AT Project where BeeFi created example demo code for users to customize their AT firmware.
A list:
- Please make sure that correct binary file (.bin) has been installed in BFQ4004 module before using the AT commands in this document.
- AT firmware uses priority levels and 1 of system_os_task, so only one task of priority 2 is allowed to be set up by user application.
Some highlight text.This document provides detailed information about the BF4004Q WiFi module AT commands. It also introduces how to download firmware images onto the flash on the module as well as some customization examples.
def some_function():
interesting = False
print 'This line is highlighted.'
print 'This one is not...'
print '...but this one is.'
cd ~/esp/esp-idf
./install.ps1
Linux and macOS¶
cd ~/esp/esp-idf
./install.sh
Important
- Please make sure that correct binary file (.bin) has been installed in BFQ4004 module before using the AT commands in this document.
- AT firmware uses priority levels and 1 of system_os_task, so only one task of priority 2 is allowed to be set up by user application.
This document provides detailed information about the BF4004Q WiFi module AT commands. It also introduces how to download firmware images onto the flash on the module as well as some customization examples.
Note
- Please make sure that correct binary file (.bin) has been installed in BFQ4004 module before using the AT commands in this document.
- AT firmware uses priority levels and 1 of system_os_task, so only one task of priority 2 is allowed to be set up by user application.
Attention
Please make sure that correct binary file (.bin) has been installed in BFQ4004 module before using the AT commands in this document.
Note
- Please make sure that correct binary file (.bin) has been installed in BFQ4004 module before using the AT commands in this document.
- AT firmware uses priority levels and 1 of system_os_task, so only one task of priority 2 is allowed to be set up by user application.
Command Types and Formats¶
Each command set contains four types of AT commands.
| Type | Command Format | Description |
|---|---|---|
| Test Command | AT+<X>=? | Queries the Set Commands’ internal parameters and their range of values. |
| Query Command | AT+<X>? | Returns the current value of parameters. |
| Set Command | AT+<X>=<…> | Sets the value of user-defined parameters in commands, and runs these commands. |
| Execute Command | AT+<X> | Runs commands with no user-defined parameter. |
BFQ4004 AT Firmware, officially launched by BeeFi Technologies (hereafter “BeeFi”), is available for download and can be used directly. Users may also find AT Project where BeeFi created example demo code for users to customize their AT firmware.
Note
- Not all AT commands support all four varioations mentioned above.
- Square brackets “[]” designate the default value. It is not always required or may not appear.
- String values need to be included in double quotation markets, for example: AT+CWSAP_CUR=”BFQ4004A”,”123456789”,1,4
- The default baud rate is 1152.
- AT commands have to be capitalized and must end with a new line (CR LF).
Hint
- Not all AT commands support all four varioations mentioned above.
- Square brackets “[]” designate the default value. It is not always required or may not appear.
- String values need to be included in double quotation markets, for example: AT+CWSAP_CUR=”BFQ4004A”,”123456789”,1,4
- The default baud rate is 1152.
- AT commands have to be capitalized and must end with a new line (CR LF).
Tip
- Not all AT commands support all four varioations mentioned above.
- Square brackets “[]” designate the default value. It is not always required or may not appear.
- String values need to be included in double quotation markets, for example: AT+CWSAP_CUR=”BFQ4004A”,”123456789”,1,4
- The default baud rate is 1152.
- AT commands have to be capitalized and must end with a new line (CR LF).
Warning
- Not all AT commands support all four varioations mentioned above.
- Square brackets “[]” designate the default value. It is not always required or may not appear.
- String values need to be included in double quotation markets, for example: AT+CWSAP_CUR=”BFQ4004A”,”123456789”,1,4
- The default baud rate is 1152.
- AT commands have to be capitalized and must end with a new line (CR LF).
Caution
- Not all AT commands support all four varioations mentioned above.
- Square brackets “[]” designate the default value. It is not always required or may not appear.
- String values need to be included in double quotation markets, for example: AT+CWSAP_CUR=”BFQ4004A”,”123456789”,1,4
- The default baud rate is 1152.
- AT commands have to be capitalized and must end with a new line (CR LF).
Danger
- Not all AT commands support all four varioations mentioned above.
- Square brackets “[]” designate the default value. It is not always required or may not appear.
- String values need to be included in double quotation markets, for example: AT+CWSAP_CUR=”BFQ4004A”,”123456789”,1,4
- The default baud rate is 1152.
- AT commands have to be capitalized and must end with a new line (CR LF).
Error
- Not all AT commands support all four varioations mentioned above.
- Square brackets “[]” designate the default value. It is not always required or may not appear.
- String values need to be included in double quotation markets, for example: AT+CWSAP_CUR=”BFQ4004A”,”123456789”,1,4
- The default baud rate is 1152.
- AT commands have to be capitalized and must end with a new line (CR LF).
Basic AT Commands¶
| Commands | Description |
|---|---|
| AT | Tests AT startup. |
| ATE | Configures echoing of AT commands. |
| AT+RST | Restarts the module. |
| AT+GMR | Checks AT commands version information. |
| AT+RESTORE | Restores the factory settings. |
| AT+UART_CUR | The current UART configuration. |
| AT+UART_DEF | The default UART configuration, saved in flash. |
| AT+SYSRAM | Checks the available RAM space. |
| AT+SLEEP | Configures the operating modes for power optimization |
| AT+GSLP | Enters suspend (deep-sleep) mode. |
| AT+RFPOWER | Sets the maximum RF TX power. |
AT – Tests AT Startup¶
| Execute Command | AT |
| Response | OK |
| Parameters | - |
AT+ATE – Configures Echoing of AT Commands¶
BFQ4004 AT Firmware, officially launched by BeeFi Technologies (hereafter “BeeFi”), is available for download and can be used directly. Users may also find AT Project where BeeFi created example demo code for users to customize their AT firmware.
| Execute Command | ATE |
| Response | OK |
| Parameters |
|
| Notes | This command is used to configure command echoing. It means that entered commands are echoed back to the sender when ATE is set to 1. Two settings are possible. The command returns OK in normal case and ERROR when a parameter other than or 1 was specified. |
AT+RST – Restarts the Module¶
| Execute Command | AT+RST |
| Response | OK |
| Parameters | - |
AT+GMR – Checks AT Commands Version Information¶
BFQ4004 AT Firmware, officially launched by BeeFi Technologies (hereafter “BeeFi”), is available for download and can be used directly. Users may also find AT Project where BeeFi created example demo code for users to customize their AT firmware.
| Execute Command | AT+GMR |
| Response | <AT version info> <SDK version info> <compile time> OK |
| Parameters | - |
AT+RESTORE – Restores Factory Settings¶
| Execute Command | AT+RESTORE |
| Response | OK |
| Notes | The execution of this command resets all parameters saved in flash, and restores the factory default settings of the module. The chip will be restarted when this command is executed. |
AT+UART_CUR – Current UART Configuration in RAM¶
| Command | Query: AT+UART_CUR? | Set: AT+UART_CUR=<baudrate>, <databit s>,<stopbits>,<parity>, <flow control> |
| Response | +UART_CUR:<baudrate>,
<databit
s>,<stopbits>,<parity>, | <flow control> OK |
OK |
| Notes | Command AT+UART_CUR? will return the actual value of UART configuration parameters, which may have allowable errors compared with the set value because of the clock division. For example, if the UART baud rate is set as 1152, the baud rate returned by using command AT+UART_CUR? could be 115273. |
- |
| Parameters |
|
|
| Notes |
|
|
| Examples | AT+UART_CUR=1152,8,1,,3 | |
AT+UART_DEF – Default UART Configuration from Flash¶
| Command | Query: AT+UART_DEF? | Set: AT+UART_DEF=<baudrate>, <databit s>,<stopbits>,<parity>, <flow control> |
| Response | +UART_DEF:<baudrate>,
<databit
s>,<stopbits>,<parity>, | <flow control> OK |
OK |
| Parameters |
|
|
| Notes |
|
|
| Examples | AT+UART_DEF=1152,8,1, ,3 | |
AT+SYSRAM – Checks the Remaining Space on RAM¶
BFQ4004 AT Firmware, officially launched by BeeFi Technologies (hereafter “BeeFi”), is available for download and can be used directly. Users may also find AT Project where BeeFi created example demo code for users to customize their AT firmware.
| Query Command | AT+SYSRAM? |
| Response | +SYSRAM:<remaining RAM size> OK |
| Notes | <remaining RAM size>: remaining space of RAM, in bytes. |
AT+SLEEP – Configures the Operating Modes for Power Optimization¶
BFQ4004 AT Firmware, officially launched by BeeFi Technologies (hereafter “BeeFi”), is available for download and can be used directly. Users may also find AT Project where BeeFi created example demo code for users to customize their AT firmware.
| Command | Query: AT+SLEEP? | Set: AT+SLEEP=<sleep mode> |
| Response | +SLEEP:<sleep mode> OK |
OK |
| Parameters |
|
|
| Notes | This command can only be used in Station mode. Associated mode is the default mode.
|
|
| Examples | AT+SLEEP=0 | |
AT+GSLP – Enters Suspend (Deep-sleep) Mode¶
| Set Command | AT+RFPOWER=<TX power> |
| Response | OK |
| Parameters | <TX power>: the maximum value of RF TX power, range: [0, 82] in 0.25dBm unit |
| Notes | This command sets the maximum value of BFQ4004 RF TX power. It is not precise. The actual value could be smaller than the set value. |
| Examples | AT+RFPOWER=50 |
AWS IoT Core AT Commands¶
Customizing AT Firmware¶
If users want to customize AT source code, or add customized AT commands, please copy the folder “at” in the examples to the root directory of the corresponding BFQ4004 SDK , and then enter BFQ4004_SDK/at folder to develop and compile the custom AT project. For details, please refer to BFQ4004 Getting Started Guide.
- OTA:
The official AT firmware launched by BeeFi supports the command AT+CIUPDATE by default, which helps update AT firmware to the latest version from BeeFi Cloud.
For the customized AT firmware, users have to implement this function by themselves to update the firmware from their own cloud. Please refer to the OTA example detailed inat_upgrade.c.
- [STRIKEOUT:SmartConfig:]
[STRIKEOUT:The official AT firmware launched by Espressif supports the commands AT+CWSTARTSMART and AT+CWSTOPSMART.]
[STRIKEOUT:If users don’t need SmartConfig, you can compile AT Project and disable CONFIG_AT_SMARTCONFIG_COMMAND_ENABLE in user_config.h for smaller bin size and more memory.]
TBD
Revision History
| Revision | Description | Date |
| V0.1.0 | Initial internal review version | 2020-07-26 |
Disclaimer and Copyright Notice
Information in this document, including URL references, is subject to change without notice. Please visit http://www.beefi.io/ for the latest information.
THIS CODUMENT IS PROVIDED AS IS WITH NO WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY, NON-INFRINGEMENT, FITNESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE.
All liability, including liability for infringement of any proprietary rights, relating to the use of information in this document, is disclaimed. No licenses express or implied, by estoppel or otherwise, to any intellectual property rights are granted herein.
The Wi-Fi Alliance Member logo is a trademark of the Wi-Fi Alliance. The Bluetooth logo is a registered trademark of Bluetooth SIG.
All trade names, trademarks and registered trademarks mentioned in this document are property of their respective owners and are hereby acknowledged.
Copyright©2020 BeeFi Technologies Inc. All rights reserved.
