adamvr/MQTT.js — pull request #176 by dongyouj (2014-04-29 21:30:26+00:00)
Title: MQTT automatically replaces some HEX into 'ef bf bd'

I am doing a student project.
We have a server and the server communicates with MSP430 Texas Instrument board.
The MSP430 has a MQTT library installed inside. When it sends a connecting request, it sends username,password,and clientId in AES-128-ECB form.
This is what I analyzed the packet from the MSP430.
![image2](https://cloud.githubusercontent.com/assets/1688574/2834984/4c5a4044-cfe3-11e3-9be6-8fef990d70d3.jpg)
If I code..
```
mqtt = createServer(function(client) {
client.on('connect', function(packet){
console.log(packet.username.toString('hex');
...
```
![image1](https://cloud.githubusercontent.com/assets/1688574/2835068/8cd62f4c-cfe4-11e3-9b33-da206286b7eb.jpg)

This is the code I changed.
If you see any possible bug from my change, please let me know.
I tested with MSP430. Everything worked fine.
These changes are made for only my project.
Probably, these changes might not be applicable to other project.

I will provide unit test results.
However, I have a question about this.
I want to send a packet from MqttClient to MqttServer without using MSP430.
I tried something like this in client.
```
var buf1 = new Buffer('bfc8ae69a27ea33b8e2058f67a85e639', 'hex');
var buf2 = new Buffer('/* password in AES-128-ECB */', 'hex');
var buf3 = new Buffer('/* clientId in AES-128-ECB */', 'hex');
var client = mqtt.createClient(port, ip, {
username : buf1,
password : buf2,
clientId : buf3
});
```

However, it keeps failing to send this packet.
Any idea about this one?