Skip to main content

GET_IP

Syntax​

GET_IP

Description​

Returns the IP address of the board and how it was obtained. At boot the board asks a DHCP server for an address; if none answers within 10 seconds it uses its fixed fallback address.

Response​

IP <a.b.c.d> src=<source>
srcMeaning
dhcpAddress assigned by a DHCP server.
fallbackNo DHCP answer: the board uses its fixed fallback address.
staticFixed address configured on the board.
noneNo address yet.

Example​

get_ip.py
from hmcls_udp import Board

board = Board("192.168.1.11")
print(board.query("GET_IP")[0]) # IP 192.168.1.11 src=fallback