I am working with a Digi Xbee LTE connected via USB to a Raspberry Pi using PHP to send and receive SMS, but standard AT commands don't seem to be working to receive SMS. How can I check for incoming SMS messages using AT commands? Here is the output of the serial port:
+CMS ERROR: 321
CPMS shows that it supports SM, so we set it to that and try getting all messages. I get an empty "OK" response. Then on my cell phone I send it a SMS and it prints instantly on the screen without me running any commands to retrieve them. At least now I know it should have some SMS to view now, so I run AT+CMGL="ALL" again, and get an empty "OK" response.
Because of the nature of Serial, I can't have my PHP application that is running over USB listening for incoming messages constantly and be able to send, it has to do one or the other. Because of that, I need to be able to alternately send messages, then check for incoming, but it doesn't seem to store them or something.