Re: RS232 Redirector Program in C using Linux



On 23 Jan., 02:17, Joe Beanfish <j...@xxxxxxxxxx> wrote:
Josef Moellers wrote:
Please don't quote the entire article just to add a few lines. Quote
only the relevant parts.

Steffen wrote:

Confusing is that if i am sending a normal text file.. e. g. my
sourcecode-file.... this works fine... no problems.

No, I am wrong - sorry for that much posting of my side - if i am
transfering a raw file (means not only a text file), the whole file
gets corrupted... not only the beginning of the file :-(

You can do some additional analysis by saving the data that you transfer
in the redirector. That way you can find out if, from the redirector's
perspective, the incoming data stream is corrupted or the outgoing.

Also look at what the differences are in the bytes. Are the changed
bytes always changed the same way? If so from what to what? That may
shed some light. As someone else suggested, perhaps your stream isn't
fully raw/untranslated.

Thanks for your advices. Currently I tried to use another Terminal
Program instead of GtkTerm. I used CuteCom. I send the file again
(Plain, Hex Output). And I receive it (Plain, Hex input) on the other
end, also using CuteCom. Now I examined the original file using
hexedit and compared many lines and many random samples of that with
the received data. And all seems to be fine, i tested many times.
Sadly it is not possible to save the received hex data as a file with
CuteCom. I tried again many times using GtkTerm... and always errors
(means bytes have changed there content)... so I think that there is
maybe a bug in GtkTerm. I know the best way is to do a checksum on
both sides.. but for that i need to save the file at the receiver
side... with CuteCom not possible... For now i assume that my program
is working correct.. What are your opinions?

Another Question I still have: What parameters must be adjustable by
the use for that kind of program (redirector)? Right now I assume:
- Baudrate
- RTSCTS

- maybe also : Wordlen ?
.