You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, im having this error:
RangeError: Illegal range: 0 <= 21 <= 16 <= 32
My code is:
var cmd = 'DYD,000000#';
var command = new ByteBuffer();
command.writeByte(0x78);
command.writeByte(0x78); // size
command.writeByte(5 + cmd.length); // size
command.writeByte(0x80); //Protocol Number
command.writeByte(4 + cmd.length); //Length of Command
command.writeByte(0x91); // Server Flag Bit end
command.writeUTF8String(cmd)
command.writeShort(crc.crc16ccitt(command.slice(2, 4)));
command.writeByte(0x0D); command.writeByte(0x0A); // ending
console.dir(command)
socket.write(command.toString('hex'))
The text was updated successfully, but these errors were encountered:
Hello, im having this error:
RangeError: Illegal range: 0 <= 21 <= 16 <= 32
My code is:
var cmd = 'DYD,000000#';
var command = new ByteBuffer();
command.writeByte(0x78);
command.writeByte(0x78); // size
command.writeByte(5 + cmd.length); // size
command.writeByte(0x80); //Protocol Number
command.writeByte(4 + cmd.length); //Length of Command
command.writeByte(0x91); // Server Flag Bit end
command.writeUTF8String(cmd)
command.writeShort(crc.crc16ccitt(command.slice(2, 4)));
command.writeByte(0x0D); command.writeByte(0x0A); // ending
console.dir(command)
socket.write(command.toString('hex'))
The text was updated successfully, but these errors were encountered: