M410 LTE Antenna Detection - AT command

This would be cool to have to determine if the antenna was installed correctly for production.

It’s possible that some of these commands will be added to system firmware in future, but there’s nothing preventing your from using Cellular.command now. I don’t see any reason why that command shouldn’t work with Cellular.command. I’d try it and see if it works.


int callbackAntenna(int type, const char* buf, int len, char* response) {
      if (sscanf(buf, "\r\n+UANTR: 0,%[^\r]", response) == 1);

    return WAIT;

Serial.println("Detecting Antenna: ");
          char response[200] = "";
          //int code = Cellular.command(callbackAntenna, response, 10000, "AT+UANTR=0\r\n");
          if (RESP_OK == Cellular.command(callbackAntenna, response, 10000, "AT+UANTR=0\r\n")) {
            Serial.printlnf("Antenna = %s\r\n", response);
          } else {

This is the output, so the -1 indicates an open circuit although I have an antenna installed.

But there is an output of 4. Do you know what this number is or where its coming from? Each time I call this function the number 4 changes at each call between numbers 0 and 15.

Also do you know why the buf is printing out twice (between buf begin and buf end)?

Detecting Antenna: 

+UANTR: 0,-1

TR: 0,-1
Antenna = 0,-1

Oh, wait, there’s going to be a different problem. This won’t work with the stock antenna.

The FXUB63 does not have a diagnostic resistor. There are specific models like this one that do, but most don’t.

The buf passed to the callback is not null terminated - it’s specified by length so the extra bytes are typically data that was left in the buffer from earlier.