Sinamics
You could just add a serial write and look in Arduino Terminal if you get the respons. while(!isReady){ if(mySerial.available()){ String b=mySerial.readString(); if(b.indexOf("+CREG: 1") > 0 || b.indexOf("+CREG: 2") > 0){ isReady = true; //while(!sendATCommand("AT+IPR=57600","OK",100)); // Uncomment to set Modem Baudrate //while(!sendATCommand("AT&W","OK",100)); // Uncomment to write settings to non-volatile memory while(!sendATCommand("AT V1 E1 X1 S0=0","OK",100)); // Set error response and do not pickup on ring while(!sendATCommand("AT+CREG=2","OK",100)); // Set various notice messages and parameters while(!sendATCommand("AT+CMEE=2","OK",100)); while(!sendATCommand("AT+CR=1","OK",100)); while(!sendATCommand("AT+CRC=1","OK",100)); while(!sendATCommand("AT+CSNS=4","OK",100)); while(!sendATCommand("AT+CSMINS=1","OK",100)); while(!sendATCommand("AT+CSCLK=0","OK",100)); while(!sendATCommand("AT+CIURC=1","OK",100)); while(!sendATCommand("AT+CGEREP=2","OK",100)); while(!sendATCommand("AT+CIPMUX=0","OK",100)); // Single channel communication (ie only one socket can be opened) while(!sendATCommand("AT+CIPMODE=1","OK",100)); // Transparent bridge mode while(!sendATCommand("AT+CIPCCFG=8,10,400,0","OK",100)); // GPRS params mySerial.print("AT+CMUX=0,0,4,32768,10,3,30,10,2\r"); // GPRS/IP params delay(2000); while(!sendATCommand("AT+CGATT?","OK",1000)); // Make sure GPRS is Attached while(!sendATCommand("AT+CSTT= \"zain\",\"\",\"\"","OK",1000)); // AT+CSTT="APN","username","password" - login to service provider/carrier while(!sendATCommand("AT+CIICR","OK",1000)); // Connect! while(!sendATCommand("AT+CIFSR",".",100)); // Get IP address (for info only); while(!sendATCommand("AT+CLPORT=\"UDP\",8888","OK",100)); // Prep UDP Port 8888 while(!sendATCommand("AT+CIPSTART=\"UDP\",\"drone.dyndns.biz\",8888","OK",1000)); // AT+CIPSTART="protocol","ip address or domain","port #" Serial.begin(57600); // Start Serial port for communication with Ardupilot Serial.write("Serial initialized and OK"); digitalWrite(LED,HIGH); // Turn on All Good LED digitalWrite(ERR,LOW); // Turn off Warning LED delay(1000); digitalWrite(LED,LOW); } else { digitalWrite(ERR,HIGH); // Turn on Warning LED digitalWrite(LED,LOW); // Turn off All Good LED } }