Own fork of C027_Support

Dependents:   MbedSmartRestMain MbedSmartRestMain

Fork of C027_Support by u-blox

Files at this revision

API Documentation at this revision

Comitter:
mazgch
Date:
Tue Aug 12 08:43:15 2014 +0000
Parent:
105:f6bb2a20de70
Child:
107:436ee320efd6
Child:
108:254bf037f83f
Commit message:
fix UDP socket creation for CDMA

Changed in this revision

MDM.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MDM.cpp	Tue Jul 29 04:08:43 2014 +0000
+++ b/MDM.cpp	Tue Aug 12 08:43:15 2014 +0000
@@ -897,10 +897,13 @@
     socket = _findSocket();
     TRACE("socketSocket(%d)\r\n", ipproto);
     if (socket != SOCKET_ERROR) {
-        if ((ipproto == IPPROTO_UDP) && (port == -1)){
-            sendFormated("AT+USOCR=17\r\n");
-        } else if (ipproto == IPPROTO_UDP){
-            sendFormated("AT+USOCR=17,%d\r\n", port);
+        if (ipproto == IPPROTO_UDP) {
+            // sending port can only be set on 2G/3G modules
+            if ((port != -1) && (_dev.dev != DEV_LISA_C200)) {
+                sendFormated("AT+USOCR=17,%d\r\n", port);
+            } else {
+                sendFormated("AT+USOCR=17\r\n");
+            }
         } else /*(ipproto == IPPROTO_TCP)*/ {
             sendFormated("AT+USOCR=6\r\n");
         }