Which are the minimum operations to do for transfer simple data from board to pc with ethernet in K64F

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Which are the minimum operations to do for transfer simple data from board to pc with ethernet in K64F

1,099 Views
alessiopaolucci
Contributor III

Hi, I need to do a simple library to make data transfer with ethernet in K64F. I can't use MQX or PE or mbed or other. I'm lost in the more of 100 pages of ref manual dedicated at ethernet. Wich are the minimum action that I have to do for transfer data with ethernet in a point to point communication?

I hope that someone can give me information or examples.

Best regards!

Alessio

Tags (3)
0 Kudos
Reply
4 Replies

918 Views
ndavies
Contributor V

I agree with Rick, What you're asking for isn't easy.

If you're looking at the "Ethernet spec" you're just looking at part of the problem. It only covers the electrical signaling part of the problem. If You're expecting this to work on an intranet or the internet, You will also have to look at the UDP and TCPIP specs. The internet protocols are a collection of components in a stack, The Ethernet part comprises just the lowest layers.

You also need to be more specific in your request. You need to describe your application in a little more detail.

Is your connection from the board to the PC dedicated or does it have to share the link with other devices by going though a switch? Ethernet is the electrical signaling layer. Do you just want  electrical signaling to happen? Do you need UDP or TCPIP. This allows the data to cross a company's intranet or the internet. If you need intranet/internet access, How are you going to assign an Internet address to it? Are you going to allow DHCP or assign the addresses by hand? You'll also need to support other protocols like arp.

The answers to those questions will drive the complexity of your stack.

The LWIP TCPIP stack is included in PE and MQX. lwIP Wiki

You can port LWIP to a bareboard system. LWIP provides the upper layer protocols to talk on the internet. You will need to provide LWIP with the services normally provided by an RTOS to make this work. You will need timer support, memory allocation and task scheduling at a minimum. You will need to add software layers to set up the Ethernet MAC and PHY. Examples can be found in MQX and PE on how to do this.

Norm

918 Views
alessiopaolucci
Contributor III

I Norm, for the moment the only things that I have to do is transfer data from a board to PC with the 100Mbps of Ethernet protocol (this because I need to transfer data in a very little time and so the normal serial communication can't used to do this), but I didn't have experience with ethernet communication implementation so I need to understand if I can do this without implementing all the stack.

Best Regards!

Alessio

0 Kudos
Reply

918 Views
rickstuart
Contributor V

Maybe.  But the way I see it, to do a limited stack implementation (first couple of layers), you need to understand a lot of what is going on.  That will take time.

Also, you need to consider what you are connected to.  Windows cost me days of trouble shooting.  I turned all the Windows protocols off and Windows still pushed out all types  of packets probing the embedded device.  This resulted in Windows faulting the network and stopping any application, even wireshark/ethereal, from attaching.

My guess, if you are using Windows as the host computer and you implement a stack that can not handle these hidden Windows attempt at probing the network, Windows will not allow connecting to the network.

FYI, I also noticed that Windows does not actually ping when you type ping into the Windows command line.  And does not give any indication that it is doing this.  Really aggravating.

I switched to Linux and had much better success.

My other suggestion is to do some research on the throughput of different types of USB and Ethernet.  And contact your Freescale FSE as to the throughput on different ports of this particular processor.  Sometimes the USB throughput is better than the Ethernet throughput (note: Not talking speed but the throughput of just your data).  And while USB protocol is still complex - it is usually easier to implement.

0 Kudos
Reply

918 Views
rickstuart
Contributor V

Maybe there's an answer to what you need.   But to me this is like asking how to build a car over the phone.  It would be much easier to tell you how to buy a car.  But the problem with that is that I don't know if anyone has made such a car.  That is, an FTP/Ethernet Utility that runs on a K64F w/o using the RTCS stack already found in the MQX code. I imagine if someone actually did do this (TCP stack and FTP from scratch) the cost would be prohibitive (weeks if not months of a programmers time).

If you don't want to use the Ethernet stack built into complex software/programs like MQX or Linux, maybe you could off load the Ethernet communications to an off the shelf solution similar to the commonly available "shields" for very low power processors (i.e. Arduino Ethernet shields).

If you are just interested in transferring data, consider other alternatives.  Does the K64F processor have a USB port?  Are there examples of USB Mass Storage Devices for the K64F.  You might make the K64F appear as a Thumb Drive to the PC and make your data available as files in the Thumb Drive's file space.