Terminal with Mem-Stick Logger---Need Help!
Alex Bell
Posts: 17
My friends and I (newbies) have been trying to develop a Terminal Emulator that logs all keystrokes and com port input to a thumb-drive memory stick as well as to a local printer. As seen in the enclosed developing files, we have arranged Propeller VGA, keyboard, and serial port software which actually runs as a terminal and copies out the secondary (printer port). However, we cannot capture the keystrokes to the thumb drive! The thumb drive "seats", the file directory and file are written to the drive, and even some of the embedded and "0" terminated DAT strings are copied into the file...however the keystrokes or input from the COM port never appears. Can anyone see why? We are mystified! We really need the thumb drive to work as it is the "green" part of the project, to save paper! Thanks for any light you can give!
Comments
first of all I had to add
step by step just to get your project to compile
of course this code will NOT work properly
it was just for compiling it to get easy access to the subobjects by doubleclicking on
the filenames in the object-info windows of the poptool
you should always use the archive function of the proptool to ensure that ALL files that are compiled on your PC
are included in your attachment
I took a quick and short look into your code.
Do you get output on the Display and the printer ?
In the Paul_USBDemo there is a line of code
which is missing in your code
did you test WITHOUT changing to a subfolder ?
You are checking if something comes in on the SERIAL connection
and no keystrokes
I did NOT test your complexe line of code
code]
if (x := Terminal.rxcheck) > $00
[noparse][[/noparse]/code]
I would test this line for itself
or "decompress" it to less complex lines of code
whenever there occurs an error
you have to check EVERY detail on its own
otherwise you will be mystified as you said yourself
Now I took a look into the method PUB Write in the Paul_USBdrive.spin
the method Write expects a POINTER to a string
for writing an integervalue you have to create a new method
WriteDec that calculates the length of the integervalue and sends the same commandbytes like
method write and then calls the dec method of the FullDuplexSerial-object
or you have to use a method that converts the integervalue into a string and use the POINTER to this string
(NOT the string itself !) as the parameter of the call of method USB.Write
I THINK this is the bug. You know it if you really tested it
best regards
Stefan