I'm a beginner here and I'm attempting this project in which I have to send a message to a device..
I have the specs for the test message (it's all in hexadecimal), but how do I actually code it out so that my java main is sending a hexadecimal message? (since there is no data type for that, I was told to try using bytes[] but it's not working.)
I have already successfully implemented a CommPortDevice communication so I'm sure it is already connected, but the actual message itself, I'm unable to construct it.
For example, I need to send "02 60 01 00 00 84 7A BE 88 00 01 6E 6B" to the device to get a response (it will give out a beeping sound), and I'm not sure how I can construct the message in Java using bytes[]. I've seen resources using xxx * 0xFF or the operators >> and <<, for example, digit1 << 4 | digit2 or something, and I'm not sure what those are.
I would appreciate if someone point me to the right direction. Thank you.