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

LTE Link Monitor and Trace collector not possible with nRF9160 dev-kit - using Apple Macbook Pro - serial port issue

Hi,

I am using an nRF9160 dev-kit and I am debigging some connectivity issues.

Unfortunately there is some random bahaviour on the Serial Interfaces, which are exposed to my Macbook.

Sometimes it is not possible to use the Trace Collector, sometimes it is working.

Port #2 is not selectable (it is the USB interface with 2 ports).

I have the impression it depends on the way, the USB ports are enumerated. I.e. sometimes it is working.

On Windows and Linux, I do not have the same problem. 

But on Mac the "Auto Device/Port Filter" is not supported, I get individual ports.

I am attaching a few screenshots, which hopefully expain my problem.

And here are also some logfiles.

# nRFConnect System Report - 2020-09-04T12-59-11.594Z

- System:     Apple Inc. MacBookPro15,2
- BIOS:       Apple Inc. 
- CPU:        1 x Intel® Core™ i5-8279U 2.40 GHz 8 cores (4 physical)
- Memory:     964.7 MB free of 16 GB total
- Filesystem: /dev/disk1s1 (HFS) 465.6 GB 2.3% used

- OS:         Mac OS X (10.15.6) darwin x64

- Versions
    - kernel: 19.6.0
    - git: 2.24.3
    - node: 12.0.0
    - python: 2.7.16
    - python3: 3.7.3

- Connected devices:
    - /dev/tty.usbmodem0009600182571: 000960018257 PCA10090

2020-09-04T12:57:42.971Z INFO Application data folder: /Users/owierichs/Library/Application Support/nrfconnect/pc-nrfconnect-linkmonitor
2020-09-04T12:57:43.063Z DEBUG App pc-nrfconnect-linkmonitor v1.1.6 official
2020-09-04T12:57:43.063Z DEBUG App path: /Users/owierichs/.nrfconnect-apps/node_modules/pc-nrfconnect-linkmonitor
2020-09-04T12:57:43.063Z DEBUG nRFConnect 3.5.0 is supported by the app (^3.2.0)
2020-09-04T12:57:43.063Z DEBUG nRFConnect path: /Applications/nRF Connect.app/Contents/Resources/app.asar
2020-09-04T12:57:43.063Z DEBUG HomeDir: /Users/owierichs
2020-09-04T12:57:43.064Z DEBUG TmpDir: /var/folders/d1/f1j8j__x7bx7dtwb3bcgwscm0000gn/T/
2020-09-04T12:57:43.801Z VERBOSE Could not fetch serial number for serial port at /dev/tty.Bluetooth-Incoming-Port
2020-09-04T12:57:48.319Z INFO Modem port is opened
2020-09-04T12:57:48.324Z DEBUG modem >> AT+CFUN?
2020-09-04T12:57:52.903Z DEBUG modem >> AT+CFUN=1
2020-09-04T12:57:53.903Z ERROR Error: 'AT+CFUN=1
' timed out
2020-09-04T12:57:55.071Z DEBUG modem >> AT+CFUN?
2020-09-04T12:57:56.073Z ERROR Error: 'AT+CFUN?
' timed out
2020-09-04T12:57:57.966Z DEBUG modem << [00:35:41.290,924] <inf> modem: signal quality update: 255,0,255,0
2020-09-04T12:58:02.383Z DEBUG modem >> AT+CFUN?
2020-09-04T12:58:03.384Z ERROR Error: 'AT+CFUN?
' timed out
2020-09-04T12:58:21.594Z INFO Modem port is closed
2020-09-04T12:58:21.600Z INFO Modem port is opened
2020-09-04T12:58:21.603Z DEBUG modem >> AT+CFUN?
2020-09-04T12:58:23.480Z DEBUG modem << NRF52840 board control statically configured. DK Uptime is 2390 seconds
2020-09-04T12:58:31.686Z INFO Modem port is closed

2020-09-04T13:07:20.625Z INFO Application data folder: /Users/owierichs/Library/Application Support/nrfconnect/pc-nrfconnect-linkmonitor
2020-09-04T13:07:20.729Z DEBUG App pc-nrfconnect-linkmonitor v1.1.6 official
2020-09-04T13:07:20.729Z DEBUG App path: /Users/owierichs/.nrfconnect-apps/node_modules/pc-nrfconnect-linkmonitor
2020-09-04T13:07:20.729Z DEBUG nRFConnect 3.5.0 is supported by the app (^3.2.0)
2020-09-04T13:07:20.729Z DEBUG nRFConnect path: /Applications/nRF Connect.app/Contents/Resources/app.asar
2020-09-04T13:07:20.729Z DEBUG HomeDir: /Users/owierichs
2020-09-04T13:07:20.729Z DEBUG TmpDir: /var/folders/d1/f1j8j__x7bx7dtwb3bcgwscm0000gn/T/
2020-09-04T13:07:21.443Z VERBOSE Could not fetch serial number for serial port at /dev/tty.Bluetooth-Incoming-Port
2020-09-04T13:08:08.291Z INFO Modem port is opened
2020-09-04T13:08:08.298Z DEBUG modem >> AT+CFUN?
2020-09-04T13:08:24.944Z DEBUG modem >> AT+CFUN=1
2020-09-04T13:08:25.944Z ERROR Error: 'AT+CFUN=1
' timed out
2020-09-04T13:08:26.729Z DEBUG modem >> AT+CFUN?
2020-09-04T13:08:27.730Z ERROR Error: 'AT+CFUN?
' timed out
2020-09-04T13:08:34.800Z DEBUG modem << [00:46:18.151,702] <inf> modem: signal quality update: 255,0,255,0
2020-09-04T13:08:46.409Z DEBUG modem << *** Booting Zephyr OS build v2.3.0-rc1-ncs1  ***
2020-09-04T13:08:46.414Z DEBUG modem << Flash regionsDomainPermissions
2020-09-04T13:08:46.417Z DEBUG modem << 00 00 0x00000 0x08000 Securerwxl
2020-09-04T13:08:46.419Z DEBUG modem << 01 31 0x08000 0x100000 Non-Securerwxl
2020-09-04T13:08:46.425Z DEBUG modem << Non-secure callable region 0 placed in flash region 0 with size 32.
2020-09-04T13:08:46.597Z DEBUG modem << SRAM regionDomainPermissions
2020-09-04T13:08:46.602Z DEBUG modem << 00 07 0x00000 0x10000 Securerwxl
2020-09-04T13:08:46.605Z DEBUG modem << 08 31 0x10000 0x40000 Non-Securerwxl
2020-09-04T13:08:46.606Z DEBUG modem << PeripheralDomainStatus
2020-09-04T13:08:46.609Z DEBUG modem << 00 NRF_P0               Non-SecureOK
2020-09-04T13:08:46.612Z DEBUG modem << 01 NRF_CLOCK            Non-SecureOK
2020-09-04T13:08:46.616Z DEBUG modem << 02 NRF_RTC0             Non-SecureOK
2020-09-04T13:08:46.619Z DEBUG modem << 03 NRF_RTC1             Non-SecureOK
2020-09-04T13:08:46.625Z DEBUG modem << 04 NRF_NVMC             Non-SecureOK
2020-09-04T13:08:46.626Z DEBUG modem << 05 NRF_UARTE1           Non-SecureOK
2020-09-04T13:08:46.629Z DEBUG modem << 06 NRF_UARTE2           SecureSKIP
2020-09-04T13:08:46.633Z DEBUG modem << 07 NRF_TWIM2            Non-SecureOK
2020-09-04T13:08:46.636Z DEBUG modem << 08 NRF_SPIM3            Non-SecureOK
2020-09-04T13:08:46.641Z DEBUG modem << 09 NRF_TIMER0           Non-SecureOK
2020-09-04T13:08:46.643Z DEBUG modem << 10 NRF_TIMER1           Non-SecureOK
2020-09-04T13:08:46.647Z DEBUG modem << 11 NRF_TIMER2           Non-SecureOK
2020-09-04T13:08:46.650Z DEBUG modem << 12 NRF_SAADC            Non-SecureOK
2020-09-04T13:08:46.655Z DEBUG modem << 13 NRF_PWM0             Non-SecureOK
2020-09-04T13:08:46.657Z DEBUG modem << 14 NRF_PWM1             Non-SecureOK
2020-09-04T13:08:46.660Z DEBUG modem << 15 NRF_PWM2             Non-SecureOK
2020-09-04T13:08:46.664Z DEBUG modem << 16 NRF_PWM3             Non-SecureOK
2020-09-04T13:08:46.667Z DEBUG modem << 17 NRF_WDT              Non-SecureOK
2020-09-04T13:08:46.672Z DEBUG modem << 18 NRF_IPC              Non-SecureOK
2020-09-04T13:08:46.674Z DEBUG modem << 19 NRF_VMC              Non-SecureOK
2020-09-04T13:08:46.677Z DEBUG modem << 20 NRF_FPU              Non-SecureOK
2020-09-04T13:08:46.681Z DEBUG modem << 21 NRF_EGU1             Non-SecureOK
2020-09-04T13:08:46.684Z DEBUG modem << 22 NRF_EGU2             Non-SecureOK
2020-09-04T13:08:46.690Z DEBUG modem << 23 NRF_DPPIC            Non-SecureOK
2020-09-04T13:08:46.691Z DEBUG modem << 24 NRF_GPIOTE1          Non-SecureOK
2020-09-04T13:08:46.695Z DEBUG modem << 25 NRF_REGULATORS       Non-SecureOK
2020-09-04T13:08:46.697Z DEBUG modem << SPM: NS image at 0xc000
2020-09-04T13:08:46.699Z DEBUG modem << SPM: NS MSP at 0x200237d8
2020-09-04T13:08:46.702Z DEBUG modem << SPM: NS reset vector at 0xe65d
2020-09-04T13:08:46.707Z DEBUG modem << SPM: prepare to jump to Non-Secure image.
2020-09-04T13:08:46.929Z DEBUG modem << *** Booting Zephyr OS build v2.3.0-rc1-ncs1  ***
2020-09-04T13:08:46.953Z DEBUG modem << [00:00:00.222,229] <inf> main: modem-test 0.8-cat_m1-trace
2020-09-04T13:08:46.959Z DEBUG modem << [00:00:00.229,705] <inf> modem: Connecting to network...
2020-09-04T13:08:46.992Z DEBUG modem << [00:00:00.270,294] <inf> modem: Modem firmware: mfw_nrf9160_1.2.1
2020-09-04T13:08:47.004Z DEBUG modem << [00:00:00.285,675] <inf> modem: Supported bands: %XCBAND: (1,2,3,4,5,8,12,13,18,19,20,25,26,28,66)
2020-09-04T13:08:47.053Z DEBUG modem << [00:00:00.336,914] <inf> modem: status update: +CEINFO: 1,1,I,0,0,255,127
2020-09-04T13:08:50.705Z DEBUG modem << [00:00:03.971,466] <inf> modem: signal quality update: 255,0,255,0
2020-09-04T13:08:50.715Z DEBUG modem << [00:00:03.998,870] <inf> modem: status update: +CEREG: 2,"FFFE","FFFFFFFF",7,0,0,"11100000","11100000"
2020-09-04T13:08:50.720Z DEBUG modem << [00:00:03.998,901] <inf> modem: registration status: 2
2020-09-04T13:09:03.017Z DEBUG modem << [00:00:16.304,779] <inf> modem: signal quality update: 255,0,255,0
2020-09-04T13:09:15.419Z DEBUG modem << [00:00:28.708,160] <inf> modem: signal quality update: 255,0,255,0
2020-09-04T13:09:37.837Z DEBUG modem << [00:00:51.127,044] <inf> modem: signal quality update: 255,0,255,0
2020-09-04T13:09:45.945Z INFO Modem port is closed
2020-09-04T13:09:45.952Z INFO Modem port is opened
2020-09-04T13:09:45.954Z DEBUG modem >> AT+CFUN?
2020-09-04T13:09:52.729Z DEBUG modem << NRF52840 board control statically configured. DK Uptime is 3080 seconds
2020-09-04T13:10:02.718Z DEBUG modem << NRF52840 board control statically configured. DK Uptime is 3090 seconds
2020-09-04T13:10:12.707Z DEBUG modem << NRF52840 board control statically configured. DK Uptime is 3100 seconds
2020-09-04T13:10:22.696Z DEBUG modem << NRF52840 board control statically configured. DK Uptime is 3110 seconds
2020-09-04T13:10:32.685Z DEBUG modem << NRF52840 board control statically configured. DK Uptime is 3120 seconds
2020-09-04T13:10:42.674Z DEBUG modem << NRF52840 board control statically configured. DK Uptime is 3130 seconds
2020-09-04T13:10:52.663Z DEBUG modem << NRF52840 board control statically configured. DK Uptime is 3140 seconds
2020-09-04T13:10:52.997Z INFO Modem port is closed

Parents
  • Hi Martin,

    I know, that the Auto device/port filter is not supported on Mac and I need to selact manually.

    But my problem is, that not all ports are coming up properly.

    I usually can connect only to 2 ports out of the 3, which I should get:

    1) the nRF9160 AT command interface

    2) the nRF52840 showing this message: NRF52840 board control statically configured. DK Uptime is 3080 seconds

    3) Trace Collector coming up randomly, but quite often not.

    regards,

    Oliver

  • Hi Oliver,

    Correct,

    #1 there are is one port from the console of the nrf9160 (at_client in your case),
    #2 one port for the nrf52 (just running the boardcontroller app) and
    #3 last port is used for modem tracing when thats enabled(CONFIG_BSD_LIBRARY_TRAACING=y)

    The last port should only be used with the Trace Collector app. (opening that port in LTE Link Monitor would not work properly).

    Do you have issues using the Console port from nRF9160 with LTE link monitor and the modem trace port connected to Trace Collector?

    Could you give more details if that is the issue? (5/6 screenshots are corrupted)


    Best regards,
    Martin L.


  • Hi Oliver,

    Thank you very much for the additional feedback and behavior.

    That could be the reason, I will forward it to the development team.

    Best regards,
    Martin L.

  • I've been running into this trouble also.

    Does the trace tool do anything special, or does it just read from the serial port?  Could I write a small Python script to do the same thing more reliably without having to deal with the Electron app?

  • I have written such a script. Invoke it as `nrftrace.py /dev/tty.usbmodem*5 trace.bin`.

    #!/usr/bin/env python3
    
    import serial
    import sys
    import time
    
    ser = serial.Serial(sys.argv[1], 1000000, timeout = None)
    lasttime = 0
    tbs = 0
    with open(sys.argv[2], 'wb') as tfp:
        while True:
            b = ser.read(1)
            tfp.write(b)
            tbs = tbs + 1
            if time.time() > (lasttime + 1):
                print(f"... {tbs} bytes ...")
                lasttime = time.time()
        

  • Hi Joshua,
    Nice work.
    As you probably have seen the trace tool just reads from the serial port so it is nice to see that you could use this alternative method.
    We are working on a fix on the modem trace app, so at least next update should fix this issue where the port changes on MAC.

  • Hi,

    When will the modem trace app be fixed ?

    regards,

    Oliver

Reply Children
Related