---
name: "getDpDataByMesh"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "2.4.0" }
platform:
  - "iOS"
  - "Android"
async: true
---

## getDpDataByMesh

> [VERSION] DeviceKit >= 2.4.0

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Get DP data of a Mesh sub-device. On success, the success callback has no payload (t.Null), indicating only that the DP read request has been initiated/completed

### Parameters

| Property | Type | Required | Default | Since | Description |
| --- | --- | --- | --- | --- | --- |
| `deviceId` | `string` | Yes | - | `2.4.0` | Mesh sub-device ID (target device) |
| `dpIds` | `Record<string, any>[]` | Yes | - | `2.4.0` | List of DP IDs to query |
| `complete` | `() => void` | No | - | - | Callback invoked when the call completes (runs on success or failure) |
| `success` | `() => void` | No | - | - | Success callback |
| `fail` | `(params: Object) => void` ↓see below | No | - | - | Failure callback |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extension |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Extended error code |
| `errorMsg` | `string` | Extended error info |
