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
618 views 5 comments
by anonymous
I have a system that is controlled by a Beckhoff PLC which has a COM RS232/485 port. I would like to utilize this port in order to connect to a TRB245, as Beckhoff output cards are hard to come by lately.

The end goal is for the TRB245 to send different pre-made SMS messages based on the commands from the PLC via RS232.

This isn't something I've worked with before so id like to get some pointers in the right direction on if it's possible to do this.

1 Answer

0 votes
by anonymous

Hello,

It is possible to configure the gateway to use the RS232/485 to communicate directly to the modem module via AT commands in modem mode.

As an example, you could you try the following AT commands executed in come script:

AT+CMGF=1

AT+CMGS="phone_number"

This will enable you to enter SMS text.

Console mode can be used as well, which would provide control over the router.

For more details in regards of serial communication, please refer to the following link: https://wiki.teltonika-networks.com/view/TRB245_RS232#RS232_Configuration

Best regards,

by anonymous
Hi,

Thanks for the response.

Can you explain to me what the two commands you've listed are actually doing?

Trying to do some testing using the CLI in WebUI, but haven't been able to get it to work.

Ive been trying to follow the examples on https://wiki.teltonika-networks.com/view/AT_Commands but they only go through specific examples, none that use different arguments so im trying to work out howe to structure the commands correctly.
by anonymous

Testing these commands in CLI, when i use;

gsmctl -A AT+CMGF=1  i get the OK, but when doing gsmctl -A AT+CMGS="+6427XXXXXXX" the console either hangs, or shows Error shortly after.

I assume there's some other steps here, and I'm really battling to find any clear info as to how i can get this to work.

by anonymous

Try adding apostrophes ' for the AT+ part:

gsmctl -A 'AT+CMGS=""+6427XXXXXXX""'

Since using console, you can try the following command:

gsmctl -S -s, --sms --send "<NUMBER> <TEXT>" , 

for example:

 gsmctl -S -s "0037011111111 Hello"
by anonymous

using the gsmctl -S -s "+6427XXXXXXX test"   returns an N/A

gsmctl -A 'AT+CMGS=""+6427XXXXXXX""' Still just hangs in console.

by anonymous
Realise where i mucked that up.

Had RS232 config still set to modem full control when trying to use the gsmctl _s -s command.

Thanks for the help! have managed to get an sms to send, now to try work out how to get my PLC to send the same console commands to the TRB245.