Setting up Tomcat + jNabServer

Filed under: programming

I recently joined the team of researchers led by Dr. Jennifer Rode, to study smart closets. We are attempting to use RFID readers to track clothing items.

The RFID readers are bunnies, called Nabaztag. They can be connected to via Java libraries. This blog posts illustrates some steps to getting the bunnies connected to a development machine, in order to write and test apps.

The steps:

1) Install & Start Tomcat on MacOSX

Follow the directions linked above, and then run the command in your terminal shell window.

/bin/startup.sh

This is how it looks:

Starting up server message

Once you start the server, you can access it by typing in ‘localhost:8080′ into your browser.

Apache server

Next, you can install jNabServer on top of this local server.

2) Start jNabServer

Once it is installed, you can start the application using this command.

java -cp lib/jNab.jar jNab

This command will show you configuration settings for your local server, port numbers, etc. These are the settings you need for your rabbit to connect with.

Example of local server settings shown

If you have issues with connecting, it is likely related to your localhost address. Change your configurations file ‘jNab.conf’ and restart the jNabServer once more.

Still running into same problem with jNabServer. Can’t connect to port 8080 or 8081.

Possible reasons for error: * the ports are barred in the firewall * the ports are used by an other program running

3) Change jNab.conf file & run start command again.

vi jNab.conf
java -cp lib/jNab.jar jNab

It should work and you’ll see that the IP address is now localhost 127.0.0.1.

Example of the server log

4) Connect to jNabServer with telnet

In a separate terminal window, type in this command to connect the bunnies to the jNabserver.

telnet 127.0.0.1 6970

Log

Success!

§youtube(XXufbpxgtYE)§