sending hex to rs232 device
alexho
Posts: 7
was trying to create a simple duet module but encounter this problem, how do i send hex from java to the device? please advice.
Thanks in advance
Alex
Thanks in advance
Alex
0
Comments
depends on how you need/want to build the packet, but I use a string buffer...
StringBuffer packet = new StringBuffer();
packet.append((char) 0x01);
packet.append((char) 0x2B);
packet.append((char) 0x0D);
packet.append((char) 0x0A);
// etc...then
dv.sendString(packet.toString());
you could also use a character array
thanks the above reply is of great help to me.
thanks alot
Alex