Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

TeraTerm and Xmodem.. going crazy!

Status
Not open for further replies.

ikalogic

Member
Hi there!

I have spent the last 2 hours banging my head around a problem. I am starting to feel very stupid about it!

Okay, i created a simple text file with the content "hello world".

I want to use Teraterm and xmodem protocol to send that file to a micro controller. till ther seems pretty simple right?

Okay, i read all about Xmodem, and implemented the protocol, which seems to work like a charm (sends the ACK when it needs to), and teraterm does not complain about anything.

In my program, i store the payload in a 128 bytes buffer, and then, when the transfer is finished, i display it back on the terminal window.

Problem is: I never get the original "hello world" that was supposed to be sent.

I don't have a L.A. right there so i can't sniff the serial port, i am not at the office. (yes, even a logic analyzer manufacturer can find himself without a L.A. someday!! )

Anyway, I tried to find *any* relation between the original file and the final outputted string, but i can't find any.

Simple question: Am i getting something totally wrong here? shouldn't XMODEM be plain binary data transfer..? is data transformed in anyway..?

Thanks a lot!

ps: I usualy never use xmodem, but thought: let's not reinvent the wheel.. :) Seems like reinventing the wheen would have taken less time.. but hell, i want to know what is going on with that serial link!
 
Fairly obviously, you're doing something wrong :D

XModem works perfectly, and does exactly what it's supposed to do - but you also obviously don't need it to send simple ASCII like "Hello World", it's for sending 8 bit non-ASCII data.

I've never had reason to do it on a PIC, but I did it in Turbo Pascal a LONG time ago, for a Packet Radio Program I wrote.
 
Hi Nigel,

Thanks for your reply. a "hello world" txt file is still formated as 8 bit data... (i verified with a hex editor, although it's obvious, but who knows).

I'll post my source code later.. although pretty simple as this stage.. I just store the received data in an array, and write it back on the teraterm terminal window at the end of transfer...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top