微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > mt2523如何由USB顯示syslog

mt2523如何由USB顯示syslog

时间:10-02 整理:3721RD 点击:
Base on SDK 4.0.0
ATCMD
Field
– <op>: integer

0: display port assignment for applications/users (ATCI and Syslog).

1: reassign port for the specific applications/users and store in NVDM.

2: switch old port to specific port for the specific applications/users.

3: modify parameters of port service devices.

4: show parameters of port service devices.

Application name of port service. Ex. “atci” is ATCI application, “syslog”is Syslog application.
the specific device of port service support. Refer the structure -serial_port_type_t
when <op>=2 and <device_id>=9/10, it indicates <bt_address> of btspp CLIent.
when <op>=3 and <device_id>=0/1/2/3, it indicates <baudrate> of UART port.
when <op>=3 and <device_id>=6/7/8, it indicates <UUID>,<name> of btspp
server.
when <op>=3 and <device_id>=9/10, it indicates <uuid> of btspp client.
when <op>=0, it indicates port assignment of applications/users.
when <op>=4, it indicates all parameters of port service devices.
AT+EPORT=2,syslog,5 => OK
AT+EPORT=2,atci,1=> OK
AT+EPORT=3,0,12 => OK
AT+EPORT=3,6, 123456789abcdef123456789abcdef01, server_6=> OK
AT+EPORT=4=> OK
Or modify source code directly. In main.c
#if defined(mtk_PORT_SERVICE_ENABLE)
syslog_port_service_init();
#endif
In syslog_port_service_init() function :
serial_port_dev_t syslog_port = SERIAL_PORT_DEV_USB_COM1;//or SERIAL_PORT_DEV_USB_COM2
serial_port_config_write_dev_number("syslog", syslog_port);
uart_setting.baudrate = HAL_UART_BAUDRATE_115200;
serial_port_config_write_dev_setting(syslog_port, (serial_port_dev_setting_t
*)&uart_setting);

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top