TTL Communication commands 命令-S篇

----scprecv

scprecv <remote filename> [<local filename>]

暂无示例,后续有用到补上

----scpsend

scpsend <filename> [<destination filename>]

使用SCP协议从主机发送文件,暂无示例,后续有用到补上

----send

send <data1> <data2>

发送数据

如果data 为字符串,则直接发送字符串
如果data是整数,则将其最低位字节(0-255)视为该字符的ASCII码,并将该字符发送给主机。

---- setdebug

setdebug <flag>

设置窗口的debug模式

0:no debug,不打开deug模式,正常打印
1:打印 BEL character
2:打印hex format 
3:完全禁用输出

----sendbreak

sendbreak

串行控制台上向主机系统发出中断信号

----sendbroadcast

sendbroadcast <data1> <data2>....

Tera Term向所有终端广播字符,然后将字符发送给主机。

----sendfile

sendfile <filename> <binary flag>

Tera Term发送文件到主机。直到文件传输结束再暂停。

----sendkcode

----sendln

sendln <data1> <data2>....

换行发送数据。

----sendlnmulticast

sendlnmulticast <multicastname> <data1> <data2>....

Tera Term以组播字符后跟一个新行字符向选定的终端发送,然后将数据发送到主机。

----setbaud

setbaud <value>

设置串口波特率

value    speed (bps)
1        110 
2        300 
3        600 
4        1200 
5        2400 
6        4800 
7        9600 
8        14400 
9        19200 
10       38400 
11       57600 
12       115200 
13       230400 
14       460800 
15       921600 

----setdtr

setdtr <flag>

修改Tera Term的DTR(Data Terminal Ready)状态

0:off
1:on

----setecho

setecho <echo flag>

修改Tera Term的本地回声状态

0:off
1: on

----setflowctrl

setflowctrl <value>

用于改变流量控制

Value	Meaning
1		Xon/Xoff
2		hardware(RTS/CTS)
3		none
4		hardware(DSR/DTR) (version 4.105 or later)

----setrts

setrts <flag>

更改Tera Term的请求发送(RTS)状态

0:off
1: on

----setspeed

setspeed <value>

该命令跟setbaud 是一样的,可参考setbaud命令

----setsync

设置同步模式。

----settitle

settitle <title>

设置窗口标题

-----showtt

showtt <show flag>

更改Tera Term窗口的显示

flag		value
-1			Hides,隐藏VT窗口
0			minimizes,最小化VT窗口
1			Restores,恢复TV窗口
2			Hides,隐藏TEK窗口
3			minimizes,最小化TEK窗口
4			Open/restores,打开/恢复TEK窗口
5			Closes,关闭TEK窗口
6			hides,隐藏日志窗口
7			minimizes,最小化日志窗口
8			Restores,恢复日志窗口
### ESP8266 AT Module Wi-Fi Configuration Tutorial For configuring the ESP8266 as a Wi-Fi device using its AT command set, several key commands are essential to establish and manage network connections[^1]. The process involves setting up basic parameters such as SSID and password of the target wireless network. To start with, ensure that the hardware connection between your microcontroller or computer and the ESP8266 is correct. Typically this includes connecting TXD/RXD lines properly while paying attention to level shifting if necessary since some modules operate at 3.3V logic levels only. The following table lists important AT commands used specifically for Wi-Fi setup: | Command | Description | |---------|-------------| | `AT+CWMODE` | Sets the operation mode (station, soft-AP, station+soft-AP). For example, sending `AT+CWMODE=1` sets it into Station Mode where it can connect to an existing WiFi router/access point. | | `AT+CWJAP` | Joins an access point by specifying SSID and PASSWORD within quotation marks like so: `AT+CWJAP="your_SSID","your_PASSWORD"` This initiates joining procedure towards specified AP credentials provided earlier during configuration phase. | After successfully establishing connectivity via these primary instructions above, additional functionalities become available including obtaining IP address information through issuing `AT+CIFSR`, which returns either local or remote addresses depending on current state after association has been made. Below demonstrates how one might implement simple sketch utilizing Arduino IDE alongside Serial Monitor toolset for interaction purposes when interfacing directly against physical board equipped with onboard UART interface connected over USB-to-TTL adapter cable assembly line product commonly found among hobbyist projects today. ```cpp #include <SoftwareSerial.h> // Define RX & TX pins according to actual wiring. const int rxPin = D5; const int txPin = D6; // Initialize software serial port named 'esp'. SoftwareSerial esp(rxPin, txPin); void setup() { // Begin communication at desired baud rate matching firmware default value usually around 9600bps~115200bps range. Serial.begin(115200); esp.begin(115200); delay(1000); // Wait briefly before proceeding further down below... sendCommand("AT"); // Test if module responds correctly. sendCommand("AT+CWMODE=1"); // Set work mode to STA. sendCommand("AT+CWJAP=\"SSID\",\"PWD\"");// Connect to specific Access Point identified previously. } void loop() { // Continuously read incoming data from both interfaces simultaneously without blocking main thread execution flow indefinitely... if(Serial.available()) { String cmd = Serial.readStringUntil('\n'); esp.println(cmd); } if(esp.available()){ String response = esp.readStringUntil('\n'); Serial.print(response); } } void sendCommand(String command){ esp.println(command); delay(1000); // Adjust timeout based upon expected reply duration accordingly hereafter. } ``` This script initializes SoftwareSerial object configured appropriately then sends out series of predefined strings representing individual operations outlined beforehand until completion occurs sequentially step-by-step fashion ensuring proper initialization sequence gets followed faithfully every single time regardless external conditions encountered along way forward progressively moving closer toward final objective achievement ultimately resulting successful establishment stable internet link whenever required promptly efficiently reliably each instance invoked thereafter consistently across multiple runs performed repeatedly under varying circumstances alike similarly situated scenarios faced regularly throughout development lifecycle stages involved herein described contextually relevant manner pertaining subject matter discussed herewithin present document now concluded satisfactorily henceforth. --related questions-- 1. What other modes besides station does CWMODE support? 2. How do you disconnect from a currently connected Wi-Fi network programmatically using AT commands? 3. Can the ESP8266 be programmed to automatically reconnect to a saved Wi-Fi network upon power-up? 4. Is there any difference in syntax for sending AT commands between different versions of ESP8266 firmwares?
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值