Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

8051 + AT commands using Nokia phone

Status
Not open for further replies.

dancingqueeneng

Member level 1
Member level 1
Joined
Oct 26, 2006
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,564
nokia phone commands

Kindly send me a helping hand, thank you..
I'm using a microcontroller 8051 to interface with Nokia 8250, and I'm using AT commands to send sms through 8250.
I have a question here, do I need to wait to receive the response from the phone (e.g. OK)after I've sent AT commands to it, just like receiving 'OK' after I've inserted AT commands in HyperTerminal? If yes, then does it mean that I have to get the response from phone through receiver in 8051 serial port?
Let's say I've transmitted 'AT+CMGS=(phone number)', do I have to wait to receive a '>' before transferring the message to phone? Then complete the message by 'control-z'?
Sorry to trouble and thank you for helping.
 

nokia 1600 at commands

Let's say I've transmitted 'AT+CMGS=(phone number)', do I have to wait to receive a '>' before transferring the message to phone?
YES

Then complete the message by 'control-z'?
YES
 

at commands for nokia 1600

I have another question here, I start my program from 30H, then it ends up more than F0H, what shall I do? RAM is only from 30H up to 7FH right? Shall I program it into ROM? As I might edit the program which I have written but ROM cannot be overwrote, or shall I place the program into external RAM?
Thanks in advance.
 

nokia1600 rs232

I start my program from 30H, then it ends up more than F0H, what shall I do? RAM is only from 30H up to 7FH right? Shall I program it into ROM?
Internal Program memory space on 8051 start from 0000h and ended at 1FFFh, this Program Memory is reside on ROM! And you have to start you program from 0000h!
I think you are confusing between Internal Program Memory and Internal Data Memory.
Internal Data Memory (RAM) start from 00h upto 7Fh is for data storage purpose, not for program storage.

As I might edit the program which I have written but ROM cannot be overwrote, or shall I place the program into external RAM?
For you program right now, you don't need use external RAM or external ROM.

You have more internal RAM if you use 8052 (start from 00h up to 0FFh)
 
atcommands for nokia 1600

hi,
you use C35 siemens mobile it is AT command set compatible
 

nokia 1600 fbus commands

Another problem arises, I've connected everything including the 8051 and phone, but the phone didn't perform the SMS sending, how can I troubleshoot which part has gone wrong?
Another thing is that I've changed 8051 to 8951 because it is EPROM. Do they perform the same?
Another question is that what is the ASCII code for the key 'enter'? I have to include it at the end of the string 'AT+CMGF=1' and other AT commands right? Just like I include 'control-Z' by the code 1AH right? So what is the code for 'enter' key?
Thanks in advance.
 

dlr-3p at-commands

Another thing is that I've changed 8051 to 8951 because it is EPROM. Do they perform the same?
8051 is totally compatible with 8951. No problem at all.

Another question is that what is the ASCII code for the key 'enter'?
the ASCII code for the key 'enter' is 0x0D
 

nokia 1600 8051

the ASCII code for the key 'enter' is 0x0D
Why must it be 0x0D? Can I write just 0DH? What is the 'x' for? Then 1AH or 0x1A for ctrl-z?
 

nokia 6310 dlr-3p at commands

Hi :)
dancingqueeneng said:
the ASCII code for the key 'enter' is 0x0D
Why must it be 0x0D? Can I write just 0DH? What is the 'x' for? Then 1AH or 0x1A for ctrl-z?
0x indicate to the compiler that the next number is in Hex.
like:
0x0f is 0fH = 15D
thanks
Ahmed
 

at commands nokia 1600

I've connected the 8951 and the Nokia 8250, I failed to get the result, the phone didn't send out sms, I don't know how can I troublshoot because the program runs internally and I don't know where has gone wrong, can anyone teach me?
Just to confirm, I program the timer part with this:
MOV IE, #00 ;Disable interrupts
CLR SMOD ;Select divide by 384
CLR TR0 ;Off timer 0
CLR TR1 ;Off timer 1
MOV TMOD, #20H ;Timer 1 in mode 2
MOV TH1, #-3 ;9600 baud rate
SETB TR1 ;Start timer 1
MOV SCON, #50H ;8-bit, 1 stop bit, REN enabled

Is there anything wrong?
 

nokia phone at commands

Code:
      MOV IE, #00 ;Disable interrupts
      CLR SMOD ;Select divide by 384
      CLR TR0 ;Off timer 0
      CLR TR1 ;Off timer 1
      MOV TMOD, #20H ;Timer 1 in mode 2
      MOV TH1, #-3 ;9600 baud rate
      SETB TR1 ;Start timer 1
      MOV SCON, #50H ;8-bit, 1 stop bit, REN enabled

Nothing wrong, but you can remove the first 4 lines of that code.

How about your Serial transmit dan Serial receive routines?
 

m commands for nokia

serial transmit is like this:
SEND: MOV SBUF, A ;Load the data
HERE: JNB TI, HERE ;Stay until last bit sent
CLR TI ;Get ready for next character
RET

serial receive is like this:
RECVi: JNB RI, RECVi ;Wait for character
MOV A, SBUF ;Save it in accumulator
CLR RI
RET

Are they correct?
But I have a question here, do I have to receive the letter 'O', then clear the flag, then receive the letter 'K' before I proceed? The two letters 'O' and 'K' are received separately or at the same time?
 

nokia at command with microcontroller

Hello,
I just read the history and I have some comments:
1- In the command AT+CMGS=" Number" you should write the AsCII code of the " which is decimal 34 hence the command should be as follow:
'A','T','+','C','M','G','S','=', 34,NUMBER, 34, 13,10
I recommend to write every char. between ' ' as it works with every Assembler
but when I tried to use AT+CMGS="NUMBER"1310 it did work for some and some assemblers don't accept it.
2-Are you sure the the NOKIA phone you use can accept communication through AT commandd???
3- You insert inter commands delay to make sure the modem inside the Nokia get your command.
 

nokia at commands compatible

mos_halas wrote:
1- In the command AT+CMGS=" Number" you should write the AsCII code of the " which is decimal 34 hence the command should be as follow:
'A','T','+','C','M','G','S','=', 34,NUMBER, 34, 13,10
I don't think so, normally I don't use double quotation (")

2-Are you sure the the NOKIA phone you use can accept communication through AT commandd???
Right, Nokia 8250 is one of the cell phone that can't accept AT Command

3- You insert inter commands delay to make sure the modem inside the Nokia get your command.
Normally I wait the answer from cell phone, this way is more precise than time delay

Added after 27 minutes:

dancingqueeneng wrote:
Are they correct?
Yes

But I have a question here, do I have to receive the letter 'O', then clear the flag, then receive the letter 'K' before I proceed? The two letters 'O' and 'K' are received separately or at the same time?
Separately! One by one
 

what is the baud rate nokia 1600

But I still couldn't get the performance, the phone still failed to send sms, how can I troubleshoot to find out where is the problem? I don't know which part is wrong, I've run my program using simulator and it worked as what I desired, but when it comes to practical, I couldn't get what I want, the phone has no response at all.
How can I solve this problem? Or how to troubleshoot this problem?
Thank you.
 

interface nokia 1600 with 8051

2-Are you sure the the NOKIA phone you use can accept communication through AT commandd???
Right, Nokia 8250 is one of the cell phone that can't accept AT Command

I'm sorry, I doubt your 8250 can't accept AT command
 

write nokia at command in 8051 assembly

But I've tried with HyperTerminal, using infrared to connect with 8250, it proves that AT commands work with 8250 because I can send sms through HyperTerminal, that's why I can't figure out why 8951 failed to send sms, can someone suggest me what to do? Thanks a lot.
 

nokia 1600 with microcontroller

I'll try my 8250 with infra red, last time I try it through Cable Data but fail.
 

nokia at commands 232

Thanks a lot for helping me, for the current project that I'm doing, I'm using data cable to interconnect between 8951 and 8250 but failed to response, whereas I succeed by using infrared to interconnect between PC and 8250, I wonder why.
 

tx and rx pin of nokia for at command

dancingqueeneng mail me:
Can you please help me to check if there is any error in my program? I'm in urgent and I don't know how to troubleshoot the problem, sorry to trouble you but I really appreciate your helping hand, thanks a lot.

P/s: Can I assign my program address like what I assigned in the program? Or do I need to modify the address?

Here is your code, I already check it all an rewrite the code.
Code:
SENSOR BIT P1.0
IRin   BIT P1.1
IRout  BIT P1.2

     ORG 0000H         ;Power up
MAIN:
     MOV   DPTR,#ST
     MOV   R6,DPH
     MOV   R7,DPL
     MOV   TMOD,#20H   ;Timer 1 in mode 2
     MOV   TH1,#-3     ;9600 baud rate
     SETB  TR1         ;Start timer 1
     MOV   SCON,#50H   ;8-bit, 1 stop bit, REN enabled
;
; ***** you don't need to execute the following 4 lines every time
;
     MOV   DPTR,#CMGF
     ACALL SingleCommand
     MOV   DPTR,#CSCA
     ACALL SingleCommand
;
; ******** I don't known what do you want in the following 8 lines
;
NextMessage:
     CLR   IRin         ;Configure IRin as output
LOOP:
     JNB   SENSOR,LOOP  ;Loop until door is open (active high)
     SETB  IRin
     CLR   IRin         ;Pulse Infrared
LOOP1:
     JB    IRout,LOOP1  ;Loop until signal is reflected (active low)
;
; ***** Send SMS
;
     MOV   DPTR,#CMGS
     ACALL ATcommand
WaitReady:
     ACALL SerialIn          ;Get the status of the phone
     CJNE  A,#'>',WaitReady  ;Repeat if symbol '>' not received
;
     MOV   DPH,R6
     MOV   DPL,R7
     ACALL ATcommand
     MOV   R6,DPH
     MOV   R7,DPL
;
     CLR   A
     MOVC  A,@A+DPTR
     JNZ   NextMessage
FINISH:
     JMP   FINISH      ;If yes, end of program

SerialOut:
     MOV   SBUF,A      ;Load the data
WaitTI:
     JNB   TI,WaitTI   ;Stay until last bit sent
     CLR   TI          ;Get ready for next character
     RET

SendIt:
     ACALL SerialOut
ATcommand:
     CLR   A
     MOVC  A,@A+DPTR
     INC   DPTR
     JNZ   SendIt
     RET

SingleCommand:
     ACALL ATcommand
Wait0DH:
     ACALL SerialIn
     CJNE  A,#0DH,Wait0DH
     RET

SerialIn:
     JNB   RI,SerialIn ;Wait for another character
     MOV   A,SBUF      ;Save it in accumulator
     CLR   RI          ;Get ready for next character
     RET

CMGF: DB 'AT+CMGF=1',0DH,0
CSCA: DB 'AT+CSCA="60120000015"',0DH,0
CMGS: DB 'AT+CMGS="60122521131"',0DH,0
ST:   DB '01',1AH,0,'02',1AH,0,'03',1AH,0,0

     END

Waiting for your response
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top