This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Connecting CC3200 over the Proxy Enabled Network

Other Parts Discussed in Thread: ENERGIA, CC3200, CC3100

Hi,

    I have just connected the CC3200 over the proxy enabled network [HTTP Proxy] in energia But same process can be used in CCS also. I have found energia is much simpler than CCS at high level abstraction. To connect with internet, you just need to follow three steps after connecting network. i.e First connect your AP then try following steps.

1. Declare port and proxy host, mine is following but your can be different

const int httpPort = 8080; 
const char* host = "10.3.100.207";

2. Connect Client to internet But first connect with your AP

if (!client.connect(host, httpPort)) {
    Serial.println("connection failed");
    return;
  }
else
 Serial.println("Internet Connection successfully established");

3. Reconnect if disconnected from server

if (WiFi.status() != WL_CONNECTED)
  {
    Serial.println("Disconnected... But we are connecting Back");
      if (!client.connect(host, httpPort)) 
        {
          Serial.println("connection failed");
          return;
        }
      while (WiFi.status() != WL_CONNECTED) {
      delay(50);
      Serial.print("...");
      }
    }

That's all what you need to get started.. I have just connected it with HTTP Server Thingspeak... Sometimes it automatic got disconnected but it's also reconnect automatic :P. Happy Discovering!!!

  • Hi Laxmi,

    Thanks for this post, appreciate it!

    Regards,
    Gigi Joseph.
  • hello, I'm devolping an app IOT with many sensors but I have a huge probrem!!  

    In my company has a proxy network enable, my program works connecting my cc3200 to wifi using my cell phone as a Hotspot, but when I tried to connect with my company network doesnt work and i dont know how!! please help !!

    My code is below:

    Any suggestions??

    char ssid[] = "Com-AP-AT"; // your network name also called SSID
    char password[] = "3E4AFD1045"; // your network password
    char server[] = "test.mosquitto.org"; // MQTTServer to use
    const int httpPort = 80;
    char host[] = "internet.cfemex.com";


    WiFiClient wifiClient;
    PubSubClient client(server, 1883, callback, wifiClient);

    int pubCount = 0; // Keep count of number of MQTT publishes we've sent


    void callback(char* topic, byte* payload, unsigned int length) {
    }

    void setup() {
    wifiReady.begin();
    delay(100);




    ///////////////////////////////////////////// NETWORK CONNECTION /////////////////////////////////////////////////////////////////////
    Serial.print("\nAttempting to connect to Network named: ");
    Serial.println(ssid);
    WiFi.begin(ssid, password);

    while ( WiFi.status() != WL_CONNECTED)

    {
    delay(300);
    }

    Serial.println("\nYou're connected to the network");
    Serial.println("Waiting for an ip address");
    while (WiFi.localIP() == INADDR_NONE)

    {
    Serial.print(".");
    delay(300);
    }



    //////////////////////////////////////////////////////////////////////////////////////////
    Serial.print("\nIP Address obtained: ");
    Serial.println(WiFi.localIP());
    wifiReady.send();



    }


    void loop() {
    myEvent.waitFor(); // Wait for next JSON payload event to be triggered

    // Reconnect to MQTT Broker if not connected
    if (!client.connected()) {
    Serial.println("Disconnected. Reconnecting....");
    client.connect("MSP432_CC3100");
    }

    pubCount++; // Keep count of times we publish to the cloud
    client.publish("myLaunchPadData", jsonPayload); // PUBLISH!!!
    free(jsonPayload); // free the dynamic space allocated for this global variable
    Serial.print("MQTT published! ("); Serial.print(pubCount); Serial.println(")");
    }

    //PD.   I'm using MQTT to publish my sensor data