caramoan tour package

caramoan tour package

Author Topic: gsm AT commands reading ng SMS  (Read 1004 times)

Offline daved

  • CR2032 Battery
  • **
  • Posts: 7
  • Pogi/Ganda Points: 0
gsm AT commands reading ng SMS
« on: January 14, 2011, 02:24:19 PM »
Hi.. ang project ko po is using gsm interfaced with pic16f877a micocontroller. ngayon eto un program na huli ko na try, ang prob ko is hindi ko maopen ung text message sa gsm module para icompare iyon sa delim na naka set. At pagna open ng gsm un sms na sinend eh may matrigger na ports pra mag ON. sana po matulungan nyo po ako.

Code: [Select]
 
program GSM

symbol CR            =    13   ' Carriage Return  (enter key)
Symbol CTRL_Z        =    26   ' Control + Z key
symbol LF            =    10    ' linefeed
symbol quote         =    34   ' ascii code for quote (")

dim delim as string[20]
dim count, tym as byte
dim txt as string[10]

trisa=%000000

trisb=%00000000

main:

Usart_Init(9600)

porta=%000000
portb=%00000000

delay_ms(400)

gosub check_connection
gosub text_mode
portb.1=1
gosub readstring
portb.2=1

delim = "on1"

porta=%000000
portb=%00000000

while TRUE

  if Usart_Data_Ready() = 1 then

    Usart_Read_Text(txt,delim)

             delay_ms(400)
             porta.0=1
             delay_ms(400)

  end if
wend


check_connection:

' This will check the availability of GSM module
  count = 0
     while count < 5           'To make sure GSM communicate perfectly
     Usart_Write_Text("AT")    'AT commands of gsm module
     delay_ms(500)
     usart_write(CR)
     delay_ms(500)
     portb.0=1
     count = count + 1
     wend
return

text_mode:
'
' This will instruct the phone to use text mode.
' Mikrobasic cannot send the whole command "AT+cmgf=1", so
' the command is sent by chunk  "AT","+",and "cmgf=1"
'
    Usart_Write_Text("AT")
    delay_ms(500)
    Usart_Write_Text("+")
    delay_ms(4000)
    Usart_Write_Text("CMGF=1")
    delay_ms(500)
    usart_write(CR)
    delay_ms(500)

return


readstring:         
tym=0
while tym < 20
    portb.3 = 1
    Usart_Write_Text("AT")
    delay_ms(500)
    Usart_Write_Text("+")
    delay_ms(4000)
    Usart_Write_Text("CMGR=1")
    delay_ms(500)
    usart_write(CR)
    delay_ms(500)
    portb.3 = 0
    tym=tym+1
wend
return


goto main

end.



Philippine Electronics Forum

gsm AT commands reading ng SMS
« on: January 14, 2011, 02:24:19 PM »

Offline lyrad24

  • CR2032 Battery
  • **
  • Posts: 13
  • Pogi/Ganda Points: 0
Re: gsm AT commands reading ng SMS
« Reply #1 on: February 26, 2011, 12:03:03 AM »
Hello Sir, I am new to the AT Commands and interfacing the 877a with the GSM module. Same tayo rin ng ginagawa kasi, I would like to ask if you had an answer to this problem already. We need the codes din ngayon! Thank you!

Philippine Electronics Forum

Re: gsm AT commands reading ng SMS
« Reply #1 on: February 26, 2011, 12:03:03 AM »

Offline daved

  • CR2032 Battery
  • **
  • Posts: 7
  • Pogi/Ganda Points: 0
Re: gsm AT commands reading ng SMS
« Reply #2 on: March 27, 2011, 06:35:34 PM »
yup i've answered this..

Philippine Electronics Forum

Re: gsm AT commands reading ng SMS
« Reply #2 on: March 27, 2011, 06:35:34 PM »

Offline Tal Rasha

  • CR2032 Battery
  • **
  • Posts: 23
  • Pogi/Ganda Points: 0
Re: gsm AT commands reading ng SMS
« Reply #3 on: April 22, 2011, 11:13:52 PM »
pa post naman po how.. prob ko din tohh

Philippine Electronics Forum

Re: gsm AT commands reading ng SMS
« Reply #3 on: April 22, 2011, 11:13:52 PM »

Offline Tal Rasha

  • CR2032 Battery
  • **
  • Posts: 23
  • Pogi/Ganda Points: 0
Re: gsm AT commands reading ng SMS
« Reply #4 on: April 22, 2011, 11:18:03 PM »
GSM module pala gamit nio.. di ko lang mapagana AT+CMGR using HT sa nokia 6220, and 5230.. pero it works pag tinetest ko sa USB modems.. ???

Philippine Electronics Forum

Re: gsm AT commands reading ng SMS
« Reply #4 on: April 22, 2011, 11:18:03 PM »

Offline daved

  • CR2032 Battery
  • **
  • Posts: 7
  • Pogi/Ganda Points: 0
Re: gsm AT commands reading ng SMS
« Reply #5 on: May 14, 2011, 04:25:00 PM »
check this site.....



activexperts.com/xmstoolkit/atcommands/nokia/


Philippine Electronics Forum

Re: gsm AT commands reading ng SMS
« Reply #5 on: May 14, 2011, 04:25:00 PM »

 

Privacy Policy

Contact Us: elabph@yahoo.com