title: How to subscribe IBM Watson IOT Platform with CC3220s launchpad and Code Composer Studio?
body: <p>I have been trying to send messages to IBM IOT Platform using CC3220s Launchpad and Code Composer Studio cc32xx SDK, watson_mqttclient_CC3220S_Launchxl_tirtos_ccs project.</p>
  
  <hr>
  
  <p>I can send the messages to quickstart broker.<br>
  However, I got: </p>
  
  <ul>
  <li><strong><em>Invalid userID () for device auth:<br>
  ClientID='d:u45vsd:ti-simplelink:9884e34e0611',<br>
  ClientIP=178.241.108.68</em></strong><br>
  Connection Log Message on IBM Watson IOT Platform</li>
  <li><strong><em>CONNACK:<br>
  Connection Error: 5<br>
  Connection to broker failed, Error code: -5<br>
  BRIDGE DISCONNECTION</em></strong><br>
  Error on CCS serial terminal</li>
  </ul>
  
  <hr>
  
  <p>I have done following changes on CCS mqttclient code and IBM Watson IOT Platform:</p>
  
  <ol>
  <li><p>I have changed the security level as "TLS Optional" on the security options IBM Watson IOT Platform and I have added new device with following informations:  </p>
  
  <blockquote>
    <p>Organization ID       : u45vsd<br>
    Device Type       : ti-simplelink<br>
    Device ID     : 9884e34e0611<br>
    Authentication Method : use-token-auth<br>
    Authentication Token  : zzzzzzzzzzzzz</p>
  </blockquote></li>
  <li><p>Following codes were changed in network_if.h:</p>
  
  <blockquote>
    <p>define SSID_NAME               "Netmaster EB75-G"<br>
    define SECURITY_KEY             "<em>password</em>"<br>
    define SECURITY_TYPE           SL_WLAN_SEC_TYPE_WPA_WPA2</p>
  </blockquote></li>
  <li><p>Following codes were changed in mqtt_client_app.c:</p>
  
  <blockquote>
    <p>define SERVER_ADDRESS       "u45vsd.messaging.internetofthings.ibmcloud.com"<br>
    char ClientId[64] = "d:u45vsd:ti-simplelink:9884e34e0611";<br>
    const char *ClientUsername = "use-token-auth";<br>
    const char *ClientPassword = "zzzzzzzzzzzzzzzzzzz";<br>
    sprintf(ClientId, "d:u45vsd:ti-simplelink:%02x%02x%02x%02x%02x%02x",
             macAddress[0], macAddress[1], macAddress[2],
             macAddress[3], macAddress[4], macAddress[5]);</p>
  </blockquote></li>
  </ol>
  
  <hr>
  
  <p>What am I missing?<br>
  Any help will be appreciated.<br>
  Thanks in advance.</p>