I have just finished testing the serial interface modification that allows me to use a "homemade" DTR line to drive my modem.
I have used a switch to use a single transmitter on the MAX3232 to drive the TX line of tts/0 or the DTR line of tts/1, allowing me to use the console OR the modem (not both together), which is a good setup for me. If you want to use both modem and console at the same time, you need another MAX3232.
The DTR line is connected to the DMZ led, which is really a matter of connectinng some wires. I have connected pin #2 of DMZ led to pin#8 of serial connector (J1) that is not used in original WRT design, as you can see here:
Now, since the serial driver does not drive the DMZ led, I had to tell PPPD how to use it.
These are the relevant settings in pppd config file, to make pppd raise DTR before connection and lower DTR after connection:
connect "/bin/echo 0x01 > /proc/sys/diag && /usr/sbin/chat -v -f /etc/ppp/chatscripts/dialup -T <phone number>"
disconnect "/bin/echo 0x00 > /proc/sys/diag"
I have also made up an init script for pppd to run it at boot. (/etc/init.d/S41pppd)
#!/bin/sh
case "$1" in
start|restart)
echo "Killing PPPD"
/usr/bin/killall -TERM pppd 2> /dev/null
echo "nameserver <provider's DNS>" > /tmp/resolv.conf
echo "Starting PPPD"
/usr/sbin/pppd call <filename>
;;
stop)
echo "Hanging up link and killing PPPD"
/usr/bin/killall -HUP pppd
/usr/bin/killall -TERM pppd
/bin/echo "0x00" > /proc/sys/diag
;;
hup)
echo "Hanging up link, not killing PPPD"
/usr/bin/killall -HUP pppd
;;
esac
This is the schematic for the dual serial interface with DTR support: