GSM Module TC35, Problem with AT+CPIN command


hello,
i using tc35 , uno r3 play bit gsm network.
now strange happening me...
i use code:
code: [select]
void loggon(){
    uint8_t x=0,  answer=0;
    char response[100];
    unsigned long previous;

    memset(response, '\0', 100);

    delay(100);

    while( gsmserial.available() > 0) gsmserial.read();    

    gsmserial.println("at+cpin=****"); //**** pin
        x = 0;
    previous = millis();
    do{
        if(gsmserial.available() != 0){    
            response[x] = gsmserial.read();
            x++;
            if (strstr(response, "ok") != null)    
            {
                answer = 1;
            }
        }
    }while((answer == 0) && ((millis() - previous) < 2000)); //the second part timeout condition
 
    serial.println(response);
}

,where gsmserial softwareserial rx , tx pins of module,
to "log on gsm network" pin , response of @ command.

the response getting

error

and do-while loop left because of time-out connection...

but
i still able read fresh sms or send sms after logged in command returning error problem?
why can things module if "login" tells me failed?

is not necessary enter pin send sms?
or pin set first time used command(i did not check response of command in beginning) , set rest of lifetime , responds error cause pin set?
or strange going on on desk?

i hope english understandable ;)
greetings
niosat

nobody has tipp me?


Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > GSM Module TC35, Problem with AT+CPIN command


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code