Jump to content

Xmodem protocol using Hyperterminal


Guruthilak

Recommended Posts

You can check out the code here. I have also attached some code to calculate the XMODEM CRCs as well as the normal CRC-16.I have also attached the XMODEM-VISA.llb that I used. I am pretty sure this is the same llb referred to in the link I posted but if I recall I added the support for 1K transfers.

Nice. Well worth a point.:thumbup1:

Link to comment

Thanks MArk,

I could not reply since we had a long week end out here.

I actaullay saw these VI's before posting the thread. But i would like to know is it possible to send set of "FILES" using these vi's?

If yes how.. ( I am looking at selecting the existing files and sending it to the destination Path. And to make it a little complex, the target is a H/W running linux)

Link to comment

Thanks MArk,

I could not reply since we had a long week end out here.

I actaullay saw these VI's before posting the thread. But i would like to know is it possible to send set of "FILES" using these vi's?

If yes how.. ( I am looking at selecting the existing files and sending it to the destination Path. And to make it a little complex, the target is a H/W running linux)

The llb that is attached does support the XMODEM send. You should be able to use those VI's to transfer your files. You may have to modify the send VI's to support the XMODEM-1K transfer if you are going to use it. The CRC VI's will work fine for calculating your CRC's. However you will need to read your file and send it is chunks according to the XMODEM protocol. You can find more information about it here and here.

Link to comment
  • 2 years later...

You can check out the code here. I have also attached some code to calculate the XMODEM CRCs as well as the normal CRC-16.I have also attached the XMODEM-VISA.llb that I used. I am pretty sure this is the same llb referred to in the link I posted but if I recall I added the support for 1K transfers.

Thanks alot Mr.Mark.

I was searching for the same.It helped me at the right time.

Link to comment
  • 2 years later...

Currently I send serially a collection of hex files that have been dubbed a “FW†file via HyperTerminal in Xmodem format to an embedded device. I would like to do this in LabVIEW. I am not familiar with where I should start.

 

I have used the Calculate XMODEM CRC-16 (File input).vi with my FW file.  The Calculate XMODEM CRC-16 (File input).vi appears to handle the FW file accurately. It calculates the length accurately. I don’t know where to start in order to send the file serially to the embedded device in a Xmodem format.

Link to comment

I don’t know where to start in order to send the file serially to the embedded device in a Xmodem format.

I'd start by maybe putting a man in the middle, and do your process as you normally have using HyperTerminal, but look at the trace of data going in and out.  Then you can probably start there then read up on the particular protocol to help understand it more.

Link to comment

Sniff the serial traffic. Either with another PC on the serial bus as a listener, or there is software that will listen to the traffic on a physical serial port and log.  Then you can review the data later.  Actually if you have this in HyperTerminal can't you just log the traffic there?  Maybe copy and paste the communications after a download is complete?

 

EDIT:  Man-In-The-Middle, but maybe I should have said to Eavesdrop.

Link to comment
  • 2 weeks later...

I have sniffed the communication using UART to USB interfaces with Hyper-terminal.

I sniffed the file going out and the communication being sent back. I saved these in files.

 

When I started the transfer the receiving end transmission sent out a two uppercase "C"s and then 1451 Acknowledgements (Looking a file through Notepad++)

The last portion in the receiving file is a CAN (again viewed through Notepad++)

 

Where do I start with the x-modem vi libraries?  Do I Initiate receiving first or send or something else?

Link to comment
  • 2 weeks later...

I didn't realize that all I needed was to send a "xmodem" serial string. Add a few second wait and then  use "VISA SEND VI" with my firmware file. 

 

 KISS

 

"Keep It Simple Stupid"

 

 

Thanks everyone :thumbup1::beer_mug::thumbup1:

Edited by jew666
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.