If L4 means something else, then use another port.
How to debug a connection:
1. Make sure that terminal server is properly configured and the
cable is good: connect port 4 on the terminal server to the some known
working target, e.g. standar UNIX serial port, do 'telnet server-ip
2004' and type stuff on console and check responses.
2. Make sure that gdb stub is workin properly: connect port 4 on the
terminal server to debug port on the targe, start gdb stub, again do
'telnet server-ip 2004' and make sure that by hitting return you
cause gdb to send you properly formed packets.
3. Start gdb and do 'target remote server-ip:2004' I would be very
surprised if it does not work at the point.
Does anyone think that some of the above should be in the manual?