Wifi SuperLocal User Modes
Introduction
WiFi SuperLocal User Modes are best suited for industrial usage throughout known routes. The device can remember up to 128 MAC addresses with associated pointers (this is MAC number 1, etc. up to 128) and will report WiFi SuperLocal events with up to 5 MAC addresses (in the form of the respective pointers) and also the scanned RSSI which allows for localization with great precision. The MACs will be reported from the strongest RSSI to the weakest (in case more than 5 MACs are scanned, only the first 5 with the strongest RSSI are sent to the backend - the uplink payload looks like this:
Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9 | Byte 10 | Byte 11 | Byte 12 |
Mode | Event | Pointer | RSSI | Pointer | RSSI | Pointer | RSSI | Pointer | RSSI | Pointer | RSSI |
When using WiFi SuperLocal modes, it’s preferable that you build your own platform and create a map of the monitored facility with the local MACs you will be using and then just work with the signal strength to determine the position mathematically with a <1m precision.
When an event trigger (something that triggers the message such as a button press) occurs, the device will scan its surroundings for MAC addresses and (in short):
If unknown MAC addresses are discovered, you will first receive a 0xFC event with the whole new MAC and also the newly assigned pointer and after this you will receive the corresponding WiFi SuperLocal event message with up to 5 MAC addresses and the respective RSSI of each.
If no unknown MACs are discovered, you will receive the WiFi Precise with up to 5 already known MACs and the respective RSSI of each.
For details, see here:
WiFi SuperLocal in-depth
The scanning will return 1+ or no MACs. If there are MACs, they are then stored in an internal table in the device under a pointer and also have a counter assigned to them. There is a place for up to 128 MAC addresses in the internal device storage - the table is software-only but the visualization would be similar to the table below (except it would have 128 rows with fixed pointers and filled/empty MACs):
MAC | Pointer (0x01-0x7F, 1-128 in decimal) | Counter (0-255, 128 is default) |
00:0A:95:9D:68:16 | 0x01 | 136 |
00:A0:C9:14:C8:29 | 0x02 | 127 |
When a scan returns MAC addresses, the data is worked with in the following way:
If the scanned MAC address is found in the table, its counter value is increased by 1
If the scanned MAC is not found in the table and the table is not full, the new record will be inserted into the first open position (going from 1 upwards) and the counter will be set to the default value of 128
If the scanned MAC is not found in the table and the table is full, the record with the lowest number on the counter will be erased, its pointer reassigned to the new MAC and the counter will be reset to the default value of 128
MACs that are stored in the internal storage (read: you can find them in the hypothetical table) that were not found during scanning will have their counter value decreased by 1
This essentially means that MACs that are scanned often (which means they are more likely to be useful for your use case as they are most likely somewhere in the monitored facility) have a smaller chance to be erased from the memory of your device.
Accidental MACs that are not important on the other hand will have their counter value decreased with every new scan (they will “age”) and will be erased when the table is full and replaced with new records.
When you change the mode, the MACs in the internal memory are NOT erased. They are erased only when the device is reset (because they are stored in the RAM).
Working with downlink, you can get a readout of up to 7 MACs from the device that will be reported to you in a 0xFC uplink event (one MAC per uplink message). This is done with the downlink register 0xFD.
The downlink sequence has to have the register 0xFD as the first byte followed by up to 7 pointers. Also, in a similar way, it’s possible to erase up to 7 MACs at once from the internal memory by the downlink register 0xFC - the downlink sequence is the same as above, only the register hex is replaced.
Last updated