BGX DMS

The BGX DMS module is used for interacting with the Silicon Labs Device Management Service (DMS) in order to get a list of firmware versions that are available for your BGX device and to download firmware images. More...

Classes

class  bgx_dms
 bgx_dms is used to get a list of firmware versions that are compatible with your BGX device and to download firmware images that can be loaded using BGX_OTA_Updater. More...
 

Variables

NSString * DMSServerReachabilityChangedNotificationName
 This notification is sent when the reachability of the dms server changes. More...
 
NSString * NewBGXFirmwareListNotificationName
 This notification is sent when a new list of BGX Firmware versions is loaded from DMS. More...
 

Detailed Description

The BGX DMS module is used for interacting with the Silicon Labs Device Management Service (DMS) in order to get a list of firmware versions that are available for your BGX device and to download firmware images.


Class Documentation

◆ bgx_dms

class bgx_dms

bgx_dms is used to get a list of firmware versions that are compatible with your BGX device and to download firmware images that can be loaded using BGX_OTA_Updater.

Remarks
The bgx_dms class depends on the ability to reach the Silicon Labs DMS servers. As soon as an instance of this class is created you may begin to receive NSNotifications of type DMSServerReachabilityChangedNotificationName. Therefore, your app should reigster for these notifications before creating an instance of this class.

Inherits NSObject.

Instance Methods

(id) - initWithBGXUniqueDeviceID:
 Initialize DMS for a specific BGX device ID. More...
 
(void) - retrieveAvailableVersions:
 Pull a list of available firmware. More...
 
(void) - loadFirmwareVersion:completion:
 Retrieve the specified firmware image from DMS by version number. More...
 

Class Methods

(NSString *) + bgxPartInfoForDeviceID:
 Retrieve a string containing the part id for a specific device id. More...
 
(void) + reportInstallationResultWithDeviceUUID:version:
 Reports the installation to the DMS system for the purpose of analytic tracking. More...
 

Protected Attributes

NSArray * _firmwareList
 

Properties

NSArray * firmwareList
 This array contains NSDictionary objects with the following keys: More...
 

Method Documentation

◆ bgxPartInfoForDeviceID:()

+ (NSString *) bgxPartInfoForDeviceID: (NSString *)  device_uuid

Retrieve a string containing the part id for a specific device id.

This will return nil if the device id indicates an invalid part.

Parameters
device_uuidthe UUID for the individual BGX part.
Returns
part id for the device. This is currently either bgx13s or bgx13p.

◆ initWithBGXUniqueDeviceID:()

- (id) initWithBGXUniqueDeviceID: (NSString *)  bgx_unique_device_id

Initialize DMS for a specific BGX device ID.

Parameters
bgx_unique_device_id- the unique device ID of the device being updated
Returns
the intialized instance of bgx_dms

◆ retrieveAvailableVersions:()

- (void) retrieveAvailableVersions: (void(^)(NSError *, NSArray *))  completionBlock

Pull a list of available firmware.

Parameters
completionBlockto be called when the operation is complete. Parameters to this block include an error (nil on success, non-nil on error) and an NSArray of the available versions of firmware.

◆ loadFirmwareVersion:completion:()

- (void) loadFirmwareVersion: (NSString *)  version
completion: (void(^)(NSError *, NSString *firmware_path))  completionBlock 

Retrieve the specified firmware image from DMS by version number.

If unable to load it, a non-nil error parameter will result and firmware_path will be nil. One parameter or the other will be nil depending on whether the image was loaded.

Parameters
versionis the firmware version to load
completionBlockBlock to be called when the operation is complete.

◆ reportInstallationResultWithDeviceUUID:version:()

+ (void) reportInstallationResultWithDeviceUUID: (NSString *)  bgx_device_uuid
version: (NSString *)  bundleid 

Reports the installation to the DMS system for the purpose of analytic tracking.

Parameters
bgx_device_uuidis the UUID of the BGX device to report.
bundleidis the firmware bundle ID that was loaded.

Member Data Documentation

◆ _firmwareList

- (NSArray*) _firmwareList
protected

Property Documentation

◆ firmwareList

- (NSArray*) firmwareList
readwritenonatomicstrong

This array contains NSDictionary objects with the following keys:

  • version - NSString containing the version
  • description - NSString containing the description of the firmware version.
  • tag - NSString containing the firmware flavor.
  • size - NSNumber containing the size of the firmware in bytes.

Variable Documentation

◆ DMSServerReachabilityChangedNotificationName

NSString* DMSServerReachabilityChangedNotificationName

This notification is sent when the reachability of the dms server changes.

Object is an NSNumber containing a BOOL. YES means the server is reachable. NO means it isn't reachable. This is only sent when this changes. Wait for it before trying to call loadFirmwareVersion: or retrieveAvailableVersions:

◆ NewBGXFirmwareListNotificationName

NSString* NewBGXFirmwareListNotificationName

This notification is sent when a new list of BGX Firmware versions is loaded from DMS.

The object is an NSArray containing NSDictionary objects with the following keys:

  • version - NSString containing the version
  • tag - NSString containing the firmware flavor.
  • size - NSNumber containing the size of the firmware in bytes.