How to get response of Xbee 802.15.4 on Linux console

I am dealing with 2 Xbee 802.15.4 module.

one module is being used on usb explorer with Ubuntu

another module is on breadboard

two modules are using API mode (2)

They can communicate on X-CTU

so I made simple communication program like X-CTU.

------example source-----
char packet[8] = {0x7E, 0x00, 0x04, 0x08, 0x01, 0x4E, 0x44, 0x64};

FILE *fp = fopen (“/dev/tty.USB0”,“w”);

for (i = 0; i < 8; i++)
fprintf (fp, “%c”, packet[i]);
fclose (fp);

when I send Remote AT command to Xbee module on breadboard. It works

so I think If I read /dev/tty.USB0, I can read respond.

but When I send ND packet like that, I cannot get respond on ubuntu terminal.

However when I send remote AT command packet to own (Xbee module on USB explorer with Ubuntu), I can get it.

but except remote AT command packet to own, I cannot see anything.

How can I get respond of sent packet?

please let me know it.

What is the frames you are sending the ND command with?

I only sent ND command (0x7E, 0x00, 0x04, 0x08, 0x01, 0x4E, 0x44, 0x64)

but I couldn’t get response of ND command.

so I sent any Remote AT command to own (as test)

and then I could check It works (I got response on linux terminal)

I hope I see response of ND and other commands on linux terminal like Remote AT Command.

to sum up, I wanna get response of ND command on linux terminal, when I send only ND command.

Are all of the nodes sleeping end devices or are they all awake?

They are not sleeping.

Current value of their SM is 0 (No Sleep)

Try setting an NI value on the remotes. Then issue the ATND command with the NI value.