Hello ppl,
I'm working on a windows program simulating an existing Unix program,
the program is a firmware downloader, it sends a binary firmware file through the serial port (rs232) to a Set-Top Box running under unix system too, as i'm a poor unix user and not a unix programmer i choosed the hardware way to see how the program sends the file, and i found the next :
(i analysed the communication in hexadecimal form - low level and i will write lines that i didn't understood as hexadecimal, and commas are not part of data)
1- the Unix PC sends a sort of password and awaits a specefic answer from the STB:
0x18,0x67,0x00,0x16,$,"the file name",$,00,86,9A,0C
2-the sending process starts :
a-the PC sends this line : 0x18,0x61,0x00,0x04,0x00,0x01,0xFD,0x22
b-this part is recursive and is the essential protocol's way to send the file:
I-The PC send this line of 12 bytes: 0x17,0xC0,0x1D,0xC3,0x18,0x64,0x04,0x04,0x00,0x00,0x00,0x00
where (what i understood): the first 4 bytes are some checksum, the second are a command (because they are repetitively tge same) and the third 4-bytes refer to the actual position of the file you will see by the next how it incriments.
II-The STB answers with line of 12 bytes : 0x18,0x72,0x00,0x04,0x00,0x00,0x00,0x00,0x45,0x30,0x44,0xB2
same thing, the first 4-bytes is a command (maybe) the second 4 are the loaded size (you will see the incrimentation) and the 3rd is a checksum,
III- The PC sends a block of 1024 bytes of the file
So i think that those 3 steps are : I- the pc send current position of file, II- the card responds with currently loaded size or asks for data and III- the PC sends a block of 1 kbyte data from the file
IV- The PC sends again a line of actual position 0x7F,0xEE,0xB7,0x24,0x18,0x64,0x04,0x04,0x00,0x00,0x04,0x00
V- the STB responds with 0x18, 0x72 ,0x00 ,0x04 ,0x00 ,0x00 ,0x04 ,0x00 ,0x21 ,0x5C ,0x81 ,0xB6
VI- The PC sends the second 1 kb of data
and so on till the file transmission is finished,
why i think that its a checksum? : because i tried the process with 2 different firmwares, if i repeat the operation for the same firmware many times, i find the same commands/headers/checksums in the communication,
and if i change to other firmware i find different checksums, only the incremented blocks are the same.
samples of PC commands (step I- or IV-)
samples of STB commands: PROBLEM :
I tried sending the file with a windows application that i'm developing as the original application do, i failed: Login is ok, sending the first kbyte with loaded size response from the STB ok, second kbyte : i dont get the right answer which is "t2" array, i get continuously the "t1" array so sending failed,
I also tried to letterally send the packets sent by the unix application as they are, that i got by spying hardware, and i failed too, i tried also to insert some time breaks between sending a 1 kb bloc and receiving the answer, also not sending the second bloc unless i get the answer of first one received...
I tried many possibilities but i failed,
So what i ask you to, if some one knows this protocole tell me maybe there is such a protocol used to communicate between devices using rs232 in unix so i understand how it works
As you can see, i'm analysing this program in low level, i don't know if there is a way to analyse it in high level or if already those headers/commands seems to be familiar to you please let me know
Any information could do too much for me, thanks.
Last edited by jim mcnamara; 03-30-2013 at 09:51 AM..
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)
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)
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)
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)
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)
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)
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)