sending AT comands while modem is in a data state
-
Hi, could you help me on this problem?
I am working on a project with the GPy and my client needs to have the LTE signal strength sent back to them.
I keep getting this error when I send the AT command for that. My LTE modem is of course on and connected, and I need to check the signal strength.
>>>LTE modem is in data state, cannot send AT commandsHere on the Pycom documentation it states that
lte.send_at_cmd(cmd, delay=10000)"Sends an AT command directly to the modem. Returns the raw response from the modem as a string object. IMPORTANT: If a data session is active (i.e. the modem is connected), sending the AT commands requires to pause and then resume the data session. This is all done automatically, but makes the whole request take around 2.5 seconds."
I have two issues. It doesn't say on that page as far as I can see, how to manually pause the data-state, and secondly, I keep getting the above mentioned error while doing the following code.
In my code I created an lte object, connect with the cellular network, do some web requests, and then I try this line.
lte.lteStrength() # this is the function I'm calling. def lteStrength(self): if self.lte.isconnected(): if self.lte.isattached(): return self.lte.send_at_cmd("AT+CSQ", delay=10000) # tried without delay too. else: print("Error. LTE Strength is unknown. LTE is not attached or connected.")I get this error every time.
>>>LTE modem is in data state, cannot send AT commands -
@mattliddle Check
lte.pppsuspend()beforelte.send_at_cmdandlte.pppresume()afterlte.send_at_cmd. Also check this thread. Btw, which GPy f/w and modem f/w are you running on? -
@rskoniec thank you so much! I will try that out. That's a good thread.
As far as the firmware, I need to double check, but I believe for both I'm using the most updated stable release version.
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