You are viewing an older revision! See the latest version

Networking

Introduction

The mbed microcontroller is quite capable of connecting to the internet, and functioning as client or server for a variety of protocols. To achieve this, the LwIP TCP/IP stack has been ported to mbed.

The other thing you will of course need is appropriate hardware to establish a connection to the internet. This could potentially be via a radio and using 802.11 wifi or 3G modem, but by far the easiest and best place to start is to use the onboard Ethernet.

Getting started

Step one, physical connection

On the Ethernet-RJ45 page you will find wiring diagrams for popular RJ45 sockets.

Step two, set up the stack

On the Ethernet Interface page you will find everything you need to set an IP address, and bring up the stack.

Legacy Networking

The following paragraphs are referring to legacy libraries written by mbed users before the introduction of an official IP networking library.

Next steps

Afterwards, you should hopefully have TCP/IP up and running over Ethernet. Have a look at Working with the networking stack to find out more, and to create your first example program.

Physical interfaces

  • Ethernet
  • /handbook/Ethernet documents the underlying raw Ethernet API
  • There are some early versions of programs/libraries for using wireless TCP/IP communications, which can be found here.

Network clients, servers, and examples

Alternative versions of the LwIP stack

The programs linked to in the networking documentation generally refer to the original port of the LwIP stack, by Donatien Garnier.

There is a fork of this port called NetServices by Segundo Equipo. The differences and improvements over the original port can be found on the NetServices page.

License

By using the stack, you are agreeing to the terms of the LWIP license.


All wikipages