OpenWrt Forum Archive

Topic: Change Serial Baudrate (TL-MR3420)

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello everybody ,
is it possible to change the baudrate from the serial ? Normal is the baudrate (115200)!


I'm looking for the same thing... let's team up wink

Quick howto:

Change uart serial port baudrate speed on OpenWrt … oot.config

OpenWrt has uart serial port baudrade speed set via kernel command line option.

For example for TP-Link WR741ND V4.x it is set to: "console=ttyATH0,115200"

Nos the question is how to change this kernel command line, only way to do this is to compile your own kernel with different "console=" line.

First you need to know which speed you need to set. In this example we use TP-LINK WR741ND which uses has it's uart serial port baudrate speed set to 115200 and we need to change it to 19200.

First check check what baudrate and which port your current router uses, telnet or ssh to your router and then find out your current settings.
Usual ports are ttyS0 or ttyATH0:

Use these command so check your serial port settings
? fw_printenv
? baudrate=115200
? console=console=ttyS0,115200
? OR: logread | grep tty
? ...

find where is your config file:
• grep ttyATH0 ./trunk/target/linux/ar71xx/ -R

edit file:
• ./trunk/target/linux/ar71xx/image/Makefile

find line for your modem:
• tlwr740_cmdline=board=TL-WR741ND console=ttyS0,115200
• tlwr740v4_cmdline=board=TL-WR741ND-v4 console=ttyATH0,115200

Change "console=ttyATH0,115200" to speed you need:
• tlwr740_cmdline=board=TL-WR741ND console=ttyS0,19200
• tlwr740v4_cmdline=board=TL-WR741ND-v4 console=ttyATH0,19200

Hi There,

I have a WR740N router that I need set up the /dev/ttyS0 serial port and I would like to understand better how did you that for exemple: Where is the ./trunk/target/linux/ar71xx/ file?

I did the fw_printenv cmd from my system and I didn´t see nothing from there, look:

root@OpenWrt:/etc# fw_printenv
Cannot parse config file: No such file or directory

same thing from logread output cmd:

root@OpenWrt:/etc# logread | grep tty

But seems like that ttyATH0 exists from there but I need configura the /dev/ttyS0 insted:

root@OpenWrt:/etc# dmesg | grep tty
[    0.000000] Kernel command line:  board=TL-WR741ND-v4 console=ttyATH0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.630000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UART
[    0.640000] console [ttyATH0] enabled, bootconsole disabled

Could you explain or give me detail information to configure that port?


The discussion might have continued from here.