background image

Copyright ©2012–2020,

Chengdu Ebyte Electronic Technology Co.,Ltd

9

3.5 Functional Configuration of TCP/UDP Passthrough Channel

3.5.1TCP/UDP Address andPort Configuration

AT Command

Respond

AT+SOCKADDR =<addr>,<port>,<local_port>,<type>

/r/n

OK

AT+SOCKADDR /r/n

address:< addr >,port:< port >,local port:

<local_port>,type:<type>

OK

(1) The socket0 address support the IP address and the domain name, the maximum byte length supports 50 byte, the soft restart,

hardware reset and normal power-on of the equipment are automatically connected with the socket0, If the server does not release the link

before connection, the terminal needs to disconnect the link successfully first and then connect to socket0.

(2) Configuration Parameter Description

<addr>,which supportsIPaddressesordomainnames, with a maximumbytelengthof50bytes.

<Port>, the port of the remote server.

<local_port>, local port, 0 means freely selected by tcpip, default is 0.

<type>, 0 indicates the TCP protocol, 1 indicates the UDP protocol.

Whenyouneedtosaveafterpower-off,NRBcommandtosavetheparameterstotheflash,andautomaticallyrestarttotakeeffect.

(3) Actively repXSSTATE:<id>,<state> when Socket connection state changes;

<id> Indicates the created socket ID. Currently, only 0 and 1 are supported. TCP/DUP channels can only use 0, and COAP, MQTT, and

Ebyte cloud channels use 1.

<state> indicates the socket connection state, 1 indicates the connection state, and 0 indicates the disconnection state.

For example, socket0 will actively  XSSTATE: 0,1 after successful connection, and will actively  XSSTATE:0,0 when the

server or terminal disconnects socket0.

3.5.2 Turnonand off TCP/UDP connections to socket0

AT Command

Respond

AT+SOCKONOFF=<enable>,<on-off>/r/n

+XSSTATE:< id>,<state>

OK

<enable>, indicates whether the TCP/UDP channel is enabled, 1 indicates enabled, and 0 indicates not enabled. The default is to enable open

TCP/UDP channels.

<on-off>, which turns socket0 on or off, 1 on, 0 off.

Whenyouneedtosaveafterpower-off,NRBcommandtosavetheparameterstotheflash,andautomaticallyrestarttotakeeffect.

.

Содержание EA01-D

Страница 1: ...0 IOT SerialModule EA01 D...

Страница 2: ...tbeat packet command 10 3 6 3 Registration packet function configuration 10 3 6 4 Custom registration package data content configuration 11 3 7 Modbus RTU TCP conversion function 11 3 7 1 Modbus RTU T...

Страница 3: ...le China Unicom Telecom NB card adopts compatible level for communication and LED indication default 3 3V applicable to 5V level with anti interference ability It is adaptable to environment with stro...

Страница 4: ...features Antenna type IPEX Baud rate Max 115200bps default 9600bps Transmitting power 20dBm 2dB Current consumption typ Sending current 345 mA 5V Receiving current 30 mA 5V Operating Voltage DC 5V 18V...

Страница 5: ...rd right LED light 1 When the device is attaching to the network it flashes rapidly After the device is successfully attached to the network it flashes slowly 7 RXD Data receiving indicator default 3...

Страница 6: ...this test are as follows Before testing please connect the serial cable SIM card insert the notch outwards antenna and other related devices Details are as follows EA01 D 5V 18V power adapter or 4 2V...

Страница 7: ...COM No the default serial port baud rate is 9600 8N1 and configure the module by following the user manual 3 Check the signal strength and set the device connection server IP and port No as 116 62 42...

Страница 8: ...eed to be memorized after power off first configure the parameters through the AT command and then input the AT NRB command to save the parameters to the flash 3 3ApplicationofpowersavinglockWORKLOCK...

Страница 9: ...ically switch the baud rate If it is set to 1 it is saved in NV and restarted immediately If it is set to 0 it means that the dynamic effect is valid and the baud rate of the other party needs to be s...

Страница 10: ...the TCP protocol 1 indicates the UDP protocol Whenyouneedtosaveafterpower off inputAT NRBcommandtosavetheparameterstotheflash andautomaticallyrestarttotakeeffect 3 Actively reporting XSSTATE id state...

Страница 11: ...at packet can be completed 2 If PDU _ type selects TCP UDP the TCP UDP heartbeat packet will be sent if MQTT is selected the MQTT heartbeat packet will be sent PINGRESP will be printed on the serial p...

Страница 12: ...into the data format of the Modbus TCP for serial port print In that transmit state when the serial port receives the data format of the Modbus RTU the data format is automatically converted into the...

Страница 13: ...a Cloud platform 2 means to access the OneNet platform and other Internet of Things platforms that support the standard MQTT protocol and 3 means to access Baidu Cloud platform When youneed to save af...

Страница 14: ...ication guidance for the description of the three element values of each platform AlibabaCloud Platform value0 indicating the Product Key 1PbEeweXIm is as shown in the below screenshot Value1 represen...

Страница 15: ...withNo CIMInumberofthecard OnBaidu Cloud platform value0 represents the nameentered when creating a new object shadowsuch as ebyte_nbiot_xy value1 indicatesthe user namesuch as 7nzgctm ebyte_nbiot_xy...

Страница 16: ...ription topicconfiguration AT Command Respond AT MQTTSUBTOP topicName qos r n OK AT MQTTSUBTOP r n OK qos qos topicName topicName a string within 200 bytes of the content of the subscription topic qos...

Страница 17: ...pe as COAP Thirdly AT ADDOPTION AT ADDTOKEN and AT COAPMINUS instructions add or delete option or token in the message Finally AT COAPHEADER instruction sends the message without load ATD 98 enters th...

Страница 18: ...es 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 ra...

Страница 19: ...the message 3 9 6 Send command of COAP withoutpayload message AT Command Respond AT COAPHEADER type code r n OK AT COAPHEADER r n OK type token code code type Configure the type of the sent message Ty...

Страница 20: ...cating the message ID decimal format of the received message If there is token in the received message the serial port prints the token token ends with carriage return and line feed and token is in th...

Страница 21: ...al number key calculated by the tool shown in the screenshot below AT CIMI command to get the CIMI number and fill it in the red box the green box will get the keysn sequence value Note before using E...

Страница 22: ...improvement of product hardware and software this manual may be changed without prior notice The latest version of the manual shall prevail Users who use this product need to follow the product news...

Отзывы: