Skip to content

Callback Recent

1. Callback Description

Callbacks are messages the kernel actively broadcasts to all connected WebSocket clients. For example, when a device connects, disconnects, or settings change, the kernel pushes notifications.

Callback Format

json
{
  "fun": "function_number",
  "status": 200,
  "message": "",
  "msgid": 0,
  "data": {}
}

Callback Events

#FunctionEvent
1im_connectKernel connection successful
2dev_connectDevice connected
3dev_disconnectDevice disconnected
4dev_rotateDevice rotation
5dev_changeDevice properties changed
6dev_deleteDevice deleted
7group_changeGroup modified
8group_deleteGroup deleted
9usb_changeUSB hardware changed
10collection_mouseMouse parameter collection status
11airplay_connect_logAuto screen casting log
12restart_logRestart phone log
13user_infoUser info (pushed every 30s)
14im_logKernel information log
15error_pushKernel error log
16im_config_changeKernel config changed
17logoutAccount logged out
18dev_sort_changeDevice list sorting changed

Key Callback Details

usb_change - USB Hardware Changes

The code field indicates hardware status:

  • 19 - Hardware connected to computer
  • 20 - Hardware disconnected from computer
  • 12 - Hardware connected to phone

collection_mouse - Mouse Parameter Status

The code field indicates:

  • 0 - Success
  • 4 - Collection failed
  • 5 - A device is collecting
  • 14 - Start working
  • 21 - Working

error_push - Error Log

Contains call_fun indicating which function was called when the error occurred.

user_info - Auto-pushed User Info

User information is pushed automatically every 30 seconds when logged in. Contains all fields from the login/user info response.

Some3C Phone Farm Documentation