I would use this:
http://www.2robots.com/2008/07/30/telnet-client-released-for-iphone-ipod-touch/If you're on 3G, you'll probably also need the VPN client so you can connect to the internal network, and then telnet to the router.
If you want an actual serial cable and serial connection, you'll need to jailbreak your phone. There's a guy that talks about it in a blog. But I'd just stick with the telnet unless you're an extreme hobbyist.
http://www.ohscope.com/2009/02/serial-port-on-iphone-with-minicom.html