direwolf icon indicating copy to clipboard operation
direwolf copied to clipboard

Add CRC calculation for IL2P

Open leventelist opened this issue 7 months ago • 5 comments

The byte order might be wrong. We must test it with the reference implementation. Unfortunately, I don't have any.

leventelist avatar May 30 '25 15:05 leventelist

#507 It solves this feature request.

leventelist avatar May 30 '25 15:05 leventelist

The indentation seems to be mismatched.

EDIT: I just saw https://github.com/wb2osz/direwolf/issues/573; might be worth just keeping the indentation of the line immediately preceding it?

Pandapip1 avatar May 30 '25 22:05 Pandapip1

@Pandapip1 That is a PITA if you work with a modern code editor just like I do with VS-code.

leventelist avatar May 31 '25 10:05 leventelist

Weird. I use vscodium and if anything it doesn't mess with the indentation when it should. Definitely there should be a consistent indentation style throughout though; that is pretty obviously beneficial.

Pandapip1 avatar Jun 01 '25 22:06 Pandapip1

Ok. It turned out in the meantime, that I misinterpreted the standard. I tried to fix it, but now I have some problem that I don't know how to solve. The standard says that the input of the CRC is the AX.25 data before it is scrambled and encoded. After getting the IL2P frame from the radio, it is translated back to AX.25 data. However, some of the fields are not presented in the IL2P header, such as the MSB of the SSID. I experience that this field is set differently, when we regenerate the packet, and the CRC fails. This is only an issue with TYPE-1 packets, when the AX.25 header is compressed.

I leave this PR as it is, and hope someone can help me sort these things out.

leventelist avatar Jun 02 '25 16:06 leventelist