UDP Send-Receive Demo

<< Click to Display Table of Contents >>

Navigation:  STM32F4 Target > Demos > Hardware Modules Demos > aMG EthernetINF >

UDP Send-Receive Demo

Previous pageReturn to chapter overviewNext page

Demo File: target_udp_demo.mdl

udp_demo_target_model

 

udp_demo_target_model2

Hardware setup

1. Hardware setup

2. Ethernet Link Setup, the interface between Ethernet transceiver. Select profile pins corresponding to the board using, or specify by using pins (Manual).

IP address and Port setup

1. Target

- IP address of target is configured in Ethernet Application Block. In this demo, IP address of Target board is 192.168.1.31.

- UDP Receive configure only port number to accept (IP of block is same as IP of Target board). In this demo using port 7.

- UDP Send, must specify both IP address and Port of Host PC. For this demo use IP address from "Remote IP" received by UDP Receive block.

2. Host PC

- IP address is assigned by network connecting, use ipconfig software to get the IP address of Host PC. In this demo, IP address of Host PC is 192.168.1.33.

- UDP Receive configure only port number. In this demo using port 7.

- UDP Send must specify IP address and port of destination (Target board) to send data to.

Testing

Demo File: host_udp_demo.mdl

udp_demo_host_model

 

1. Target board must running first, it is wait for receiving data, then response the counter value back to Host PC.

2. Start simulation, this simulation model running on Host PC.

3. Please make sure the Firewall is not block UDP connection. Instruction: Allow a program to communicate through Windows Firewall.