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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...