This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to enable modem log in nRF9160?

nRF9160 is scanning and but  not latching to the network.

using "AT+COPS=1,2,"number"" to latch and it is not registering.

Verified the logs in server and nRF9160 dev kit is not hitting the server.

we need Detailed logging from nRF9160 modem for all network calls, please help us to enable modem logging through UART.

Parents
  • There is a detailed blog post about it that was put up very recently here:

    https://devzone.nordicsemi.com/nordic/b/blog/posts/how-to-get-modem-trace-using-trace-collector-in-nrf-connect

    That spits out a binary log that Nordic hasn't given out a decoder for yet.  You'll need a Nordic employee to help analyze it.

    In my own experience, you can usually get a quick idea why the cellular connection is failing to without going through all that, though.  While the modem is offline, send the command "AT+CEREG=5" to activate extra modem status messages, and then connect with the COPS command.  As the modem tries different towers, you will get CEREG messages from the modem.  Pay attention to the cause type and reject cause fields of any CEREG messages that appear. If you're not getting *any* CEREG messages, that would imply the modem is not seeing any towers at all.

    Also, it sounds like this is your first time connecting, which implies you just got your dev kit.  They've upgraded the modem firmware a couple times recently and the new version is much better and also enables a lot more cellular bands than the old one (allowing you to see more towers).  You may want to check which version you're running with "AT+CGMR" and download the newest version if you're not already running it.

Reply
  • There is a detailed blog post about it that was put up very recently here:

    https://devzone.nordicsemi.com/nordic/b/blog/posts/how-to-get-modem-trace-using-trace-collector-in-nrf-connect

    That spits out a binary log that Nordic hasn't given out a decoder for yet.  You'll need a Nordic employee to help analyze it.

    In my own experience, you can usually get a quick idea why the cellular connection is failing to without going through all that, though.  While the modem is offline, send the command "AT+CEREG=5" to activate extra modem status messages, and then connect with the COPS command.  As the modem tries different towers, you will get CEREG messages from the modem.  Pay attention to the cause type and reject cause fields of any CEREG messages that appear. If you're not getting *any* CEREG messages, that would imply the modem is not seeing any towers at all.

    Also, it sounds like this is your first time connecting, which implies you just got your dev kit.  They've upgraded the modem firmware a couple times recently and the new version is much better and also enables a lot more cellular bands than the old one (allowing you to see more towers).  You may want to check which version you're running with "AT+CGMR" and download the newest version if you're not already running it.

Children
  • Thanks!!.

    By following the above steps modem logging is enabled.

    Please help us parsing attached logs.

    trace-2019-05-31T13-00-11.411Z_NBIOT.bintrace-2019-05-31T13-13-06.848Z_LTE_M.bin

    2019-05-31T09:40:06.023Z INFO Application data folder: C:\Users\Bala\AppData\Roaming\nrfconnect\pc-nrfconnect-tracecollector
    2019-05-31T09:40:06.165Z DEBUG App pc-nrfconnect-tracecollector v0.9.0 official
    2019-05-31T09:40:06.165Z DEBUG App path: C:\Users\Bala\.nrfconnect-apps\node_modules\pc-nrfconnect-tracecollector
    2019-05-31T09:40:06.165Z DEBUG nRFConnect 2.6.2 is supported by the app (^2.6.0)
    2019-05-31T09:40:06.165Z DEBUG nRFConnect path: C:\Users\Bala\AppData\Local\Programs\nrfconnect\resources\app.asar
    2019-05-31T09:40:06.165Z DEBUG HomeDir: C:\Users\Bala
    2019-05-31T09:40:06.165Z DEBUG TmpDir: C:\Users\Bala\AppData\Local\Temp
    2019-05-31T09:40:06.173Z VERBOSE Could not fetch serial number for serial port at COM7
    2019-05-31T09:40:06.174Z VERBOSE Could not fetch serial number for serial port at COM8
    2019-05-31T09:40:55.427Z INFO Device opened
    2019-05-31T10:50:51.634Z INFO Device closed
    2019-05-31T12:59:47.959Z INFO Device opened
    2019-05-31T12:59:47.972Z ERROR Serial port error:  Opening COM12: Access denied
    2019-05-31T12:59:59.332Z INFO Tracefile created: C:\Users\Bala\AppData\Roaming\nrfconnect\pc-nrfconnect-tracecollector\trace-2019-05-31T12-59-59.328Z.bin
    2019-05-31T13:00:07.712Z INFO Device opened
    2019-05-31T13:00:09.716Z INFO Tracefile closed
    2019-05-31T13:00:11.413Z INFO Tracefile created: C:\Users\Bala\AppData\Roaming\nrfconnect\pc-nrfconnect-tracecollector\trace-2019-05-31T13-00-11.411Z.bin
    2019-05-31T13:11:41.885Z INFO Tracefile closed
    2019-05-31T13:13:06.849Z INFO Tracefile created: C:\Users\Bala\AppData\Roaming\nrfconnect\pc-nrfconnect-tracecollector\trace-2019-05-31T13-13-06.848Z.bin
    2019-05-31T13:24:57.912Z INFO Tracefile closed
    2019-05-31T13:29:46.007Z INFO Device closed
    

    Below log is full sequence of log powering on to network latching and getting IP address. but it is taking 10 to 20 mins to attach to network.

     Could you parse/analyse attached log.

    Also would be possible to release tool to read the modem log from our end.

    Fill_seq_network_connect_3-6-19_3_09pm.bin

    
    
    
    

    Modem Firmware version:mfw_nrf9160_0.7.0-29.alpha

    nrf dk version:v0.4.0-79-gee5cf34

    
    
Related