With the help of Serial to Ethernet Connector, it’s possible to establish UDP connections and broadcast data over the network.
How it works
Let’s imagine you have a computer with the IP address 192.168.85.x.
To send a broadcast request you need to know your subnet mask. Let’s say, your subnet mask is 255,255,255,0. So, 192.168.85.255 is the broadcast address for your subnet.
In Serial to Ethernet Connector, you can create a UDP connection where you will specify the broadcast address “192.168.85.255” and select a free UDP port, for example, port “5000”.
Once the UDP connection is established, the data sent to port 5000 will be received by all of the devices which are 1) connected to the same subnet (192.168.85.x with the subnet mask 255.255.255.0) 2) set up to listen to the specified network port 5000 3) do not have any Firewall or other security settings that can block receiving UDP packets transferred through the specified port 5000.
Creating a UDP connection on the broadcasting computer
To create a UDP connection using Serial to Ethernet Connector, do as follows:
- Start the application and select Connection → New UDP connection from the main menu or UDP connection in the Home window:
- In the connection settings, specify the name of your connection and the serial port that will be used for data transfer. In the remote host settings, enter the broadcast address as a hostname and the UDP port you’d like to use for the broadcast.
- Click Create for the connection to be established.
- Once created, the connection will be displayed in the connection list at the left. By clicking the connection name, you can open and view the connection info and data transfer statistics.
Now that the UDP connection is created on the broadcasting computer, you can create UDP connections on other computers connected to the same subnet. Those connections will be used to listen to the specified TCP port and receive broadcasted data.
Creating a UDP connection on a recipient computer
- Start Serial to Ethernet Connector and select Connection → New UDP connection from the main menu or UDP connection in the Home window:
- In the network settings, specify the broadcast address and the UDP port you entered when creating the UDP connection on the broadcasting computer.
- Click Create.
Once the connection is created, you can open its info anytime by clicking the connection name in the connection list at the left of the app’s interface. You can manage the connection using the Pause, Edit, or Delete buttons. You can also view data transfer statistics.
Sending a UDP broadcast
To check how the broadcasting works you can use any third-party software, for example, Advanced Serial Port Terminal by Eltima Software.
You can send the “Hello” message from the broadcasting computer and it will be received on all devices connected to the same subnet that are configured to accept UDP packets.
Sending the “Hello” message as a broadcast:
Receiving the “Hello” message on a PC connected to LAN: