Pic to GSM Phone connection (HSerin problems)


Closed Thread
Results 1 to 40 of 289

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170

    Default

    PBP does not have such string compring capabilities.

    You have to make your own subroutine to compare byte to byte the two string array. Like that:

    i=0
    while i less_than gsmbuffer_length (I cant sen the less character! Why?)

    if gsmbuffer[i]=compare_array[i] then
    'gsmbuffer[i]=0
    i=i+1
    else
    goto wrong_sms
    endif
    wend
    correct_sms:
    'your code here

    wrong_sms:
    'your code here

    You understand that in compare_array you have to put your characters in some other place of the program prior to the above subroutine.
    Last edited by Ioannis; - 26th July 2005 at 11:25.

  2. #2
    Royce's Avatar
    Royce Guest

    Default

    Thanks again but I'm afraid I dont quite understand. Really sorry but would it be possible to be little clearer.

    Thanks again.

    Kind Regards,
    Royce

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170

    Default

    Hmm, what part you are not understanding?

    Ioannis

  4. #4
    Royce's Avatar
    Royce Guest

    Default

    Sorry.... would it be possible to add comments to each of the following lines:

    You have to make your own subroutine to compare byte to byte the two string array. Like that:

    i=0
    while i less_than gsmbuffer_length (I cant sen the less character! Why?)

    if gsmbuffer[i]=compare_array[i] then
    'gsmbuffer[i]=0
    i=i+1
    else
    goto wrong_sms
    endif
    wend
    correct_sms:
    'your code here

    wrong_sms:
    'your code here

    Could you give me an example using the SMS keyword: "switch on" in order to switch on an LED.

    Thanks again.

    Regards,
    Royce

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170

    Default

    The commands used in the small piece of code are very elementary. So you have to read the manual because all the answers are in there.

    I cannot explain how an If-Then-EndIf statement is syntaxed or how is working. The code I gave you is very very easy and basic I could say.

    It is comparing one element of the array gsmbuffer at a time with one element of the other array. If it succeeds then it is moving on to the part of the program labeled:

    correct_sms:
    'you add your code here

    If it does not succeed then it is moving on to the part of the program labeled:

    wrong_sms:
    'you add your code here

    Try to write some code and see what happens. One part at a time...

    Ioannis

  6. #6
    Royce's Avatar
    Royce Guest

    Default

    Thanks Ioannis. I will do my homework.

    Kind Regards,
    Royce

  7. #7
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216

    Default

    Hello all,
    I have been doing something similar with an Ericsson T68I phone.
    I communicated at 1200 buad and use AT command set.
    I am NOT trying to send SMS, but DTMF tones. I am getting the phone to dial by using the access keypad AT command (rather than ATD command, which for some reason wouldn't work) and then activating send DTMF tones. Sorry I can't remember what the AT for these are, but what I dis was successful withoput too much trouble. Simple serout at N1200 (without MAX232 chip) was the most successful from a 4MHz 'F84. The T68I is autobaud so will talk at most baud rates above 1200.

Similar Threads

  1. Serial VB 2005 pic 16f877a problems
    By Snap in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 8th July 2013, 01:52
  2. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 15:46
  3. problem with the GSM controller
    By Dariolo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th May 2009, 21:33
  4. Automatic VB6 to pic serial connection
    By arniepj in forum Code Examples
    Replies: 13
    Last Post: - 10th January 2008, 08:57
  5. Pic to GSM Phone connection
    By samertop in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 14th July 2005, 14:40

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