Get device information
To retrieve a connected device’s information, use the PGPeripheral requestDeviceInformation
method. The method accepts PGCommand
, wrapping the PGDeviceInformationRequest
and completionHandler
parameters.
If successful, the completion handler will return PGDeviceInformation
object containing all the available information.
In case the request fails, an error object will be returned via the completion handler.
Currently exposed data-points:
serialNumber
firmwareRevision
Example 142. Objective C
- (void)requestDeviceInformationWithDeviceInfoCommand:(nonnull PGCommand *)deviceInfoCommand completionHandler:(void (^_Nonnull)(PGDeviceInformation * _Nullable deviceInformation, NSError * _Nullable error))completionHandler;
Example 143. Swift
func requestDeviceInformation(withDeviceInfoCommand deviceInfoCommand: PGCommand, completionHandler: @escaping (PGDeviceInformation?, Error?) -> Void)