Objective
This hands-on application example outlines the basic Command mode operation for the RN1723.
You will learn:
- How to setup basic communications between your PC and the RN-1723-EK
- How to enter Command mode
- Commands that review the current configuration settings of the module
- Commands that reset the module
Materials
Hardware Tools
Tool | About | Purchase |
---|---|---|
| |
Software Tools
This lab requires the following software tools:
In order to communicate with the board, you will need to download and install Future Technology Devices International (FTDI) USB Drivers on your PC.
Procedure
The following procedure is performed on a Windows 7 computer using Tera Term terminal emulator software.
1
Connection Overview
You will be using Tera Term (or CoolTerm) to emulate a microcontroller that sends/receives text messages from the Universal Asynchronous Receiver Transmitter (UART) interface of the module.
After associating with an AP and obtaining an IP address from the router, the module creates a TCP/UDP socket connection with a server, then exchanges data with the server. The TCP/UDP operation is transparent to the UART interface (i.e., the MCU only sees the application data bytes on the UART interface).
This is depicted in Figure 1:
3
Connect Module to PC
After installing the FTDI USB drivers on your PC, connect the RN-1723-EK to your computer using the supplied USB cable.
By default, the module powers up in Data mode. This is indicated by the GREEN LED flashing slowly, and the RED LED flashing quickly.
5
Launch Tera Term, Open Assigned COM Port, Enter Command Mode
Start Tera Term, and open the assigned COM port number with the following settings:
- 9600 baud, 8-bits, No Parity, 1-stop bit
Since the module is currently in Data mode, you will need to enter a special key sequence to switch to Command mode. Type the following key sequence in the terminal (note these keys are not echoed):
$
If proper communication has been established, the module should reply with:
CMD
You are now in Command mode. Yay!
6
Query Current Module Configuration Settings
The first action command we will learn is how to query the module settings.
The following query retrieves all current settings in all categories:
get everything
Alternatively, each category's settings may be queried individually:
get wlan
get ip
get comm
etc...
Here is a useful command to obtain the current firmware version of the module:
ver
7
Change Specific Module Configuration Settings, Save to NVM
Typically, you will want to modify one or more settings in your application.
The following command sequence scans available access points, then updates several WLAN configuration settings, enabling the module to automatically scan and associate with a specific WLAN access point every time it is restarted.
Note that to make the changes persistent across module restart, the save command must be issued.
scan
set wlan join 1
set wlan ssid TCP0401_3
set wlan pass Microchip
save
8
Exit Command Mode
At this point, you may exit Command mode by typing the following command in the terminal:
exit
The module should reply with:
EXIT
Alternatively (and preferably if you've just saved several configuration updates), you can "reboot" the module (thereby applying those configuration changes) by typing:
reboot
You will see some status messages on reboot, followed by *READY*, indicating the module is in Data mode.
Conclusions
RN-1723-EK is a cost-effective tool that may be used to learn the ASCII command set for the RN1723 module, before embedding the module into your design.
To learn more about the RN-1723-EK or RN1723 command set, please view the following: