Sending and receiving data

Hello,

It seems that the AT command manual of RAK3172 is a little bit unclear if decimal or hex numbers should be used. This applies particularly to commands AT+SEND and AT+RECV.

In case of AT+SEND there are no examples. In case of AT+RECV there is an example if empty data is received. However, the example and the table of AT+RECV are not consistent. According to the table, both the port and the payload should be in hex format, but in case of the example, the port is in decimal format.

As a consequence, I would like to clarify which is the correct method. For example, let us assume that I want that the payload is 0xA5A5 and the port is 25 (0x19).

In case of AT+SEND, which one is correct when sending data:

A) AT+SEND=25:A5A5

B) AT+SEND=19:A5A5

In case of AT+RECV, which one is correct when receiving data:

A) 25:A5A5OK

B) 19:A5A5OK

I have ignored CR and LF in these examples. I would strongly recommend to add some examples in both cases.

Regards Sami

Hello @samimaisniemi , welcome to the forum.
I agree, the documentation is missing examples for the AT command. I will forward this to the documentation team @carlrowan to add examples for each AT command.
For a fast solution, the AT+SEND syntax is
AT+SEND=<port>:<data>
<port> = decimal number from 1 to 255
<data> =hexadecimal formatted data

Example:
AT=SEND=12:112233 will send the hex data 0x11,0x22,0x33 over port 12.

Hi @samimaisniemi

The port number is still decimal. Only the data or payload is in Hex.

Option A will be the answer in your question.

Hi @beegee , the AT command example is noted :+1: