DJIBluetoothProductConnector

@interface DJIBluetoothProductConnector : NSObject

Some DJI products can be controlled using the Mobile SDK on the mobile device over a Bluetooth wireless connection. This class contains methods to search for, connect to and disconnect from such products.

  • Delegate that receives the product list found by the connector.

    Declaration

    Objective-C

    @property (readwrite, nonatomic)
        id<DJIBluetoothProductConnectorDelegate> _Nullable delegate;
  • Start searching for DJI Products that are near the mobile device and can be controlled with the Mobile SDK using Bluetooth. Use connectorDidFindProducts: in DJIBluetoothProductConnectorDelegate to receive the product list.

    Declaration

    Objective-C

    - (void)searchBluetoothProductsWithCompletion:(DJICompletionBlock)block;

    Parameters

    block

    Completion block returns the command execution result. It is called once the searching is started.

  • Connects to the DJI product using Bluetooth. Once it is connected, DJISDKManager can be used to access the product.

    Declaration

    Objective-C

    - (void)connectProduct:(CBPeripheral *_Nullable)product
            withCompletion:(DJICompletionBlock)block;

    Parameters

    product

    The bluetooth product to connect to.

    block

    The completion block returns the command execution result.

  • Disconnects current connected bluetooth product.

    Declaration

    Objective-C

    - (void)disconnectProductWithCompletion:(DJICompletionBlock)block;

    Parameters

    block

    The completion block returns the command execution result.