Index: branches/autonomous_recharging/code/projects/libwireless/bayboardTest/main.c
===================================================================
--- branches/autonomous_recharging/code/projects/libwireless/bayboardTest/main.c	(revision 882)
+++ branches/autonomous_recharging/code/projects/libwireless/bayboardTest/main.c	(revision 883)
@@ -5,17 +5,18 @@
 int main(int argc, char** argv)
 {
 	bayboard_init(ALL_ON);
-	usb_puts("Start.\n");
+	usb_puts("Start.\n\r");
 	set_orb(0, 0, 200);
 	wl_init();
+	//wl_set_channel(0xf);
 	set_orb(0, 200, 0);
-	/*if (wl_token_ring_register() < 0)
-		usb_puts("Failed to register token ring.\n");
+	if (wl_token_ring_register() < 0)
+		usb_puts("Failed to register token ring.\n\r");
 	if (wl_token_ring_join() < 0)
-		usb_puts("Failed to join token ring.\n");*/
-	usb_puts("Wireless initialized.\n");
-	//while (1)
-	//	wl_do();
+		usb_puts("Failed to join token ring.\n\r");
+	usb_puts("Wireless initialized.\n\r");
+	while (1)
+		wl_do();
 	return 0;
 }
 
Index: branches/autonomous_recharging/code/projects/libwireless/bayboardTest/Makefile
===================================================================
--- branches/autonomous_recharging/code/projects/libwireless/bayboardTest/Makefile	(revision 882)
+++ branches/autonomous_recharging/code/projects/libwireless/bayboardTest/Makefile	(revision 883)
@@ -14,7 +14,7 @@
 USE_WIRELESS = 1
 
 # com1 = serial port. Use lpt1 to connect to parallel port.
-AVRDUDE_PORT = /dev/ttyUSB1
+AVRDUDE_PORT = COM3
 #
 #
 ###################################
@@ -230,7 +230,7 @@
 # to submit bug reports.
 #AVRDUDE_VERBOSE = -v -v
 
-AVRDUDE_FLAGS = -p m164p -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
+AVRDUDE_FLAGS = -p m164 -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
 AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
 AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
 AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
Index: branches/autonomous_recharging/code/projects/libwireless/lib/wl_token_ring.c
===================================================================
--- branches/autonomous_recharging/code/projects/libwireless/lib/wl_token_ring.c	(revision 882)
+++ branches/autonomous_recharging/code/projects/libwireless/lib/wl_token_ring.c	(revision 883)
@@ -232,6 +232,7 @@
  **/
 static void wl_token_ring_timeout_handler()
 {
+	usb_putc('t');
 	//someone is not responding, assume they are dead
 	if (deathDelay == 0)
 	{
@@ -239,6 +240,9 @@
 		//also, declare that person dead, as long as it isn't us
 		if (wl_token_next_robot != wl_get_xbee_id())
 		{
+			usb_puts("Death.\n\r");
+			usb_puti(wl_token_next_robot);
+			usb_puts("\n\r");
 			sensor_matrix_set_in_ring(wl_token_next_robot, 0);
 			WL_DEBUG_PRINT("Robot ");
 			WL_DEBUG_PRINT_INT(wl_token_next_robot);
@@ -258,6 +262,7 @@
 	{
 		if (sensor_matrix_get_joined() == 0)
 		{
+			usb_puts("Gave up.\n\r");
 			WL_DEBUG_PRINT("Creating our own token ring, no robots seem to exist.\r\n");
 			sensor_matrix_set_in_ring(wl_get_xbee_id(), 1);
 			ringState = MEMBER;
@@ -314,19 +319,24 @@
 	switch (type)
 	{
 		case WL_TOKEN_PASS:
+			usb_puts("Got token.\n\r");
 			wl_token_pass_receive(source);
 			break;
 		case WL_TOKEN_SENSOR_MATRIX:
+			usb_puts("Got sensor matrix.\n\r");
 			wl_token_sensor_matrix_receive(source, packet, length);
 			break;
 		case WL_TOKEN_BOM_ON:
+			usb_puts("Got BOM on.\n\r");
 			//add the robot to the sensor matrix if it is not already there
 			wl_token_bom_on_receive(source);
 			break;
 		case WL_TOKEN_JOIN:
+			usb_puts("Got join request.\n\r");
 			wl_token_join_receive(source);
 			break;
 		case WL_TOKEN_JOIN_ACCEPT:
+			usb_puts("Got join accept.\n\r");
 			wl_token_join_accept_receive(source);
 			break;
 		default:
@@ -505,6 +515,8 @@
 	WL_DEBUG_PRINT_INT(wl_token_next_robot);
 	WL_DEBUG_PRINT(".\n");
 	// this prevents two tokens from being passed around at a time (second clause is in case we are joining)
+	usb_puti(source); usb_putc(' '); usb_puti(wl_token_next_robot); usb_putc(' '); usb_puti(wl_get_xbee_id());
+	usb_putc(' '); usb_puti(bom_on_count); usb_putc(' '); usb_puti(ringState); usb_putc(' '); usb_puts("\n\r");
 	if ((source != wl_token_next_robot && wl_get_xbee_id() != wl_token_next_robot) && bom_on_count <= DEATH_DELAY / 2 &&
 		ringState != ACCEPTED)
 	{
@@ -693,6 +705,7 @@
 	}
 	else
 	{
+		usb_puts("Accepting.\n\r");
 		WL_DEBUG_PRINT("Accepting new robot, sending it the token.\r\n");
 		//add a new robot to the token ring
 		sensor_matrix_set_in_ring(accepted, 1);
@@ -711,13 +724,18 @@
 			buf[2*j] = i;
 			buf[2*j + 1] = sensor_matrix_get_reading(wl_get_xbee_id(), i);
 			j++;
+			usb_puti(i);
+			usb_puts("\n\r");
 		}
 	}
-
+	usb_puts("\n\r");
 	int packetSize = 2 * j * sizeof(char);
 	WL_DEBUG_PRINT("Passing the token to robot ");
 	WL_DEBUG_PRINT_INT(nextRobot);
 	WL_DEBUG_PRINT(".\r\n");
+	usb_puts("Passing token ");
+	usb_puti(nextRobot);
+	usb_puts("\n\r");
 	if (wl_send_global_packet(WL_TOKEN_RING_GROUP, WL_TOKEN_SENSOR_MATRIX, buf, packetSize, 0) != 0)
 		return -1;
 	if (wl_send_robot_to_robot_global_packet(WL_TOKEN_RING_GROUP, WL_TOKEN_PASS, NULL, 0, nextRobot, WL_TOKEN_PASS_FRAME))
@@ -724,6 +742,7 @@
 		return -1;
 
 	wl_token_next_robot = nextRobot;
+	usb_puti(nextRobot);
 	deathDelay = DEATH_DELAY;
 
 	return 0;
@@ -779,14 +798,17 @@
 	WL_DEBUG_PRINT("Our BOM has been flashed.\r\n");
 	wl_send_global_packet(WL_TOKEN_RING_GROUP, WL_TOKEN_BOM_ON, NULL, 0, 0);
 
-	bom_on_function();
-	#ifdef ROBOT
+	//bom_on_function();
+	//#ifdef ROBOT
+	usb_puts("BOM ON!\n\r");
 	delay_ms(BOM_DELAY);
-	#endif
-	bom_off_function();
+	usb_puts("BOM OFF!\n\r");
+	//#endif
+	//bom_off_function();
 
 	if (!sensor_matrix_get_in_ring(wl_get_xbee_id()))
 	{
+		usb_puts("FAIL\n\r");
 		WL_DEBUG_PRINT("Removed from sensor matrix while flashing BOM.\r\n");
 		return;
 	}
Index: branches/autonomous_recharging/code/projects/libwireless/lib/sensor_matrix.h
===================================================================
--- branches/autonomous_recharging/code/projects/libwireless/lib/sensor_matrix.h	(revision 882)
+++ branches/autonomous_recharging/code/projects/libwireless/lib/sensor_matrix.h	(revision 883)
@@ -64,11 +64,6 @@
 	 **/
 	int numJoined;
 	/**
-	 * The matrix. Each row represents the readings of one
-	 * robot.
-	 **/
-	unsigned char matrix[MAXIMUM_XBEE_ID][MAXIMUM_XBEE_ID];
-	/**
 	 * The element representing a robot is true if that robot
 	 * is in the token ring and false otherwise.
 	 **/
Index: branches/autonomous_recharging/code/projects/libwireless/lib/xbee.c
===================================================================
--- branches/autonomous_recharging/code/projects/libwireless/lib/xbee.c	(revision 882)
+++ branches/autonomous_recharging/code/projects/libwireless/lib/xbee.c	(revision 883)
@@ -476,8 +476,6 @@
 		// check if buffer is empty
 		if (buffer_last != buffer_first) {
 			char c = arrival_buf[buffer_first++];
-			usb_putc(c);
-			usb_putc('\n');
 			if (buffer_first == XBEE_BUFFER_SIZE) {
 				buffer_first = 0;
 			}
@@ -736,7 +734,7 @@
 				buffer_first = 0;
 			// check if buffer is empty
 			if (buffer_first == buffer_last) {
-				return 0;
+				return -1;
 			}
 		} while (arrival_buf[buffer_first++] != XBEE_FRAME_START);
 
@@ -768,7 +766,7 @@
 
 		// check if buffer is empty
 		if (buffer_first == buffer_last) {
-			return 0;
+			return -1;
 		}
 		xbee_buf[currentBufPos++] = arrival_buf[buffer_first++];
 		if (buffer_first == XBEE_BUFFER_SIZE) {
@@ -778,8 +776,10 @@
 
 	currentBufPos = 0;
 
+	usb_puts("Got packet.\n\r");
 	if (!xbee_verify_checksum(xbee_buf, len + 4))
 	{
+		usb_puts("Checksum failed.\n\r");
 		WL_DEBUG_PRINT("XBee checksum failed.\r\n");
 		return -1;
 	}
@@ -786,11 +786,13 @@
 
 	//we will take care of the packet
 	if (xbee_handle_packet(xbee_buf + 3, len) != 0) {
-		return 0;
+		usb_puts("We handled a packet.\n\r");
+		return -1;
 	}
 
 	if (dest == NULL) {
-		return 0;
+		usb_puts("dest == NULL");
+		return -1;
 	}
 
 	int i;
Index: branches/autonomous_recharging/code/projects/libwireless/lib/sensor_matrix.c
===================================================================
--- branches/autonomous_recharging/code/projects/libwireless/lib/sensor_matrix.c	(revision 882)
+++ branches/autonomous_recharging/code/projects/libwireless/lib/sensor_matrix.c	(revision 883)
@@ -55,8 +55,6 @@
 	for (i = 0; i < MAXIMUM_XBEE_ID; i++)
 	{
 		m.joined[i] = 0;
-		for (j = 0; j < MAXIMUM_XBEE_ID; j++)
-			m.matrix[i][j] = READING_UNKNOWN;
 	}
 }
 
@@ -69,13 +67,7 @@
  */
 void sensor_matrix_set_reading(int observer, int robot, int reading)
 {
-	if (robot >= MAXIMUM_XBEE_ID || observer >= MAXIMUM_XBEE_ID)
-	{
-		WL_DEBUG_PRINT("ID too large.");
-		return;
-	}
 
-	m.matrix[observer][robot] = (unsigned char)reading;
 }
 
 /**
@@ -88,10 +80,7 @@
  **/
 int sensor_matrix_get_reading(int observer, int robot)
 {
-	if (observer >= MAXIMUM_XBEE_ID || robot >= MAXIMUM_XBEE_ID)
-		return -1;
-
-	return (int)m.matrix[observer][robot];
+	return -1;
 }
 
 /**
@@ -104,6 +93,7 @@
 {
 	if (robot >= MAXIMUM_XBEE_ID)
 	{
+		usb_puts("ID too large.\n\r");
 		WL_DEBUG_PRINT("ID too large.");
 		return;
 	}
Index: branches/autonomous_recharging/code/projects/libwireless/lib/wireless.c
===================================================================
--- branches/autonomous_recharging/code/projects/libwireless/lib/wireless.c	(revision 882)
+++ branches/autonomous_recharging/code/projects/libwireless/lib/wireless.c	(revision 883)
@@ -115,7 +115,8 @@
 #ifdef FIREFLY
 	rtc_init(PRESCALE_DIV_256, 32, &timer_handler);
 #else
-	rtc_init(HALF_SECOND, &timer_handler);
+	//TODO: FIX THIS
+	rtc_init(10 * HALF_SECOND, &timer_handler);
 #endif
 #else
 
@@ -428,6 +429,8 @@
 	}
 	else if (wl_buf[0] == XBEE_RX)
 	{
+		usb_puti(len);
+		usb_puts("Got packet!\n\r");
     //TODO: what does this 7 represent?  It shouldn't be hardcoded.  It should be set as a define
 		if (len < 7)
 		{
