Jump to content

GSM number via vector with variable length


Recommended Posts

Hi,

In a project I have SMS alarms being sent to a number that is defined by a vector. Doe's anyone have experience with different lengths?

The GSM number length can vary from 11 to 14 numbers including the "+" sign.

I have devided the number that is 13 digits long into three MI:s (3*4+"+") and that works. But now I need to expand the range.

How does the function read the vector? does it read it from left to right and is the maximum value of a vector set to 9999 and not 32767. / does it only read four digits from the MI in the vector, and starting from left or counting from the right.

Thanks in advance

Ari

Link to comment
Share on other sites

Hi Ari,

Please note that the indirect phone number is in ASCII. Than means each MI contain two digits.

If the maximum length of the number if 14 digits then you can set the maximum length to 14.

Now each time you fill the vector with a new number, make sure to add null at the end of the number.

For example if the vector starts in MI1000 and the number is +972544332211, MI1000 = +9 MI1001= 72 MI1002= 54 etc...

Link to comment
Share on other sites

  • 3 months later...

Hi Ofir,

Thank you for the answer. I'm abit confused about your answer, I have built up the project according to the example in the help section. (See pucture below)

As I understand this, a MI value should contain four digits.

Case: Lets say that I need to have a 10 number long number.

I have set the MI 0 to 10

In the display I have 3*4digits long variables (XXXXYYYYZZZZ) because we need up to 13 numbers.

Should it be inserted like this? 1234 5678 9000 and not 1234 5678 9

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.