Home/Support/Support Forum/XBee3 4G - Phone number of most recent SMS message received

XBee3 4G - Phone number of most recent SMS message received

0 votes
I feel like I'm missing something extremely simple, here.

I'm using an XBee3 4G to send and receive low level commands to a custom circuit board, which is essentially an Arduino running the TinyGSM library. It can send SMS messages using the P# command. No problems there. It can also receive texts using a stream read command: if there is data available, take it in.

For some reason it reads the SMS body well, but I can't figure out how to get it to spit out the phone number that the SMS (or perhaps the last SMS received) is from.

I know there are a lot of variables here that make it hard for much debugging help, but google has led me to the same unanswered forum posts or info for other brand 4G boards.
asked Jul 13 in RF Solutions and XBee by DrRocksalt New to the Community (1 point)

Please log in or register to answer this question.

1 Answer

0 votes
For what it's worth, it seems like switching to API mode 1 instead of 0 spits out both the sent phone number as well as the body. Now I just have to be clever about separating the two and parsing appropriately. And switching back to API mode 0 to send a text since the library I'm using to send requires that.
answered 6 days ago by DrRocksalt New to the Community (1 point)
Why wouldn't you just stay with the API mode? You can use API mode command 1F to send a SMS.
https://www.digi.com/resources/documentation/Digidocs/90002258/#reference/r_frame_0x1f.htm?TocPath=API%2520frames%257C_____3
Simply due to the fact that the off-the-shelf library I snagged is set up to send SMS in API 0, as far as I can tell.  But you're absolutely right, and teaching myself all of this makes me want to just ditch that library and roll my own sending code.
...