🐼
Some3C User Manual
Back to Some3C
  • Welcome SOME 3C
  • User Guide
    • Box Phone Farm Manual
    • Build Setup Mobile Farm Guide
  • 🐼Panda Guide
    • Panda Android Screen Projection
    • Download and install
    • USB Connect Phone
    • WIFI Mode Connection
    • LAN Mode Connection
    • Accessible Mode Connection
    • Safe Mode Connection
    • Connection FAQ
    • Panda Setting & Use
    • Members and Versions
    • API interface documentation
    • Contact Us
  • iPhone Farm Setup
    • iPhone Farm Settings
    • API Documentation
  • XP API Documentation
    • Equipment related
    • Configuration related
    • User related
    • Keyboard and Mouse
    • Picture Text Recognition
    • Shortcuts
    • Callback
Powered by GitBook
On this page
  • 1.Callback Description
  • Callback
  • Callback
  • Example 1, the sorting of the device list
  • Example 2, USB hardware device
  • Example 3, device
  • 2.Connecting to the kernel successfully
  • Callback
  • 3.Device connected
  • Callback
  • 4.Device is disconnected
  • Callback
  • 5.Device rotation
  • Callback
  • 6.Equipment changes
  • Callback
  • 7.Device deleted
  • Callback
  • 8.Grouping changes
  • Callback
  • 9.Group deletion
  • Callback
  • 10.USB hardware changes
  • Callback
  • 11.Collect mouse parameter status
  • Callback Format
  • 12.Automatic screen casting log
  • Callback
  • 13.Restart phone log
  • Callback
  • 14.User information status
  • Callback
  • 15.Kernel push log
  • Callback
  • 16.Kernel push error log
  • Callback
  • 17.Kernel configuration has been changed
  • Callback
  • 18.Log out of account
  • Callback
  • 19.Device list sorting changed
  • Callback
  1. XP API Documentation

Callback

Some3C.com – A Professional Solution for iOS Development and Testing

1.Callback Description

Callback

Although callbacks and asynchronous requests appear in the ws callback, the callback mentioned here is the message that the kernel actively broadcasts to all connected clients.

For example, if a connected client deletes a device, sets device operations, or takes a device offline, the kernel will automatically push messages to all connected clients.

Callback

{
  "fun": "Function number",
  "status": Must be 200
  "message": "",
  "msgid": 0,
  "data": {}Actual data
}

Example 1, the sorting of the device list

{
  "data": {
    "code": 0,
    "id": "",
    "sort_index": 2,
    "sort_value": 1,
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "dev_sort_change"
}

Example 2, USB hardware device

{
  "data": {
    "list": [
      {
        "vid": "720D",
        "pid": "9523",
        "uid": "952324BD",
        "ver": "4.4",
        "state": 2
      }
    ],
    "code": 12,
    "id": "",
    "message": "There are hardware and mobile phone connections"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "usb_change"
}

Example 3, device

{
  "data": {
    "list": [
      {
        "air_handle": 118639968,
        "air_pid": 17260,
        "rotate": 0,
        "state": 1,
        "imgw": 750,
        "imgh": 1334,
        "gid": 0,
        "air_ratio": 0,
        "air_fps": 0,
        "air_refresh": 0,
        "air_img_fps": 0,
        "air_audio": 0,
        "name": "11",
        "srv_name": "`iMouseXP-D2B6",
        "width": "375",
        "height": "667",
        "ip": "192.168.9.112",
        "mac": "00:E0:99:D9:8B:2E",
        "user_name": "iPhone",
        "version": "15.7.3",
        "model": "iPhone8,1",
        "deviceid": "6C:72:E7:EA:CD:95",
        "device_name": "iPhone 6s",
        "location": "",
        "location_crc": "B0DBD800",
        "vid": "720D",
        "pid": "9523",
        "uid": "952324BD",
        "gname": "未分组",
        "uver": "4.4"
      }
    ],
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "dev_change"
}

2.Connecting to the kernel successfully

Callback

Function number im_connect

{
  "fun": "im_connect",
  "status": 200,
  "message": "",
  "msgid": 0,
  "data": {
    "ver": "2024.12.21.910"
  }
}
  • Response data field description

Fields

illustrate

Remark

ver

Kernel version number

-

3.Device connected

Callback

Function number dev_connect

{
  "data": {
    "list": [
      {
        "air_handle": 118639968,
        "air_pid": 17260,
        "rotate": 0,
        "state": 1,
        "imgw": 1206,
        "imgh": 2622,
        "gid": 0,
        "air_ratio": 0,
        "air_fps": 0,
        "air_refresh": 0,
        "air_img_fps": 0,
        "air_audio": 0,
        "name": "",
        "srv_name": "`iMouseXP-D2B6",
        "width": "402",
        "height": "874",
        "ip": "192.168.9.100",
        "mac": "C6:4D:3A:7A:E0:D3",
        "user_name": "Ss的xx",
        "version": "18.2",
        "model": "iPhone17,1",
        "deviceid": "9A:97:4E:C9:54:71",
        "device_name": "iPhone 16 Pro",
        "location": "",
        "location_crc": "",
        "vid": "",
        "pid": "",
        "uid": "",
        "gname": "未分组",
        "uver": ""
      }
    ],
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "dev_connect"
}
  • Response data field description

See Get Device

4.Device is disconnected

Callback

Function number dev_disconnect

{
  "data": {
    "list": [
      {
        "air_handle": 118639968,
        "air_pid": 17260,
        "rotate": 0,
        "state": 0,
        "imgw": 1206,
        "imgh": 2622,
        "gid": 0,
        "air_ratio": 0,
        "air_fps": 0,
        "air_refresh": 0,
        "air_img_fps": 0,
        "air_audio": 0,
        "name": "",
        "srv_name": "`iMouseXP-D2B6",
        "width": "402",
        "height": "874",
        "ip": "192.168.9.100",
        "mac": "C6:4D:3A:7A:E0:D3",
        "user_name": "Ss的xx",
        "version": "18.2",
        "model": "iPhone17,1",
        "deviceid": "9A:97:4E:C9:54:71",
        "device_name": "iPhone 16 Pro",
        "location": "",
        "location_crc": "",
        "vid": "",
        "pid": "",
        "uid": "",
        "gname": "未分组",
        "uver": ""
      }
    ],
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "dev_disconnect"
}
  • Response data field description

See Get Device

5.Device rotation

Callback

Function number dev_rotate

{
  "data": {
    "list": [
      {
        "air_handle": 118639968,
        "air_pid": 17260,
        "rotate": 0,
        "state": 0,
        "imgw": 1206,
        "imgh": 2622,
        "gid": 0,
        "air_ratio": 0,
        "air_fps": 0,
        "air_refresh": 0,
        "air_img_fps": 0,
        "air_audio": 0,
        "name": "",
        "srv_name": "`iMouseXP-D2B6",
        "width": "402",
        "height": "874",
        "ip": "192.168.9.100",
        "mac": "C6:4D:3A:7A:E0:D3",
        "user_name": "Ss的xx",
        "version": "18.2",
        "model": "iPhone17,1",
        "deviceid": "9A:97:4E:C9:54:71",
        "device_name": "iPhone 16 Pro",
        "location": "",
        "location_crc": "",
        "vid": "",
        "pid": "",
        "uid": "",
        "gname": "未分组",
        "uver": ""
      }
    ],
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "dev_rotate"
}
  • Response data field description

See Get Device

6.Equipment changes

Callback

Function number dev_change

{
  "data": {
    "list": [
      {
        "air_handle": 118639968,
        "air_pid": 17260,
        "rotate": 0,
        "state": 0,
        "imgw": 1206,
        "imgh": 2622,
        "gid": 0,
        "air_ratio": 0,
        "air_fps": 0,
        "air_refresh": 0,
        "air_img_fps": 0,
        "air_audio": 0,
        "name": "",
        "srv_name": "`iMouseXP-D2B6",
        "width": "402",
        "height": "874",
        "ip": "192.168.9.100",
        "mac": "C6:4D:3A:7A:E0:D3",
        "user_name": "Ss的xx",
        "version": "18.2",
        "model": "iPhone17,1",
        "deviceid": "9A:97:4E:C9:54:71",
        "device_name": "iPhone 16 Pro",
        "location": "",
        "location_crc": "",
        "vid": "",
        "pid": "",
        "uid": "",
        "gname": "未分组",
        "uver": ""
      }
    ],
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "dev_change"
}
  • Response data field description

See Get Device

7.Device deleted

Callback

Function number dev_delete

{
  "data": {
    "list": [
      "90:81:58:EE:D1:9E"
    ],
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "dev_delete"
}
  • Response data field description

See Deleting a Device

8.Grouping changes

Callback

Function number group_change

{
  "data": {
    "name": "g1",
    "code": 0,
    "id": "222440499",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "group_change"
}
  • Response data field description

See Setting the Return of Groups

9.Group deletion

Callback

Function number group_delete

{
  "data": {
    "list": [
      "1145527833",
      "1145533497"
    ],
    "code": 0,
    "id": "1145527833,1145533497",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "group_delete"
}
  • Response data field description

See the return of deleting a group.

10.USB hardware changes

Callback

Function number usb_change

{
  "data": {
    "list": [
      {
        "vid": "720D",
        "pid": "1F2D",
        "uid": "1F2D24BD",
        "ver": "4.4",
        "state": 2
      }
    ],
    "code": 19,
    "id": "",
    "message": "There is hardware and computer connection"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "usb_change"
}
  • Response data field description

Here we mainly look at the value of code

Fields

illustrate

Remark

code

Hardware Status

19 hardware is connected to the computer, 20 hardware is disconnected from the computer, 12 hardware is connected to the phone

11.Collect mouse parameter status

Function number collection_mouse

{
  "data": {
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "collection_mouse"
}
  • Response data field description

Here we mainly look at the value of code

Fields

illustrate

Remark

code

Hardware Status

0 Success, 4 Collection failed, 5 A device is collecting, 6 This device ID is not collecting the mouse, 8 Scan the code to open successfully, 9 Enter the collection page, 14 Start working, 21 Working

12.Automatic screen casting log

Callback

Function number airplay_connect_log

{
  "data": {
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "airplay_connect_log"
}
  • Response data field description

Here we mainly look at the code value 0 success, when it is not 0, the current status is described in the message

13.Restart phone log

Callback

Function number restart_log

{
  "data": {
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "restart_log"
}
  • Response data field description

Here we mainly look at the code value 0 success, when it is not 0, the current status is described in the message

14.User information status

Callback

User information will be pushed automatically every 30 seconds when logging in and at other times.

Function number user_info

{
  "data": {
    "code": 0,
    "id": "",
    "pass": true,
    "total_license": 0,
    "local_total_license": 100,
    "dev_num": 16,
    "dev_online_num": 0,
    "create_time": 1690800970000,
    "overdue_time": 1683288910000,
    "phone": "13999999999",
    "utag": 2,
    "info_clock_in_time": 60000,
    "add_clock_in_time": 60000,
    "info_time": 885192828,
    "add_time": 0,
    "utag_data": "",
    "test_num": 100,
    "user_state": 2,
    "network_time": 1735124455463,
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "user_info"
}
  • Response data field description

For field descriptions, see Obtaining User Information in User-related

15.Kernel push log

Callback

Used to tell the client some important information logs, such as exceeding authorization, etc.

Function number im_log

{
  "data": {
    "code": 0,
    "id": "",
    "message": "未登录,不允许上线"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "im_log"
}
  • Response data field description

The log information is in the message

16.Kernel push error log

Callback

Used to tell the client some current error information logs, such as unknown hardware errors

Function No. error_push

{
  "data": {
    "code": 0,
    "id": "",
    "call_fun":"/mouse/down",
    "message": "Hardware not working (unknown error)"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "error_push"
}
  • Response data field description

The error message is in message, and call_fun is what function is called.

17.Kernel configuration has been changed

Callback

When a client changes the kernel configuration, other connected clients will receive this information

Function number im_config_change

{
  "data": {
    "air_play_name": "iMouseXP-D2B6",
    "lang": "English",
    "mdns_type": 0,
    "connect_failed_retry": 3,
    "air_play_ratio": 0,
    "opencv_num": 1,
    "ocr_num": 1,
    "allow_ip_list": [],
    "air_play_fps": 30,
    "air_play_img_fps": 0,
    "air_play_refresh_rate": 60,
    "air_play_port": 17000,
    "air_play_audio": true,
    "auto_connect": false,
    "auto_updata": false,
    "thread_mode": false,
    "mouse_mode": true,
    "flip_right": true,
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "im_config_change"
}
  • Response data field description

For field descriptions, see Get Kernel Configuration in Configuration Related

18.Log out of account

Callback

Log out of the kernel account

Function number logout

{
  "data": {
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "logout"
}
  • Response data field description

none

19.Device list sorting changed

Callback

You will receive this message when the device list changes

Function number dev_sort_change

{
  "data": {
    "sort_index": 0,
    "sort_value": 0,
    "code": 0,
    "id": "",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "dev_sort_change"
}
  • Response data field description

For field descriptions, see Get device list sorting.

PreviousShortcuts

Last updated 1 month ago

Callback

Format