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
419 views 2 comments
by anonymous
Dear Teltonika Forum

I've replaced an old Wavecom Fastrack 2G/3G modem with a TRB142. It's connected to a Mitshubishi E1071 PLC HMI panel by RS232. It is intended to send SMS from the E1071. I've managed to get it up and running, but I wonder if there is a way to send the AT-command:

AT+CMGF=1

at startup/boot? Without it, the command for sending SMS AT+CMGS="00xxxxxxx" only returns an error. I've tried adding

gsmctl -A AT+CMGF=1 in the startup script, but that didn't seem to work.

Best regards,

Roy Antonsen.

2 Answers

0 votes
by anonymous

Hello

It might be that the modem is still in initialisation state, when command is executed, thus you could try adding a delay with additional line:

  • sleep 60

Best regards,

by anonymous

Hi

0 votes
by anonymous
Hi everybody,

the gsmctl command in the startup script will not work when in full RS232 mode, because gsmctl is then disabled. Is there a way to use the startup-script to switch to full RS232 modem after init, so I could use gsmctl commands in the first lines in the startup-script?

Best regards,

Roy Antonsen.
by anonymous

A bunch of commands have to be executed to configure RS232 via CLI:

  • uci set rs.rs232.enabled='1'
  • uci set rs.rs232.baudrate='115200'
  • uci set rs.rs232.databits='8'
  • uci set rs.rs232.parity='none'
  • uci set rs.rs232.stopbits='1'
  • uci set rs.rs232.flowcontrol='none'
  • uci set rs.rs232.type='modem'
  • uci set rs.rs232.ctl_mode='full'
  • uci commit
  • reload_config