sms to control pic..pls help...


Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 40 of 54
  1. #1
    Ziki's Avatar
    Ziki Guest

    Default sms to control pic..pls help...

    hi ....i doing a project on sms to control a robot ....i'm using t610 SE phone as GSM phone as it can support AT command , the pic i'm using is just 16F84 ....can give me a abit of guide lines ??.....1st of all ...can tell me which pin of the phone is for TX,RX and ground ...?
    pls help ....
    thx alot

  2. #2
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    SonyEricsson R520, R310, R320, T28, T39, T68, T68i, R600, T610, T310 and others cell phones pinout
    http://pinouts.ru/CellularPhones-A-N...8_pinout.shtml

  3. #3
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    thx alot for your help savnik. Are you familiar with this project ?? or does anyone familiar with it ...might need some guidedance ...thx again ...

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ziki
    thx alot for your help savnik. Are you familiar with this project ?? or does anyone familiar with it ...might need some guidedance ...thx again ...
    I just started something similar, was going to use a 2550 but using a f88 at the moment, dont connect port A to your phone, it wont work on the f88, no I dont know why! (just spent a day hitting it)

    Connect phone to port B, I used a 1k resistor to protect the phone from the 5v of the pic, but maybe 560ohm would be ok too, I did try none, worked fine, but I put the 1k back to be safe.

    I can send data to the T610 and a T68i at T2400 and T9600 with a 4mhz crystal with no problems. I dropped back to 2400 to be safe.

    Today I am hoping to get data from the phone back into the pic.

    Biggest problem you will have is the format of the sms message is pdu mode0 only............

    This means you will have to read in the entire sms which could be 255 chars etc.

    I suppose you could limit theincoming data size by discarding what you dont need, IE only send it a short message with short commands.

    But you still need to skip over header, and you may want to authenticate the message sender

    {edit}
    also tried a t100, nothing. dont know why, its old maybe its bust.

    {edit2}

    Also phone pinouts on web cant be trusted!
    I used 4 and 5, 4 is data in to phone, 5 is data out, maybe I should have tried different pins for the t100
    Last edited by f_lez; - 20th August 2006 at 10:54.

  5. #5
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    thx for the info ... i believe t610 can support text mode ? izzit true ?

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ziki
    thx for the info ... i believe t610 can support text mode ? izzit true ?

    No the t100, t68, t681, t610 I can say with definate authority only support PDU mode.

    This makes them a total pain for sms controllers.

    You have to type the sms command very carefully......

    If you sent alarm arm it would be 09417658DE0685E56D
    if you sent alarm arm. it would be 0A417658DE0685E56D17
    If you sent alarm arm it would be 09A0203B2C6F83DE6E


    Just one extra space makes it totally different.....

    You have to be very strict on how messages have to be sent, which also means you can just check parts of the string like this as most of it will always be the same.

    Alarm arm 0AD09417658DE0685E56D
    Alarm off 0AD09417658DE06BDCD66

    You can just test at various points to parse it IE

    0AD09 (4176) 58DE06B (DCD) 66
    0AD09 (4176) 58DE068 (5E5) 6D

    Put it all in a byte array and then 'if then it'



    If buf(6)<>"4" then wait_for_command
    if buf(6)<>"1" then wait_for_command
    If buf(6)<>"7" then wait_for_command
    If buf(6)<>"6" then wait_for_command

    ' Ok so we have a command, now which one

    If buf(17)<>"D" then not_arm_command
    If buf(18)<>"C" then not_arm_command
    If buf(19)<>"D" then not_arm_command

    ' OK we got here so its 'arm' command



    Gosub arm_the_alarm

    goto wait_for_commands

    not_arm_command: ' so check for 'off' command


    If buf(17)<>"5" then not_off_command
    If buf(18)<>"E" then not_off_command
    If buf(19)<>"5" then not_off_command


    Gosub alarm_off

    goto wait_for_commands


    not_off_command:

    ' if we got here the command was not understood

    gosub error_comand

    goto wait_for_commands
    Last edited by f_lez; - 24th August 2006 at 10:14.

  7. #7
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Unhappy

    thx flez.....sorry i'm not very familiar with the code you have given ...maybe if possible ..can you send me a code on a simple program ( on a LED when t610 receive sms " ONLED" and off it when recieve "OFFLED" ..thx alot

  8. #8


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ziki
    thx flez.....sorry i'm not very familiar with the code you have given ...maybe if possible ..can you send me a code on a simple program ( on a LED when t610 receive sms " ONLED" and off it when recieve "OFFLED" ..thx alot

    My point was your pic will not see 'OFFLED' it will see a string of hex digits like "6768768768768670987898658769080978547678465587548 7"

    Off led is:
    064FA391592402

    06 is 6 bytes of message and

    4FA391 is off

    592402 is led

    but if you type offled then you get

    06
    6FB399 off
    5D2603 led

    you need to read up on pdu mode if your using ericsson

    pdu mode is more common than text mode phones, I dont know of new phones that support text so learn to use pdu its all the phone manufacturers are offering!

    download pduspy, a link is on google.

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default

    Hi,

    That's not Pic ... but have a look !!!

    http://www.serasidis.gr/circuits/sms...controller.htm

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  10. #10
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Smile

    thx for the link acetronics..........

  11. #11


    Did you find this post helpful? Yes | No

    Default

    You can make it all work without worrying about decoding the pdu's, dont be scared off by them!

    Provided you always send commands in a set way, a protocol if you like, then it wont matter that its not text.

    IE..

    617658DE06BDDD alarm on
    617658DE06BDCD66 alarm off

    You just check a few key points in the above, ie

    617 658D E06B DDD alarm on
    617 658D E06B DCD66 alarm off

    Just check for 658d, if you have that you have the alarm word,then check for DDD, if you have then its on, if DCD then its off, if not any, its a user/sms/command error.

    Thats how I have mine working now.

    And sending a sms back is easy too, ie...

    serout portb.6,t1200,["atz",13] ' wake up thephone
    pause 500
    serout portb.6,t1200,["at+cmgs=",#ln,13] ' tell it we want to send a txt
    pause 2000

    serout portb.6,t1200,["0011000C91"] ' start of the pdu data


    for x=1 to 12 ' send it the destination phone number, 12 digits international format
    serout portb.6,t1200,[pduphn(x)]

    next


    serout portb.6,t1200,["00F0AD"] ' next part of header


    ' ****** Put all the above in a subroutine, every message you send will need the same header, all you need to send a different message is to change the next lines

    serout portb.6,t1200,["C8329BFD06DDDF723619"] ' hello world
    pause 9000 ' wait for phone to send


    You can just change the hello world to whatever you want, remember if you change the length, you need to tellthe phone the incoming data is a different length.

    use 'pdu spy' to create the pdu text you need.
    Last edited by f_lez; - 6th September 2006 at 10:59.

  12. #12
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    thx for the info ...sorry for late reply ....bz lately with exam .......in the #6 post u put :

    If buf(6)<>"4" then wait_for_command
    if buf(6)<>"1" then wait_for_command
    If buf(6)<>"7" then wait_for_command
    If buf(6)<>"6" then wait_for_command

    do i need to store the recieve message( Alarm arm 0AD09417658DE0685E56D
    )into the buffer 1st ...?

  13. #13
    Join Date
    Mar 2006
    Location
    INDIA
    Posts
    89


    Did you find this post helpful? Yes | No

    Default Compleet command for sony & Siemens

    I think this help you, this is the compleet command list that work for picmicro.
    http://www.precision.net.in/picbasic...guidelines.pdf

    http://www.precision.net.in/picbasic...at_command.pdf

  14. #14


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ziki
    thx for the info ...sorry for late reply ....bz lately with exam .......in the #6 post u put :

    If buf(6)<>"4" then wait_for_command
    if buf(6)<>"1" then wait_for_command
    If buf(6)<>"7" then wait_for_command
    If buf(6)<>"6" then wait_for_command

    do i need to store the recieve message( Alarm arm 0AD09417658DE0685E56D
    )into the buffer 1st ...?

    Yes, make buf(XX) large enough for your longest message, but remember that a message has a huge 60 chars plus overhead, dont store those, you have to read them, but dont store them, and then simply read what you want with a for next loop.

    use serin with a timeout so if the message is short, it will keep going, and also if the message is short, you need to skip any further serin commands, IE






    for z=0 to 90
    buf(z)="*"
    next

    error_flag=0

    for n=1 to 20 digits

    get_back_in_loop:

    if error_flag=0
    SERIN portb.7,t1200,1000,comserr,combuf(z)
    endif

    next

    goto finished read


    comserr:

    error_flag=1

    goto get_back_in_loop

    finished_read:


    OK so we have now read the string in (in a dirty horrible looking way) so you can now process it as you need

    You will have to write another routine, to call (gosub) before that, to read the first 46 or so chars, then you can read the next 12 and save them as there are the originating phone number, you may want to check that for an authentic message sender, then dump another 20 as they are time/date etc, unless you want to do something with them.

    remember it screws phone numbers / time date etc up too, so a phone number of 1234 becomes 2143, stupid damn system.

  15. #15
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    hi ..there's a problem ......when i connect my data cable which i have modify it to become serial instead of usb ....(coz canot find it anymore ) to the T610 with the PC .the hyperterminal doesn't seems to respond :< ..canot type anything on it ...pls advice ..thx .....

  16. #16
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Unhappy

    i use pin 4 (Rx)from T610 SE to pin 3(Tx) of db-9 female
    pin 5(Tx) from t610 to pin 2(Rx) of db9 female
    pin 8(Gnd) from t610 to pin 5(Gnd) of db9 female

  17. #17


    Did you find this post helpful? Yes | No

    Default

    to connect to pc 9 pin serial you need a max232.

    your phone is 0v and 3.6v serial, your pc is -12v and +12v, your phone's port may be damaged after that.

    I have had no problems with a t610 connected to a pic16f88 at 5v. but may in my finished design include a resistor.

  18. #18
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Smile

    ooic .....ok..i try it out 1st ..thx alot .....

  19. #19
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    hi ..i have done the max 232 but it canot work .....i attached my diagram .....is there any error ????
    Attached Images Attached Images  

  20. #20


    Did you find this post helpful? Yes | No

    Default

    looks fine to me.

    same as this one.

    http://pinouts.ru/CellularPhonesCabl...e_pinout.shtml

  21. #21
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    there's a correction in my schematic ..i'm using max 232 ...not max323....why must and is it necessary that the DB9 pin 4 and 6 shorted .7 and 8 shorted together ???since i canot make this work yet ..so plan to work on the micro C and phone commmunication ...flez ..do you have a schematic for your project ...can i have a look .....thx alot ....

  22. #22


    Did you find this post helpful? Yes | No

    Default

    I'm using rb6 and 7 connected direct to phone, and a gnd.

    its not a pretty sight to look at is my 'development stage' but I am moving to a better pcb!



    It has 3 cables..........

    one is a usb data cable, I'm using that as an input to the pc on com5 to monitor what the phone is sending to the pic.

    Other cable is a serial data cable on com1, I'm using that to monitor what the pic sends to the phone.

    Phone is connected to pic and the cables above, but it does not need the cables to the pc, just for debugging.

    I used no resistors between phone and pic, but I think I should have done, say 560 ohm at a guess as a bit of protection as phone is 3v not 5v, but after weeks of running it like this, nothing has gone wrong.

    I use power from usb for the pic 5v.

  23. #23
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    thx for picture
    the max 232 part ...is it necessary that the DB9 pin 4 and 6 shorted .7 and 8 shorted together which is shown in http://pinouts.ru/CellularPhonesCabl...e_pinout.shtml
    does it serve any purpose?

  24. #24
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    hi.....i suceed in the hyperterminal part ..there's a connection between phone and pc...now my problem is how to automatically save recieved sms into my sim card because i can only read the sms that are save in sim card..(at+cmgr=1)

    and also in hyperterminal ..t610 can support text mode(at+cmgf=?)
    it show (0,1)
    does it mean it can support text mode ???

  25. #25


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ziki
    hi.....i suceed in the hyperterminal part ..there's a connection between phone and pc...now my problem is how to automatically save recieved sms into my sim card because i can only read the sms that are save in sim card..(at+cmgr=1)

    and also in hyperterminal ..t610 can support text mode(at+cmgf=?)
    it show (0,1)
    does it mean it can support text mode ???

    ericsson only pdu mode, no text mode,

    pdu is not that hard if you only look for 'key' strings of digits.

    download ericsson manual, at+cmgr=1 only read memeory 1, of the current memory, you need to change the current memory from sim to phone (SM to ME)

  26. #26
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    hi...i'm facing some problem ....when i use hyperterminal ...i got no problem ...can receive and send sms but when i connect it to my uC . it canot work ...must the phone go thrught a max232 when connect to uC?? i'm using t610
    pls help..thx alot ....

  27. #27


    Did you find this post helpful? Yes | No

    Default

    I connected t610 (and t68i) to pic 16f88, no max232, no resistors, just wire.

    look at picture above, pic on dev board, connected to phone.

  28. #28
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Arrow

    hi ....i finally suceed in trasmitting part( uC to "tell" GSM phone to send a sms )
    now i workin on receiveing part(uC to accept information from GSM phone )before this i was using ATMEL ..with BASCOM ..but don't no why it canot work ...spend a week in lab but no result ...

    now for the PIC ..which should i use ?
    Hserin or Serin or Serin 2

    if u don't mind ...can pls share some code example here ..
    thx alot ....

  29. #29


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ziki

    now for the PIC ..which should i use ?
    Hserin or Serin or Serin 2

    if u don't mind ...can pls share some code example here ..
    thx alot ....
    I used serin, no reason except I always worked with the f84 and just carried on!

    I can let you have my code, you can do with it what you will, its really poorly written and just banged together.

    Its unfinished, in fact not done anything with it in about 3 weeks so will take me a day to get back in to it!

    Problem was the project was drafted out in my head to use a 2550 for a gsm equipped car alarm, but I only had a f88 to hand, so started on that, idea was I could just recompile the code / cut and paste the routines, then it went off in a different direction as a cut down version of the project using a f88 as a garage/house/boat/shed, so has some features not now needed and ones not yet done.......

    http://homepage.ntlworld.com/tinabriddon/pic/

    Its a real work in progress........

  30. #30
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    thx for the code....can you have a look at this ...

    DEFINE OSC 8
    DEFINE HSER_TXSTA 24h
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_BAUD 9600
    DEFINE HSER_SPBRG 129
    DEFINE HSER_CLROERR 1

    sms:

    HSEROUT ["AT" ,13,10]
    hserin 5000,sms,[WAIT("OK")]


    HSEROUT ["AT+CMGF=1" ,13,10]
    hserin 5000,sms,[WAIT("OK")]


    HSEROUT ["AT+CMGS=",34,"my number ",34,13,10]
    hserin 5000,sms,[WAIT(">")]


    HSEROUT ["BUTTON HAS BEEN",26,13,10]
    pause 5000

    end


    it doesn't work (canot send sms ) ..but if i just use hserout and use pause instead of hserin .it work perfectly ...so...the problem must be at the hserin .
    i try using 4 Mhz and lower baud rate ..also canot work ..
    is there any problem in my code ??? thzzzz

  31. #31
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    hi ..i also try out with this code ..also canot work....

    include "modedefs.bas"
    DEfine OSC 4

    sms:
    pause 1000

    serout portb.6,t1200,["atz",13] ' wake up thephone
    serin portb.7,t1200,5000,sms,["OK"]

    serout portb.6,t1200,["at+cmgs=19",13]
    serin portb.7,t1200,5000,sms,[">"]


    serout portb.6,t1200,["07910621000010F511000B910621297767F80000AA05E8329 BFD06",26,13]
    pause 9000

    end


    as usual this code work fine with pause instead of serin command ..it suppose to send out a "hello " sms
    what have i done wrong ????pls help ..thx ...

  32. #32
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    hi ..the problem from the previous tread have solved
    now ..i'm having problem storing those valur to my array
    below are my code


    sms:
    include "modedefs.bas"
    DEfine OSC 4
    buffer var byte(90)
    z var byte
    TRISB= %10001011

    serout portb.6,t1200,["atz",13]
    serin portb.7,t1200,5000,sms,["OK"]
    pause 2000

    serout portb.6,t1200,["at+cpms=",34,"me",34,13]
    serin portb.7,t1200,5000,sms,["CPMS"]
    pause 2000

    serout portb.6,t1200,["at+cmgr=1",13]

    for z=1 to 90
    serin portb.7,t1200,5000,sms,buffer(z)
    next

    end

    this code canot work ....is it possible to store everting in a array ?..i don't know how to filter out those unwanted ones....

  33. #33


    Did you find this post helpful? Yes | No

    Default

    One problem with your loop of 1 to 90 is what if you dont have 90 incoming chars ?

    The only real way to read a sms is to read one char and loop until no more arrive, you only need a short timeout, say half second.

    That why I dod not use a for loop


    also

    serout portb.6,t1200,["at+cpms=",34,"me",34,13]
    serin portb.7,t1200,5000,sms,["CPMS"] ************* Why have this line ?
    pause 2000

    The line is not really needed, you dont need the data, while I suppose its more correct to have it, its using code space etc
    Last edited by f_lez; - 11th October 2006 at 10:24.

  34. #34
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    oo..ya.the cpms is just for testing purpose ..nothing more..
    now just to test the code can skip certain amount of character and store the wanted value into buffer ,i modify the code ,..i want to store "M" into buffer(1),"G" into buffer(2) and R into buffer(3)


    include "modedefs.bas"
    DEfine OSC 4
    buffer var byte[90]
    z var byte
    x var byte
    TRISB= %10001000


    portb.4=0
    portb.2=0
    portb.1=0



    serout portb.6,t1200,["atz",13]
    pause 2000

    serout portb.6,t1200,["at+cpms=",34,"me",34,13]
    pause 2000

    serout portb.6,t1200,["at+cmgr=1",13]
    x = 2
    while x>0
    x = x-1
    SERIN portb.7,t1200,1000,oops2,z
    oops2:
    wend

    for x=1 to 3
    SERIN portb.7,t1200,1000,oops,buffer(x)
    oops:
    next x
    pause 2000

    if buffer(1) ="M" then
    portb.1=1
    if buffer(2) ="G" then
    portb.2=1
    if buffer(3)="R" then
    portb.4=1

    endif
    endif
    endif

    end


    in hyperterminal .....the phone response with this :
    at+cmgr=1
    +CMGR: 1,,26
    07910621000110F5040B910621297377F40000600111221064 230853BA3C9C3EA3E9

    from the code above ...none of the LED light up is there problem with the code? thx ......

  35. #35


    Did you find this post helpful? Yes | No

    Default

    It looks like it should work, but what speed are running comms at, doh! just realised its 1200, doh!


    just try it again 300, see it the program is just not fast enough to catch it.

  36. #36
    Ziki's Avatar
    Ziki Guest


    Did you find this post helpful? Yes | No

    Default

    hi..i have change to T300 and also omit the "skipping" character part so that i can focus on just storing data in array.


    include "modedefs.bas"
    DEfine OSC 4
    buffer var byte[90]
    z var byte
    x var byte
    TRISB= %10001000


    portb.4=0
    portb.2=0
    portb.1=0



    serout portb.6,t300,["atz",13]
    pause 2000

    serout portb.6,t300,["at+cpms=",34,"me",34,13]
    pause 2000

    serout portb.6,t300,["at+cmgr=1",13]

    for x=1 to 3
    SERIN portb.7,t300,1000,oops,buffer(x)
    oops:
    next x
    pause 2000

    if buffer(1) ="+" then
    portb.1=1
    if buffer(2) ="C" then
    portb.2=1
    if buffer(3)="M" then
    portb.4=1

    endif
    endif
    endif

    end


    now ...only portb.1 LED light up .. ....running out of idea .

  37. #37


    Did you find this post helpful? Yes | No

    Default

    emm, I cant do anything at the moment I'm changing my PC/desk everything, but try it this way.......

    x=1

    while x<4
    serin buffer(x)
    x=x+1
    wend

    or use if....then... etc, I remember when I used a for loop I had a problem that went a way for no reason, I think its when I stopped using the ...for...next...


    Or I could be wrong.........

    <edit>

    Yes I am wrong because I have it working with a foor loop IE

    for x=1 to 12
    SERIN portb.7,t1200,500,oops,incphn(x)
    oops:
    next x

    <edit2>

    Can you use a max232 circuit or an old phone data cable to monitor on the PC with hyperterminal what is goin on?

    If you put it on the phone output, you get to see (because the phone echos) what your pic is sending, and what the phone replys with.
    Last edited by f_lez; - 13th October 2006 at 10:46.

  38. #38
    peter_o_tool's Avatar
    peter_o_tool Guest


    Did you find this post helpful? Yes | No

    Default test

    test

    p_O_t






    Quote Originally Posted by f_lez
    emm, I cant do anything at the moment I'm changing my PC/desk everything, but try it this way.......

    x=1

    while x<4
    serin buffer(x)
    x=x+1
    wend

    or use if....then... etc, I remember when I used a for loop I had a problem that went a way for no reason, I think its when I stopped using the ...for...next...


    Or I could be wrong.........

    <edit>

    Yes I am wrong because I have it working with a foor loop IE

    for x=1 to 12
    SERIN portb.7,t1200,500,oops,incphn(x)
    oops:
    next x

    <edit2>

    Can you use a max232 circuit or an old phone data cable to monitor on the PC with hyperterminal what is goin on?

    If you put it on the phone output, you get to see (because the phone echos) what your pic is sending, and what the phone replys with.

  39. #39


    Did you find this post helpful? Yes | No

    Default

    lol hello and welcome.

  40. #40
    zaliko's Avatar
    zaliko Guest


    Did you find this post helpful? Yes | No

    Default Hi

    It's not tested but try this one:

    include "modedefs.bas"
    DEfine OSC 4

    buffer var byte[20]
    z var byte
    x var byte
    TRISB= %10001000


    portb.4=0
    portb.2=0
    portb.1=0



    serout portb.6,t300,["atz",13]
    pause 2000

    serout portb.6,t300,["at+cpms=",34,"me",34,13]
    pause 2000

    serout portb.6,t300,["at+cmgr=1",13]

    ; wait + sign for 1 second and then store next 2 signs in buffer[0] and buffer[1]
    SERIN portb.7,t300,1000,oops,["+"],buffer[0],buffer[1]

    portb.1=1 ; port be is high beqause + sign already detected
    if buffer(0) ="C" then
    portb.2=1
    endif
    if buffer(1)="M" then
    portb.4=1
    endif
    goto dasasruli
    oops: ;no answer from the phone
    ; do something if there is no answer
    dasasruli:
    end

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 11:00
  2. HELP ME, SMS controlled relay using PIC
    By pazko1125 in forum mel PIC BASIC
    Replies: 14
    Last Post: - 2nd October 2008, 16:26
  3. Siemens c55 sms control help please
    By camolas in forum mel PIC BASIC Pro
    Replies: 85
    Last Post: - 20th August 2008, 02:13
  4. Motor Control PLC with a PIC
    By sougata in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 2nd November 2006, 08:59
  5. Need help on pic to pic flow control (simple problem I think)
    By khufumen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th January 2006, 01:34

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts