Go Down

Topic: How can I change my phone number in sim800l module via sms ?? (Read 339 times) previous topic - next topic

Rendypray123

Hello everyone
I recently bought a sim800l module, I've launched this module and now I can send SMS with this module but I need to change my phone number in SIM800L via sms  ...
Can anyone guide me to do this?? Or does anyone have a simple example to do this??

I'm using Arduino Uno, thank you

dannable

What do you mean by 'change phone number'? Make it appear that the call / SMS originated from a different number?
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

Robin2

Isn't the phone number allocated by the phone company?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

androidfanboy

Your phone number is based on the SIM card, not the SIM800 itself.
"Genius: one percent inspiration and 99 percent perspiration." - Thomas Edison

lastchancename

...or possibly, OP wants to change the recipient number, without reprogramming his application...

This feature needs to be written into your code before you deploy the unit, so you can send a message to the sketch (something like)
>SET RECIP 0565123789
That value would then be stored locally in EEPROM, and used by the sketch whenever it wants to call or send a message.

There are a few gotchas to be aware of...
Add security so that only messages from 'permitted' users can make the change, and possibly add a backdoor or other mechanism that allows 'you' to reset or update the number - or you may not be able to reach the device if the SIM credit runs out etc!
Q: How many searches did you make before posting this question?      A: none
At the very least, take a guess at the solution, then we can help move forward from what you know already.

Rendypray123

sorry, I mean change the destination/recipient number in sim800l via sms

Rendypray123

What do you mean by 'change phone number'? Make it appear that the call / SMS originated from a different number?
sorry, I mean change the destination/recipient number in sim800l via sms

PaulS

Quote
sorry, I mean change the destination/recipient number in sim800l via sms
How is the destination number stored?

Can you determine that an SMS has arrived? Can you read the SMS? Can you store the (useful parts of) the SMS message? Can you parse the stored data to extract the phone number? Can you overwrite the current number?

If you answered yes to all of the above, the project is trivial. Any no means that you need to have a sit down with Mr. Google.
The art of getting good answers lies in asking good questions.

Rendypray123

...or possibly, OP wants to change the recipient number, without reprogramming his application...

This feature needs to be written into your code before you deploy the unit, so you can send a message to the sketch (something like)
>SET RECIP 0565123789
That value would then be stored locally in EEPROM, and used by the sketch whenever it wants to call or send a message.

There are a few gotchas to be aware of...
Add security so that only messages from 'permitted' users can make the change, and possibly add a backdoor or other mechanism that allows 'you' to reset or update the number - or you may not be able to reach the device if the SIM credit runs out etc!
Do you have an example??

Rendypray123

How is the destination number stored?

Can you determine that an SMS has arrived? Can you read the SMS? Can you store the (useful parts of) the SMS message? Can you parse the stored data to extract the phone number? Can you overwrite the current number?

If you answered yes to all of the above, the project is trivial. Any no means that you need to have a sit down with Mr. Google.
do you have any example or hint? , sorry, this is my first project using microcontroller. can you give me a hint ?

lastchancename

Hints :
it's a little more complicated than a single command.
1. You need to be able to receive an SMS, then parse it for the 'SET RECIP 0565123789' command.  (with your new preferred number)
2. When you have that, validate and save the new number into EEPROM.
3. Finally, when you're going to send an SMS notification, use that saved number from EEPROM - rather than the hard-coded number you've been using until now.
Q: How many searches did you make before posting this question?      A: none
At the very least, take a guess at the solution, then we can help move forward from what you know already.

Rendypray123


Hints :
it's a little more complicated than a single command.
1. You need to be able to receive an SMS, then parse it for the 'SET RECIP 0565123789' command.  (with your new preferred number)
2. When you have that, validate and save the new number into EEPROM.
3. Finally, when you're going to send an SMS notification, use that saved number from EEPROM - rather than the hard-coded number you've been using until now.
I can not find an example in google, do you have a sample program?

PaulS

Quote
I can not find an example in google
An example of what? I outlined the steps you needed to follow. YOU have made, apparently ZERO effort to answer the questions or to write any code.

If you want to PAY for some code, get your post moved to Gigs and Collaboration, and discuss how much you'll pay.
The art of getting good answers lies in asking good questions.

lastchancename

To extend on PaulS comment...
There is no single example that does exactly what you need, because that functionality is integral to your application.
If you can perform the steps listed in #10, you should have no problem dropping those three chunks of code into your own project.
Q: How many searches did you make before posting this question?      A: none
At the very least, take a guess at the solution, then we can help move forward from what you know already.

ykn

How is the destination number stored?

Can you determine that an SMS has arrived? Can you read the SMS? Can you store the (useful parts of) the SMS message? Can you parse the stored data to extract the phone number? Can you overwrite the current number?

If you answered yes to all of the above, the project is trivial. Any no means that you need to have a sit down with Mr. Google.
i have done all the above task , except i cant overwrite the number ,
please help me
Code: [Select]

 void init_sms()
{
  mySerial.println("AT+CMGF=1");
  delay(1000);
  mySerial.println("AT+CMGS=\"+918208021773\"\r");   // i need to change this number from message
  delay(1000);
}

void send_data(String message)
{
  mySerial.println(message);
 
}

void send_sms()
{
  mySerial.write(26);
   delay(1000);
  mySerial.write(0x1A);
}   

Go Up