AT Commands how to check and respond on return messages from modem

I have a SIM7000E hat connected to my Raspberry. I want to connect the Raspberry to the internet using the SIM7000E hat.

I have manged to get everything working and get responses from the modem when i send the AT commands. I am however unable to get a way to resend the at command if the modem does not return an "OK" and/or respond with an error.

The modem returns two strings when i send the the at command like in the example below.


How can i resend the message if "OK" was not returned and/or when i get an error from the modem. it must only look at the "OK: when "AT+CGDCONT=1,"IP","internet","",0,0" was send.

I hope that makes sense :slight_smile:

What do you see from the modem for other commands?




The above is a couple of examples.

Sometimes when there is no reception or something is wrong it will return an error......or nothing....then i must have a way to resend the at command.

When you send the AT+CGDCONT you could start a Trigger node set to Send Nothing then after a delay (set to the timeout which you expect to receive OK in) to loop back to resend the command. On the output of the serial node use a Switch node to detect OK and use that to send msg.reset to the Trigger node to cancel the timeout.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.