
SESSIONLESS NETWORKS 223
Who’s Out There? Broadcast Messages
The first advantage to sessionless protocols like UDP and 802.15.4 is that they allow for
broadcasting messages to everyone on the network at once. Although you don’t want
to do this all the time, because you’d flood the network with messages that not every
device needs, it’s a handy ability to have when you want to find out who else is on your
network. You simply send out a broadcast message asking “Who’s there?” and wait
for replies. You could write your own methods for doing this, but most of the time you
won’t have to. Broadcast querying is such a useful technique that most manufactur-
ers of network devices include it as part of their products’ functionality. Lantronix uses
a specific UDP message to query a subnet for any of their devices. Similarly, the XBee
devices from Maxstream have a special broadcast query command.
Querying for Lantronix Devices
Using UDP
All the Lantronix devices are preprogrammed to respond
via UDP if they receive a particular UDP message. Knowing
this, you can find out the IP address of any Lantronix
device on your subnet by sending this message. They
reserve a special port for status queries: port 30718.
When you send UDP messages to that port, you get back
a status report from the device. This is handy if you’ve got
a few Lantronix devices on the network and need to know
their addresses. ...