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
321 views 4 comments
by anonymous

Hi, 

I'd like to send some AT commands to GSM modem, but I don't know how to access it. Normally on other OpenWrt system based devices I use something like "echo "ATI" | socat - OPEN:/dev/ttyUSB1,crnl,ignoreeof" but in that case it does not appear to work, as there is no such device. Could you advice where should I direct my command in case of TRB140?

I know that there is gsmctl tool, and I like it, but my piece of software has to run on different OpenWrt routers and it has to be generic. I wouldn't like to use something like "if (teltonika) { use gsmctl } else { use socat }" . 

Krzysztof

1 Answer

0 votes
by anonymous

Hello,

Thank you for reaching out!

Could you specify what you'd like to achieve with the modem? Should it act as a completely standalone modem separate from TRB140, or would you just like to, for example, send SMS messages using AT commands?

While there isn't one simple way for TRB140, TRM240/TRM250 acts as a completely standalone modem, and can only communicate with the master device using AT commands, so that might be worth looking into.

Our other devices with serial or USB-A ports (for USB to Serial) can also act as a standalone modem if using serial for communication.

Awaiting your response!

Best regards,
DaumantasG

by anonymous
I just need to replace the command:

/usr/sbin/gsmctl --modemtime 1 or 2

with:

echo "AT+CCLK?" | socat - OPEN:/dev/?????,crnl,ignoreeof

where /dev/????? is GSM modem within TRB device
by anonymous
Hello,

sorry, seem to have misunderstood your question.

To access the modem, it will be mounted in one of the ttyUSB slots. This might change from device to device, you'll have to test it out on your device.

AT command for network time is AT+QLTS, but this will return GMT time. If you need time for your local time zone, then the command would be AT+QLTS=2. The last digit will indicate whether DST is currently taking place.

Hope this helps.

Best regards,
DaumantasG
by anonymous
The thing is that there are no /dev/ttyUSB0 or similar.

there is usbserial device after lsmod, but nothing where I can connect to within /dev/
by anonymous
Hello,

I'm sorry, for some reason I had TRB245 in mind.

TRB1xx and TRB5xx series of devices have different architectures, thus accessing the modem as a device will most likely not be possible. I'll consult my colleagues, and if we find a solution I'll let you know.

For now, the best bet is gsmctl -A route.

Best regards,
DaumantasG