Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#277498 - 13/03/2006 02:11 USB-Serial dongles & the Empeg: FIXED!
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
A longstanding problem with programming the Empeg flash (kernels, logos, etc..) over serial, is that it has always been very fussy about the PC serial port. In particular, USB-serial adapters rarely worked.

No more.

I've finally gone through the download.c code with a fine-toothed comb, and found/fixed the problem. Linux users can take immediate advantage by downloading and using the new code.

Now.. If only tfabris could update LogoEdit based on this new/fixed code, and if JEmplode were similarly updated, the problem could be put completely to rest.

The updated POSIX (Linux et al..) code is here. The actual fix was to change the flushrx (aka readflush) code to do a non-zero delay. But I also cleaned up the indentation etc.. so that I could understand the rest of the code.

It works for me, using several different USB/bluetooth serial adapters.

Cheers

Top
#277499 - 13/03/2006 02:20 Re: USB-Serial dongles & the Empeg: FIXED! [Re: mlord]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
Looking at my source code from Logoedit, I already changed flushrx in my version, thusly:

Code:
static void flushrx()
{
// Tony Fabris 2002-10-22
// Attempt to fix long-standing bug in flash timings. This particular
// change (delay 1 second instead of 0 seconds on each flushrx) was
// suggested by Jan Harkes. I avoided it at first because I thought
// it would slow things down too much. But now it seems to be just
// what the doctor ordered. Thanks, Jan.
while(readbyte(1)>=0);
}



Is there more to it than that?
_________________________
Tony Fabris

Top
#277500 - 13/03/2006 02:39 Re: USB-Serial dongles & the Empeg: FIXED! [Re: tfabris]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
That was most of it, though I only used 0.10 secs delay in that routine (noticeably quicker), but no big deal any way one does it).

There were a couple of other places where I added writeflush() before any reads, dunno if those helped or not.

If it's working well over USB-serial dongles, then you know you've got it right.

Cheers

Top