Panasonic cf-20 em7305 gps problem on ubuntu

Hello everyone, I am trying to activate the GPS functionality under UBUNTU 22.04.
Even if i try to communicate with the modem i get an “WrongState” response.

$ sudo mmcli -m 0 --enable
error: couldn't enable the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.WrongState: modem in failed state'

The only way to get information is from the mmcli command:

$ sudo mmcli -m 0 –location-status
  -----------------------------
  General  |              path: /org/freedesktop/ModemManager1/Modem/0
           |         device id: f415afcae9a3c9978fd35460293a407556b817e9
  -----------------------------
  Hardware |      manufacturer: Sierra Wireless, Incorporated
           |             model: EM7305
           | firmware revision: SWI9X15C_05.05.78.00
           |      h/w revision: EM7305
           |         supported: gsm-umts, lte
           |           current: gsm-umts, lte
           |      equipment id: 357726090562884
  -----------------------------
  System   |            device: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2
           |           drivers: cdc_mbim
           |            plugin: sierra
           |      primary port: cdc-wdm2
           |             ports: cdc-wdm2 (mbim), wwan0 (net)
  -----------------------------
  Status   |             state: failed
           |     failed reason: sim-missing
           |       power state: low
  -----------------------------
  Modes    |         supported: allowed: 2g; preferred: none
           |                    allowed: 3g; preferred: none
           |                    allowed: 4g; preferred: none
           |                    allowed: 2g, 3g; preferred: 3g
           |                    allowed: 2g, 3g; preferred: 2g
           |                    allowed: 2g, 4g; preferred: 4g
           |                    allowed: 2g, 4g; preferred: 2g
           |                    allowed: 3g, 4g; preferred: 4g
           |                    allowed: 3g, 4g; preferred: 3g
           |                    allowed: 2g, 3g, 4g; preferred: 4g
           |                    allowed: 2g, 3g, 4g; preferred: 3g
           |                    allowed: 2g, 3g, 4g; preferred: 2g
           |           current: allowed: 2g, 3g, 4g; preferred: 4g
  -----------------------------
  Bands    |         supported: egsm, dcs, pcs, g850, utran-1, utran-5, utran-8, utran-2, 
           |                    eutran-1, eutran-3, eutran-7, eutran-8, eutran-20
           |           current: egsm, dcs, pcs, g850, utran-1, utran-5, utran-8, utran-2, 
           |                    eutran-1, eutran-3, eutran-7, eutran-8, eutran-20
  -----------------------------
  IP       |         supported: ipv4, ipv6, ipv4v6

and

$ sudo qmicli -p -d /dev/cdc-wdm2 --dms-swi-get-usb-composition
[/dev/cdc-wdm2] Successfully retrieved USB compositions:
            USB composition 1: HIP, DM, NMEA, AT, MDM1, MS
            USB composition 6: DM, NMEA, AT, QMI
            USB composition 7: DM, NMEA, AT, RMNET1, RMNET2, RMNET3
            USB composition 8: DM, NMEA, AT, MBIM
            USB composition 9: MBIM
            USB composition 10: NMEA, MBIM
            USB composition 11: DM, MBIM
            USB composition 12: DM, NMEA, MBIM
        [*] USB composition 14: Dual configuration: USB composition 6 and USB composition 9
            USB composition 19: Dual configuration: USB composition 7 and USB composition 9

Devices are shown as /dev/ttyUSB0 and /dev/cdc-wdm2.

Any help would be great.

Do you have AT command port?

Beats me. I haven’t worked with AT ports yet :disappointed:

you can install the MBPL USB driver: (MBPL_DRIVERS_R35_ENG4-usb-src.tar)

https://source.sierrawireless.com/resources/airprime/software/mbpl/mbpl-software-latest/#sthash.ZXRwiiKx.1i3tew3y.dpbs

Thank you. I’ve compiled an installed the driver. Will reboot and test it.

OK., installed. What shall i do now?

how many /dev/ttyUSBx port are generated in dmesg?
you can use minicom to open one by one to see if there is any response on AT command

Thank you for your effort.

sudo dmesg | grep ttyUSB
[    8.807000] usb 1-3.1.2: cp210x converter now attached to ttyUSB0

One USB port.

But no communication over /dev/ttyUSB0 - opened but stuck.

sudo minicom -D /dev/ttyUSB0

There is no AT command port.

are you able to use --dms-swi-set-usb-composition=7 ?

So …

$ qmicli -d /dev/ttyUSB0  --dms-swi-set-usb-composition=7 /dev/ttyUSB0
[19 Mär 2024, 14:24:48] -Warning ** [/dev/ttyUSB0] couldn't detect transport type of port: unexpected port subsystem
error: couldn't open the QmiDevice: Cannot automatically select QMI/MBIM mode

didn’t you should do as before?
sudo qmicli -p -d /dev/cdc-wdm2 --dms-swi-get-usb-composition

and …

$  sudo qmicli -p -d /dev/cdc-wdm2 --dms-swi-get-usb-composition
[/dev/cdc-wdm2] Successfully retrieved USB compositions:
            USB composition 1: HIP, DM, NMEA, AT, MDM1, MS
            USB composition 6: DM, NMEA, AT, QMI
            USB composition 7: DM, NMEA, AT, RMNET1, RMNET2, RMNET3
            USB composition 8: DM, NMEA, AT, MBIM
            USB composition 9: MBIM
            USB composition 10: NMEA, MBIM
            USB composition 11: DM, MBIM
            USB composition 12: DM, NMEA, MBIM
        [*] USB composition 14: Dual configuration: USB composition 6 and USB composition 9
            USB composition 19: Dual configuration: USB composition 7 and USB composition 9

then why are you using /dev/ttyUSB0 in previous test?

Sorry. seemed like it killed my connection. So on wire …

$ sudo qmicli -d /dev/cdc-wdm2 --dms-swi-set-usb-composition=7
[/dev/cdc-wdm2] Successfully set USB composition

        You may want to power-cycle the modem now, or just set it offline and reset it:
                $> sudo qmicli ... --dms-set-operating-mode=offline
                $> sudo qmicli ... --dms-set-operating-mode=reset

$ sudo qmicli -d /dev/cdc-wdm2 --dms-set-operating-mode=offline
[/dev/cdc-wdm2] Operating mode set successfully
$ sudo qmicli -d /dev/cdc-wdm2 --dms-set-operating-mode=reset
[/dev/cdc-wdm2] Operating mode set successfully

Now i am getting ttyUSB0 to ttyUSB3

use minicom to try /dev/ttyUSB2 or /dev/ttyUSB3 on following AT commands:


ati3
AT!entercnd="A710"
at!custom?
at+cfun?
at!GSTATUS?
AT!UDUSBCOMP?
AT!UDUSBCOMP=?
at!PCINFO?
AT!GPSEND=0
AT!GPSFIX=0,255,1000

Thank you.
ttyUSB3 is working.
here’s the terminal output (echo is unfortunately off :((

Manufacturer: Sierra Wireless, Incorporated
Model: EM7305
Revision: SWI9X15C_05.05.78.00 r34310 CARMD-EV-FRMWR3 2017/09/17 00:43:17
IMEI: 357726090562884
IMEI SV: 22
FSN: FL825604900310
+GCAP: +CGSM


OK

+CFUN: 0

OK

ERROR

ERROR

ErrCode = 12

OK

Manufacturer: Sierra Wireless, Incorporated
Model: EM7305
Revision: SWI9X15C_05.05.78.00 r34310 CARMD-EV-FRMWR3 2017/09/17 00:43:17
IMEI: 357726090562884
IMEI SV: 22
FSN: FL825604900310
+GCAP: +CGSM


OK

OK

!CUSTOM: 
            GPIOSARENABLE       0x01
            GPSENABLE           0x04
            GPSSEL              0x01
            NMEAENABLE          0x01
            SINGLEAPNSWITCH     0x01
            USBSERIALENABLE     0x02


OK

+CFUN: 0

OK

!GSTATUS: 
Current Time:  953              Temperature: 32
Bootup Time:   6                Mode:        LOW POWER MODE 
System mode:   TD-SCDMA         PS state:    Not attached 


OK

!UDUSBCOMP: 7

OK

0  - reserved                                     NOT SUPPORTED
1  - DM   AT                                      SUPPORTED
2  - reserved                                     NOT SUPPORTED
3  - reserved                                     NOT SUPPORTED
4  - reserved                                     NOT SUPPORTED
5  - reserved                                     NOT SUPPORTED
6  - DM   NMEA  AT    QMI                         SUPPORTED
7  - DM   NMEA  AT    RMNET1 RMNET2 RMNET3        SUPPORTED
8  - DM   NMEA  AT    MBIM                        SUPPORTED
9  - MBIM                                         SUPPORTED
10 - NMEA MBIM                                    SUPPORTED
11 - DM   MBIM                                    SUPPORTED
12 - DM   NMEA  MBIM                              SUPPORTED
13 - Config1: comp6    Config2: comp8             NOT SUPPORTED
14 - Config1: comp6    Config2: comp9             SUPPORTED
15 - Config1: comp6    Config2: comp10            NOT SUPPORTED
16 - Config1: comp6    Config2: comp11            NOT SUPPORTED
17 - Config1: comp6    Config2: comp12            NOT SUPPORTED
18 - Config1: comp7    Config2: comp8             NOT SUPPORTED
19 - Config1: comp7    Config2: comp9             SUPPORTED
20 - Config1: comp7    Config2: comp10            NOT SUPPORTED
21 - Config1: comp7    Config2: comp11            NOT SUPPORTED
22 - Config1: comp7    Config2: comp12            NOT SUPPORTED


OK

State: LowPowerMode
LPM force flags - W_DISABLE:0, User:1, Temp:0, Volt:0, BIOS:0, GOBIIM:0
W_DISABLE: 0
Poweroff mode: 0
LPM Persistent: 1


OK

ErrCode = 12

OK

ERROR


to enable echo, you need to type ATE1

How about adding AT+CFUN=1?
Can it attach to network?
Or you just need GPS function?

ATE1 works. Thank you.

AT+CFUN=1
OK

The WIFI network is working too after the switch of the mode.

so it is working fine for you now?

So, that’s the new /dev/ttyUSB3 port which i should use for GPS, right?