Home/Support/Support Forum/What does XCTU perform while adding a radio module
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

What does XCTU perform while adding a radio module

0 votes
I believe the XCTU performs something magical while adding a radio module because I realized that my application programs (reading and writing) coded in C can work after the XCTU have added them.

I compared the USB file flags of my two programmable XBee S2Cs (/dev/ttyUSB0 and /dev/ttyUSB1) before and after the XCTU have added them in order to make sure that thay all are equal. They were equal but the XBees are unable to communicate before the XCTU have them added. Then, I added them to the XCTU (Shift+Ctrl+A), then they are able to communicate to each other. That's why I believe the XCTU performs something else background and I want to know what it is.

Serial interfacing options are given below:

BD = 9600
NB = No Parity
SB = One stop bit
RO = 3
D7 = CTS flow control //I tried Disable as well but no change :/
D6 = Disable
AP = Transparent mode
AO = Native

To clarify the question, I give the port opening and port initializing codes below:

int open_port(){
int fd;
fd = open("/dev/ttyUSB0"/*or /dev/ttyUSB1*/, O_RDWR | O_NOCTTY);
// fd control code
return fd;
}

int initport (int fd){
int portstatus=0;

struct termios options;
memset (&options, 0, sizeof options);

//some control code

if(cfsetispeed(&options, B9600)<0 || cfsetospeed(&options, B9600)<0){
//error code
}

options.c_cflag &= ~PARENB;
options.c_cflag &= ~CSTOPB;
options.c_cflag &= ~CSIZE;
options.c_cflag |= C8;
options.c_cflag &= ~CRTSCTS;

options.c_cc[VMIN] = 1;
options.c_cc[VTIME] = 0;
options.c_cc[VSWTC] = 'p';

tcflush(fd, TCIFLUSH);
if(tcsetattr(fd, TCSANOW, &options) == -1){
//error code
}

return portstatus;
}
asked Aug 14, 2017 in USB Serial by samettonyali29 New to the Community (2 points)

Please log in or register to answer this question.

1 Answer

0 votes
 
Best answer
XCTU is using the commands that exist for the freescale bypass application (bootloader) that is installed on the module.
answered Aug 14, 2017 by mvut Veteran of the Digi Community (11,302 points)
selected Aug 14, 2017 by samettonyali29
Thank you mvut. I have another question then. Is there a way to run/activate this bootloader in my code or where can I find this list of the commands for the bypass application so I can initialize the device for the communication?
At 9600 baud, issue a U on power up. This brings you into a bootloader state. From there you can select B for Bypass mode.
...