User Manual

RN131/171 Evaluation Kit User’s Guide
DS50002183A-page 28 2013 Microchip Technology Inc.
2.4.6 Using AP Mode
The following sections describe how to use AP mode, including connecting to the mod-
ule, checking for the last device connected over TCP, viewing associated devices,
enabling the link monitor and routing data between clients.
2.4.6.1 CONNECT TO THE MODULE
Once the module boots up in AP mode, any client device can associate with the network
the module is broadcasting. Once associated, the module’s DHCP server assigns an IP
address to the client device.
The default lease time is 1 day i.e., 86,400 seconds. Based on the requirement, configure
or change the lease time using the set dhcp lease <value> command, where <value> is
the time in seconds. To view a list of devices associated with the module, use the show
lease command. The command output is in the following format with commas delimiting
the fields:
Figure 2-8 shows example output from the show lease command.
FIGURE 2-8: SHOW LEASE COMMAND EXAMPLE OUTPUT
Once a client is associated to the network, it can open a TCP connection to the RN131/171
module. After successfully opening a TCP connection, the client receives a *HELLO* mes-
sage. The RN131/171 module prints *OPEN* on the UART, indicating an open TCP con-
nection.
IP address assigned Client MAC address Remaining lease time
(in seconds)
Host name
<2.42> show lease
1.2.3.10,f0:cb:a1:2b:63:59,153,*
1.2.3.11,00:00:00:00:00:00,0,
1.2.3.12,00:00:00:00:00:00,0,
1.2.3.13,00:00:00:00:00:00,0,
1.2.3.14,00:00:00:00:00:00,0,
1.2.3.15,00:00:00:00:00:00,0,
1.2.3.16,00:00:00:00:00:00,0,
<2.42>
Note: In AP mode, the module can assign a DHCP lease to 7 clients. However, not
all clients report the host name. In this case, the module reports the name as
an asterisk (*).