diff --git a/README.md b/README.md index 7e2587f..256dcd2 100644 --- a/README.md +++ b/README.md @@ -7,17 +7,16 @@ Command line python script to discover Ubiquiti devices on the local LAN segment This code may therefore not be compatible with all devices. I have not tested this on Unifi APs or EdgeOS products.* -Ubiquiti discovery works by sending an UDP packet to the local broadcast address (255.255.255.255) on port 10001, -containing 4 bytes in the payload, namely "01 00 00 00", and waiting for UDP replies destined to the local +Ubiquiti discovery works by sending an UDP packet to the local broadcast address (255.255.255.255) on port **10001**, +containing 4 bytes in the payload, namely `01 00 00 00`, and waiting for UDP replies destined to the local broadcast address. The payload of the reply packet sent by the radio is structured as follows: -- offset `0x00` (3 bytes) : *Ubiquiti discovery reply signature ("0x01 0x00 0x00")* - We'll check this to make sure it's a valid discovery-reply packet. -- offset `0x03` (1 byte) : *Payload size (excluding signature)* +- offset `00` (3 bytes) : *Ubiquiti discovery reply signature (*`0x01 0x00 0x00`*). We'll check this to make sure it's a valid discovery-reply packet.* +- offset `03` (1 byte) : *Payload size (excluding signature)* -Starting at offset 0x04, the structure of the payload is as follows: -- `Field Type` (1 byte) : *see the UBNT_ constants in the code for the ones I saw and could figure out* +Starting at offset `04`, the structure of the payload is as follows: +- `Field Type` (1 byte) : *see the UBNT_ constants in the code for the ones I saw and could figure out* - `Field data length` (2 bytes) : *contains the length of this field's data* - `Field data` (*n* bytes) : *contains the actual field data (eg. radio name, firmware version, etc)*