lte.isattached() is always false
-
Anyone suggest why lte.isattached() is always false..we are using telstra nework if that helps. Has the latest dev firmware 1.20... using the fipy
import time
import machine
from network import LTEwait_time = 1
def wait():
print("Waiting {}".format(wait_time))
time.sleep(wait_time)lte = LTE()
print("Resetting ... ", end='')
reply = lte.send_at_cmd('AT^RESET')
print("DONE: {}".format(reply))
wait()carrier = 'Telstra Mobile'
def status():
print("")
print("Status")
print(lte.send_at_cmd("ATI"))
print(lte.send_at_cmd('AT!="showphy"'))
print(lte.send_at_cmd('AT!="fsm"'))
print("")def do(command, sleep_time):
print("Sending: {}.".format(command))
response = lte.send_at_cmd(command)
print("Response: {}".format(response))
wait()
return responsedef getLTE():
if lte.isconnected(): return lte
if not lte.isattached():
print('attaching ', end=''); lte.attach()
while not lte.isattached(): print('.', end=''); time.sleep(1)
if not lte.isconnected():
print('connnecting ', end=''); lte.connect()
while not lte.isconnected(): print('.', end=''); time.sleep(1)
return ltedo('AT+CGDCONT=1,"IP","telstra.m2m"', 1)
do('AT!="addscanfreq band=28 dl-earfcn=9410"', 1) # in place of: lte.attach(band=28)
do('AT+CFUN=1', 1)
getLTE()
do('AT+COPS=?', 1)
result = do('ATI', 1)r=requests.get('http://micropython.org/ks/test.html'); print(r.text)
lte.disconnect()
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login