OnSms event not workin

Hello team,

I’m tring to write some scripts for my customer using the event “onsms”.

After several failed attempts i just cut and paste the example in the basic documentation of ewon and still don’t works

ONSMS “Goto Hsms”
Hsms:
a% = GETSYS PRG, “SmsRead”
IF (a%<>0) THEN
s% = s%+1
PRINT "SMS Nr: " ; s%
f$ = GETSYS PRG, “smsfrom”
PRINT "From: " ; f$
PRINT GETSYS PRG, “smsdate”
a$ = getsys prg,“smsmsg”
PRINT "Message: " ; a$
b$ = f$ + “,gsm,0”
c$ = "Message received: " + a$
sendsms b$, c$
goto HSms
ENDIF
END

With a custom function I forced the ewon to send me an sms to my phone to check the number was correct and could send sms from it. The Ewon send sms for this test.

I tried in 2 different flexy 205, diferent sim with the last firmware and i don’t get any sms when i text to the ewon or in the console.

Thanks

BR

Hi BR,

What provider are you using for your 3G/4G connection, and what region are you located in? I’ve seen some strange behavior with receiving text messages in the central untied states.

-Tim

Hello Tim,

Sorry I’m new coding in Basic and Put the OnSms behind the end in the init section.

You can close the ticket.

Thanks.

-Ernest

1 Like

Ok glad to hear it’s working!