class DJIWiFiLink
@interface DJIWiFiLink : NSObject
Description:
This class provides methods to change the setting of the product's WiFi. Rebooting WiFi is required in order to make new settings take effect.
Class Members:
property delegate
@property (nonatomic , weak ) id <DJIWiFiLinkDelegate> delegate
Description:
Returns the DJIWiFiLink
delegate.
See Also:
DJIWiFiLinkDelegate
Channel Selection Mode
property
property isChannelSelectionModeSupported
@property (nonatomic , readonly ) BOOL isChannelSelectionModeSupported
Description:
Returns YES
if the firmware of the connect product supports channel selection mode. This feature is only supported by Mavic Air and Spark.
method setChannelSelectionMode:withCompletion
-(void )setChannelSelectionMode:(DJIWiFiChannelSelectionMode)mode withCompletion:(DJICompletionBlock)completion
Description:
Sets the channel selection mode. Both channel number and bandwidth can be changed. If the 5 GHz band is available, then channels from that band can also be used. It is supported when isChannelSelectionModeSupported
returns YES
.
method getChannelSelectionModeWithCompletion
-(void )getChannelSelectionModeWithCompletion:(void (^_Nonnull)(DJIWiFiChannelSelectionMode mode, NSError *_Nullable error))completion
Description:
Gets the channel selection mode. It is supported when isChannelSelectionModeSupported
returns YES
.
method rebootWithCompletion
- (void )rebootWithCompletion:(DJICompletionBlock)completion
Description:
Reboot WiFi to enable new settings to take effect.
method setSSID:withCompletion
- (void )setSSID:(NSString *_Nonnull)ssid withCompletion:(DJICompletionBlock)completion
Description:
Sets the WiFi SSID. The setting will take effect only after the product reboots.
NSString *_Nonnull ssid The WiFi SSID to change. It should only include alphabetic characters, numbers, spaces, '-' and should not be more than 30 characters. DJICompletionBlock completion Remote execution result error block.
method getSSIDWithCompletion
- (void )getSSIDWithCompletion:(void (^_Nonnull)(NSString *_Nullable ssid, NSError *_Nullable error))completion
Description:
Gets the WiFi SSID.
NSString *_Nullable ssid The SSID string. NSError *_Nullable error Error retrieving the value. void (^_Nonnull)(NSString *_Nullable ssid, NSError *_Nullable error) completion Completion block to receive the result.
method setPassword:withCompletion
- (void )setPassword:(NSString *_Nullable)password withCompletion:(DJICompletionBlock)completion
Description:
Sets the WiFi Password.
NSString *_Nullable password The new WiFi password. It must be at least 8 characters and can only includes alphabetic characters and numbers. DJICompletionBlock completion Remote execution result error block.
method getPasswordWithCompletion
- (void )getPasswordWithCompletion:(void (^_Nonnull)(NSString *_Nullable password, NSError *_Nullable error))completion
Description:
Get the WiFi Password.
NSString *_Nullable password The password string. NSError *_Nullable error Error retrieving the value. void (^_Nonnull)(NSString *_Nullable password, NSError *_Nullable error) completion Completion block to receive the result.
WiFi Frequency Band
method
method setFrequencyBand:withCompletion
- (void )setFrequencyBand:(DJIWiFiFrequencyBand)frequencyBand withCompletion:(DJICompletionBlock)completion
Description:
It is not supported by Spark, Mavic Air and DJI Mini 2. For these products, set different channel numbers to select the frequency band.
method getFrequencyBandWithCompletion
- (void )getFrequencyBandWithCompletion:(void (^_Nonnull)(DJIWiFiFrequencyBand frequencyBand, NSError *_Nullable error))completion
Description:
Gets the current WiFi frequency band. It is not supported by Spark or Mavic Air.
method setChannelNumber:withCompletion
-(void )setChannelNumber:(NSUInteger )channelNumber withCompletion:(DJICompletionBlock)completion
Description:
Sets the WiFi channel. setChannelNumber:withCompletion
must be used to determine which channels are possible to set. When a new channel is set, the WiFi on the product will reboot. The channel can only be changed when the product is not flying. Supported by Mavic Pro, Mavic Mini, DJI Mini SE.
NSUInteger channelNumber Index of the channel to select. DJICompletionBlock completion The completion block with the returned execution result.
method getChannelNumberWithCompletion
-(void )getChannelNumberWithCompletion:(void (^)(NSUInteger channelNumber, NSError *_Nullable error))completion
Description:
Gets the WiFi channel. Channels 1-13 are in the 2.4 GHz band. Other channels are in the 5 GHz band.
NSUInteger channelNumber The channelIndex value. NSError *_Nullable error Error retrieving the value. void (^)(NSUInteger channelNumber, NSError *_Nullable error) completion Completion block to receive the result.
Get Available Channels
method
method getAvailableChannelNumbersWithCompletion
-(void )getAvailableChannelNumbersWithCompletion:(void (^)(NSArray <NSNumber *> *_Nullable channelNumbers, NSError *_Nullable error))completion
Description:
Gets the channels available for the current frequency band. When DJIWiFiFrequencyBandDual
is selected, channels for both 2.4GHz and 5GHz are available. Supported only by Mavic Pro, Mavic Mini, DJI Mini SE.
NSArray<NSNumber *> *_Nullable channelNumbers The array of the channel value. NSError *_Nullable error Error retrieving the value. void (^)(NSArray<NSNumber *> *_Nullable channelNumbers, NSError *_Nullable error) completion Completion block to receive the result.
method setDataRate:withCompletion
-(void )setDataRate:(DJIWiFiDataRate)rate withCompletion:(DJICompletionBlock)completion
Description:
Sets the WiFi data rate (throughput). Higher data rates increase the quality of video transmission, but can only be used at shorter ranges. It is not supported by Spark or Mavic Air.
method getDataRateWithCompletion
-(void )getDataRateWithCompletion:(void (^)(DJIWiFiDataRate rate, NSError *_Nullable error))completion
Description:
Gets the current data rate (throughput). It is not supported by Spark or Mavic Air.
protocol DJIWiFiLinkDelegate
@protocol DJIWiFiLinkDelegate <NSObject >
Header: DJIWiFiLink.h Inherits From: NSObject
Description:
This protocol provides a delegate method to receive the updated WiFi signal quality.
Protocol Methods:
Protocol Method
method wifiLink:didUpdateMagneticInterferenceLevel
@optional - (void )wifiLink:(DJIWiFiLink *_Nonnull)link didUpdateMagneticInterferenceLevel:(DJIWiFiMagneticInterferenceLevel)level
Description:
Updates the WiFi Signal Quality.
method wifiLink:didUpdateChannelInterference
@optional - (void )wifiLink:(DJIWiFiLink *_Nonnull)link didUpdateChannelInterference:(NSArray <DJIWiFiChannelInterference *> *)interferences
Description:
This will be invoked when there is a change in RSSI. Interference power of the available channels.
enum DJIWiFiFrequencyBand
typedef NS_ENUM (uint8_t, DJIWiFiFrequencyBand)
Description:
WiFi frequency band.
Enum Members:
DJIWiFiFrequencyBand2Dot4GHzThe WiFi Frequency band is 2.4 GHz. DJIWiFiFrequencyBand5GHzThe WiFi Frequency band is 5 GHz. DJIWiFiFrequencyBandDualDual frequency band mode. The WiFi frequency band can be either 2.4 GHz or 5 GHz. DJIWiFiFrequencyBandUnknownThe WiFi Frequency is unknown.
enum DJIWiFiMagneticInterferenceLevel
typedef NS_ENUM (uint8_t, DJIWiFiMagneticInterferenceLevel)
Description:
WiFi magnetic interference - as measured by Osmo, Phantom 3 4K and Phantom 3 Standard.
Enum Members:
DJIWiFiMagneticInterferenceLevelLowWiFi magnetic interference is low. DJIWiFiMagneticInterferenceLevelMediumWiFi magnetic interference is medium. At this level, the video quality will be degraded compared to when the signal quality is low. DJIWiFiMagneticInterferenceLevelHighWiFi magnetic interference is high. At this level, the video quality will be degraded compared to when the signal quality is medium. DJIWiFiMagneticInterferenceLevelUnknownWiFi magnetic interference is Unknown.
enum DJIWiFiDataRate
typedef NS_ENUM (uint8_t, DJIWiFiDataRate)
Description:
WiFi data rate. Lower rates are used for longer ranges, but will have lower video quality.
Enum Members:
DJIWiFiDataRate1Mbps1 Mbps. DJIWiFiDataRate2Mbps2 Mbps. DJIWiFiDataRate4Mbps4 Mbps. DJIWiFiDataRateUnknownUnknown.
enum DJIWiFiChannelSelectionMode
typedef NS_ENUM (uint8_t, DJIWiFiChannelSelectionMode)
Header: DJIAirLinkBaseTypes.h
Description:
Channel selection mode for WiFi Link.
Enum Members:
DJIWiFiChannelSelectionModeAutoWiFi link will automatically select the best physical channel based on the signal environment. DJIWiFiChannelSelectionModeManualManually select the physical channel. DJIWiFiChannelSelectionModeUnknownUnknown.