In my application i need to use NBIOT network & GNSS.
For that i found that i need to configure AT%XSYSTEMMODE=0,1,1,2.
But i am not clear on what should be configuration for AT%XMAGPIO command ?
In my application i need to use NBIOT network & GNSS.
For that i found that i need to configure AT%XSYSTEMMODE=0,1,1,2.
But i am not clear on what should be configuration for AT%XMAGPIO command ?
Hi Jagir008,
Yes, that would be the correct use of the XSYSTEMMODE AT-Command.
However, you can achieve the same functionality if you use the LTE Link Control driver and enable the config:
CONFIG_LTE_NETWORK_MODE_NBIOT_GPS in prj.conf.
It's quite easy the process of connecting to a network when you enable the LTE Link Control driver (instead of manually adding the AT commands yourself)
You should not need to change anything with the XMAGPIO command.
You would usually use it when e.g. to control an external antenna tuner, or any other GPIO-controlled device, whose state depends on modem's RF frequency.
In that case, I would recommend this White paper: nRF9160 Antenna and RF Interface Guidelines
Best regards,
Martin L.
Hi Martin,
What should be initialization steps for using LTE Link control Driver.
Currently i have used "lte_lc_init_and_connect()" & added configuration in pr.cfg file.
As per my understanding i need to include kConfig file for LTE link control & Call this function for initialization.
Please let me know required steps for it.
Hi Jagir,
To use the LTE Link Control Driver in your application you just have to enable the driver.
You can do this by manually adding these lines in prj.conf:
# LTE link control
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
and in your main.c you add:
#include <lte_lc.h>
And I would recommend copying the "modem_configure()" function which is used in most of our samples to enable the modem.
/**@brief Configures modem to provide LTE link. Blocks until link is * successfully established. */ static void modem_configure(void) { #if defined(CONFIG_LTE_LINK_CONTROL) if (IS_ENABLED(CONFIG_LTE_AUTO_INIT_AND_CONNECT)) { /* Do nothing, modem is already turned on * and connected. */ } else { int err; printk("LTE Link Connecting ...\n"); err = lte_lc_init_and_connect(); __ASSERT(err == 0, "LTE link could not be established."); printk("LTE Link Connected!\n"); } #endif }
The Kconfig for the LTE Link Control driver is automatically available when you enable the LTE Link Control driver:
CONFIG_LTE_LINK_CONTROL=y
Best regards,
Martin L.