DJIWiFiLink

@interface DJIWiFiLink : NSObject

This class provides methods to change the setting of the product’s WiFi. You can also reboot the WiFi adapter inside product in order to make the new setting take effect.

  • Returns the DJIWiFiLink delegate.

    Declaration

    Objective-C

    @property (readwrite, nonatomic) id<DJIWiFiLinkDelegate> _Nullable delegate;
  • Reboot WiFi.

    Declaration

    Objective-C

    - (void)rebootWiFiWithCompletion:(DJICompletionBlock)block;

    Parameters

    block

    Remote execution result error block.

  • Gets the WiFi SSID.

    Declaration

    Objective-C

    - (void)getWiFiSSIDWithCompletion:(void (^_Nonnull)(NSString *_Nullable,
                                                        NSError *_Nullable))block;

    Parameters

    block

    Remote execution result error block.

  • Sets the WiFi SSID. The setting will take effect only after the product reboots.

    Declaration

    Objective-C

    - (void)setWiFiSSID:(NSString *_Nonnull)ssid
         withCompletion:(DJICompletionBlock)block;

    Parameters

    ssid

    The WiFi SSID to change to. Must alphanumeric, space and ’-’ characters and must not be more than 30 characters in length.

    block

    Remote execution result error block.

  • Gets the WiFi Password.

    Declaration

    Objective-C

    - (void)getWiFiPasswordWithCompletion:
        (void (^_Nonnull)(NSString *_Nullable, NSError *_Nullable))block;

    Parameters

    block

    Remote execution result error block.

  • Sets the WiFi Password.

    Declaration

    Objective-C

    - (void)setWiFiPassword:(NSString *_Nullable)password
             withCompletion:(DJICompletionBlock)block;

    Parameters

    password

    The new WiFi password. It must be at least 8 characters and can only includes alphabetic characters and numbers.

    block

    Remote execution result error block.

  • YES if the product allows the user to change WiFi frequency bands. Osmo and Mavic Pro with WiFi connection support this feature.

    Declaration

    Objective-C

    - (BOOL)isWiFiFrequencyBandEditable;
  • Sets the WiFi frequency band. It can be called only if isWiFiFrequencyBandEditable returns YES.

    Declaration

    Objective-C

    - (void)setWiFiFrequencyBand:(DJIWiFiFrequencyBand)frequencyBand
                  withCompletion:(DJICompletionBlock)block;

    Parameters

    frequencyBand

    WiFi frequency band to change to.

    block

    Remote execution result error block.

  • Gets the current WiFi frequency band. It can be called only if isWiFiFrequencyBandEditable returns YES.

    Declaration

    Objective-C

    - (void)getWiFiFrequencyBandWithCompletion:
        (void (^_Nonnull)(DJIWiFiFrequencyBand, NSError *_Nullable))block;

    Parameters

    block

    Remote execution result error block.


  • Sets the WiFi channel. getAvailableChannels 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 only by Mavic Pro.

    Declaration

    Objective-C

    - (void)setChannel:(NSUInteger)channelIndex
        withCompletion:(DJICompletionBlock)block;

    Parameters

    channelIndex

    Index of the channel to select.

    block

    The completion block with the returned execution result.

  • Gets the WiFi channel. Channels 1-13 are in the 2.4 GHz band. Other channels are in the 5 GHz band. Supported only by Mavic Pro.

    Declaration

    Objective-C

    - (void)getChannelWithCompletion:(nonnull void (^)(NSUInteger,
                                                       NSError *_Nullable))block;

    Parameters

    block

    The completion block with the returned execution result.

  • 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.

    Declaration

    Objective-C

    - (void)getAvailableChannelsWithCompletion:
        (nonnull void (^)(NSArray<NSNumber *> *_Nullable, NSError *_Nullable))block;

    Parameters

    block

    The completion block with the returned execution result.


  • Sets the WiFi data rate (throughput). Higher data rates increase the quality of video transmission, but can only be used at shorter ranges.

    Declaration

    Objective-C

    - (void)setDataRate:(DJIWiFiDataRate)rate
         withCompletion:(DJICompletionBlock)block;

    Parameters

    rate

    Data rate (throughput).

    block

    The completion block with the returned execution result.

  • Gets the current data rate (throughput).

    Declaration

    Objective-C

    - (void)getDataRateWithCompletion:(nonnull void (^)(DJIWiFiDataRate,
                                                        NSError *_Nullable))block;

    Parameters

    block

    The completion block with the returned execution result.