TRB245 & Modbus with third party device

Thanks for such an awesome community.

I have a TRB245 with a Rika Ultrasonic Wind Direction and speed sensor.

I might be missing the point here, so I guess I have two questions :

Firstly and I am sorry if I have not searched ‘enough’ is how to get the modem to push that query and to get the returned value when queried over TCP/IP - I am guessing custom register information?

I have found one bit of documentation but it seems to relate to an older version of firmware and I cant seem to replicate what they have done.

Secondly - how would I push that query over TCP/IP through the modem to just get the raw data back - when I have enabled any of the ModBus services I cant seem to query anything on the RS485 port as what I have discovered is you need to query it with the following :
01 03 00 00 00 04 44 09 (in HEX) and it responds with the status of wind speed and direction in the following returned packet:

01 03 08 00 02 [00 44] [1A 9E 3F D8] 31 44

The values I am interested in are in between the square brackets - first for Direction and the second for speed (first value 68º and the second value 1.68m/s once the math has been applied)

The device ID is 1 but I assume that modem’s is 1 too?

Not very familiar with Modbus - but willing and able to learn :slight_smile:

So any help would be fantastic :slight_smile:
Thanks in advance.



Are you trying to read Modbus data from your speed sensor from PC using Modbus TCP, but the speed sensor uses Modbus RTU? I.e:

Speed sensor — Modbus RTU —> TRB245 <— Modbus TCP — PC

Is that correct? If so, you can configure Modbus TCP over Serial. With this configuration, the TRB will basically convert Modbus TCP requests and pass them to the RTU device.

Regarding the requests and responses in HEX, it seems that you are trying to send the following request:

  • Modbus address: 1
  • Function: 3 (read holding registers)
  • Register address: 0 (this is register number 1 (0+1))
  • Registers to read: 4

The data type for the degrees looks like 16bit INT, while the speed is in floats.

You can configure those on you modbus configuration, or test the requests using Modbus Serial Client’s ‘test’ button. Keep in mind that only one service should be enabled at the same time - either Modbus Serial Client, or Modbus TCP over Serial gateway.

So, for example, the request to get degrees can look something like this:

If you get a wrong value, you can try changing the byte order. You can also take a look at these posts here and here for better understanding.

Kind Regards,

1 Like

We get TRB245, for using as LTE modem,
but do not get full AT commands manual.
Because in modem is processor Quectel EC25, i downloaded AT command manual for this processor
(file “Quectel_EC25EC21_AT_Commands_Manual_V1.3.pdf”)
But it do not fully describe commands, parameters.
For example TRB245 have a ATS12, but not in PDF file.
Where to get full modem description?


You are on the right track. The modem is indeed Quectel EC25 on TRB245, and the AT commands manual should be the right one. However, we do not have any other documentations/manuals for AT commands. If you need to find information about some specific AT commands, you can try looking up on the Quectels website or the internet.

Regarding ATS12 command, does the ATS12 command works on this device? For example, what is the output of the following commands from CLI:

gsmctl -A 'ATS8?'
gsmctl -A 'ATS10?'
gsmctl -A 'ATS12?'

Kind Regards,

This topic was automatically closed after 15 days. New replies are no longer allowed.