In NDN.expressInterest, call readAllFromSocket directly without using getAsync to pass the interest in hex.
In NDNSocketTransportService.js, remove unused getAsync.
diff --git a/js/NDN.js b/js/NDN.js
index 05577b8..2c12e3f 100644
--- a/js/NDN.js
+++ b/js/NDN.js
@@ -157,7 +157,7 @@
 /** Encode name as an Interest. If template is not null, use its attributes.
  *  Send the interest to host:port, read the entire response and call
  *  closure.upcall(Closure.UPCALL_CONTENT (or Closure.UPCALL_CONTENT_UNVERIFIED),
- *                 new UpcallInfo(this, interest, 0, contentObject)).
+ *                 new UpcallInfo(this, interest, 0, contentObject)).                 
  */
 NDN.prototype.expressInterest = function(
         // Name
@@ -178,7 +178,11 @@
     }
     else
         interest.interestLifetime = 4200;
-	var outputHex = encodeToHexInterest(interest);
+    
+    var encoder = new BinaryXMLEncoder();
+	interest.to_ccnb(encoder);	
+	var outputData = DataUtils.toString(encoder.getReducedOstream());
+    encoder = null;
 		
 	var dataListener = {
 		onReceivedData : function(result) {
@@ -203,6 +207,8 @@
 		}
 	}
         
-	return getAsync(this.host, this.port, outputHex, dataListener);
+    // The application includes a source file that defines readAllFromSocket
+    //   according to the application's communication method.
+	readAllFromSocket(this.host, this.port, outputData, dataListener);
 };
 
diff --git a/js/NDNSocketTransportService.js b/js/NDNSocketTransportService.js
index 1f8a93d..5fe86aa 100644
--- a/js/NDNSocketTransportService.js
+++ b/js/NDNSocketTransportService.js
@@ -9,13 +9,6 @@
 // Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 // Components.utils.import("resource://gre/modules/NetUtil.jsm");
 
-/** Convert outputHex to binary, send to host:port and call listener.onReceivedData(data)
- *    where data is a byte array.
- */
-function getAsync(host, port, outputHex, listener) {
-    readAllFromSocket(host, port, DataUtils.hexToRawString(outputHex), listener);
-}
-
 /** Send outputData to host:port, read the entire response and call listener.onReceivedData(data)
  *    where data is a byte array.
  *  Code derived from http://stackoverflow.com/questions/7816386/why-nsiscriptableinputstream-is-not-working .
@@ -71,3 +64,4 @@
 	pump.init(inStream, -1, -1, 0, 0, true);
     pump.asyncRead(dataListener, null);
 }
+
diff --git a/js/ccnxProtocol.xpi b/js/ccnxProtocol.xpi
index 48091cb..3fc76d8 100644
--- a/js/ccnxProtocol.xpi
+++ b/js/ccnxProtocol.xpi
Binary files differ
diff --git a/js/ccnxProtocol/modules/ndn-js.jsm b/js/ccnxProtocol/modules/ndn-js.jsm
index 1532ee5..d8117ab 100644
--- a/js/ccnxProtocol/modules/ndn-js.jsm
+++ b/js/ccnxProtocol/modules/ndn-js.jsm
@@ -247,7 +247,7 @@
 /** Encode name as an Interest. If template is not null, use its attributes.
  *  Send the interest to host:port, read the entire response and call
  *  closure.upcall(Closure.UPCALL_CONTENT (or Closure.UPCALL_CONTENT_UNVERIFIED),
- *                 new UpcallInfo(this, interest, 0, contentObject)).
+ *                 new UpcallInfo(this, interest, 0, contentObject)).                 
  */
 NDN.prototype.expressInterest = function(
         // Name
@@ -268,7 +268,11 @@
     }
     else
         interest.interestLifetime = 4200;
-	var outputHex = encodeToHexInterest(interest);
+    
+    var encoder = new BinaryXMLEncoder();
+	interest.to_ccnb(encoder);	
+	var outputData = DataUtils.toString(encoder.getReducedOstream());
+    encoder = null;
 		
 	var dataListener = {
 		onReceivedData : function(result) {
@@ -293,7 +297,9 @@
 		}
 	}
         
-	return getAsync(this.host, this.port, outputHex, dataListener);
+    // The application includes a source file that defines readAllFromSocket
+    //   according to the application's communication method.
+	readAllFromSocket(this.host, this.port, outputData, dataListener);
 };
 
 
@@ -308,13 +314,6 @@
 // Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 // Components.utils.import("resource://gre/modules/NetUtil.jsm");
 
-/** Convert outputHex to binary, send to host:port and call listener.onReceivedData(data)
- *    where data is a byte array.
- */
-function getAsync(host, port, outputHex, listener) {
-    readAllFromSocket(host, port, DataUtils.hexToRawString(outputHex), listener);
-}
-
 /** Send outputData to host:port, read the entire response and call listener.onReceivedData(data)
  *    where data is a byte array.
  *  Code derived from http://stackoverflow.com/questions/7816386/why-nsiscriptableinputstream-is-not-working .
@@ -371,6 +370,7 @@
     pump.asyncRead(dataListener, null);
 }
 
+
 /*
  * @author: ucla-cs
  * See COPYING for copyright and distribution information.