Brian Antonishek (antonis@nist.gov) 12/16/1999 ****************************************************************** *** Running the Camera Server ****************************************************************** To get things working you need to first get the SonyServer process running on the machine which has the camera attached to its serial port. The command to run the server with java: Usage: java SonyServer [] default: 6789) PCs and Suns ------------ On Windows and Solaris, SonyServer uses the Java COMM API 2.0 extension for serial port communications. You just need to be sure that you have the Java COMM API extension installed correctly. See: http://java.sun.com/products/javacomm/index.html LINUX ----- The server should work with Linux also, see Java Comm API port at: http://www.interstice.com/kevinh/linuxcomm.html SGIs ---- I don't currently have a SGI version of the Java COMM API 2.0 so I'm still using my original Java Native Interface (JNI) code for the the serial port communications on SGI platforms. You'll need to compile the 'libSonyRoutines.so' shared library for your machine. The only functions that this shared library implement are Serial port Connect & Disconnect and a Serial port Read & Write. Make that you have that 'libSonyRoutines.so' on your shared library path. With the SGIs you need to 'setenv' either LD_LIBRARY_PATH or LD_LIBRARYN32_PATH. Also notre that with Irix 6.X you have to do use the '-o32' flag on the java command. That is, 'java -o32 SonyServer'. Once you have the server running you can test the server by telneting directly to the server and giving commands found in SonyBase.java. That is, if the camera server is running on host host1.nist.gov and listening on port 6789 then your session would look like this: telnet host1.nist.gov 6789 Trying 129.6.x.x Connected to host1. Escape character is '^]'. Pan-tiltPosInq 140, 213 Pan-tiltDrive Absolute_postion 125 200 ok Pan-tiltPosInq 125, 200 bye Exit command received. Bye. Connection closed by foreign host. This is the quickest way to make sure your server is running correctly. ****************************************************************** *** Using a Client application ****************************************************************** Next take a look at the imageMapExample/ directory for example code for a client application. ****************************************************************** *** Proxy Server ****************************************************************** If you try and run a Java applet client by connecting to the camera server make sure that you get the controlling java applet from a web server that is running on the same machine as the camera server. This is necessary because of the Java security feature that applets can only open sockets to the host from which they came. But, it is pretty simple setting up a proxy server application that can get around this situation. See the nice proxy server example from the javaExamplesInANutshell book at: http://www.davidflanagan.com/javaexamples ****************************************************************** *** ****************************************************************** Have fun! Let me know if you have any suggestions or get it running on any other platforms. Thanks! -Brian (antonis@nist.gov) -----------------------------------------------------------------------