No response to AT commands.

I use the module XBee S6 and ATMega32 with UART. After power up I send “+ + +” to enter AT commands mode. Wait for an answer, “OK.” (Wait about 1 second). Expectant guard interval of silence (the default is 1000 ms) and send the following AT command:
putchar (0x7E);
putchar (0x00);
putchar (0x05);
putchar (0x09);
putchar (0x01);
putchar (0x42);
putchar (0x44);
putchar (0x07);
putchar (0x68);
Expectant guard interval of silence, and do not get any response.
I tried send other AT commands using API fremes 08, but still do not get any response.
What am I doing wrong?

You are sending an API packet while in command mode which will not work.

There are different modes the xbee radio can be in. In transparent mode the radio sends everything received from the UART out transparently unless you wait one second send three + characters “+++” and then wait one second. this puts the radio into command mode. In command mode you send AT commands with just ASCII characters. for example in command mode you could send ATBD7 to change the baud rate to 115200 you might then send ATWR to write the setting to non-volatile memory and then enter ATCN to exit command mode and go back to transparent mode (or you could wait for the 10 second timeout.) These AT commands are ASCII strings.

If your radio is instead in API mode (AP = 1 or ATAP1) then all commands would be sent with API frames. Transmission requests, AT commands, and other types of request can be sent in this mode. To send an API command for that same ATBD7 we mentioned earlier you would send: “7E 00 05 08 01 42 44 07 69”
“7E” is the API header, “00 05” is the packet length, “08” is the packet type for AT command, “01” is the frame id which can be anything and lets you match this request with the response the module will give you, “42 44” is ASCII for BD which is the command we are sending, “07” is the value we are setting BD to representing 115200 baud, and 69 is the check-sum (FF minus the sum of the other bytes between the length and check-sum fields.) Remember all of these are hexadecimal bytes. You should also use API commands to send your data when in API mode.

1 Like

Thank you very much! The Problem solved! I guessed yesterday.