9 years, 4 months ago.

How to make two Mbed communication by ethernet

Hello, I'm new in Mbed, now I'm using two LPC1768 and two Mbed application. I want to know what could I do to make this two mbed communicate by using crossover. I have find the code in https://developer.mbed.org/handbook/Socket but I don't know how to change the code. And I have one more question: /media/uploads/xixi/qq--20150722052347.jpg What does the IP means in this code, does every mbed has it's own IP adress?

Thanks~~

1 Answer

9 years, 4 months ago.

Hi,

if you only use a crossover-ethernet cable you cannot use the source code shown above. This code is assuming that you have a DHCP server which delivers a IP-address to the mBed. The EthernetInterface also supports a fixed IP-address. As example: So use IP-address 192.168.0.1 on mBed 1 and IP-address 192.168.0.2 on mBed 2 to be able to communicate with each other.

You should read some documentation to choose what to communicate. I believe there are some examples on the mBed site as well.

Good Luck.

Accepted Answer

I forgot to mention:

start with UDP communication first. That is easier to start with...

posted by Erik Houet 22 Jul 2015