![]() It means SMS phone number is compared with specified SIM phonebook position(s) and in case numbers match GETSMS_AUTH_SMS is returned, otherwise GETSMS_NOT_AUTH_SMS is returned Reads SMS from specified memory(SIM) position and makes authorization. Serial.println(“DEBUG SMS phone number: “, 0) Ĭhar GetAuthorizedSMS( byte position, char *phone_number, char *SMS_text, byte max_SMS_len, byte first_authorized_pos, byte last_authorized_pos) Sms_classname.GetGSM(position, phone_num, sms_text, 100) GETSMS_OTHER_SMS – other type of SMS was found an example of usage:Ĭhar phone_num // array for the phone number stringĬhar sms_text // array for the SMS text string GETSMS_READ_SMS – already read SMS was found at the specified position ![]() ![]() GETSMS_UNREAD_SMS – new SMS was found at the specified position GETSMS_NO_SMS – no SMS was found at the specified position Max_SMS_len: maximum length of SMS text excluding also string terminating 0×00 character SMS_text : a pointer where SMS text will be placed So the space for the phone number string must be reserved – see example Phone_number: a pointer where the phone number string of received SMS will be placed Reads SMS from specified memory(SIM) position Sms_classname.GetGSM(position, tel_number, &sms_text) Ĭhar GetSMS(byte position, char *phone_number, char *SMS_text, byte max_SMS_len) Position = sms_classname.IsSMSPresent(SMS_UNREAD) If there is new SMS before IsSMSPresent() is executed this SMS has a status UNREAD and then after calling IsSMSPresent() method status of SMS is automatically changed to READĠ – there is no SMS with specified statusĬhar phone_number // array for the phone number string Sim_phonebook_position: SIM phonebook position įinds out if there is present at least one SMS with specified status Sends SMS to the specified SIM phonebook position Sms_classname.SendSMS(“00XXXYYYYYYYYY”, “SMS text”) Ĭhar SendSMS(byte sim_phonebook_position, char *message_str) 3 – GSM module has answered “ERROR” string Message_str: pointer to the SMS text string Number_str: pointer to the phone number string SMSGSM sms_classname //the name you choose must be the same in the functions belowĬhar SendSMS(char *number_str, char *message_str) call_classname.Call(1) // call to the number stored at the 1st SIM positionįor using SMS functions is necessary to include the next two lines call_classname.Call(“+390123456789″) Ĭalls the number stored at the specified SIM positionĮ.g. ![]() Simple way to write a string on newsoftserialįor memory saving, next functions are included in a class, so before use them is needed to include the header and to create the class.įor calling functions is necessary to include the next two linesĬallGSM call_classname //the name you choose must be the same in the functions belowĮ.g. Simple way to read from the newsoftserial and print the value on the hardware serial Port: port used for establish a connectionġ - server started successfully, waiting for client connection Puts the SIM900 into server mode, waiting for TCP client connection on the specified port. Port: port used to establish a connectionĮ.g. Server: pointer to the server address string, it can be the IP or normal address Starts a socket connection to the server at specific port Int connectTCP(const char* server, int port) Int attachGPRS(char* domain, char* dom1, char* dom2)Įstablishes a GPRS connection with domain using authentication (if needed)ĭomain: pointer to a string that contains the domain address of GPRS connectionĭom1: pointer to the username string (don't use if not needed)ĭom2: pointer to the password string (don't use if not needed)Ġ - unable to establish a GPRS connection The below functions are always available in the library. It seems this library was refactored and published by the iTead team.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |