Home/Support/Support Forum/XBee Cellular LTE Ping and MQTT

XBee Cellular LTE Ping and MQTT

0 votes
I have a custom board with an XBee3 Cellular LTE-M doing some basic stuff. Ultimately I'm trying to connect to an MQTT server for data uploading, but so far it just always fails with a timeout.

After an appropriate amount of warm up time, the XBee has a signal, reports its own IP as something not 0.0.0.0, and can send the cell time that looks correct.

To make sure I'm even on the right track, I'm trying to use the Ping (PG) command to see if it can, say, ping google. But when I send the AT command of PG (regardless of what argument I pass it), it just immediately responds with ERROR. What am I missing on how to ping an IP address like this?

For example this send AT command fails:
gsmModem.sendAT(GF("PG"), "http://www.google.com");

For reference this is through an Arduino as the interface to the XBee, with TinyGSMClient as the library, with PubSubClient as the MQTT library.
asked Apr 14 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
Try the following for the PG command:

+++
ok
ATPGwww.digi.com
ok
atcn
ok

You can see an example for the mqtt by going to https://www.digi.com/resources/documentation/digidocs/90002219/default.htm#container/cont_mp_libraries.htm?Highlight=mqtt
answered Apr 14 by mvut Veteran of the Digi Community (15,223 points)
Unfortunately this board is soldered onto my custom circuit, so I have to have some work-arounds to get commands in and out.  With a super simple serial echo on the Arduino, the board is recognized and reads in all settings with XCTU.  For some reason, though, in the terminal, I can't get it to respond to any commands, though they do show if I read a parameter through the settings screen and pop back over to the terminal.  Weird.

If I send your exact ping commands with a simple Arduino script, still get ERROR.

Unfortunately I'm not using micropython for this MQTT, so I'm not sure that document will help, unless I'm missing something.
You really need to take the XBee out of the circuit to find where the issue is. That is, start by eliminating components that can be causing the issue. The simplest way is to put the XBee into a Development board and run the Ping command when in it.
...