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

Hello,

I'm facing out the problem to lock the router modem(s) on a cell Id: I've already solved the matter on the primary modem but I really did't find the solution for the secondary one.

I've followed the follow instructions that are working for the primary modem only

Locking_Devices_to_a_Mobile_Cell

What about the right AT commands in order fix the problem?

Thanks

Roberto

1 Answer

0 votes
by anonymous

Hello,

   

In the RUTX12 case, a different way to send the AT commands to the modems can be used instead of gsmctl.

For each command, instead of writing gsmctl -A, you'll need to write ubus call gsm.modem<0/1> exec '{"command":"<AT command>"}'. So for example, instead of

gsmctl -A 'AT+QCFG="NWSCANMODE",3,1'

You will need to write

ubus call gsm.modem0 exec '{"command":"AT+QCFG=\"NWSCANMODE\",3,1"}'

and for the second modem

ubus call gsm.modem1 exec '{"command":"AT+QCFG=\"NWSCANMODE\",3,1"}'

In case anyone else encounters this issue when using an external modem, the solution should be the same.
Let me know if any more help is needed!

EDIT: The ubus commands were edited to escape the quotes, so they should work as well.

   

Best regards,
DaumantasG

by anonymous

Hi!

I've tried to use the new commands as suggested but the router fails.

What did I do wrong?

Best Regards

Roberto

https://community.teltonika-networks.com/?qa=blob&qa_blobid=6437882135961928623

by anonymous

Hello,

  

Sorry, indeed I missed a quote conflict.

In this case, the only solution I could think of is sending the pure AT commands directly to the modem. To do so, a service called microcom can be used. Before explaining what commands will be used, I will explain how the modems are mounted on the device. The modem is connected to the system via USB, thus the modem ports can be found in the /dev directory. Modem0 will be assigned tty ports ttyUSB0 - ttyUSB3, and modem1 will be assigned ports ttyUSB4 - ttyUSB7. However, the assignment of these ports is dynamic and can change after each reboot.

Using the microcom utility, you'll need to connect to the AT command port of the modem. Usually, the AT port is mounter towards the end, but it can change. Configure the first modem using the guide on the Wiki, and the second modem can be configured by connecting to its AT port. Try using this command:

microcom /dev/ttyUSB7

You should see no return. Try typing ATE1 (echo is disabled, so you'll not see what you're typing) and press enter. If you see OK, you're in. Then simply run the commands provided in the Wiki without the gsmctl part.

If typing ATE1 returns nothing, that means the port is not for AT commands. Try connecting to ttyUSB6.

However, you should remember, that the cell lock preference gets lost after each reboot, so locking the second modem might take more time than it's worth.

Hope it helps!

  

Best regards,
DaumantasG

by anonymous

Hi Daumantas

Thank You for Your precious help! Now the procedure works like a charm!

I hope that in the future this option will be included in the webui panel.

Have a nice day

Regards

Roberto

by anonymous
Hello,

  

This feature was investigated by our RnD team, however, as not all modules are compatible, it was decided to not include it in RutOS at least for now.

Let me know if any additional help will be needed!

  

Best regards,
DaumantasG