Index: trunk/code/projects/colonet/ColonetServer/colonet_wireless.cpp
===================================================================
--- trunk/code/projects/colonet/ColonetServer/colonet_wireless.cpp	(revision 398)
+++ trunk/code/projects/colonet/ColonetServer/colonet_wireless.cpp	(revision 399)
@@ -58,10 +58,14 @@
 
   message_handler = message_handler_;
 
-  printf("Calling wl_init...\n");
-  wl_init();
-  printf("wl_init succeeded.\n");
+  wl_set_com_port(wl_port);
 
+  printf("Calling wl_init(%s)...\n", wl_port);
+  if (wl_init() != 0) {
+    fprintf(stderr, "wl_init failed.\n");
+    return -1;
+  }
+
   wl_token_ring_register();
 
   printf("Joining token ring...\n");
Index: trunk/code/projects/colonet/ColonetServer/wirelessMessageHandler.cpp
===================================================================
--- trunk/code/projects/colonet/ColonetServer/wirelessMessageHandler.cpp	(revision 398)
+++ trunk/code/projects/colonet/ColonetServer/wirelessMessageHandler.cpp	(revision 399)
@@ -22,8 +22,7 @@
 extern ColonetServer colonet_server;
 
 /* Public functions */
-int wirelessMessageHandler(unsigned char type, short source, int dest,
-                           unsigned char* data, int len) {
+int wirelessMessageHandler(unsigned char type, short source, int dest, unsigned char* data, int len) {
   printf("Server received wireless message!!!\n");
 
   printf("server received this packet: ");
Index: trunk/code/projects/colonet/ColonetServer/options.c
===================================================================
--- trunk/code/projects/colonet/ColonetServer/options.c	(revision 398)
+++ trunk/code/projects/colonet/ColonetServer/options.c	(revision 399)
@@ -45,8 +45,7 @@
   memset(&optionsG, 0, sizeof(ColonetServerOptionsT));
 
   if (argc < 2) {
-    printf("No port was specified for listening for client connections."
-           "  Defaulting to %d\n", DEFAULTPORT);
+    printf("No port was specified for listening for client connections. Defaulting to %d\n", DEFAULTPORT);
   }
 
   /* Defaults */
@@ -69,8 +68,7 @@
       optionsG.listen_port = atoi(optarg);
 
       if (optionsG.listen_port < SMALLEST_POSS_LISTEN_PORT) {
-        printf("You cannot listen on a port less than %d.\n", 
-               SMALLEST_POSS_LISTEN_PORT);
+        printf("You cannot listen on a port less than %d.\n", SMALLEST_POSS_LISTEN_PORT);
         printf("Setting listener port to %d\n", DEFAULTPORT);
         optionsG.listen_port = DEFAULTPORT;
       }
@@ -78,6 +76,7 @@
     case 'w':
       /* Set wireless port */
       strcpy(optionsG.wireless_port, optarg);
+      printf("Wireless port set to %s.\n", optionsG.wireless_port);
       break;
     case 'l':
       /* Set log filename (and enable logging) */
Index: trunk/code/projects/colonet/README
===================================================================
--- trunk/code/projects/colonet/README	(revision 398)
+++ trunk/code/projects/colonet/README	(revision 399)
@@ -26,6 +26,12 @@
 
 TROUBLESHOOTING
 
-"Failed to write to xbee, error 9."
-The Xbee is not being recognized by the computer (assuming it is plugged in).  Try unplugging it and plugging it in
-again.
+If you get an error like:
+   Failed to write to xbee, error 9.
+   Failed to join token ring.
+   ERROR - colonet_wl_init failed.
+   initialize_server: initWireless failed
+
+The xbee on the specified wireless port/file descriptor is not being recognized by the computer (assuming it is
+plugged in and you are using the right port (/dev/ttyUSB0, /dev/ttyUSB1)).  Try unplugging it and plugging it in again.
+Check the wireless port (-w option of ColonetServer).
Index: trunk/code/projects/libwireless/lib/wireless.h
===================================================================
--- trunk/code/projects/libwireless/lib/wireless.h	(revision 398)
+++ trunk/code/projects/libwireless/lib/wireless.h	(revision 399)
@@ -118,7 +118,7 @@
 } PacketGroupHandler;
 
 /**@brief Initialize the wireless library **/
-int wl_init(void);
+int wl_init();
 /**@brief Uninitialize the wireless library **/
 void wl_terminate(void);
 /**@brief Perform wireless library functionality **/
@@ -132,8 +132,7 @@
 void wl_send_robot_to_robot_global_packet(char group, char type,
 		char* data, int len, int dest, char frame);
 /**@brief Send a packet to a specific robot in our PAN **/
-void wl_send_robot_to_robot_packet(char group, char type,
-		char* data, int len, int dest, char frame);
+void wl_send_robot_to_robot_packet(char group, char type, char* data, int len, int dest, char frame);
 /**@brief Send a packet to all robots **/
 int wl_send_global_packet(char group, char type, char* data, int len, char frame);
 /**@brief Send a packet to all robots in our PAN **/
Index: trunk/code/projects/libwireless/lib/xbee.c
===================================================================
--- trunk/code/projects/libwireless/lib/xbee.c	(revision 398)
+++ trunk/code/projects/libwireless/lib/xbee.c	(revision 399)
@@ -100,9 +100,9 @@
 /*Global Variables*/
 
 #ifndef ROBOT
-char* xbee_com_port = XBEE_PORT_DEFAULT;
-int xbee_stream;
-pthread_t* xbee_listen_thread;
+static char* xbee_com_port = XBEE_PORT_DEFAULT;
+static int xbee_stream;
+static pthread_t* xbee_listen_thread;
 #endif
 
 // TODO: is this a good size?
@@ -193,7 +193,7 @@
 /**
  * Initializes the XBee library so that other functions may be used.
  **/
-int xbee_lib_init(void)
+int xbee_lib_init()
 {
 	arrival_buf[0] = 'A';
 	arrival_buf[1] = 'A';
Index: trunk/code/projects/libwireless/lib/xbee.h
===================================================================
--- trunk/code/projects/libwireless/lib/xbee.h	(revision 398)
+++ trunk/code/projects/libwireless/lib/xbee.h	(revision 399)
@@ -74,7 +74,7 @@
 #define XBEE_RX 0x81
 
 /**@brief Initialize the XBee library **/
-int xbee_lib_init(void);
+int xbee_lib_init();
 /**@brief Uninitialize the XBee library **/
 void xbee_terminate(void);
 /**@brief Get a packet from the XBee **/
Index: trunk/code/projects/libwireless/lib/wireless.c
===================================================================
--- trunk/code/projects/libwireless/lib/wireless.c	(revision 398)
+++ trunk/code/projects/libwireless/lib/wireless.c	(revision 399)
@@ -96,6 +96,8 @@
 /**
  * Initializes the wireless library. Must be called before any
  * other function.
+ *
+ * @param wl_port File descriptor for wireless port, or NULL for default.
  **/
 int wl_init()
 {
