Closed wghirakawa closed 9 years ago
May be we wants to add it but doesnt know ??
I will try to help you.
Sorry I was working on it. First time doing the fork and pull request. I will add the source file and change the header file to match and submit pull request again. I have this feature working now.
On Apr 6, 2015, at 5:11 PM, Jack Shao notifications@github.com wrote:
Only modification on header file? no source file?
— Reply to this email directly or view it on GitHub https://github.com/Seeed-Studio/GPRS_Shield_Suli/pull/7#issuecomment-90332113.
@wghirakawa , It's ok. I recommend to close this pull request and you pull another one, because there's commit merged against the base of your patch. So I suggest you to fetch the new HEAD of this repo and then pull a new request. Thanks.
So do I revamp the code to reflect what opop. Said about returning an interger? And pass in a string variable to assign value too?
On Tue, Apr 7, 2015, 3:58 PM Jack Shao notifications@github.com wrote:
@wghirakawa https://github.com/wghirakawa , It's ok. I recommend to close this pull request and you pull another one, because there's commit merged against the base of your patch. So I suggest you to fetch the new HEAD of this repo and then pull a new request. Thanks.
— Reply to this email directly or view it on GitHub https://github.com/Seeed-Studio/GPRS_Shield_Suli/pull/7#issuecomment-90778488 .
Actually no need. For arduino, you can use String as the returning type.
Try not to use strings, they use toó muchos RAM memory from our arduinos and it will be the only función using strings.
Sorry, some words had been corrected by my mobile phone. "Too much RAM memory"
Ok. I’m still kind of new to arduinos and the c++ but I’ve been forcing my self to learn it. What would you recommend I do. Return and Integer 0 if successful and -1 if unsuccessful? Also would the user pass in the variable to store the IMEI? If so what would be the data type? should it be a char array? Let me know what you recommend or if you want to modify the code, I can learn from what you do.
Thank you, Wayne
On Apr 7, 2015, at 7:02 PM, op2op2op2 notifications@github.com wrote:
Sorry, some words had been corrected by my mobile phone. "Too much RAM memory"
— Reply to this email directly or view it on GitHub https://github.com/Seeed-Studio/GPRS_Shield_Suli/pull/7#issuecomment-90802375.
I am also a noob. Only 8 months with arduino but i had improved a lot. Just take this function as example and try to do it, you will learn trying it !!!!.
/** read SMS, phone and date if getting a SMS message. It changes SMS status to READ
* @param messageIndex SIM position to read
* @param message buffer used to get SMS message
* @param length length of message buffer
* @param phone buffer used to get SMS's sender phone number
* @param datetime buffer used to get SMS's send datetime
* @returns
* 0 on success
* -1 on error
*/
int readSMS(int messageIndex, char *message, int length, char *phone, char *datetime);
or a simplier one:
/** read SMS if getting a SMS message
* @param buffer buffer that get from GPRS module(when getting a SMS, GPRS module will return a buffer array)
* @param message buffer used to get SMS message
* @param check whether to check phone number(we may only want to read SMS from specified phone number)
* @returns
* 0 on success
* -1 on error
*/
int readSMS(int messageIndex, char *message, int length);
The buffer than the user has to pass you needs 14 chars. (13 IMEI + \0 character)
OK thanks I'll try that
On Tue, Apr 7, 2015, 9:41 PM op2op2op2 notifications@github.com wrote:
I am also a noob. Only 8 months with arduino but i had improved a lot. Just take this function as example and try to do it, you will learn trying it !!!!.
/\ read SMS, phone and date if getting a SMS message. It changes SMS status to READ
- @param messageIndex SIM position to read
- @param message buffer used to get SMS message
- @param length length of message buffer
- @param phone buffer used to get SMS's sender phone number
- @param datetime buffer used to get SMS's send datetime
- @returns
- 0 on success
- -1 on error / int readSMS(int messageIndex, char message, int length, char phone, char datetime);
or a more complicate one:
/\ read SMS if getting a SMS message
- @param buffer buffer that get from GPRS module(when getting a SMS, GPRS module will return a buffer array)
- @param message buffer used to get SMS message
- @param check whether to check phone number(we may only want to read SMS from specified phone number)
- @returns
- 0 on success
- -1 on error / int readSMS(int messageIndex, char message, int length);
The buffer than the user has to pass you needs 14 chars. (13 IMEI + \0 character)
— Reply to this email directly or view it on GitHub https://github.com/Seeed-Studio/GPRS_Shield_Suli/pull/7#issuecomment-90832804 .
Only modification on header file? no source file?