Click here to Skip to main content
15,914,322 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hey I am locking for some source are suggestions . To transfer files to Embedded System Device. I have tried with lot of articles. i have found some Application to Transfer files from Windows PC to Embedded System Device with help of Kermit Dll. Now am looking for Such Source.

Can any one Help me to come out of this. I would be so thankful to you.

Device Details:
Processor: ARM9 32-bit Core CPU
OS:LINUX Operating System (Ver 2.6)
peripheral port RS-232.
Posted
Updated 9-Apr-14 4:01am
v3
Comments
[no name] 9-Apr-14 7:42am    
You say you "have tried with lot of articles" but you do not say anything about any kind of a problem.
[no name] 9-Apr-14 9:56am    
For what? For serial communications? Must be tons of examples out there everywhere for you to look at. "non of them were helpful" does not tell us anything about your problem.
Dave Kreskowiak 9-Apr-14 8:38am    
So what method/server type does the device provide to transfer files to it? It sounds like you're doing a lot of guessing and work without knowing anything about what the device expects.
Harinath_Varala 9-Apr-14 10:02am    
its a Processor: ARM9 32-bit Core CPU and OS:LINUX Operating System (Ver 2.6) and Regarding Ports am trying to Use peripheral port RS-232. if any thing am missing just let me know. so that it can help me to transfer a text file to that particular Device.
Dave Kreskowiak 9-Apr-14 11:47am    
Ok, that's the device hardware. What server on the device is listening to the serial port and what protocol does it speak? If you jUst start sending bytes how is the server going to know what to do with it?

Maybe the MSDN docu is a start: http://msdn.microsoft.com/de-de/library/system.io.ports.serialport(v=vs.110).aspx[^]

If you get the example working for your device(s), chances are high you manage to transfer a file too...
 
Share this answer
 
You did not clarify what your embedded device is. But you can find the Kermit source files here: www.kermitproject.org[^]

I do not however, have the time to step you through how to implement Kermit. If you are looking for a complete solution you need to spend time and read the webistes information. When you learn how to use the libraies you wil have gained some valuable experience and added new tools to your skillset.

Good luck.
 
Share this answer
 
this is what helped at end

C#
public delegate uint KERMITPROC(HANDLE WPARAM, HANDLE LPARAM);

[DllImport("kermitlib.dll", EntryPoint = "SendFile", SetLastError = true)]
private static extern int SendFile(string strFileName, HANDLE hDevice, KERMITPROC KermitProc);

public static uint KermitProc(HANDLE wp, HANDLE lp)
{
    string buff = "";
    double per = 0;
    switch (wp.ToString())
    {
        case "S": // Send Initiation
            myprintf(0, 1, "Sending S Packet ...");
            break;
        case "F": // File Header packet
            myprintf(0, 1, "Sending F Packet ...");
            break;
        case "A": // File Atrribute packet
            myprintf(0, 1, "Sending A Packet ...");
            break;
        case "D": // Data Packet
            per = (double)((Convert.ToInt16(lp) * 100) / filelength);
            buff = string.Format("File sending - {0:f0}{1}", per, Convert.ToChar(37));
            myprintf(0, 3, buff);
            break;
        case "Z": // End of the File
            break;
        case "B": // Break the Transmission
            break;
        case "N": // Nak Packet
            myprintf(0, 1, "Sending nak");
            break;
        case "E": // Error Packet
            buff = string.Format("Error : {0}", lp.ToString());
            myprintf(0, 1, buff);
            break;
        case "Q": // Quit
            //SetEvent(hEvent);
            myprintf(0, 1, "File Not Sent");
            break;
        case "C": // File Send or Receive Complete
            filestatus = 1;
            //SetEvent(hEvent);
            myprintf(0, 1, "File sent");
            break;
        case "R": // Retries
            buff = string.Format("Resending packet {0:D} times of retries", lp);
            myprintf(0, 1, buff);
            break;
    }
    return 0;
}
 
Share this answer
 
Comments
govindrulz 6-Aug-15 10:39am    
but how did u use "HANDEL" in c# , ive been working on this for a week nw , your code does not return any errors but the file does not get transfered , i used intptr instead of handel

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900