Serial file transfer protocol / checksums


 
Thread Tools Search this Thread
Top Forums Programming Serial file transfer protocol / checksums
# 8  
Old 03-28-2013
Do not paste binary data in the forums, upload an attachment instead.
# 9  
Old 03-28-2013
You can run strace on linux to see all the calls it makes to the kernel, and possibly to other libraries. On Solaris and AIX, strace is called truss, and on HPUX, tusc (available open source). The Solaris version can capture all lib calls using option: -u'*'

You can get the code reverse assembler analyzed, but it might not be very friendly unless you are an x86/64 assembly guru.

I work in C/C++/JAVA a lot, where every byte is pretty well under my thumb. Other compilers and languages sometimes do you unwelcome favors. Even in JAVA, System.out.flush() doesn't. PERL is nice, too, sort of a script/C/C++ cross, but not my forte. Others give me pause!

Weird that some printouts there seem like printf format strings! Maybe the 'fixed checksums' are punctuation words, like with mime multipart separator strings.

They might just have a final checksum that checks it all. Be careful. The answer is always somewhere inside or outside the box, so when you get stuck, stop trusting your assumptions and competence! Good placement of monitoring is critical, as you can see! Are the NULs real characters or the line marking? Something like '[CAN]r' might be a short integer, maybe unsigned. I assume NU is a mangled NUL.
# 10  
Old 03-28-2013
I tried analysing a microcontroller assembler level program before, i've done it because i already programmed the same target in assembler before, so i understand what you mean that it could be not friendly if you are not familiar with the language, i will give a try with strace if i found clear calls to chks calculating libraries maybe i continue, else i will have to emulate the communication.

Quote:
a final checksum that checks it all
no, it still a direct calc of number of bytes :
Quote:
the last is 0x00 0x01 0xFD 0x22 = 130338 which is the real number of bytes contained in the file
The Nuls are end of line markers in the habitual meaning or in strings handling but here its not, its just a 0x00 byte and the binary file is full of em, same in the start of a line. and the NU is a mangled NUL.
But for the "CAN r NUL EOT", this is the 4 bytes repetitive command part of the headers, i dont think if it have different type from other 8bits data as its transfered by the link, so if it is in different type then it should have special treatement of testing the first 8 bits and then concat second ones if for exemple its in 16bits format. those are not outputs, but communication frames.
But the whole line must have a meaning, maybe as you noticed about the languages equivalent in low level.

---------- Post updated at 06:31 PM ---------- Previous update was at 06:27 PM ----------

Oh didnt noticed this rule Corona, i will pay attention next time. thx
# 11  
Old 03-28-2013
Quote:
Originally Posted by nidal
I tried analysing a microcontroller assembler level program before, i've done it because i already programmed the same target in assembler before, so i understand what you mean that it could be not friendly if you are not familiar with the language, i will give a try with strace if i found clear calls to chks calculating libraries maybe i continue, else i will have to emulate the communication.
strace does not show function calls, it shows system calls. It can tell you exactly how the port is being configured and what data is read and written in what order when.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

file transfer using AWK over serial port

I have a unix system that only has AWK to program with which hooks up to a windows or linux based system with all progamming and software capabilities. The link between the systems is typically a 9600 baud TTY port on the AWK system and COM1 on the other system. I can cat <filenm> from the unix... (4 Replies)
Discussion started by: bobfrog
4 Replies

2. Solaris

Transfer files from windows to solaris with winscp (file protocol:SFTP)

Hello, I have a couple of zip files to be copied from my local drive to a folder in solaris10 residing in a VM ware. i am using WINSCP, I tried to get hold of the solaris hostname or ip using ifconfig -a , hostname|nslookup etc. when i create a new session in WINSCP using that IP and port... (6 Replies)
Discussion started by: herbich1985
6 Replies

3. SCO

Need some advice concerning file transfer with a serial connection

Hi, I have a SCO Unix ver 5.0.7 from which I need to get some files. The problem is that I'm working remotely (have no physical access) and using Dejawin because this server is only has a serial connection to a Windows machine. Ucopy isn't on the server. What I was thinking is to do a print... (5 Replies)
Discussion started by: spartanboy184
5 Replies

4. UNIX for Dummies Questions & Answers

How do i transfer file using ftp protocol in Linux.

Hi , I want to transfer file using ftp protocol . I m using following linux distribution. LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch Distributor ID: OracleVMserver Description: Oracle VM server release 2.2.0 Release: 2.2.0 Codename: ... (5 Replies)
Discussion started by: pinga123
5 Replies

5. HP-UX

SFTP Protocol: How to transfer the file in PC Format

Hi, We are facing issue with files transfered using SFTP in Hp-UX. The transfered files are in Unix Format. That is, file format as UNIX (LF) instead of a PC format (CR & LF). How can we achieve file transfers as PC format using SFTP? Your help and input will be highly appreciated. ... (2 Replies)
Discussion started by: brap45
2 Replies

6. Shell Programming and Scripting

Secure File Transfer Protocol

Hi, Is there any protocol other than SFTP to transfer the file using secured connection SSH. ? Regards, Arthik (2 Replies)
Discussion started by: arthikbabu
2 Replies

7. Programming

how i can transfer and receive file in any format over serial port

helo i m using fedora core 6 o.s. i want to develop application using c,c++ which transfer file in any format(like pdf,txt,doc etc) over the serial port and i want to receive the same file from the serial port please guide me. amit (4 Replies)
Discussion started by: amitpansuria
4 Replies

8. SCO

Serial File Transfer

I need to transfer files from a sco/unix system to a windows xp system and they are only connected via a digiboard serial connection. The terminal emulation software connects and runs a program but I need to transfer files. Anyone know a good solution? (2 Replies)
Discussion started by: chansen
2 Replies

9. Programming

File transfer using Zmodem protocol

can anybody guide me how do i initiate file transfer over modem using zmodem protocol... (0 Replies)
Discussion started by: borntorock
0 Replies
Login or Register to Ask a Question