Explore Command Mode

 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
RN-1723-EK-50px.png
RN-1723-EK
RN1723 Evaluation Kit

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:

connection-overview.png
Figure 1

2

Module Overview

The following diagram depicts the key components of the RN-1723-EK. Note the Status LED color locations, as these provide useful status indications for a variety of events.

rn-1723-ek-overview.png
Figure 2

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.

laptop-connection.png
Figure 3

By default, the module powers up in Data mode. This is indicated by the GREEN LED flashing slowly, and the RED LED flashing quickly.

4

Use The Device Manager to Find the COM Port Number

Before you start Tera Term, you need to determine the COM port number assigned to the connection.

Select Start > Control Panel > System > Device Manager. Expand Ports and note the COM port number as shown here.

device-manager.png
Figure 4

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
start-tera-term.png
Figure 5

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
query-module.png
Figure 6

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
update-specific-configuration.png
Figure 7

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.

reboot-command.png
Figure 8

 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:

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.