Set Control Connection Parameters
Flutter Example:
/// Control connection parameters event number
setConnParam(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.app_set_conn_param),
/// Set control connection parameters
libManager.send(evt: CmdEvtType.setConnParam, json: jsonEncode(json));
JSON fields sent by the App:
| Field Name | Field Type | Field Description |
|---|---|---|
| mode | int | 1: Control 2: Query |
| modify_conn_param | int | 1: Enable log 2: Disable log 3: Write AGPS data 4: Erase AGPS data 5: Write GPS firmware |
| max_interval | int | Maximum interval Unit:second |
| min_interval | int | Minimum interval Unit:second |
| slave_latency | int | Device latency 0-499 packets Number of packets that the device does not respond to the app |
| conn_timeout | int | Connection timeout time Unit:second |
Example:
{
"mode": 2,
"modify_conn_param": 0,
"max_interval": 0,
"min_interval": 0,
"slave_latency": 0,
"conn_timeout": 0
}
JSON fields received by the App:
| Field Name | Field Type | Field Description |
|---|---|---|
| cur_mode | int | Current mode 1: Set fast mode 2: Set slow mode |
| err_code | int | 0 for success, non-zero for failure |
Example:
{
"cur_mode": 2,
"err_code": 0
}