OC-G-5646-2-ET OLED Lighting Controllers - User Manual
8.2.2
Fixed IP address
When using a fixed IP addr ess, you m ust ensur e that you use an IP
addr ess that is not being used by any other device on the networ k. It
is usual to keep the fir st thr ee num ber s of the IP addr ess the sam e as
other devices and to change only the last num ber . For exam ple, if you
have a networ k consisting of a PC (IP addr ess 192.168.1.35) and two
OC-G-5646-2-ET could be allocated addr esses 192.168.1.201 and
192.168.1.202.
8.3
Automatic sensing
All the featur es below ar e im plem ented in sam ple C++ sour ce code
available for download fr om www.gar dasoft.com .
The OC-G-5646-2-ET sends a m essage on thr ee events:
i.
On power up
ii.
When an IP addr ess is r eceived or r enewed by DHCP
iii.
When an enquir y m essage is r eceived.
On the fir st two events, the m essage is br oadcast. On the thir d it is a
r eply to a single IP addr ess.
An enquir y m essage is a UDP packet fr om sour ce por t 30310,
destination por t 30311 with the m essage body ‘Gar dasoft Sear ch’ (8-bit
ASCII, 13 char acter s).
The m essage output by the OC-G-5646-2-ET is a UDP packet fr om
sour ce por t 30311, destination por t 30310. It is for m atted as:
Gar dasoft,OC-G-5646-2-ET,000000,111111111111,22222222
(8-bit ASCII, 44 char acter s) wher e,
000000
The serial number of the unit
111111111111
The MAC address in 6 HEX bytes
22222222
The IP address in 4 HEX bytes
For exam ple; for OC-G-5646-2-ET, ser ial num ber 12345, IP addr ess
192.168.1.103, M AC addr ess 00.0B.75.01.80.99 the packet is for m atted:
Gar dasoft,OC-G-5646-2-ET,012345,000B75018099,C0A80167
—
25
—