FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
505 views 2 comments
by anonymous

Hello,
the following question is about a TRB140 which we want to use for an industrial application (TRB140 - ModbusTCP - PLC).
Is it possible to send SMS messages with variable text to different recipients via ModbusTCP?
Idea: The SMS text as well as the phone number of the recipient shall be provided via Modbus register in the Modbus slave. The sending of the SMS is started via another Modbus register or coil.
Can these functions be implemented? If not, are there alternatives?
Thanks in advance.

1 Answer

+2 votes
by anonymous

Hello,

As you will find in this links, TRB140 does have dedicated registers to add message values and send SMS.

The idea behind the procedure is as follows, as tested using ComTestPro:

  • TRB is configured as both, slave and master;
  • First register address - 397;
  • Number of registers - 90;
  • The register array is split into two parts that represent the recipient's phone number and the SMS message contents. Phone number resides in the first 10 registers, message contents resides at the last 80 registers.
  • A single register represents two 8-bit ASCII characters that are concatenated together. This rule applies for both, phone number and message contents registers.
  • To write a single character into a register, the register needs to end with additional zeroes (e.g. to write character a, the register will be [6100h], not [61h]).
  • Example: recipient's number -> 0037061000000; message contents -> Test (note the aforementioned caveat at the last digit of the phone number).
  • The values in the example are converted from ASCII to hexadecimal.

 

To send SMS, stored in the registers, write value of 1 to register 396:

SMS was sent with the above configuration. It did show "No response received" message, but nevertheless, SMS was sent.

Best regards,

by anonymous

Thanx a lot for your very fast and helpful reply!!

by anonymous
Hello,

found this answer and could make connection and send SMS from my PLC with my TRB140 like discribed.

Is there a way to confirm my SMS got sent away?

like some global SMS counter i can read before and after.

https://wiki.teltonika-networks.com/view/TRB140_Monitoring_via_Modbus

I Tried reading Register 187 Mobile data sent today (SIM1) but it does not change with SMS...

Thanks