Skip to main content

RS485F

1.RS485F.getState

Get Current RS485F State

BDDP

ParamValueDesc
methodRS485F.getStateGet Current State
targetDevice<String,Necessary>DeviceId of the RS485F you use;
token<String,Necessary>Net token of the RS485F you use;

BUDP

ParamValueDesc
data.baudRate<Integer,Necessary>The BaudRate of RS485, Default:9600
data.parity<String,Necessary>The Parity of RS485;["None","Even","Odd"];Default:None
data.stopBits<Integer,Necessary>The StopBits of RS485;[0.5,1,1.5,2];Default:1

2.RS485F.setState

Open RS485F

BDDP

ParamValueDesc
methodRS485F.setStateConfig RS485
targetDevice<String,Necessary>DeviceId of the RS485F you use;
token<String,Necessary>Net token of the RS485F you use;
params.baudRate<Integer,Necessary>The BaudRate of RS485, Default:9600
params.parity<Integer,Necessary>The Parity of RS485;["None","Even","Odd"];Default:None
params.stopBits<Integer,Necessary>The StopBits of RS485;[0.5,1,1.5,2];Default:1

BUDP*

Same as RS485F.getState

3.RS485F.sendDatas

Send Datas

BDDP

ParamValueDesc
methodRS485F.sendCodeSend Datas
targetDevice<String,Necessary>DeviceId of the RS485F you use;
token<String,Necessary>Net token of the RS485F you use;
params.datas<Buffer,Necessary>The Bytes you want to send;

BUDP*

ParamValueDesc
data.isSuccess<Boolean,Necessary>Result

4.RS485F.getVersion

Get firmware info

BDDP

ParamValueDesc
methodRS485F.getVersionGet firmware info;
targetDevice<String,Necessary>DeviceId of this device;
token<String,Necessary>Net Token of this device;

BUDP

ParamValueDesc
data.version<String,Necessary>Current Version;
data.newVersion.versionId<String,Optional>Id of the newest version;
data.newVersion.versionCode<String,Optional>Code of the newest version;
data.newVersion.fileSize<String,Optional>File Size of the newest version;

5.RS485F.startUpgrade

Start Upgrade

BDDP

ParamValueDesc
methodRS485F.startUpgradeStart Upgrade
targetDevice<String,Necessary>DeviceId of this device;
token<String,Necessary>Net Token of this device;
params.versionId<String,Necessary>Version Id you want to upgrade;

BUDP

ParamValueDesc
data.isStarted<Boolean,Necessary>Is upgrading started;

6.Callbacks

You can receive it with Http Callback API or MQTT report topic

BUDP

ParamValueDesc
data.type<RS485Get>Datas received from RS485
data.datas<Buffer,Necessary>Data Buffer