My software only works after I have opened X-CTU


I’m developing an application to talk to a XBEE module serially via the XBIB-U-DEV board. When I open X-TCU and close the COM port, my software is able to communicate with the module. If I only open my software I’m unable to communicate. I assume it’s because X-TCU sets all the required setting for serial communication. My software sets the following:

;************************* MASM32

mov dcb.DCBlength,sizeof dcb

invoke GetCommState,hConn,addr dcb

mov dcb.BaudRate,3
mov dcb.ByteSize,8
mov dcb.Parity,0
mov dcb.StopBits,1

mov dcb.fbits, BITRECORD<
TRUE,\ ; fBinary:1
FALSE,\ ; fParity:1
FALSE,\ ; fOutxCtsFlow:1
FALSE,\ ; fOutxDsrFlow:1
FALSE,\ ; fDsrSensitivity:1
FALSE,\ ; fTXContinueOnXoff:1 ; true
FALSE,\ ; fOutX:1
FALSE,\ ; fInX:1
TRUE,\ ; fErrorChar:1
FALSE,\ ; fNull:1
FALSE,\ ; fAbortOnError:1
NULL> ; fDummy2:17

invoke SetCommState,hConn,addr dcb


What am I missing? What settinga does X-CTU set that I need to consider?

If looks like you are setting the parity to 0. The default for the radio is no parity – 8-N-1