Network Component  Version 7.11.0
MDK Middleware for IPv4 and IPv6 Networking
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
BSD Client/Server

BSD sockets are often used for network communication as they are providing a well-defined API for exchanging data over the network. In general, they are relying on TC and UDP socket communication. The BSD server and client examples are used to demonstrate BSD compliant communication. To make it work, you need to setup two development boards within the same network: a BSD server and a BSD client. An exemplary setup could look like this:

bsd_example_setup.png

Build the "BSD" Projects

Open the two example projects in MDK (the web page explains how to do this). The ┬ÁVision Project window should display a similar project structure:

bsd_proj_structure.png
Structure of the BSD Projects

Source Files

  • BSD_Client.c contains the main C function that initializes the board hardware and the Network Component for the BSD client. It also contains the actual code that is used to communicate with the BSD server.
  • BSD_Server.c contains the main C function that initializes the board hardware and the Network Component for the BSD server. The server is waiting for a connection from a BSD client.

You may now build and download the example projects to the evaluation boards using the ┬ÁVision commands:

  • Project –> Build target
  • Flash –> Download

After these steps, the projects should start executing on your evaluation kit. In case of errors, refer to the Evaluation Board User's Guide for configuration information.

Using the "BSD" Projects

Hardware Setup

The setup of the Evaluation Board hardware is described in the Abstract.txt file.

  • Verify all jumper settings on the target hardware.
  • Use an Ethernet cable to connect your development board to the local area network. The PC is assumed to be already a member of this LAN.

PC Software

To test the BSD Server example stand-alone, run the Windows application 'LEDSwitch.exe' from C:\Keil\ARM\Utilities\LEDSwitch\Release and type in the IP address of your development board (IPv4 and IPv6 addresses are accepted). When connected, you can control the on-board LEDs.

ledswitch.png
LED Switch Application