AT%NCELLMEAS=x,y gives an error message when x > 2

Hello,

I am trying to issue the command like AT%NCELLMEAS=3,3 on my console when running asset_tracker_v2 and using Serial Terminal, which is a superb terminal for issuing AT commands. But the command produces an ugly log error message. I tracked down what is going on, and I hope you can fix this. So, in lte_lc.c, the handler is at_handler_ncellmeas(). But that handler needs  knowledge of ncellmeas_params.search_type to do the proper handling. And that handler only has the information if lte_lc_neighbor_cell_measurement() was called first.

This is very ugly and also confusing, suggesting to me that I have no clue what is going on. I absolutely need every help possible from AT commands to figure out whether we should be using a different PLMN at some weak signal locations we have in the field. I don't want to have my colleagues write a more complicated CLI than they already have--I want to take advantage of built in code and also AT commands. Can this be fixed? Thanks.

Regards,

Burt Silveman

Parents Reply
  • Hi Burt,

    I got some feedback and this seems to be a known issue, but shouldn't have negative impacts on the functionality although as mentioned, error log is printed when parsing fails.

    quote> I want to take advantage of built in code and also AT commands. Can this be fixed?

    When mixing the use of AT commands and the use of libraries that use AT commands, there is a risk for suboptimal behavior, or even clear errors. They (the developers) are not completely following why that error message is such a bad thing as they would expect AT%NCELLMEAS=3,3 to be used by a test engineer in the field (and not the real end customer). Please comment on this one so I can relay.

    Kenneth

Children
  • Thanks, Kenneth, for helpful hints. Truthfully, once I got used to the fact that the error log message will appear, it was not such a big deal. I just wondered if a hot shot programmer could make it disappear with minimal effort, so I figured it was worth asking. 

    Who is the test engineer in the field? I think that may be me, along with my colleagues, as our company provides a customized nRF9160 board to the real end customer. I am trying to help my colleagues figure out what options we have when the end customer uses the board in a weak signal location, where the board may connect once, but at some point, disconnect and not reconnect to any network for a very long time.

    When it comes to understanding the LTE-M procedure for searching for a usable cell, I admittedly am clueless. I have experimented with AT commands like %NCELLMEAS hoping I can get hints. Here is a question not directly related to what I started the ticket with: suppose I was using a home network SIM, like Verizon (US), and the strongest Verizon cell signal was too weak. If I replaced that SIM with one that does do roaming, is it possible that the roaming SIM would have a better chance of finding a usable signal? Maybe consider the iBasis SIM used with the DK and Thingy boards, although we probably would not use that one specifically.

    My experiments with %NCELLMEAS have been with a connected board. I never see other than 0 neighbor cells. My thought is to work with a board that is in functional mode receive only (AT+CFUN=2) and then see what happens.

    Burt

  • Here is something related that seems like a bug:

    > at%ncellmeas=5,5
    OK
    > at%ncellmeas=5,2
    +CME ERROR: 530
    > at%ncellmeasstop
    OK
    > at%ncellmeas=5,4
    OK
    >>>Here is where I ask if there are one or two bugs. Take my word that I issued the %ncellmeas=5,2 shortly after issuing the %ncellmeas=5,4 command. I did not get a CME ERROR:530 error but neither did I get any results from the %ncellmeas=5,4 command, other than an OK. In the %ncellmeas=5,5 case I could wait a REALLY long time before issuing %ncellmeas=5,2 and still get the 530 error. Why do 5,4 and 5,5 behave so differently? Although I don't show it here, 5,3 and 5,4 do the same thing: no output. This is modem firmware 1.3.5. And the AT_CLIENT sample program. More testing shows me that 5,5 will eventually finish but it does not print anything at that time.
    > at%ncellmeas=5,2
    OK
    %NCELLMEAS: 0,"025FFB01","311480","9B00",65535,0,5230,268,45,26,3669915,0,0,"0BBF5E0F","310410","2704",65535,0,5110,381,36,19,3669924,0,0
    > at%ncellmeas=5,4
    OK
    > at%ncellmeas=5,2
    OK
    %NCELLMEAS: 0,"025FFB01","311480","9B00",65535,0,5230,268,45,25,3681995,0,0,"0BBF5E0F","310410","2704",65535,0,5110,381,36,16,3682004,0,0

  • I think we would need modem log for these AT%NCELLMEAS=5,X related questions/issues to see what's really going on. CME error 530 doesn’t seem to be in the error code lists we can find so would be nice to see what modem actually does here and is there some encoding problem in the app side. So modem log and corresponding output from application side would be nice for futher investigation here.

    If you want to see what networks are available when a device cannot seem to find network. AT%NCELLMEAS=4,15, should do the trick. You could also do a PLMN search with AT+COPS=?.

    Hope that helps,
    Kenneth

  • I may set things up to do a modem log, but before I do, I was surprised that you did not find CME error 530 on your error code lists: it is one of two errors shown in the nrf9160 AT Commands Reference Guide under section 5.37 %NCELLMEAS. It simply means Measurement Ongoing. With that in mind, do you still need a modem trace?

    Thank you for reminding me about AT+COPS=? Interestingly, it shows 4 PLMNs
    > AT+COPS=?
    +COPS: (2,"","","311480",7),(1,"","","310410",7),(1,"","","313100",7),(1,"","","310260",7)

    where 313100 (FirstNet) I had never seen before. And if I execute AT%NCELLMEAS=4,x where x>3, I still see no cells. If I use 4,3 then I see all but 313100. Do you think there is any relationship between the problem I am experiencing with NCELLMEAS and the 313100 network--is it possible that that network has a weak signal, causing it to appear with AT+COPS=? but not with NCELLMEAS?

    Let me know if I should do a modem trace, given this additional information. Thanks.

    Burt

  • Hello again,

    Let me relay your input and check if they need further information.

    You are right about the error code, we can find the error code in the latest release under section 5.37 as you write: 
    https://infocenter.nordicsemi.com/pdf/nrf9160_at_commands_v2.4.pdf 

    Kenneth

Related