[FONA808] why fona.sendSMS return true when the phone is not

Adafruit cellular platform - SMS and IoT over celluar

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
pierrot10
 
Posts: 349
Joined: Tue Nov 17, 2015 4:34 pm

[FONA808] why fona.sendSMS return true when the phone is not

Post by pierrot10 »

Hello All

I am trying my code and I am testing the function fona.sendSMS().

When I use a valid phone number format, it print me this:
(Note 07861112233 is not valid number but an exemple. the format is correct)

Code: Select all

--> AT+CMGS="07861112233"
	<--- > 
> POSITION
Lat: 46.219871
Lon: 6.140914
GSM loc + http
https://maps.google.com/?q=46.219871,6.140914
^Z
and print this
+CMGS: 52
I reveived the SMS

But when I enter a unvalid number format by adding a 0 at the bgining
(note: 007861112233 is not a correct format)
---> AT+CMGS="007861112233"
<--- >
> POSITION
Lat: 46.219871
Lon: 6.140914
GSM loc + http
https://maps.google.com/?q=46.219871,6.140914
^Z
It also print me
+CMGS: 53
but I never receive the SMS because a swiss number does not start with two 0.
(the valid foramt are 0761112233 or +41761112233)

Should it not print +CMGS:0 ?

In any case, in both case fona.sendSMS() return true while it should return false for the second case (when the phone number format is not correct.

Is there any explication?

Many thank

Locked
Please be positive and constructive with your questions and comments.

Return to “FONA”