Dependencies:   mbed UMTSStickNetIf

Files at this revision

API Documentation at this revision

Comitter:
donatien
Date:
Fri Jul 09 15:12:41 2010 +0000
Commit message:

Changed in this revision

HTTPClient.lib Show annotated file Show diff for this revision Revisions of this file
UMTSStickNetIf.lib Show annotated file Show diff for this revision Revisions of this file
UMTSStickNetIfExample.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HTTPClient.lib	Fri Jul 09 15:12:41 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/donatien/code/HTTPClient/#d97a4fc01c86
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UMTSStickNetIf.lib	Fri Jul 09 15:12:41 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/donatien/code/UMTSStickNetIf/#62e3d7a3cc68
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UMTSStickNetIfExample.cpp	Fri Jul 09 15:12:41 2010 +0000
@@ -0,0 +1,56 @@
+#include "mbed.h"
+#include "UMTSStickNetIf.h"
+#include "HTTPClient.h"
+
+UMTSStickNetIf stick; 
+HTTPClient http;
+  
+int main() {
+
+  printf("Setting up...\n");
+  UMTSStickErr umtsStickErr = stick.setup();
+  if(umtsStickErr)
+  {
+    printf("Error %d in setup.\n", umtsStickErr);
+    return -1;
+  }
+  printf("Setup OK\r\n");
+  
+  PPPErr pppErr;
+  printf("Connecting...\n");
+  pppErr = stick.connect("internet", "web", "web");
+  //pppErr = stick.connect("three.co.uk", NULL, NULL);
+  //pppErr = stick.connect("pp.vodafone.co.uk", "web", "web");
+  //pppErr = stick.connect(NULL, NULL, NULL);
+  if(pppErr)
+  {
+    printf("Error %d during connection.\n", pppErr);
+    return -1;
+  }
+
+  HTTPText txt;
+  
+  HTTPResult r = http.get("http://mbed.org/media/uploads/donatien/hello.txt", &txt);
+  if(r==HTTP_OK)
+  {
+    printf("Result :\"%s\"\n", txt.gets()); 
+  }
+  else
+  {
+    printf("Error %d\n", r);
+  }
+  
+  printf("Disconnecting.\n");
+   
+  stick.disconnect();
+
+  printf("Disconnected.\n");
+  
+  while(1)
+  {
+  
+  }
+  
+  return 0;
+  
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jul 09 15:12:41 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da