-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checksum in 128B mode (Xmodem first protocol) #5
Comments
Hi Damien, Is this causing you grief? I'd welcome a patch to make it optional? Regards, |
I'm currently integrating this to a 16 bit firmware and it's not working. But I don't know yet if this is the root cause, or if my modifications are causing this. I just found this while investigating :) Anyway I'll be happy to open a pull request if that's really an issue! Damien |
Are you using a PC as the client, or is this between two embedded systems? I've used this as the server on an embedded when doing firmware upgrades on other embedded devices, and not had grief. I had a poke around, and it turns out it seems to be related to the special character that is sent out on startup. If the server sends out 'C', then it's assuming xmodem-crc. If it sends out 'NACK', then it's the original 8-bit checksum. See https://github.com/UweOhse/lrzsz/blob/master/src/lsz.c#L994 & https://github.com/UweOhse/lrzsz/blob/master/src/lrz.c#L641 I've created a branch which adds a new parameter to enable this mode of operation. You need to tell the server which mode it should start in. Have a look here and see if it makes things any better? |
I'm using a PC as client to upload a firmware to an embedded system. Eventually I'd like to be able to upload a new firmware to my board from a PC, and perform an upgrade.
That's an interesting lead, let have a look at this and come back to you. Thanks for the new branch, it will be helpful! |
If you're using a PC, I suspect this probably isn't the issue. Most PC-based software is going to support both modes of operation and should seamlessly swap between them as appropriate. Not 100% sure obviously :) Let me know how it goes and if there's any else I can help with. |
Hi Andre,
Thanks for this very nice little library. It's very easy to use and integrate in some custom code.
I'm trying to use the library in 128B mode and I'm wondering if the following line is correct for this case :
async_xmodem/xmodem_server.c
Line 111 in 5972a49
As far as I understand the original Xmodem protocol (the one with 128B packets) the "checksum" is a sum of the data bytes in the packet, not a CRC (as in Modem-1k). Am I missing something ?
Best regards,
Damien
The text was updated successfully, but these errors were encountered: