Modbus Get và Set Parameters trên Router Teltonika
Dưới đây là 1 số thông tin Modbus Get và Set Parameters trên Router Teltonika. Các tham số modbus được giữ trong các thanh ghi . Mỗi thanh ghi chứa 2 byte thông tin. Để đơn giản hóa, số thanh ghi để lưu trữ số là 2 (4 byte), trong khi số thanh ghi để lưu trữ thông tin văn bản là 16 (32 byte).
Bảng dưới đây tổng hợp Số thanh ghi và giá trị hệ thống tương ứng cho mỗi Request trên Router Teltonika. Các bạn có thể tham khảo để tạo các Request tương ứng xuống Slave.
Get Parameters
Dưới đây là các thông số mà các bạn có thể sử dụng để lấy dữ liệu từ Slave.
Required Value |
Register Address |
Register Number |
Number Of Registers |
Representation |
System uptime |
1 |
2 |
2 |
32 bit unsigned integer |
Mobile signal strength (RSSI in dBm) |
3 |
4 |
2 |
32 bit integer |
System temperature (in 0.1 °C) |
5 |
6 |
2 |
32 bit integer |
System hostname |
7 |
8 |
16 |
Text |
GSM operator name |
23 |
24 |
16 |
Text |
Router serial number |
39 |
40 |
16 |
Text |
LAN MAC address |
55 |
56 |
16 |
Text |
Router name |
71 |
72 |
16 |
Text |
Currently active SIM card slot |
87 |
88 |
16 |
Text |
Network registration info |
103 |
104 |
16 |
Text |
Network type |
119 |
120 |
16 |
Text |
Digital input (DIN1) state |
135 |
136 |
2 |
32 bit integer |
Digital galvanically isolated input (DIN2) state |
137 |
138 |
2 |
32 bit integer |
Current WAN IP address |
139 |
140 |
2 |
8 bit unsigned integer |
Analog input (PIN 9) value |
141 |
142 |
2 |
32 bit unsigned integer |
GPS latitude coordinate |
143 |
144 |
2 |
32 bit float |
GPS longitude coordinate |
145 |
146 |
2 |
32 bit float |
GPS fix time |
147 |
148 |
16 |
Text (Unix timestamp×1000) |
GPS date and time |
163 |
164 |
16 |
Text (DDMMYYhhmmss) |
GPS speed |
179 |
180 |
2 |
32 bit float |
GPS satellite count |
181 |
182 |
2 |
32 bit unsigned integer |
GPS accuracy |
183 |
184 |
2 |
32 bit float |
Mobile data received today (SIM1) |
185 |
186 |
2 |
32 bit unsigned integer |
Mobile data sent today (SIM1) |
187 |
188 |
2 |
32 bit unsigned integer |
Mobile data received this week (SIM1) |
189 |
190 |
2 |
32 bit unsigned integer |
Mobile data sent this week (SIM1) |
191 |
192 |
2 |
32 bit unsigned integer |
Mobile data received this month (SIM1) |
193 |
194 |
2 |
32 bit unsigned integer |
Mobile data sent this month (SIM1) |
195 |
196 |
2 |
32 bit unsigned integer |
Mobile data received last 24h (SIM1) |
197 |
198 |
2 |
32 bit unsigned integer |
Mobile data sent last 24h (SIM1) |
199 |
200 |
2 |
32 bit unsigned integer |
Galvanically isolated open collector output status |
201 |
202 |
1 |
16 bit unsigned integer |
Relay output status |
202 |
203 |
1 |
16 bit unsigned integer |
Active SIM card |
205 |
206 |
1 |
16 bit unsigned integer |
Mobile data received last week (SIM1) |
292 |
293 |
2 |
32 bit unsigned integer |
Mobile data sent last week (SIM1) |
294 |
295 |
2 |
32 bit unsigned integer |
Mobile data received last month (SIM1) |
296 |
297 |
2 |
32 bit unsigned integer |
Mobile data sent last month (SIM1) |
298 |
299 |
2 |
32 bit unsigned integer |
Mobile data received today (SIM2) |
300 |
301 |
2 |
32 bit unsigned integer |
Mobile data sent today (SIM2) |
302 |
303 |
2 |
32 bit unsigned integer |
Mobile data received this week (SIM2) |
304 |
305 |
2 |
32 bit unsigned integer |
Mobile data sent this week (SIM2) |
306 |
307 |
2 |
32 bit unsigned integer |
Mobile data received this month (SIM2) |
308 |
309 |
2 |
32 bit unsigned integer |
Mobile data sent this month (SIM2) |
310 |
311 |
2 |
32 bit unsigned integer |
Mobile data received last 24h (SIM2) |
312 |
313 |
2 |
32 bit unsigned integer |
Mobile data sent last 24h (SIM2) |
314 |
315 |
2 |
32 bit unsigned integer |
Mobile data received last week (SIM2) |
316 |
317 |
2 |
32 bit unsigned integer |
Mobile data sent last week (SIM2) |
318 |
319 |
2 |
32 bit unsigned integer |
Mobile data received last month(SIM2) |
320 |
321 |
2 |
32 bit unsigned integer |
Mobile data sent last month (SIM2) |
322 |
323 |
2 |
32 bit unsigned integer |
Digital non-isolated input |
324 |
325 |
1 |
16 bit unsigned integer |
Digital open collector output |
325 |
326 |
1 |
16 bit unsigned integer |
Modem ID |
328 |
329 |
8 |
Text |
IMSI |
348 |
349 |
16 |
Text |
Unix timestamp |
364 |
365 |
2 |
32 bit unsigned integer |
Local ISO time |
366 |
367 |
12 |
Text |
UTC time |
378 |
389 |
12 |
Text |
Set Parameters
Router Teltonika cũng có thể thiết lập 1 số thông số cho thiết bị qua Modbus.
Value To Set |
Register Address |
Register Number |
Register Value |
Description |
Hostname |
7 |
8 |
Hostname (in decimal form) |
Changes hostname |
Device name |
71 |
72 |
Device name (in decimal form) |
Changes device name |
Galvanically isolated open collector output status |
201 |
202 |
1 | 0 |
Toggles DOUT1 ON or OFF |
Relay output status |
202 |
2023 |
1 | 0 |
Toggles DOUT2 ON or OFF |
Switch WiFi ON/OFF |
203 |
204 |
1 | 0 |
Turns WiFi ON or OFF |
Switch mobile data connection (ON/OFF*) |
204 |
205 |
1 | 0 |
Turns mobile data connection ON or OFF |
Switch SIM card |
205 |
206 |
1 | 2 | 0 |
Changes the active SIM card slot
- 1 - switch to SIM1
- 2 - switch to SIM2
- 0 - switch from the the SIM card opposite of the one currently in use (SIM1 → SIM2 or SIM2 → SIM1)
|
Reboot |
206 |
207 |
1 |
Reboots the router |
Change APN |
207 |
208 |
APN code |
Changes APN.
The number of input registers may vary depending on the length of the APN, but the very first byte of the set APN command denotes the number of the SIM card for which to set the APN. This byte should be set to:
- 1 - to set APN for SIM1
- 2 - to set APN for SIM2
|
Switch PIN 4 state |
325 |
326 |
1|0 |
Toggles PIN 4 ON or OFF |
Bình luận bài viết!