How to have an equivalent AT+COPS=<mode>,<format>,<opName>,<rat> using qapi API functions? | Thales IoT Developer Community
November 3, 2021 - 1:36pm, 1925 views
When using AT commands, we can use the AT+COPS and pass the parameter <rat> to be one of these:
0 - GSM
3 - GSM w/EGPRS
7 - E-UTRAN Cat.M1
9 - E-UTRAN Cat.NB1
Thus, over AT commands we have a explicit way to control the connection that will be used, for example, if I want to connect to a NB network, I would do something like this in AT commands:
My question is: how can I do the same, but using the qapi? In other words, how can I tell the qapi to connect only to a Cat.NB1 network, for instance?
Do you mean how to do it from the application working on the module?
One of the possibilities would also be to use AT commands. There is an API for this and an example application in the SDK package.
I mean, when we use the qapi functions to start a data call, we would follow these steps:
In the above snippet, I took it (simplified) from the examples/coap.c file in SDK examples folder.
So, following the snippet, what I would like to do is to explicitly tell via qapi that I want to connect to a NB.1 Network, and not in a Cat.M1 for example. This is required for my app so we can implement a fallback where if NB is not available, then we try to connect in Cat.M1, and so on.
In other words, I would expect to have something like this to set connection type:
I'm sorry for the delayed answer. I'm not that much into that topic. So I had to consult R&D colleagues. And they said that it would not be possible with QAPI. They suggest to use AT commands via the provided API. So the same as I have already mentioned in my previous post.
FYI I've found this API qapi_DSS_Get_Call_Tech() however it is not working, it returns always 0, wich falls into the switch-case QAPI_DSS_CALL_TECH_INVALID_E. I assume it s wrong because my device is connecting fine.
Anyways, I leave it here for future reference.
I did as you said, using AT commands and checking the connection tech against AT^SMONI, thus I can get the information I want.
Thank you for this feedback. This ***** to be checked.
Anyway this function would not fit all your ***** as it only reads RAT.
It's good that the other solution works.
Actually the issue is still open.
I'd like to know if there is a way to explicitly tell the module to connect into a Cat.M1 network using qapi, for example.
Then, I would like to verify that I am connected in a Cat.M1 network using qapi.
We need to implement such feature because the FW we are working on must know in which technology it is connected to, and if needed, it should be able to switch connections from Cat.M1 to NB-IoT, for example.
To be even more specific, here is the AT commands that we can explicitly tell what technology to use, and verify it:
So, at the above AT commands, I can explicitly connect into Cat.M1 via "AT+COPS=1,2,"72406",7" and then, I can verify via "AT^SMONI" that I am connected to the Cat.M1 network, and check the "CONN" status.
I would like to have a way to do the same, but via qapi functions. something like:
According to the information I acquired previously for the use of this discussion RAT can only be configured with AT commands.
We provide the API for AT commands in SDK. So you would be able to select RAT and verify if the module is register to the desired technology by the use of this API and for instance the commands that you cited.
Ok then, I gonna use AT commands for this part.