Home/Support/Support Forum/XBEE cellular SMS error

XBEE cellular SMS error

0 votes
Hello.

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")
5===
True
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
OSError: [Errno 7005] EIO
asked Apr 25 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 by DigiFan23 Seasoned Professional (205 points)
...