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

Virtual /dev/ttyACMx COM port not found on macOS or Linux

Hello -

I am trying to run the USB CDC ACM example on macOS 10.12.6. Following the instructions in the example app, I should see a virtual COM port as /dev/ttyACMx when I connect both the USB and J-link ports to my Mac. I am running the example on the nRF52840-DK board with the 15.3.0 SDK. Unfortunately all I see are two usbmodem ports: /dev/cu.usbmodem14111 and /dev/cu.usbmodem14121. I have tried on two different macOS laptops.

When I use the "screen" utility connected to one of the usbmodem ports and run the USB CDC ACM example with SEGGER Embedded Studio, I do see the CLI interface in the terminal and I can send data from the terminal to the app. But when I press Button 1, the call to app_usbd_cdc_acm_write() fails with NRF_ERROR_INVALID_STATE. Presumably this is because the virtual COM port has not been opened.

From what I've read, the virtual COM port should become available automatically on both macOS and Linux when I connect both the J-Link and nRF USB ports to my Mac. I also tried connecting the board to my Ubuntu 18.04.1 machine and don't see the virtual COM port there either. Searching through the DevZone, I found a related post that suggested installing the J-Link 6.22g package. I tried that as well and unfortunately that didn't resolve this issue either.

Based on these results, I'm guessing I am missing something obvious. Are there additional steps, switch/jumper configurations, etc... required to enumerate the virtual COM port on macOS? Also, assuming we are able to resolve this issue, is it still the case that we would need to write a NRF_LOG backend for USB to route NRF_LOG data through the virtual COM port?

Best regards,

Brian

Parents
  • Hi,

    It is correct that you see the port as usbmodem ports on MacOS. It might be that you are connected to SEGGER VCOM when you see the CLI interface. Can you check if this is the case? What version of the nRF52840-DK board do you have? Do you use a preview DK maybe?

  • Hello -

    Thank you for the follow-up. I am not sure how to know if the board is connected to SEGGER VCOM. This is what I see when I run JLinkExe on macOS:

    SEGGER J-Link Commander V6.22g (Compiled Jan 17 2018 16:45:05)
    DLL version V6.22g, compiled Jan 17 2018 16:44:56
    
    Connecting to J-Link via USB...O.K.
    Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan  7 2019 14:07:15
    Hardware version: V1.00
    S/N: 683610167
    VTref = 3.300V
    

    This is what I get when I list the virtual com ports:

    $ ls /dev/cu*
    /dev/cu.Bluetooth-Incoming-Port /dev/cu.usbmodem14111 /dev/cu.usbmodem14121
    

    I don't believe I am running a preview DK. My nRF52840-DK board box sticker shows:

    nRF6828

    Rev. 1.1.1

    2019.26

    Lastly, this is what I see in the CLI interface:

    My guess is that the error (described above) indicates that the board is connected over serial but not through the virtual com port. We don't see /dev/ttyACMx when listing the ports on macOS or Linux.

    Regards,

    Brian

Reply
  • Hello -

    Thank you for the follow-up. I am not sure how to know if the board is connected to SEGGER VCOM. This is what I see when I run JLinkExe on macOS:

    SEGGER J-Link Commander V6.22g (Compiled Jan 17 2018 16:45:05)
    DLL version V6.22g, compiled Jan 17 2018 16:44:56
    
    Connecting to J-Link via USB...O.K.
    Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan  7 2019 14:07:15
    Hardware version: V1.00
    S/N: 683610167
    VTref = 3.300V
    

    This is what I get when I list the virtual com ports:

    $ ls /dev/cu*
    /dev/cu.Bluetooth-Incoming-Port /dev/cu.usbmodem14111 /dev/cu.usbmodem14121
    

    I don't believe I am running a preview DK. My nRF52840-DK board box sticker shows:

    nRF6828

    Rev. 1.1.1

    2019.26

    Lastly, this is what I see in the CLI interface:

    My guess is that the error (described above) indicates that the board is connected over serial but not through the virtual com port. We don't see /dev/ttyACMx when listing the ports on macOS or Linux.

    Regards,

    Brian

Children
No Data
Related