I had cause to reverse-engineer the mechanism by which Zebra printers are discoverable, and am documenting the information, such as it is, here.
Discovery client sends a UDP packet to port 4201 (unicast or broadcast),
containing the data: 0x2e2c3a010000
, or .,:\x01\x00\x00
.
Actually, the discovery client sends 3 identical such packets (from the same socket), then waits 1 second, then repeats the process from a new source port. It sends 3 packets 3 times, for a total of 9 packets. This appears to be meant to handle UDP’s lack of reliability; the printers reply to each packet (for a total of 9 replies from each printer).
The printers reply back with a (now unicast) packet beginning with 0x3a2c2e
or :,.
.
This is followed by a 0x03 byte, I’m not sure if this is part of the magic bytes or part of the data,
and then the data begins with the “Product Number”.
This set of information is displayed verbatim in the ZebraNet Bridge tool:
0000 3a 2c 2e 03 37 39 30 37 31 00 00 00 5a 65 62 72 :,..79071...Zebr
^-Cmd?----^ ^-Product #--^-------?^ ^-Name-----
0010 61 4e 65 74 20 57 69 72 65 64 20 50 53 00 00 00 aNet Wired PS...
-------------------------------------^------?^
0020 31 31 36 36 41 00 00 56 35 36 2e 31 37 2e 31 31 1166A..V56.17.11
^-Datecode---^----?^ ^-FW Version--------------
0030 5a 5a 42 52 00 61 00 07 4d 41 08 bd 34 32 36 32 ZZBR.a..MA..4262
-^ ^-S/N------
0040 30 37 37 00 00 00 01 00 0a 01 00 9e ff ff ff 00 077.............
-------^-------?^ ^-IP------^ ^-Netmask-^
01 00: "Using Net Protocol: TRUE"?
0050 0a 01 00 01 5a 42 52 34 32 36 32 30 37 37 00 00 ....ZBR4262077..
^-Gateway-^ ^-System Name (hostname?)---^---?
Unfortunately, I have no idea what the remainder of the message is:
0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00d0 00 00 00 00 7a 00 6d 14 7a 16 11 1c 2b 3a 35 30 ....z.m.z...+:50
00e0 3f 4e 59 54 53 52 5d 68 67 66 61 6c 7b 8a 85 80 ?NYTSR]hgfal{...
00f0 8f 9e a9 a4 ee 18 e1 14 ee 0e 8d 0c 8f 0a 91 08 ................
0100 93 06 95 04 97 02 99 00 9b 3e dd 7c 1f ba 21 b8 .........>.|..!.
0110 23 b6 25 b4 4e 6f 6e 65 00 0e 8d 0c 8f 0a 91 08 #.%.None........
0120 93 06 95 04 97 02 99 00 9b 3e dd 7c 1f ba 21 b8 .........>.|..!.
0130 23 b6 25 b4 00 00 00 00 00 00 00 00 00 00 00 00 #.%.............
0140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0160 00 00 00 00 01 01 01 00 00 00 00 00 00 00 00 00 ................
0170 00 00 00 00 00 00 00 .......