Lantronix xPico240 支持多种配置方式,网页、串口CLI,Telnet,Curl等配置方式,
在之前的文章中有介绍Curl的配置方式,在本章中主要介绍CLI配置方式。
CLI的配置方式可以通过串口或者是Telnet, 两种模式的操作方法和界面是完全一样的。
- 开启串口CLI。
xPico240串口默认为CLI模式,所以直接打开串口调试助手(超级终端,xshell),
串口参数设置为9600,N,8,1,无流控
- 开启Telnet功能
可以使用Telnet功能,如下图:
CLI命令示例:
>?
config documentation
file system help
status tlog
wlan scan [network-name] xml
exit
>status
status>?
exit Access Point
Clock CPM
Device Diagnostics
Ethernet File System
HTTP Server Interface <instance>
Line <instance> Radio
SPI WLAN
Bridge CLI Server
Discovery <instance> Mach10
Modem Emulation <instance> Monitor
NTP TLS Credential <instance>
SMTP Tunnel <instance>
Custom
status>exit
>config
config>?
exit wlan apply
wlan connect [network-name] wlan scan [network-name]
write Access Point
Clock CPM
Ethernet HTTP Server
Interface <instance> Line <instance>
Power Radio
SPI User <instance>
WLAN Profile <instance> AES Credential <instance>
Bridge CLI Server
Discovery <instance> Mach10
Modem Emulation <instance> Monitor
NTP TLS Credential <instance>
Tunnel <instance> USB Host
Custom <instance>
config>
- 命令行扫描无线AP信息,并设置xPico240连接到无线AP(短连接,重启后连接失效,需要重新连接)
config>wlan scan
Broadcast scan:
Network Name BSSID Ch RSSI Security Suite
-------------------------------- ----------------- --- ------- ------------------
Lantronix-5G DC:EF:09:AC:94:8C 157 -32 dBm WPA2-CCMP
Lantronix-2.4G DC:EF:09:AC:94:8D 8 -36 dBm WPA2-CCMP
ChinaNet-ltrx 02:0E:5E:29:69:B4 3 -41 dBm WPA2-CCMP-TKIP
TP-LINK_5G_EAC0 DC:FE:18:14:EA:C5 40 -56 dBm WPA2-CCMP-TKIP
iPhone BE:FC:01:A2:34:5D 11 -58 dBm WPA2-CCMP
WING YUG2 DC:FE:18:14:EA:C0 6 -59 dBm WPA2-CCMP-TKIP
3F_ChinaSNS_A DC:FE:18:F3:8C:41 8 -71 dBm WPA2-CCMP-TKIP
3F_ChinaSNS_A_5G DC:FE:18:F3:8C:46 44 -74 dBm WPA2-CCMP-TKIP
Tanaka ai 80:89:17:F3:9F:9A 1 -75 dBm WPA2-CCMP
QTX507 F4:83:CD:46:9C:F6 1 -75 dBm WPA2-CCMP
Shimada-Staff A8:BD:27:01:34:32 52 -84 dBm
config>wlan connect Lantronix-5G
Password: **************
Applied temporary WLAN profile.
config>
- 命令行设置xPico240连接无线AP,长连接。
config>
config>wlAN Profile Lantronix-5G //设置WLAN Profile的名称
CONFIRM: Create a new instance named "Lantronix-5G"? (okay/cancel)okay
Created WLAN Profile Instance Lantronix-5G.
WARNING: Change will not persist after reboot unless you "write".
config WLAN Profile Lantronix-5G>?
apply write
exit delete
Basic Security
Advanced
config WLAN Profile Lantronix-5G>basic
config WLAN Profile Lantronix-5G Basic>?
show apply
write exit
Network Name <value> State <value>
config WLAN Profile Lantronix-5G Basic>network Name Lantronix-5G //设置无线网络名称
Changed WLAN Profile Lantronix-5G Basic Network Name to "Lantronix-5G".
WARNING: Change will not persist after reboot unless you "write".
WARNING: Change will not take effect unless you "wlan apply" or "write".
config WLAN Profile Lantronix-5G Basic>write
WLAN changes were applied.
config WLAN Profile Lantronix-5G Basic>exit
config WLAN Profile Lantronix-5G>?
apply write
exit delete
Basic Security
Advanced
config WLAN Profile Lantronix-5G>security
config WLAN Profile Lantronix-5G Security>?
show apply
write exit
Suite <value>
config WLAN Profile Lantronix-5G Security>suite WPA2
Changed WLAN Profile Lantronix-5G Security Suite to "WPA2".
Changed WLAN Profile Lantronix-5G Security WPAx Encryption to "CCMP, TKIP".
WARNING: Change will not persist after reboot unless you "write".
WARNING: Passphrase must be between 8 and 63 characters long.
WARNING: Change will not take effect unless you "wlan apply" or "write".
config WLAN Profile Lantronix-5G Security>write
WLAN changes were applied.
config WLAN Profile Lantronix-5G Security>?
show apply
write exit
Suite <value> WPAx
config WLAN Profile Lantronix-5G Security>wpAx
config WLAN Profile Lantronix-5G Security WPAx>?
show apply
write exit
Authentication <value> Key Type <value>
Passphrase Encryption <value>
config WLAN Profile Lantronix-5G Security WPAx>passphrase
Enter Passphrase: ************** //设置密码
Changed WLAN Profile Lantronix-5G Security WPAx Passphrase to "<Configured>".
WARNING: Change will not persist after reboot unless you "write".
WARNING: Change will not take effect unless you "wlan apply" or "write".
config WLAN Profile Lantronix-5G Security WPAx>write
WLAN changes were applied.
config WLAN Profile Lantronix-5G Security WPAx>exit
config WLAN Profile Lantronix-5G Security>exit
config WLAN Profile Lantronix-5G>exit
config>exit
>status
status>wlAN
status WLAN wlan0>show
WLAN wlan0 Status:
Connection State : Connected
BSSID : dc:ef:09:ac:94:8c
SSID : Lantronix-5G
Active WLAN Profile: Lantronix-5G
Encryption : CCMP TKIP
Security Suite : WPA2
Authentication : PSK
Band : 5 GHz
Channel : 159
RSSI : -34 dBm
status WLAN wlan0>