Go Down

Topic: Interfacing to Nokia 6230i Pop port, for AT cmd (Read 1 time) previous topic - next topic

njensen

Hi, i'm new to the Arduino world and also to AT commands. I know it has been discussed a lot but i need a bit of help.

I have made some code that can send the msg "AT" to hyperterminal, and some code that should detect if the "OK" comes back. This is working.

I have tested the the phone supports AT commands, and i have managed to send sms through Hyper Terminal. This is working.

I have made a cable connecting (phone -> arduino USB B-plug):
 Pop port "D+" to Arduino "D-"
 Pop port "D-" to Arduino "D+"
 Pop port "Data Ground" to Arduino "Ground"

The cable is direct i.e. no level change. I actually don't know if this is ok !

Well - it doesn't work... When i connect the phone and the Arduino i do not receive any "OK" msg from the phone. I have tried different speeds any so, and it all seem to work betweem hyperterninal and the phone, and between arduino and hyperterminal.

any idea ?  ... my code is below..




void setup ()
{
 pinMode(13,OUTPUT);
 Serial.begin(115200);
 //Serial.println("ATZ&F");
 //delay(5000);  
 //Serial.println("AT&K[0]");
 //delay(2000);
}

void loop()
{
 inCount = 0;
 Serial.flush();
 digitalWrite(13, HIGH);
 
 
 Serial.println("AT");
 
 do {
   while (!Serial.available())
       {
       }
 
   digitalWrite(13, LOW);
   inString[inCount] = Serial.read();    
   
   if (inString [inCount] == INTERMINATOR) break;
     } while(++inCount < INLENGTH);

 inString[inCount] = 0;                     // null terminate the string
 
 if(0==strcmp(inString,"OK"))
   {
         Serial.println("OK-Recieved");
         
         digitalWrite(13, HIGH);
         delay(200);
         digitalWrite(13, LOW);
         delay(1000);
         digitalWrite(13, HIGH);
         delay(200);
                         
   }
   
   
   delay(10000);
}

Ran Talbott

Quote
I actually don't know if this is ok !


It's not:  there's no async serial data on those pins.  They're for USB.

You need to connect the Arduino's RX,  TX pins and ground to the phone.  Possibly through a 5V-to-3.3V level converter (I don't know whether the Nokia's input is 5V-tolerant).

njensen

Hi Ran, thx for the reply.

i had a feeling i was doing something wrong. So i need to use the tx rx pins. Is that digital pin 0 & 1 ? (http://arduino.cc/en/Reference/SoftwareSerial). Is it correct understood that the data communicated with the serial libary to the Usb-b plug is also available on pin 0 & 1 (sort of in parallel)?

It seems there are some limitations of serial comm on pin 0 & 1 due to it's a sw implementation only, but i guess i can live with that, if everybody else can.

i guess i need to check wheather in can take the 5v signal before trying.

PaulS

Quote
So i need to use the tx rx pins. Is that digital pin 0 & 1 ?


Yes.

Quote
It seems there are some limitations of serial comm on pin 0 & 1 due to it's a sw implementation only


Serial communication of pins 0 and 1 is a hardware implementation. Serial communication using other than pins 0 and 1 is a software implementation. On other than the Mega which supports multiple hardware serial ports, that is.

luke123

Hi just wondering if you had any luck with this ?

Im hoping on doing the same with the nokia 6230i  . I want to read sms messages . Did you get this working ? even though the usb lead .


any info would be great.

luke

Go Up