OutputStream problem
Hi,
I am using java comm API to send some cmd to a bluetooth device which is working fine if I turn on the device before I send the cmd. But if I try to send out cmd before the device has been turned on. The program would be stuck at g_os.write(sendCMD);
code:
CommPortIdentifier g_portId = CommPortIdentifier.getPortIdentifier(portname);
g_sPort = (SerialPort)g_portId.open("test", 30000);
g_os = g_sPort.getOutputStream();
g_os.write(CMD);
There isn't any error or exception message. Any one has any idea why this problem is caused and how to fix it?
Any help is appreciated.
Thanks

