XBee S6B
Really hate the idea I need to store an IP address in DL to get to my servers instead of a domain name. Is there a way to use a fqdn and have this resolved with the NS from DHCP? NI and DN look interesting, I am missing the secret sauce to get it to work. Is there a way to setup EQ to pass packets to that domain, I tried different DO settings, but no luck.
Is there documentation on this, or is this guess and pray?
I am not sure that is entirely true because their “cloud” whatever that means, accepts a fqdn. It seems like the device should have this capability, it is aware of a ns, it implies that it can do this. I guess I will call them try to get an answer.
After kicking this around, there is a way on the s6b to do a dns look up, it is ATLA fqdn. Works great. If you are using DHCP, and your router is configured properly, the xbee will get the dns server from dhcp, or you can set it via AT commands.
Here is how I resolved:
char dnsResponse[15];
memset(dnsResponse, 0, sizeof(dnsResponse));
xBEE.print(“ATLA aqua8472.com\r”);
delay(100);
i = 0;
while (xBEE.available() > 0)
{
dnsResponse[i] = xBEE.read();
i++;
}
if (sizeof(dnsResponse)<7)
{
if (Serial) Serial.println(“ERR”);
errorCode = errorCode | EC_RADIO_SETUP_ERROR;
}
else
{
Serial.println(dnsResponse);
if (Serial) Serial.print("ATDL: ");
memset(response, 0, sizeof(response));
xBEE.print(“ATDL\r”);
delay(100);
i = 0;
while (xBEE.available() > 0)
{
response[i] = xBEE.read();
i++;
}
if (strncmp(response, dnsResponse, sizeof(dnsResponse) - 1) == 0)
if (Serial) Serial.println(response);
else
{
if (Serial)
{
Serial.print("Set: ");
Serial.println(dnsResponse);
}
xBEE.print(“ATDL “);
xBEE.print(dnsResponse);
xBEE.print(”\r”);
delay(100);
bWriteConfig = true;
}
}