Hello,
I just designed a little program to test this connection.... I also included a little sh script as an example on how to use it.... It is available at
www.genieciel.com/downloads/portChecker.tgz
Tell me if it was what you wanted...
By the way, sources are included :-)