mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 15:47:46 +00:00
[rcp] change default baud rate to 460800 (#11432)
This commit is contained in:
+2
-2
@@ -139,7 +139,7 @@ To build and program the device with RCP application, complete the following ste
|
||||
#### Run
|
||||
|
||||
```sh
|
||||
./build/posix/src/posix/ot-cli 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200'
|
||||
./build/posix/src/posix/ot-cli 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=460800'
|
||||
```
|
||||
|
||||
## Daemon Mode
|
||||
@@ -152,7 +152,7 @@ OpenThread Posix Daemon mode uses a unix socket as input and output, so that Ope
|
||||
# Daemon with simulation
|
||||
./build/posix/src/posix/ot-daemon 'spinel+hdlc+forkpty://build/simulation/examples/apps/ncp/ot-rcp?forkpty-arg=1'
|
||||
# Daemon with real device
|
||||
./build/posix/src/posix/ot-daemon 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200'
|
||||
./build/posix/src/posix/ot-daemon 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=460800'
|
||||
# Built-in controller
|
||||
./build/posix/src/posix/ot-ctl
|
||||
```
|
||||
|
||||
@@ -465,7 +465,7 @@ int HdlcInterface::OpenFile(const Url::Url &aRadioUrl)
|
||||
const char *value;
|
||||
speed_t speed;
|
||||
uint8_t stopBit = 1;
|
||||
uint32_t baudrate = 115200;
|
||||
uint32_t baudrate = 460800;
|
||||
|
||||
VerifyOrExit((rval = tcgetattr(fd, &tios)) == 0);
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ const char *otSysGetRadioUrlHelpString(void)
|
||||
"Parameters:\n" \
|
||||
" uart-parity[=even|odd] Uart parity config, optional.\n" \
|
||||
" uart-stop[=number-of-bits] Uart stop bit, default is 1.\n" \
|
||||
" uart-baudrate[=baudrate] Uart baud rate, default is 115200.\n" \
|
||||
" uart-baudrate[=baudrate] Uart baud rate, default is 460800.\n" \
|
||||
" uart-flow-control Enable flow control, disabled by default.\n" \
|
||||
" uart-init-deassert Deassert lines on init when flow control is disabled.\n" \
|
||||
" uart-reset Reset connection after hard resetting RCP(USB CDC ACM).\n" \
|
||||
|
||||
@@ -40,7 +40,7 @@ def main():
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
stream = StreamOpen('p', f'{args.rcp} 1', False, 115200, False)
|
||||
stream = StreamOpen('p', f'{args.rcp} 1', False, 460800, False)
|
||||
wpan_api = WpanApi(stream, 1)
|
||||
|
||||
assert wpan_api.prop_set_value(SPINEL.PROP_PHY_ENABLED, 1) == 1
|
||||
|
||||
@@ -36,13 +36,13 @@ namespace Url {
|
||||
|
||||
void TestSimple(void)
|
||||
{
|
||||
char url[] = "spinel:///dev/ttyUSB0?baudrate=115200";
|
||||
char url[] = "spinel:///dev/ttyUSB0?baudrate=460800";
|
||||
Url args;
|
||||
|
||||
VerifyOrQuit(!args.Init(url));
|
||||
|
||||
VerifyOrQuit(!strcmp(args.GetPath(), "/dev/ttyUSB0"));
|
||||
VerifyOrQuit(!strcmp(args.GetValue("baudrate"), "115200"));
|
||||
VerifyOrQuit(!strcmp(args.GetValue("baudrate"), "460800"));
|
||||
VerifyOrQuit(args.GetValue("not-exists") == nullptr);
|
||||
VerifyOrQuit(args.GetValue("last-value-wrong-position", url) == nullptr);
|
||||
VerifyOrQuit(args.GetValue("last-value-before-url", url - 1) == nullptr);
|
||||
@@ -67,7 +67,7 @@ void TestSimpleNoQueryString(void)
|
||||
|
||||
void TestEmptyValue(void)
|
||||
{
|
||||
char url[] = "spinel:///dev/ttyUSB0?rtscts&baudrate=115200&verbose&verbose&verbose";
|
||||
char url[] = "spinel:///dev/ttyUSB0?rtscts&baudrate=460800&verbose&verbose&verbose";
|
||||
Url args;
|
||||
const char *arg = nullptr;
|
||||
|
||||
@@ -85,12 +85,12 @@ void TestEmptyValue(void)
|
||||
|
||||
void TestMultipleProtocols(void)
|
||||
{
|
||||
char url[] = "spinel+spi:///dev/ttyUSB0?baudrate=115200";
|
||||
char url[] = "spinel+spi:///dev/ttyUSB0?baudrate=460800";
|
||||
Url args;
|
||||
|
||||
VerifyOrQuit(!args.Init(url));
|
||||
VerifyOrQuit(!strcmp(args.GetPath(), "/dev/ttyUSB0"));
|
||||
VerifyOrQuit(!strcmp(args.GetValue("baudrate"), "115200"));
|
||||
VerifyOrQuit(!strcmp(args.GetValue("baudrate"), "460800"));
|
||||
|
||||
printf("PASS %s\r\n", __func__);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user