Home/Support/Support Forum/XBEE cellular SMS error

XBEE cellular SMS error

0 votes

Is this familiar error to you?

I think settings (P# set , IP Protocol = SMS, latest firmware 11411 ect....) are correct..

paste mode; Ctrl-C to cancel, Ctrl-D to finish
1=== import network
2=== c = network.Cellular()
3=== c.isconnected()
4=== c.sms_send("phonenumber", "testi")
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
OSError: [Errno 7005] EIO
asked Apr 25, 2019 in XBee Cellular by riku New to the Community (4 points)

Please log in or register to answer this question.

1 Answer

0 votes
The code you pasted needs to wait for the cellular connection to be up. The code should look something like:

import network
import time

phone_number = "XXXXXXXXXX" # Target Phone number

c = network.Cellular()
while not c.isconnected():
time.sleep(1) # Indent this line once
c.sms_send(phone_number, "Test!")
answered May 7, 2019 by DigiFan23 Veteran of the Digi Community (278 points)