Receiving message to PIC through GSM modem


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    755

    Default Re: Receiving message to PIC through GSM modem

    Did you see this?
    Code:
    CommandParser:
    ; Fast searcher! Case sensitive.  Closely based on info provided by Darrel Taylor.
    ; Searches through Str1. If it finds the strings listed in the quotes, it returns which one it found.
    ; the max length of STR1 that will be searched is in MaxSearchLen
       
        Cmd = 255  ; In case of no match
        MaxSearchLen = 20            
     
        Parse01: Cmd=01 : ARRAYREAD Str1,MaxSearchLen,Parse02,[WAIT("LedOn")] : GOTO Foundit
        Parse02: Cmd=02 : ARRAYREAD Str1,MaxSearchLen,Foundit,[WAIT("LedOff")] : GOTO Foundit
    Foundit:
        return
    Use STR modifier to receive string from modem into array Str1. Then call parser and check Cmd, if Cmd=1 then led on, if Cmd=2 then led off.

  2. #2
    Join Date
    Jun 2013
    Posts
    18

    Default Re: Receiving message to PIC through GSM modem

    Hello Pedja,

    Thank you for your support.

    I am not sure if my compiler (PicbasicPro 2.6) supports "ARRAYREAD".

  3. #3
    Join Date
    Sep 2009
    Posts
    755

    Default Re: Receiving message to PIC through GSM modem

    Then try it... And you will find out

  4. #4
    Join Date
    Jun 2013
    Posts
    18

    Default Re: Receiving message to PIC through GSM modem

    Thank you

  5. #5
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333

    Default Re: Receiving message to PIC through GSM modem

    Have you set new message notification? It is not in your code.

  6. #6
    Join Date
    Jun 2013
    Posts
    18

    Default Re: Receiving message to PIC through GSM modem

    Quote Originally Posted by EarlyBird2 View Post
    Have you set new message notification? It is not in your code.
    Hello Bird,

    Yes, there is a pin on sim900 GSM modem, if a new message be received this pin will be in high state less than 1 second, I use this pin for the new message notification. But i didn't use this feature in this sample routine. Because I am still busy with comparing two things with each other... the question of this thread is still valid

    Thank you

  7. #7
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333

    Default Re: Receiving message to PIC through GSM modem

    Is this the code that does the comparison?

    Code:
    if (s(59)="S") then
     high portc.3
     s(59)=0
     endif
     if(s(59)="T" and s(60)="a") then
     low portc.3
     s(59)=0
     s(60)=0
     endif
    and needs modifying to "LED1ON" and "LED1OFF" but does not work even with the simple test of "S" and "Ta"?

Similar Threads

  1. Interface Pic --> Max232 --> GSM Modem
    By SangkiMangki in forum GSM
    Replies: 1
    Last Post: - 28th September 2013, 13:57
  2. gsm modem and pic communication
    By shani_developer in forum GSM
    Replies: 1
    Last Post: - 7th September 2010, 09:21
  3. GSM modem not working with PIC! Both modem & PIC work fine with PC
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 12th May 2010, 10:31
  4. Anyone used a WAVECOM gsm modem ?
    By isaac in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th September 2007, 14:15
  5. SEROUT2 to GSM Modem
    By tommyers in forum General
    Replies: 5
    Last Post: - 21st August 2006, 22:35

Members who have read this thread : 0

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