ymodem icon indicating copy to clipboard operation
ymodem copied to clipboard

CRC issues

Open 2efPer opened this issue 8 years ago • 3 comments

if (crc.calcCRC(block) != readCRC(crc)) { throw new InvalidBlockException(); }

I think it's something wrong about the algorithm , it always throw the InvalidBlockException. Could anybody fix it?

2efPer avatar May 18 '16 03:05 2efPer

Hi,

Please, send to me content of block on wich you receive an error. I will check checksum

aesirot avatar May 27 '16 12:05 aesirot

image Use byte type definition the block,only represent 127 blocks,is there some mistakes? I can only transfer 127k

PengYanY avatar Dec 21 '18 09:12 PengYanY

protected void sendDataBlocks(DataInputStream dataStream, byte blockNumber, CRC crc, byte[] block) throws IOException { int dataLength; while ((dataLength = dataStream.read(block)) != -1) { sendBlock(blockNumber++, block, dataLength, crc); } }

Use byte type instead of int type ,then solve the problem

PengYanY avatar Dec 29 '18 03:12 PengYanY