Hi,
I'm currently experimenting to find the best tower and band settings for transmitting and receiving data over LTE. (I'm not sure if there is an AT command that can help me do this without doing my acrobatics). I'm aware that as the distance from the tower increases, the RSSI tends to worsen, leading to poorer performance. However, I'm unclear on how band selection comes into play and its impact on overall performance. (If there is an online link that can help me, I would be very happy to see it). I do understand that the size of antenna limits the antenna's bandwidth and this may affect also affect performance, link. Does this mean that certain LTE antennas can only work properly on certain bands? With the band selection algorithm, the modem relies on historical data to select the previous band and tower that have proven to be successful for communication. Unless the link quality is really bad, it would not swich as long this "offset" time is over. Is this correct? This means there could be situations where swtiching the tower/band could lead to improvement on the communication quality.
I wrote a little code that measures RSRQ, RSRP, and SNR. Here is the function that measures these parameters:
typedef struct quality_sign_info_t { // metadata bool execute_quality_sign_meas; int modem_state; // data float rsrq; // reference signal received quality int32_t rsrp; // reference signal received power int32_t snr; // reference signal-to-noise ratio quality_sign_info_t quality_sign_info; void get_signal_quality_params(quality_sign_info_t *quality_sign_info_l){ int32_t rsrq; int ret = nrf_modem_at_scanf("AT%XSNRSQ?","%%XSNRSQ: %i,%*i,%*i",&quality_sign_info_l->snr); if (ret!=1) { LOG_ERR("nrf_modem_at_scanf [XSNRSQ] error:%d", ret); return; } quality_sign_info_l->snr -= 24; ret = nrf_modem_at_scanf("AT+CESQ","+CESQ: %*i,%*i,%*i,%*i,%i,%i", &rsrq, &quality_sign_info_l->rsrp); if (ret!=2) { LOG_ERR("nrf_modem_at_scanf [AT+CESQ] error:%d", ret); return; } quality_sign_info_l->rsrq = (((float)rsrq)/2) -19.5; quality_sign_info_l->rsrp -= 140; LOG_INF("rsrp:%d dB, rsrq: %02.1f dB, snr: %d dB", quality_sign_info_l->rsrp, quality_sign_info_l->rsrq, quality_sign_info_l->snr ); }
Should I measure anything else to evaluate the antennas/link quality? While there's the %XRFTEST command available, I chose to only to focus on these three parameters as they are easier to configure. The %XRFTEST is considerably more detailed and needs more parameters.
The program I have wrote starts with the initialization of the buttons, the activation of +CMEE and the call of nrf_modem_lib_init(). When switch 3 is slid, the modem establishes a connection with the tower and provides information such as the current Band in use, MCC, MNC, LAC, modem version, and SDK version. Once connected, pressing button 2 triggers the function get_signal_quality_params(), which prints the values of RSRQ, RSRP, and SNR. I decided to use this method because I enabled the AT host library, which gives me control over band selection and tower changes.However, it seems that this setup is not functioning as expected.
Here is the normal configuration without forceing anything:
Below I am trying to disable band 20 and see if it can connect to another band, but all I get is +CEREG:4 which means unknown. According to the nrf9160 certification, bands 1, 3, 8 and 28 should be supported in the EU. If it's not working, what adjustments can I make to avoid this error? Why is this issue occurring? I am using the nrf9160 DK.
Additional link:
Link, (Set band lock before activating modem with +CFUN.)
According to this post, it is possible to switch to a different tower. I use the +COPS command, and the picture below shows how I done it. Is there any other way to choose the tower. I would like to specify the CID instead of mcc and mnc because I get many towers with the same mcc and mnc.
How does the modem decide which tower to take? Does it do the same as in the band selection algorithm.
Thanks for the help and patience!!!