How to get address of connected USB modem?

16,769

Solution 1

Probably too late, but it might help others. Wouldn't help you to use mmcli from ModemManager?

$ mmcli -L

Found 1 modems:
    /org/freedesktop/ModemManager1/Modem/4 [Lenovo] H5321 gw

$ mmcli -m 4 

/org/freedesktop/ModemManager1/Modem/4 (device id '34391e5ed3c2b2b7f11d7b36
53147e93414a8c06')
  -------------------------
  Hardware |   manufacturer: 'Lenovo'
           |          model: 'H5321 gw'
           |       revision: 'R3C11'
           |      supported: 'gsm-umts'
           |        current: 'gsm-umts'
           |   equipment id: '358993042510275'
  -------------------------
  System   |         device: '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4'
           |        drivers: 'cdc_acm, cdc_wdm, cdc_ncm'
           |         plugin: 'Ericsson MBM'
           |   primary port: 'cdc-wdm2'
           |          ports: 'cdc-wdm2 (at), wwp0s20u4i6 (net), cdc-wdm1 (at), 
ttyACM1 (at), ttyACM2 (gps), ttyACM0 (at)'
  ...

Solution 2

Solution 1: Run dmesg and watch out for ttyUSB* lines if your modem interface is a classical emulated serial interface.

Solution 2: Browse /sys/bus/usb/devices/X-1:Y:*/ until you find useful information.

Based on your line Bus 003 Device 013: ID 0421:0007 Nokia Mobile Phones, i would guess X=3 and Y= 12 (13 minus one).

Solution 3: Run udevadm monitor as you plug your USB device.

Share:
16,769

Related videos on Youtube

Kirix
Author by

Kirix

Updated on September 18, 2022

Comments

  • Kirix
    Kirix over 1 year

    I just connected my N81 telephone as USB modem to Linux Mint 14. All works fine, just wondering how to find a full path to this device, something like /dev/tty*.

    • Admin
      Admin about 10 years
      take a look at lsusb -v but I'm not sure.
    • Admin
      Admin about 10 years
      @Kiwy yeah, there it is: 'Bus 003 Device 013: ID 0421:0007 Nokia Mobile Phones' But no address provided
    • Admin
      Admin about 10 years
      maybe ls -l /dev/ could allow you to identify the thing if you find the number of nod maybe 3,13 in your case but I can't assure it
  • Admin
    Admin about 5 years
    How do you translate Bus 003 Device 013: ID 0421:0007 Nokia Mobile Phones to a device like /dev/ttyACM4?
  • Admin
    Admin about 5 years
    The kernel folks say to remove ModemManager because it causes too many problems. I'm not sure I agree. I think the problem is in the device or the way the device is setup. Also see How to make /dev/ttyACM0 (and friends) exclusive?
  • pevik
    pevik about 5 years
    Well, in lists.kernelnewbies.org/pipermail/kernelnewbies/2019-March/… Greg KH just says, that if person handles modem with own peace of code, than it cannot use ModemManager as they're fighting over serial line with each other. That's not a general statement that ModemManager is bad and should be removed.