final 1

Fork of C027_Support by jajn HA

Revision:
106:18aeacdae391
Parent:
105:f6bb2a20de70
Child:
107:436ee320efd6
Child:
108:254bf037f83f
diff -r f6bb2a20de70 -r 18aeacdae391 MDM.cpp
--- 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");
         }