SEND TO COM PORT


Send a text to the com port.


Command

AT#COM=<text>

Response

OK

COMMAND ACCEPTED


ERROR

COMMAND REJECTED

PARAMETERS

<text>

TEXT TO SEND TO LOCAL COM PORT (CAN INCLUDE TAGS)

To print special characters or formatting symbols, escape them with a percent sign (%) followed by their hex code. For example, use %0A for a newline / line break or %0D for a Carriage Return.

HTTP REQUEST


Make an HTTP request to the specified address, a data connection must be available.


Command

AT#HTTP=<method>,<url>[,<data>]

Response

OK

COMMAND ACCEPTED


ERROR

COMMAND REJECTED

PARAMETER

<method>

GET | POST | PUT | DELETE


<url>

DESTINATION URL


<data>

TEXT TO POST, CAN INCLUDE TAGS or

COMPLETE PATH AND FILE NAME TO SEND CONTENT


The response returned by the server is always ignored.

It is possible to include a custom tag X-command within the header of the response, any command found in its value will be executed.


It is possible to specify custom destination port at the end of URL using the canonical format: https://mysite.com:1234


NOTE: The use of TAGs that refer to variables within the URL can cause errors or crashes of the device due to improper or not yet available content (processing in progress).


SECURITY NOTE (Cybersecurity Compliance)

When using the AT#HTTP command with an https:// URL, the device establishes a secure connection using TLS (Transport Layer Security). The device enforces strict validation of the server's certificate chain via a trusted Certificate Authority (CA), ensuring the authenticity of the destination server and the integrity/confidentiality of the data in transit against interception.

The device is responsible for the secure establishment of the transmission tunnel. The secure processing, storage, and handling of the data payload once received by the destination server are the sole responsibility of the System Integrator. The System Integrator must ensure that the receiving infrastructure complies with all applicable privacy regulations (e.g., GDPR) and cybersecurity standards, ensuring that data is handled in a secure and compliant manner.

SEND UDP MESSAGE


Send a message using UDP protocol to specified IP address and port.


Command

AT#UDP=<ipaddress>,<port>,<text>

Response

OK

COMMAND ACCEPTED


ERROR

COMMAND REJECTED

PARAMETERs

<ipaddress>

DESTINATION IP ADDRESS


<port>

DESTINATION UDP PORT


<text>

MESSAGE TO BE SENT (CAN INCLUDE TAGS)


Send message "Hello Avior" to IP address 123.130.140.150 port 1234:

AT#UDP=123.130.140.150,1234,"Hello Avior"

OK


PUBLISH MQTT MESSAGE


Publish an MQTT message to broker, specifying topic, payload and QoS.


Command

AT#MQTT=<topic>,"<payload>",<qos>[,<retain>]

Response

OK

COMMAND ACCEPTED


ERROR

COMMAND REJECTED

PARAMETERs

<topic>

MESSAGE TOPIC, CAN INCLUDE TAGS


<payload>

MESSAGE PAYLOAD, CAN INCLUDE TAGS

OR COMPLETE PATH AND FILE NAME TO SEND CONTENT


<qos>

QUALITY OF SERVICE


<retain>

KEEP THE LAST MESSAGE 1

(FORWARD TO EACH NEW SUBSCRIBER)


If a message is successfully published an MQT event is triggered.


Publish text "gate is open" to topic "mytopic/home/garage" with QoS=1:

AT#MQTT=mytopic/home/garage,"gate is open",1


Publish text with tags ($D01 is the device identifier, $I12 is the status of digital input 1 and $O42 is the status of output 4) with QoS=0:

AT#MQTT=mydevice/$D01,"in1=$I12 and out4=$O42",0


Publish file located in SDcard S:LOGS/data.log to topic "system/file:

AT#MQTT=system/file,S:LOGS/data.log,1


1        To delete a retained message send a blank message with retain = 1 :
       AT#MQTT=mytopic/home/garage,"",1,1

MODBUS RTU READ REQUEST


Read Modbus RTU data from COM port.


ComMAnd

AT#RTUR=<slaveAddr>,<functCode>,<startReg>,

<numReg>,<dataType>,[<options>],<dest>

Response

OK

COMMAND ACCEPTED


ERROR

COMMAND REJECTED

PARAMETERS

<slaveAddr>

ADDRESS OF MODBUS SLAVE

1 ... 247


<functCode>

MODBUS FUNCTION CODE

1 : READ COILS

2 : READ DISCRETE INPUTS

3 : READ HOLDING REGISTER

4 : READ INPUT REGISTERS


<startReg>

STARTING REGISTER

0 ... 65535


<numReg>

NUMBER OF DATA TO BE READ

1 ... 32


<dataType>

DATA TYPE

B: BIT (for function code 1 e 2)

W: WORD - 16 bit (for function code 3 e 4)

D: DOUBLE - 32 bit (for function code 3 e 4)

F: FLOAT - IEEE754 (for function code 3 e 4)


<options>

READ OPTONS (CAN BE EMPTY)

S: data interpreted as a signed numbers (dataType W and D)

I: endianess inversiom (dataType D)

SI: both options above


<dest>

DESTINATION OF READ DATA (WHERE TO SAVE)

E01 ... E32


<dest> indicates the position of the first read data, following data are saved in next positions. Thus, if 4 data are read and destination is E06, the data are saved in E06, E07, E08, E09.

Returns ERROR if number of data to be read exceed E32 position.


AT#RTUR=8,1,5,2,B,,E04

Read request with following parameters:

- slave address: 8

- function code: 1 (lettura di coils)

- starting modbus register: 5

- number of coils to read: 2

- data type: BIT

- options: none

- destination: E04 (stored in E04, E05, E06, E07, E08)


AT#RTUR=9,3,6,1,W,S,E01

Read request with following parameters:

- slave address: 9

- function code: 3 (lettura di holding register)

- starting modbus register: 6

- number of register to read: 1

- data type: WORD (16bit)

- options: S data to be treated as signed number

- destination: E01


AT#RTUR=123,4,8,3,D,,E14

Read request with following parameters:

- slave address: 123

- function code: 4 (lettura di input register)

- starting modbus register: 8

- number of data to read: 3

- data type: DOUBLEWORD (32bit = 6 registri modbus da16bit)

- options: none, data composed taking two registers

- destination: E14 (saved in E14, E15, E16)

MODBUS RTU WRITE REQUEST


Write Modbus RTU data to COM port.


ComMand

AT#RTUW=<slaveAddr>,<functCode>,<Reg>,<data>

Response

OK

COMMAND ACCEPTED


ERROR

COMMAND REJECTED

PARAMETERS

<slaveAddr>

ADDRESS OF MODBUS SLAVE

1 ... 247


<functCode>

MODBUS FUNCTION CODE

5  : WRITE COIL

6  : WRITE 1 HOLDING REGISTER

16 : WRITE 2 HOLDING REGISTERS



<Reg>

STARTING REGISTER (TO BE WROTE)

0 ... 65535


<data>

VALUE TO BE WRITTEN, CAN INCLUDE TAG

0|1: FOR COIL

0...65535: FOR WORD

0...4294967294: FOR DOUBLE


AT#RTUW=3,5,2,1

Write request with following parameters:

- slave address: 3

- function code: 5 (write single coil)

- modbus register to be written: 2

- data to be written: 1 (set coil)


AT#RTUW=77,6,3456,$V11

Write request with following parameters:

- slave address: 77

- function code: 6 (write holding register)

- modbus register to be written: 3456

- data to be written: value of variabile "var1" ($V11)


AT#RTUW=207,16,521,$E30

Write request with following parameters:

- slave address: 207

- function code: 16 (write 2 holding registers, 32 bit)

- modbus register to be written: 521

- data to be written: content of E30 ($E30)