Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IMEI retrieval feature #7

Closed
wants to merge 2 commits into from

Conversation

wghirakawa
Copy link

No description provided.

@KillingJacky
Copy link
Member

Only modification on header file? no source file?

@ortegafernando
Copy link

May be we wants to add it but doesnt know ??

I will try to help you.

@wghirakawa
Copy link
Author

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 #7 (comment).

@KillingJacky
Copy link
Member

@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.

@wghirakawa
Copy link
Author

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
#7 (comment)
.

@KillingJacky
Copy link
Member

Actually no need. For arduino, you can use String as the returning type.

@ortegafernando
Copy link

Try not to use strings, they use toó muchos RAM memory from our arduinos and it will be the only función using strings.

@ortegafernando
Copy link

Sorry, some words had been corrected by my mobile phone. "Too much RAM memory"

@wghirakawa
Copy link
Author

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 #7 (comment).

@ortegafernando
Copy link

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)

@wghirakawa
Copy link
Author

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
#7 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants