From 68f33af73d67785a2c6ecba6859d65145bc6ee95 Mon Sep 17 00:00:00 2001
From: Ian C <ianc@noddybox.co.uk>
Date: Mon, 30 Dec 2024 12:41:33 +0000
Subject: Development over Christmas.

---
 dload.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

(limited to 'dload.c')

diff --git a/dload.c b/dload.c
index 9431ea3..ae78e87 100644
--- a/dload.c
+++ b/dload.c
@@ -87,6 +87,12 @@ static const char *StatusCode(WifiStatus status)
         case eWifiInvalidURL:
             return "Invalid URL";
 
+        case eWifiFailedToSendCommand:
+            return "Failed to send command to modem";
+
+        case eWifiBadHTTPStatusCode:
+            return "Bad HTTP status code";
+
         case eWifiOK:
             return "OK";
 
@@ -108,13 +114,17 @@ int main(int argc, char *argv[])
         return EXIT_FAILURE;
     }
 
-    /*
     if ((status = WifiConnect()) != eWifiOK)
     {
-        fprintf(stderr, "%s\n", StatusCode(status));
+        fprintf(stderr, "WifiConnect: %s\n", StatusCode(status));
+        return EXIT_FAILURE;
+    }
+
+    if ((status = ConnectURL(0, argv[1], 0)) != eWifiOK)
+    {
+        fprintf(stderr, "ConnectURL: %s\n", StatusCode(status));
         return EXIT_FAILURE;
     }
-    */
 
     return EXIT_SUCCESS;
 }
-- 
cgit v1.2.3