Copyright ©2012–2020,
Chengdu Ebyte Electronic Technology Co.,Ltd
17
3.9.3 Instructionfor adding optionin COAPmessage
AT Command
Respond
AT+ADDOPTION=<index>,< type>,< value>/r/n
OK
AT+ADDOPTION /r/n
OK
index
:
<index>
,
type:<type>
,
value:<value>
◆
<index>,thesequencenumberofoption,range0to7,themaximumnumberofoptionscanbeconfigured,andthestoragespaceis1024bytes.
◆
<type>,thenumberofoption,asshowninthefollowingfigure.
For example, type = 11 indicates that the option resource type is Uri-Path.
◆
<value>, the specific content of the option, for example, the specific value of the Uri-Path option is \ temperature. If the data type of value
is Uint, the data range is 0-4294967295, and the data length is only Holds 0-4 bytes. A plurality of options can be configured, and the
maximum number of options can be 8. For example, enter the following commands in turn:
AT+ADDOPTION=0,3, iot.eclipse.org
AT+ADDOPTION=1,7, 5683
AT+ADDOPTION=2,11,\temperature
AT+ADDOPTION read instruction return
index: 0
,
type: 3, value: iot.eclipse.org
index:1, type: 7, value: 5683
index: 2
,
type: 11, value: \temperature
Содержание EA01-D
Страница 1: ...0 IOT SerialModule EA01 D...