btleManufacturerDataGet (Function) |
Top Previous Next |
This function retrieves the manufacturer data from a remote device. The manufacturer data is custom data that is part of the 30 custom bytes in the advertising data. Note: The manufacturer data included in the Scan Response is currently not available.
There may be multiple sets of manufacturer data in the data, so the sets are concatenated in the buffer, using the following format for each set:
The format means that if the wanted device is known to only have one set of manufacturer data, it is enough to check the ID and then just use the data directly.
Note: To be able to receive advertising data, the adapter must be scanning, using btScanStart.
Input: dev : STRING The address of the device to get the data from.
size : INT The size of the buffer.
data : PTR The buffer to store the data in. Must be at least 31 bytes long. If there are multiple sets of manufacturer data, it must be larger.
Output: size : INT The number of valid bytes in the buffer. If the buffer is too small, this will contain the needed size.
Returns: INT
Declaration: FUNCTION btleManufacturerDataGet : INT;
Example: INCLUDE rtcu.inc
|