ONSMS not working

I have a script that sends and receives SMS messages that I have used on several Flexy201s, and has worked without any issues. However, it doesn’t appear to be working correctly on the current Flexy that I am using. The script will send text messages, but it does not appear to be receiving them. We are using Verizon, and per the usage section on their website, it is sending and receiving messages, but the ONSMS function does not appear to be triggered.

In the Init section I have:

ONSMS "Goto HSms"

Which normally goes to:

Print "HSms triggered." // I added these three
rSMScount@ = rSMScount@ + 1 // lines to determine if
rSMStotal@ = rSMStotal@ + 1 // ONSMS was being triggered.
recSMS% = Getsys Prg,"SmsRead"
If (recSMS%<>0) Then
<rest of code>

Everything else appears to be working correctly. I can connect to the Flexy through Talk2M, connect to controllers, the script sends SMS as it should, etc. I have updated to FW 13.3s0 (#792).

Am I missing something? Is there something else I can check?

Hi @mcn

Do you have any other Flexys that have this code working correctly or is this one the first setup? If you do have this running on another device, is it also using a Verizon SIM card?

Yes this has been working on other Flexys. It has worked with carriers T-Mobile and Rogers (with FLB3205) and Verizon (FLB3203). This is the first time I have had an issue with the ONSMS function.

Would it be possible to grab a backup of the Flexy that has this feature working with Verizon and then load it onto this device that’s having issues.

This way we’ll be able to narrow down if it’s a hardware or software issue. If it’s not working after uploading the other backup onto this device, then I’d say try and test another SIM card if you have one available.

Can you also grab a backup with support files of the device that’s running into issues for us to take a look at? We might notice something in the event log

The Verizon Flexy that this has worked on is currently offline and on loan to a customer, but I will try with the backup I made just before sending it out.

I will have to see if we have another SIM card available.

Thanks @mcn

Let me know what you find out

Hello, just saw the backup you sent me.

Did you mean that you put the backup of the working device on the one that you were having issues with and then it still wasn’t working?

That is correct. I developed this script on the first Flexy that we bought. It had the Verizon LTE card installed. I had the script working, able to send and receive text messages. Then we needed to loan it out to a customer, so I made a backup before reconfiguring it and sending it out. The script needed some slight modification to work with other carriers, but it has worked well for T-Mobile and Rogers.

One thought I had today and haven’t had the time to try was a SIM PIN. I don’t recall needing one for the first Verizon LTE card that we used, but I did seem to need one for this LTE card. In the Verizon status page, it says there are 2 PIN numbers. I want to try the other PIN to see if it makes a difference, but it seems odd that I can send SMS messages, connect to the Flexy, tunnel into the controllers, etc. if I wasn’t using the right PIN.

Any other suggestions?

Mark Needham Control Systems Integrator

Any chance there’s any restrictions on what this SIM card can do? Did you have another SIM card that you were able to try on this device?

We were able to try with another SIM card, with no difference. Our HR director manages the cellular accounts and we have gone over the device information for both SIM cards. There shouldn’t be any restrictions on the SIM card.

I removed the Verizon LTE card, did a level 2 reset, and setup the Flexy again. I tried my script again and had no luck. I also tried the example ‘Sending an SMS receipt to the SMS sender’ in the ‘SMS reception with eWON’ KB pdf. No luck there either. I can do a SENDSMS from the console, but the script doesn’t respond when running.

I have the latest firmware installed, 13.3s0. I believe this is newer than the other Flexys that this script has worked on, but they are offline right now so I can’t check. I wanted to try downgrading from 13.3 to 13.0. I tried using the eWON recovery to do so, but that doesn’t see the Flexy after I reboot when prompted. I do have the computer connected to a switch, and not directly to the eWon. The network cable is plugged into port 1.

Hi Mark,

Can you try and go through the recovery procedure described in the doc below and if you have issues getting it back onto FW 13.0 give me a call at 312-893-5636?

One other thing I’d like to try would be to send the SIM card to the working Flexy and see if you can get that to work, or if you have another Verizon 4G card available that we could try on this device to narrow down if it’s a hardware issue. I’ll check with some colleagues and see if this is an issue they might have seen before

Hi Mark,

I just checked and one of my colleagues had another idea to debug this. Can set these settings under the debug menu and then try sending an SMS to the device

Hi Mark,

Sorry for the delay on this, we went out and bought a Verizon SIM card and are trying to figure out what is going on with this issue. We’ve been able to replicate the problem that you’re seeing so hopefully we can find a solution to it quickly


Thanks for the update. I was able to get it working late this afternoon with a FLB3205 and an AT&T SIM card (it didn’t have SMS enabled initially). I noticed that when it started working, it went to the Testing() function first, and skipped the ‘Goto HSms’. When I commented out the ONSMS “@Testing()” line, it did go to the HSms routine. It appears that the messages were in a queue as it responded to several of my text messages at once. I’ve attached the program and a couple of screenshots from my phone.

This will work for the interim, as this particular Flexy is for a show next week. We will still need to figure out why the Verizon one isn’t working, as they are the carrier that we normally use.

Thanks for your help, and please let me know what you find out with the Verizon card.

Mark Needham Control Systems Integrator

Flexy SMS Test Program2.bas (988 Bytes)

Hey Mark,

Can my colleague in Belgium and I jump on and take a look at this device that had the Verizon card connected to it again sometime tomorrow morning? He wants to see what information the device was giving when it was receiving the wakeup SMS

Unfortunately I don’t think we will be able to in the morning. The panel is scheduled to ship at 9am. We could set something up when the panel gets back in a week or two. We will still need this to work with Verizon for upcoming systems.

Ok if you could send me a response on this when you’re free, we’d like to look into this with you

I would like to resolve the issue with the Verizon SIM. I created another thread that is identical before noticing this conversation with Mark. Can send SMS messages with the Console or script but the ONSMS is never triggered when a message is received.

Hi @Tmurray,

I’ll check with the developer and see what I can find out


I have two Flexy(s). One shipped to a customer with a T-Mobil SIM and it will send and receive SMS messages. They want me to replace the SIM to a US Cellular. I and not able to get it working yet. Always getting a sms-GSM Protocol Error (6). I upgraded the firmware to 14.s02 from 13.3s0 but still errors.

The second one has a Verizon SIM and it sends but never initiates the ONSMS event for the program. I simply put a Print “Here…” statement to see if the event occurs and it does not. This is the error Mark was reporting. Just providing more info and letting you know I have 2 flexy, 3 SIMs and 2 cell modules (FLB3203 & FLB3205). Verizon is on the FLB3205. The other two are being swapped in FLB3203.