XModem and GLT240128

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
MarkAtESpecTech
LCD?
Posts: 9
Joined: Tue Aug 02, 2011 8:50 am

XModem and GLT240128

Post by MarkAtESpecTech »

Currently I am using the simple protocol for uploading fonts to the device. That works fine.

I decided to start using XModem to upload Fonts to the device and have run into some problems.

First, I am actively using XModem for file transfers to other devices.
I am using the some same routines to upload to the GLT240128 but have run into some problems.

I get the first block uploaded but get a NAK.
I am trying to figure out why and I believe it has to do with the Block Count or CRC.

Questions:
Block Count
On page 47 of the manual the Block Count starts at 128.
The implementations of XModem I have used have started at 1 and increment up.
What does the device expect for the first block count? 128 or 1?

CRC16
I use CRC16 for other XModem transfers to other devices but want to verify for the Matrix Orbital device.
What is the starting seed value for the CRC16? 0xFFFF 0x0000 something else?

Reference Implementation
Do you have a reference implementation for XModem uploads? In C/C++ or C#?

Thanks for the assistance.

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Re: XModem and GLT240128

Post by Clark »

Hi Mark,

The block count for an XModem upload is incorrect as listed in the manual: it should start at 1 and increment. Thank you for catching that, it will be changed. If you are receiving a NACK from the unit after the first block, it is likely the CRC calculation that is causing a problem. I've attached a sample implementation for reference.

That should be enough to keep your development moving. Unfortunately, I don't have a polished application note for the entire XModem implementation, but if you do run into further problems please email me directly and I may be able to provide relevant C# snippets.

Thanks,
Troy
tclark@matrixorbital.ca
Attachments
XModemCRC.txt
XModem CRC Implementation
(501 Bytes) Downloaded 255 times
Troy Clark
Design & Development
Matrix Orbital

MarkAtESpecTech
LCD?
Posts: 9
Joined: Tue Aug 02, 2011 8:50 am

Re: XModem and GLT240128

Post by MarkAtESpecTech »

Thanks for the quick response.

I am getting acks all the way now but I started with 1 and increment up.
U sure it is 128 and incr down as that is not the normal xmodem protocol.

I do a directory listing and the font file size is correct but the data is corrupted.

I can post a serial trace later this evening and a directory listing from the LCD.

I even did file system dump before and after it appears the file data is corrupted.
I could post that as well.

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Re: XModem and GLT240128

Post by Clark »

No worries Mark,

I've attached the default filesystem files for the GLT240128, please work with the one designed for your unit and MOGD# to determine when and how corruption is being introduced to your process.

Thanks,
Troy
Attachments
GLT240128 Rev4.0 ebins.zip
Default GLT240128 ebin Files
(10.34 KiB) Downloaded 260 times
Troy Clark
Design & Development
Matrix Orbital

Post Reply