View previous topic :: View next topic |
Author |
Message |
staminale
Joined: 27 Mar 2009 Posts: 5
|
string modem Gm862 Telit |
Posted: Fri Mar 27, 2009 6:36 am |
|
|
Hi!
how to handle these strings? whether the calls are in phone book in or not?
there is a code to get started?
+CLIP: "",128,"",128,"",2 //hidden number
+CLIP: "+3933812345678",145,"",128,"",0 //is not in the phone book
+CLIP: "+3933812345678",145,"",128,"Giacomo" //is in the phone book |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
|
staminale
Joined: 27 Mar 2009 Posts: 5
|
|
Posted: Mon Mar 30, 2009 8:54 am |
|
|
Hi!
You can find a sequence without using the library string.h? |
|
|
rufflos Guest
|
|
Posted: Tue Apr 07, 2009 9:34 am |
|
|
hi, staminale
how can you get those strings from the gsm module? i have the same module but i cannot get any string trough rs232, what did you do? thank you, i'm waiting for your response. |
|
|
staminale
Joined: 27 Mar 2009 Posts: 5
|
|
Posted: Tue Apr 07, 2009 12:37 pm |
|
|
rufflos wrote: | hi, staminale
how can you get those strings from the gsm module? i have the same module but i cannot get any string trough rs232, what did you do? thank you, i'm waiting for your response. |
AT+CLIP=1 |
|
|
rufflos Guest
|
|
Posted: Tue Apr 07, 2009 3:06 pm |
|
|
oh, thank you but i mean, how do you manage to get somethin readable from the rcv pin? i cant get nothing more than a 0x00
i have tried the AT command that is supposed that the answer is OK, but i only get a 0x00 (end of string)
could you put the code you used for obtaining that responses?
thank you. |
|
|
staminale
Joined: 27 Mar 2009 Posts: 5
|
|
Posted: Fri Apr 10, 2009 5:52 pm |
|
|
Hi!
here's how I did, you tell me if good, if there are more efficient systems.
Code: | #include <16F877a.h>
#include <setting.h>
#include <string.h>
#include <input.c>
#define STRING_SIZE 51
void call_modem(char *calling)
{
if (calling[8] == '"') //hidden number
{
printf ("\n%s", "hidden number");
}
else
{if(calling[strlen(calling) - 1] == '0') // The last character is a zero
printf ("\n%s", "is not in the phone book");
else
if(calling[strlen(calling) - 1] == '"') // The last character is "
printf ("\n%s", "is in the phone book");
}
}
void main() {
char input_str[STRING_SIZE];
while(true)
{
get_string(input_str,STRING_SIZE); // gets the string
call_modem(input_str);
}
} |
|
|
|
volcane
Joined: 23 Feb 2008 Posts: 29
|
Re: string modem Gm862 Telit |
Posted: Sun Apr 12, 2009 4:46 pm |
|
|
staminale wrote: | Hi!
+CLIP: "+3933812345678",145,"",128,"Giacomo" //is in the phone book |
the string is wrong with the modem gm862 puts an end 0
Code: |
+CLIP: "+3933812345678",145,"",128,"Giacomo",0
|
|
|
|
|