Trouble with EM7565 startup...



  • Hi,
    I've mentioned in other posts that we have a few cases where we need to use the EM7565 because of the LTE bands that it supports. Anyway, I've been working the last few days with the EM7565 plugged into an M2-to-USB adapter so that I can plug it in to the expansion USB connector on the Voxl-Flight-Deck (VFD).
    To start off I made some progress with the modem (it registers with my LTE network!) when plugging it into my Ubuntu 18.04 host. That was a sanity check in preparation for plugging it into my VFD. Note that I have already worked with the RC7611 and the LTE-addon board successfully, so I've walked through the process once.

    So, I started with no changes thinking that maybe it will "just work". NOPE 😞 . To trace the steps, I added a few lines to /etc/systemd/system/voxl-modem.service so I could view the log with journalctl -u voxl-modem. The output of this follows:

    -- Logs begin at Thu 1970-01-01 00:00:04 UTC, end at Wed 2022-09-21 20:31:04 UTC. --
    Jan 01 00:00:07 apq8096 systemd[1]: Starting Modem Initialization...
    Jan 01 00:00:09 apq8096 systemd[1]: Started Modem Initialization.
    Jan 01 00:00:09 apq8096 voxl-modem-start.sh[2846]: VOXL detected...
    Jan 01 00:00:09 apq8096 voxl-modem-start.sh[2846]: Initializing v2 modem...
    Jan 01 00:00:09 apq8096 voxl-modem-start.sh[2846]: Waiting for ttyUSB2...
    Jan 01 00:00:12 apq8096 voxl-modem-start.sh[2846]: ttyUSB2
    Jan 01 00:00:13 apq8096 voxl-modem-start.sh[2846]: Initalizing cellular connection...
    Sep 21 20:23:12 apq8096 voxl-modem-start.sh[2846]: Failed to open device
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 is available
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 10
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 9
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: Checking for system registration
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: Attempt: 1
    Sep 21 20:23:13 apq8096 voxl-modem-start.sh[2846]: Got exception when checking registration status
    Sep 21 20:23:28 apq8096 voxl-modem-start.sh[2846]: Failed to open device
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 is available
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 10
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 9
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 8
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: Checking for system registration
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: Attempt: 1
    Sep 21 20:23:29 apq8096 voxl-modem-start.sh[2846]: Got exception when checking registration status
    Sep 21 20:23:44 apq8096 voxl-modem-start.sh[2846]: Failed to open device
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 is available
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 10
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 9
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 8
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: Checking for system registration
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: Attempt: 1
    Sep 21 20:23:45 apq8096 voxl-modem-start.sh[2846]: Got exception when checking registration status
    Sep 21 20:24:01 apq8096 voxl-modem-start.sh[2846]: Failed to open device
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 is available
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 10
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 9
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 8
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: Checking for system registration
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: Attempt: 1
    Sep 21 20:24:02 apq8096 voxl-modem-start.sh[2846]: Got exception when checking registration status
    Sep 21 20:24:17 apq8096 voxl-modem-start.sh[2846]: Failed to open device
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 is available
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 10
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 9
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 8
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: Checking for system registration
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: Attempt: 1
    Sep 21 20:24:18 apq8096 voxl-modem-start.sh[2846]: Got exception when checking registration status
    Sep 21 20:24:33 apq8096 voxl-modem-start.sh[2846]: Failed to open device
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 is available
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 10
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 9
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: Unstick QMI countdown: 8
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: Checking for system registration
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: Attempt: 1
    Sep 21 20:24:34 apq8096 voxl-modem-start.sh[2846]: Got exception when checking registration status
    Sep 21 20:25:20 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:25:20 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:25:20 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:25:20 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:25:20 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:25:20 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:25:20 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 does not exist
    
    Sep 21 20:26:06 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:26:06 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:26:06 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:26:06 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:26:06 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:26:06 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:26:06 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 does not exist
    
    Sep 21 20:26:52 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:26:52 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:26:52 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:26:52 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:26:52 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:26:52 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:26:52 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 does not exist
    
    Sep 21 20:27:39 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:27:39 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:27:39 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:27:39 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:27:39 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:27:39 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:27:39 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 does not exist
    
    Sep 21 20:28:25 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:28:25 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:28:25 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:28:25 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:28:25 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:28:25 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:28:25 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 does not exist
    
    Sep 21 20:29:11 apq8096 voxl-modem-start.sh[2846]: Configuring GPIO to pull modem out of reset
    Sep 21 20:29:11 apq8096 voxl-modem-start.sh[2846]: Waiting for the diag serial port(/dev/ttyUSB0) to activate
    Sep 21 20:29:11 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/ttyUSB0
    Sep 21 20:29:11 apq8096 voxl-modem-start.sh[2846]: /dev/ttyUSB0 is available
    Sep 21 20:29:11 apq8096 voxl-modem-start.sh[2846]: Verifying existence of QMI port(/dev/cdc-wdm0)
    Sep 21 20:29:11 apq8096 voxl-modem-start.sh[2846]: checking for serial port: /dev/cdc-wdm0
    Sep 21 20:29:11 apq8096 voxl-modem-start.sh[2846]: /dev/cdc-wdm0 does not exist
    ...
    

    This is trace from voxl-modem-start.sh, as well as sierra.py and uqmi. Notice that the last 7 lines just keep repeating (I show that above with the blank line between each block) because for some reason /dev/cdc-wdm0 just goes away. Note that /dev/ttyUSB[1-2] also disappear.
    I know I'm now working with a modem that you don't claim support for, but if you have any idea what may be causing this it sure would be appreciated. Also, where is the source for the uqmi tool?


  • Dev Team

    @Ed-Sutter Do you know how much power the m.2 to USB adapter you're plugging in is pulling? Depending on which add-on board you're plugging it into on VOXL, it may not be able to provide the required current. Some of our add-on boards' USB ports max out at 0.5 A (M0030, M0017, M0048).

    When we've tested with 3rd party modem USB adapters in the past we've had to use our debug board v2 (M0078): https://www.modalai.com/products/voxl-debug-board-v2?_pos=4&_sid=bc3d50f8c&_ss=r

    which allows you to provide a higher current to the USB port.

    Source for uqmi lives here: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-modem/-/tree/master/src/modem/uqmi



  • @tom Well, when I plug the modem into my Ubuntu host using one of these testers it shows a suspiciously low current (10mA), but it also doesn't quite work (yet) on that system. The command mmcli --modem=0 shows (snippets):

      Hardware |         manufacturer: Sierra Wireless, Incorporated
               |                model: EM7565
               |             revision: SWI9X50C_01.08.04.00 dbb5d0 jenkins 2018/08/21 21:40:11
               |         h/w revision: 10001
               |            supported: gsm-umts, lte
               |              current: gsm-umts, lte
               |         equipment id: 353533100239592
      --------------------------------
      System   |               device: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1
               |              drivers: qcserial, qmi_wwan
               |               plugin: Sierra
               |         primary port: cdc-wdm0
               |                ports: ttyUSB0 (qcdm), ttyUSB2 (at), cdc-wdm0 (qmi),
               |                       wwp0s20f0u1i8 (net)
      --------------------------------
      Numbers  |                  own: 17327793967
      --------------------------------
      Status   |                 lock: sim-pin2
               |       unlock retries: sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)
               |                state: registered
               |          power state: on
               |          access tech: lte
               |       signal quality: 59% (recent)
    

    and the interface only comes up if I manually bring it up with ifconfig wwp0s20fu1i8 up ...

    wwp0s20f0u1i8: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
            inet6 fe80::2495:2f9d:cec5:53f  prefixlen 64  scopeid 0x20<link>
            unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 11  bytes 528 (528.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    

    Notice, there's no inet address likely because [for some reason I have yet to understand] POINTOPOINT,NOARP flags are set. Any thoughts on that? (meanwhile I will get a powered USB hub for now just to see if it makes any difference).


  • Dev Team

    @Ed-Sutter The other thing you have to check is the USB vendor / device id. The Linux device drivers often have those hard coded into them for support. If those id's aren't in the driver then it won't set it up.



  • @Eric-Katzfey That shows up with lsusb...

    Bus 001 Device 002: ID 1199:9091 Sierra Wireless, Inc.
    

    but I assume you're talking about something more specific to wwan? Do you know what I would look for to see if my host meets that requirement? I've obviously got modemmanager, libmbim-utils and libqmi-utils installed, but maybe I need newer versions?


  • Dev Team

    @Ed-Sutter I'm speaking specifically of VOXL, not your host computer, but it's the same idea. It's the actual Linux device driver for that piece of hardware. For example: https://gitlab.com/voxl-public/system-image-build/apq8096-kernel/-/blob/main/drivers/net/usb/qmi_wwan.c#L772



  • @Eric-Katzfey got it... Thanks!



  • @Eric-Katzfey Just reviewing this cause I finally got things working on Ubuntu, so now I'm back to getting it to work on my flight deck (waiting for a powered usb hub, and the other usb expansion board to follow).
    Anyway, if your comment about the USB vendor/device-id in the device drivers is specific to VOXL, then wouldn't you guys know (since you set up the system) if the drivers support my modem?

    Note: if this is a dumb question, i apologize... it is Friday afternoon! 🙂


Log in to reply