Host library for controlling a WiConnect enabled Wi-Fi module.

Dependents:   wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more

Revision:
39:a963f69cb2de
Parent:
34:2616445d0823
--- a/doc/mbed/html/http_get_2example_8cpp-example.html	Thu Nov 27 10:27:18 2014 +0000
+++ b/doc/mbed/html/http_get_2example_8cpp-example.html	Mon Feb 23 20:30:18 2015 -0800
@@ -116,7 +116,7 @@
 <div class="line"><span class="comment"> */</span></div>
 <div class="line"></div>
 <div class="line"><span class="comment">// the URL of the webpage to GET</span></div>
-<div class="line"><span class="preprocessor">#define HTTP_URL &quot;http://ack.me&quot;</span></div>
+<div class="line"><span class="preprocessor">#define HTTP_URL &quot;http://mbed.org&quot;</span></div>
 <div class="line"></div>
 <div class="line"></div>
 <div class="line"></div>
@@ -152,6 +152,8 @@
 <div class="line"><span class="comment"> */</span></div>
 <div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
 <div class="line">{</div>
+<div class="line">    <a name="a0"></a><a class="code" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> result;</div>
+<div class="line">    </div>
 <div class="line">    consoleSerial.baud(115200); <span class="comment">// console terminal to 115200 baud</span></div>
 <div class="line"></div>
 <div class="line">    <span class="comment">//-------------------------------------------------------------------------</span></div>
@@ -178,12 +180,12 @@
 <div class="line">    printf(<span class="stringliteral">&quot;Initializing WiConnect Library...\r\n&quot;</span>);</div>
 <div class="line"></div>
 <div class="line">    <span class="comment">// Initialize communication with WiFi module</span></div>
-<div class="line">    <span class="keywordflow">if</span>(wiconnect.init(<span class="keyword">true</span>) != <a name="a0"></a><a class="code" href="group__api__core__types.html#gga325637ed501728bd6c8c7a7982b9ce05af0a2ad8af174aee6b52813d8528328e7">WICONNECT_SUCCESS</a>)</div>
+<div class="line">    <span class="keywordflow">if</span>(<a name="a1"></a><a class="code" href="group__api__core__macro.html#gab27aa3ef76302b5221766abfd4f47e64">WICONNECT_FAILED</a>(result, wiconnect.init(<span class="keyword">true</span>)))</div>
 <div class="line">    {</div>
-<div class="line">        <span class="keywordflow">if</span>(result == <a name="a1"></a><a class="code" href="group__api__core__types.html#gga325637ed501728bd6c8c7a7982b9ce05a62defbdafd472461054dd6bb888c9a1e">WICONNECT_FIRMWARE_OUTDATED</a>)</div>
+<div class="line">        <span class="keywordflow">if</span>(result == <a name="a2"></a><a class="code" href="group__api__core__types.html#gga325637ed501728bd6c8c7a7982b9ce05a62defbdafd472461054dd6bb888c9a1e">WICONNECT_FIRMWARE_OUTDATED</a>)</div>
 <div class="line">        {</div>
-<div class="line">            printf(<span class="stringliteral">&quot;The WiFi firmware is not supported. Run the ota example to update the firmware:\r\n&quot;</span>);</div>
-<div class="line">            printf(<span class="stringliteral">&quot;https://developer.mbed.org/teams/ACKme/code/wiconnect-ota_example&quot;</span>);</div>
+<div class="line">            printf(<span class="stringliteral">&quot;** The WiFi firmware is not supported. Run the ota example to update the firmware:\r\n&quot;</span>);</div>
+<div class="line">            printf(<span class="stringliteral">&quot;https://developer.mbed.org/teams/ACKme/code/wiconnect-ota_example\r\n\r\n&quot;</span>);</div>
 <div class="line">        }</div>
 <div class="line">        <span class="keywordflow">else</span></div>
 <div class="line">        {</div>
@@ -207,9 +209,11 @@
 <div class="line"></div>
 <div class="line">    <span class="comment">// Issue HTTP request</span></div>
 <div class="line">    <span class="comment">// NOTE: the module must have valid network credentials</span></div>
-<div class="line">    <span class="keywordflow">if</span>(wiconnect.httpGet(socket, HTTP_URL) != <a class="code" href="group__api__core__types.html#gga325637ed501728bd6c8c7a7982b9ce05af0a2ad8af174aee6b52813d8528328e7">WICONNECT_SUCCESS</a>)</div>
+<div class="line">    <span class="keywordflow">if</span>(wiconnect.httpGet(socket, HTTP_URL) != <a name="a3"></a><a class="code" href="group__api__core__types.html#gga325637ed501728bd6c8c7a7982b9ce05af0a2ad8af174aee6b52813d8528328e7">WICONNECT_SUCCESS</a>)</div>
 <div class="line">    {</div>
 <div class="line">        printf(<span class="stringliteral">&quot;Failed to issue HTTP request. Does the module have valid network credentials?\r\n&quot;</span>);</div>
+<div class="line">        printf(<span class="stringliteral">&quot;Use the network join example to configure the module&#39;s network credentials:\r\n&quot;</span>);</div>
+<div class="line">        printf(<span class="stringliteral">&quot;https://developer.mbed.org/teams/ACKme/code/wiconnect-join_example\r\n&quot;</span>);</div>
 <div class="line">        <span class="keywordflow">for</span>(;;); <span class="comment">// infinite loop</span></div>
 <div class="line">    }</div>
 <div class="line"></div>