Networking for idiots

10 Sep 2010

Greetings All!

Forgive my lack of knowledge concerning networking.

If I wanted to get two or three MBed microcontrolelrs to talk to each other directly (through an Ethernet cable or cables), what would be the simplest "protocol" to do this?  I am talking about just passing simple data (let's say, 8 bits at a time) between each of the MBeds - no interaction with a PC computer or the internet.


Thanks for any suggestions you can give!

Richard Tarbell

10 Sep 2010

Can you give more details about the task you want to accomplish? I wonder why you need several mbeds, it's quite possible one could be enough with some work. Also, do you have to use Ethernet? Connecting two devices can be done much simpler using serial.

10 Sep 2010

The easiest thing is serial, but if they are going to be far away from each other you could have problems with voltage drops in the lines...

plus mbed have 3 serial ports, so you can do connect the three of them together... just one thing, in the case you haven't use serial

ports before.... tx-> transmiter line; rx-> receiver.... you have to crosslink the lines, so  ... lets say tx1 goes to rx2; and rx1 to tx2....

so the idea is like this, just check tx and rx, you dont need the others

signals in the picture.  lol, I lost so much time figuring it out the first time I did it :S

Cheers! good luck!

10 Sep 2010

Thanks for your replies!  My intention is mostly to learn about Ethernet, and eventually, TCP/IP and HTTP transactions.  For now, I don't intend on having any internet connectivity.

I was hoping to come up with a "simple" network that can support many nodes (microcontrollers), so additional ndoes could be added in the future:

1) Any node should be able to communicate directly with any other node (I.E. no master/slave designations)

2) If one node sends data to another node, but somehow it gets corrputed by a collision or bad data, the sending node should resend the data (hopefully automatically)

3) Network speed is not of great concern - simplicity is!

--> I understand that if three or more nodes are used, then a switch would be needed to interface all of them



10 Sep 2010

Richard, if your goal is learning about ethernet then you should probably just use the ethernet port on the mbed.  You can get a connector by using one of the breakout boards that people have designed, or you can just wire one up on the breadboard.  I wired one up with no regard for the ferrite filtering elements and it worked, but it's probably better to use a socket with the filters built in.

If your goal is to get data around and serve a useful purpose then I'd say look at some of the RF options out there.  Sparkfun as a good introduction to them:


11 Sep 2010

Richard, if you intend to stick with Ethernet, it sounds like you have two options:

  • Plug some mbeds, in full duplex mode, into an Ethernet switch
  • Create an (old school) Ethernet bus. This will be susceptible to collisions, but the hardware should deal with this
And it sounds like you simply want to send raw Ethernet packets about the network. All this requires, in terms of software, is the basic mbed Ethernet class and a rough idea of what an Ethernet frame looks like.
06 Jun 2012

hey guys, do you know how I could connect to the NTP server by connecting the ethernet cable to the computer instead of connecting it to the modem?