A
Andreas
Greetings,
I am just starting to use the COMM package to communicate with a serial
device.
I have found all ports and opened the correct one without problem.
According to the serial device's manual I am supposed to "send AT plus a CR
($41, $54, $0D) and await the same answer". The problem is that I am not
sure how to transfer "AT plus a CR".
I have seen in a few examples (in this group's archives) how you can write
to a serial port, and I am doing the following:
CommPortIdentifier portId =
CommPortIdentifier.getPortIdentifier("COM2");
SerialPort serialPort = (SerialPort)portId.open( "MySerialApp", 2000 );
serialPort.getOutputStream().write("AT <CR>".getBytes());
I am guessing this is not how it should be done (the "AT <CR>" I mean).
After you all have recovered from your laughing attacks, maybe someone
could help me understand this basic stuff?
It would be greatly appreciated.
Best,
Andreas
I am just starting to use the COMM package to communicate with a serial
device.
I have found all ports and opened the correct one without problem.
According to the serial device's manual I am supposed to "send AT plus a CR
($41, $54, $0D) and await the same answer". The problem is that I am not
sure how to transfer "AT plus a CR".
I have seen in a few examples (in this group's archives) how you can write
to a serial port, and I am doing the following:
CommPortIdentifier portId =
CommPortIdentifier.getPortIdentifier("COM2");
SerialPort serialPort = (SerialPort)portId.open( "MySerialApp", 2000 );
serialPort.getOutputStream().write("AT <CR>".getBytes());
I am guessing this is not how it should be done (the "AT <CR>" I mean).
After you all have recovered from your laughing attacks, maybe someone
could help me understand this basic stuff?
It would be greatly appreciated.
Best,
Andreas