OpenWrt Forum Archive

Topic: Share serial port over IP

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

I have a TP-Link WR741ND v2.4 . I'd like to share its serial port on my local network as a raw TCP or UDP (TCP would be better). I soldered a cable onto the pins as shown here. But I don't know if I need to use pull-up or pull-down resistors and how to share this port.

To solve my problem step by step:
1: How can ttyS0 be detached from console when the router isn't in failsafe mode?

There are several locations, where the serial port is bound to console:
1. in /etc/inittab there is a line which enables login to serial console. you need to comment out/delete it: "ttyS0::askfirst:/bin/ash --login"
2. while building a firmware image, you can edit the kernel command line, which normally contains something like "console=ttyS0,115200", change or delete this
3. your bootloader also contains a kernel command line. But I'm not sure, if it gets overridden by the one within the firmware image.

MBS wrote:

There are several locations, where the serial port is bound to console:
1. in /etc/inittab there is a line which enables login to serial console. you need to comment out/delete it: "ttyS0::askfirst:/bin/ash --login"
2. while building a firmware image, you can edit the kernel command line, which normally contains something like "console=ttyS0,115200", change or delete this
3. your bootloader also contains a kernel command line. But I'm not sure, if it gets overridden by the one within the firmware image.

Can I write an init script that runs only when the firmware starts in normal mode? That script would free ttyS0.

The discussion might have continued from here.