I'm writing a java application that communicates with an external device over a serial port.
I think I can connect to the device & send/receive data ok (I don't have access to the device at the moment..I'm using an emulator)
I just need some advice on how I should format the data I'm sending.
The spec says it should be sent in byte format..So if I have something like the following packet to send
AA|0D|07|09|0A|0B|03|01|02|03|04|CSM|CSM
is this the type of thing I should be doing
outputStream.write((byte)0xAA);
outputStream.write((byte)0x0D);
outputStream.write((byte)0x07);
...or am I way off?
I'm sorry if this is really basic..I've never dealt with any of this type stuff before & I won't be getting my hands on the device for a few days.
(byte)
casts. – Seventieth