Arduino UNO with SM5100B

Hello !!!

I m using Arduino UNO with GSM module SM5100B . The Problem i m facing is that, when i download the program in UNO. The GSM module sends sms perfectly. but when i disconnect the USB cable from Arduino, and then plug in the USB Cable again, it doesnot send the SMS. The program does not run.
I checked the UNO with out the SM5100B. I download some program in it. It executes the program, then i remove the USB Cable and plugg in the USB cable again. The program executes perfectly.
Do you refer me some guidelines in this regards.
Also i want to know that, can I connect the external power source (+5v) to the UNO with SM5100B during the downloading of program in it.

Zee Alam

i just want to send SMS from it.

Can you post your code?


/* Example 26.4 Send a text message upon an event occurring > chapter 26 */

#include <NewSoftSerial.h>

NewSoftSerial cell(2,3); // We need to create a serial port on D2/D3 to talk to the GSM module

char mobilenumber=“03455900675”; // Replace xxxxxxxx with the recipient’s mobile number

char textmessage[160]; // used to hold contents of message to send

int b=0;

void setup()

{ //Initialize serial ports for communication.


delay(35000); // give the GSM module time to initialise, locate network etc.

// this delay time varies. Use example 26.1 sketch to measure the amount

// of time from board reset to SIND: 4, then add five seconds just in case

pinMode(13, OUTPUT); // use the LED for status



void startSMS()

// function to send a text message


digitalWrite(13, HIGH);

cell.println(“AT+CMGF=1”); // set SMS mode to text


cell.print(34,BYTE); // ASCII equivalent of "


cell.println(34,BYTE); // ASCII equivalent of "

delay(500); // give the module some thinking time


void endSMS()


cell.println(26,BYTE); // ASCII equivalent of Ctrl-Z

delay(15000); // the SMS module needs time to return to OK status

digitalWrite(13, LOW);


void loop()



cell.print("The random number is: ");






How much time are you waiting between unplugging it and plugging it back in?

1 minute

Need help !!! Please Reply :(

Sorry can't really think of a reason why it wouldn't work after unplugging it then plugging it back in with that code.

When you unplug and replug the port changes -are you taking that into account?