jakeday / linux-surface

Linux Kernel for Surface Devices
2.59k stars 241 forks source link

LTE/4G/mobile support #306

Open samvde opened 6 years ago

samvde commented 6 years ago

Has anybody tried the LTE model of the Surface Pro 2017 or the Surface Go LTE ? Is the modem being recognized/working?

jakeday commented 5 years ago

If someone with the LTE models can get us some logs and device lists, we can look into this!

markfromarch commented 5 years ago

Which files / logs do you need? I would really love to get the LTE going.

Thank you!!!

zommarin commented 5 years ago

I have a Surface Go LTE and I have installed @jakeday kernel. The LTE is picked up in part (dmesg output) but it is non-functional as far as I can tell:

[    7.374157] usb 2-3: Disable of device-initiated U1 failed.
[    7.374902] usb 2-3: Disable of device-initiated U2 failed.
[    7.398539] cdc_mbim 2-3:1.0: cdc-wdm5: USB WDM device
[    7.398803] cdc_mbim 2-3:1.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-3, CDC MBIM, 52:16:91:aa:f3:e7
[    7.399893] usb 2-3: Enable of device-initiated U1 failed.
[    7.403292] usb 2-3: Enable of device-initiated U2 failed.
[    7.403406] usbcore: registered new interface driver cdc_mbim

and later on:

[    9.098887] cdc_mbim 2-3:1.0 wwp0s20f0u3: renamed from wwan0

The result shows up as an network interface:

root@az-surface:~# ip a
...
2: wwp0s20f0u3: <BROADCAST,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 5a:0d:68:60:3e:33 brd ff:ff:ff:ff:ff:ff
...

Some info:

root@az-surface:~# lsusb
Bus 002 Device 002: ID 045e:096e Microsoft Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 045e:096f Microsoft Corp. 
Bus 001 Device 003: ID 0cf3:e302 Atheros Communications, Inc. 
Bus 001 Device 004: ID 04b4:5217 Cypress Semiconductor Corp. 
Bus 001 Device 012: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub
Bus 001 Device 013: ID 05ac:0250 Apple, Inc. Aluminium Keyboard (ISO)
Bus 001 Device 011: ID 05ac:1006 Apple, Inc. Hub in Aluminum Keyboard
Bus 001 Device 009: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub
Bus 001 Device 008: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 007: ID 08bb:2912 Texas Instruments 
Bus 001 Device 010: ID 04b4:3610 Cypress Semiconductor Corp. 
Bus 001 Device 006: ID 047d:8023 Kensington 
Bus 001 Device 002: ID 047d:8021 Kensington 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and

root@az-surface:~# lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 02)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 615 (rev 02)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 02)
00:05.0 Multimedia controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Imaging Unit (rev 01)
00:13.0 Non-VGA unclassified device: Intel Corporation Sunrise Point-LP Integrated Sensor Hub (rev 21)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:14.3 Multimedia controller: Intel Corporation Device 9d32 (rev 01)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)
00:15.2 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #2 (rev 21)
00:15.3 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #3 (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:19.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO UART Controller #2 (rev 21)
00:19.2 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #4 (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #3 (rev f1)
00:1c.3 PCI bridge: Intel Corporation Device 9d13 (rev f1)
00:1c.6 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #7 (rev f1)
00:1e.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO UART Controller #0 (rev 21)
00:1f.0 ISA bridge: Intel Corporation Device 9d4b (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
01:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)
03:00.0 Non-Volatile memory controller: Toshiba America Info Systems Device 0113 (rev 01)

Any help with getting the 4G/LTE modem working would be much appreciated!

KyleMelton32 commented 5 years ago

@jakeday I have a Surface Pro 5 with LTE and an active AT&T sim card. How can I help you get this working?

jakeday commented 5 years ago

I'm working on LTE support now. It should be working in the next release. I'll let you know once it's ready!

brycv commented 5 years ago

Anything further on this? Thank you!

KyleMelton32 commented 5 years ago

It appears this was included in b7e8acf. @jakeday Can you confirm?

Either way, I'll give it a try this weekend and report back. Thanks!

Ecos-hj commented 5 years ago

Only the device ID's were added to the qcserial module. So I'm not shure if this will work with the LTE Modem. Normally it should talk mbim or qmi.

Ecos-hj commented 5 years ago

I'd adressed the problem in the ModemManager List without any response.

The qcserial patch didn't work for me: I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim I: If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I: If#=0x2 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial

The probem is that the mbim port does an reset:

Mai 28 17:28:04 ThinClient ModemManager[388]: ModemManager (version 1.8.2-r1) starting in system bus... Mai 28 17:28:04 ThinClient NetworkManager[429]: [1559057284.9420] create NMModemManager singleton (0x5692a910) Mai 28 17:28:05 ThinClient NetworkManager[429]: [1559057285.3806] modem-manager: ModemManager available Mai 28 17:28:05 ThinClient ModemManager[388]: opening device... Mai 28 17:28:05 ThinClient ModemManager[388]: cannot connect to proxy: Could not connect: Connection refused Mai 28 17:28:05 ThinClient ModemManager[388]: spawning new mbim-proxy (try 1)... Mai 28 17:28:05 ThinClient ModemManager[388]: [/dev/cdc-wdm0] Read max control message size from descriptors file: 4096 Mai 28 17:28:06 ThinClient ModemManager[388]: [/dev/cdc-wdm0] unexpected port hangup! Mai 28 17:28:06 ThinClient ModemManager[388]: [/dev/cdc-wdm0] channel destroyed Mai 28 17:28:06 ThinClient ModemManager[388]: Couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.2': not supported by any plugin Mai 28 17:28:06 ThinClient ModemManager[388]: Couldn't check support for device '/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0': not supported by any plugin Mai 28 17:28:19 ThinClient cdbcfgd/conf::org_freedesktop_ModemManager_service[669]: Interfaces 0.000708 sec Mai 28 17:28:35 ThinClient ModemManager[388]: proxy configuration failed: closed Mai 28 17:28:35 ThinClient ModemManager[388]: [device /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3] creating modem with plugin 'Generic' and '2' ports Mai 28 17:28:35 ThinClient ModemManager[388]: Could not grab port (usbmisc/cdc-wdm0): 'Cannot add port 'usbmisc/cdc-wdm0', unsupported' Mai 28 17:28:35 ThinClient ModemManager[388]: Couldn't create modem for device '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3': Failed to find primary AT port

albttx commented 5 years ago

Any update on LTE ? is it working ?

mathewjpotter commented 5 years ago

+1

ddscentral commented 5 years ago

Hi there. I've recently bought an Surface Pro 2017 with LTE modem. For a couple of days I've been trying to get the modem working under Linux. Modem is the same as in the Surface Go, but has a different USB ID (045E:094A). Modem exposes 3 devices: MBIM Control (registers as /dev/cdc-wdm1), MBIM Data (registers as a network adapter) and a third device which is a GPS receiver (not a serial port). Firmware for the modem is available in C:\Windows\Firmware\QCOM. It is based on Android.

I couldn't get the modem to work under Linux yet. MBIM device does not respond to the "open" command. Other MBIM commands return a "NotOpened" error. I've made a USBPcap packet dump of the modem on Windows. I've reset the modem's network adapter a few times during the dump (Windows driver sends MBIM "close" and "open" commands when disabling and enabling modem network adapter). I will try to analyze the dump myself, but my experience with raw USB is limited. I've attached the dump to this post if anyone wants to take a look. Use Wireshark to read the dump.

modem_windows.zip

ddscentral commented 5 years ago

I think I have found the reason why the modem refuses to work. I've checked power statuses of modem's USB devices. Main USB device (045E:094A) reports runtime_status "active", while the MBIM Control and MBIM Data sub-devices report USB runtime_status "suspended". I've analyzed the firmware dump and indeed the firmware has "remote wakeup" enabled. Windows driver uses a SetFeature SUSPEND call to wake up the modem. The problem is that Linux does not offer any options to "wakeup" modem sub-devices, only the main device (trying to wake-up the main device has no effect).

csecker commented 5 years ago

I'm no expert here, but just guessing: so the way to go would be modifying the firmware in a way that the MBIM Control and MBIM Data sub-devices don't go to sleep?

ddscentral commented 5 years ago

I've managed to get LTE working on my Surface Pro 2017 (I've posted this from Ubuntu using LTE). The problem wasn't remote wakeup at all, it was the cdc_ncm driver. It was not setting the NTB transfer buffer sizes during initialization for some reason, causing the modem's control interface to refuse to respond. To fix the problem, you need to force the cdc_ncm driver to set the buffer sizes. This can be done at boot from /etc/rc.local, no kernel patch is necessary. I've attached my /etc/rc.local file (in a zip archive). Change "wwp0s20f0u2" to your modem's interface name and 2-2 and 2-2:1.0 to your modem's USB device IDs. To get your modem's interface name, use "ip a" command. Look for a device with "wwp" prefix or "wwan0". To get your modem's USB device ID, type "lsusb -t". Look for a device with class "Communications". Device ID format is Bus-Dev and Bus-Dev:1.If, without the leading zeros (in my case it's Bus 02 Dev 2 If 0) Default buffer size for my Pro 2017's modem is 16384. This size should work for the Go as well as it uses the same Qualcomm X16 modem. P.S.: Make sure ModemManager is installed if you want to use the UI to control your LTE connection. rclocal.zip

csecker commented 5 years ago

I can confirm that it works on the Surface Go after setting the buffer sizes like described above.

Interface name and usb device IDs & therefore paths are little different as suggested. I can upload the exact file for the Surface Go if later today

ddscentral commented 5 years ago

I think it would be wise to fill a bug report on kernel.org. At init cdc_ncm driver assumes the device should already have an initial buffer size set (because the driver does report a default buffer size) and there's no need to set it again, but in case of Microsoft Surface devices, this assumption is wrong. I think this issue is more of a bug in Microsoft's firmware than a bug in the kernel driver, but it would be nice if kernel developers made some kind of workaround for this.

o-schwartz commented 5 years ago

Hi, did you find out anything more about the gps? From what I read it should be part of the X16 modem, but Qualcomm doesn't say anything about it on the product page.

ddscentral commented 5 years ago

One of the functions of modem's USB composite device is the GPS. It should in theory work with the qcserial driver and present a USB serial port, but this does not happen for me, even after patching the driver to recognize the GPS. Windows uses Qualcomm's QMUX driver to interface with the GPS. I will need to take a closer look at driver's USB traffic, but it's not a priority for me right now.

o-schwartz commented 5 years ago

Thank you for your quick reply!

Trinity93 commented 5 years ago

Tip:...for gps to work you need to change the usb composition setting of the LTE device to 8 i believe. Its probably at 6 or at 9 by default in which gps won't work as a com port under linux or possibly on windows as well. You might need to double check these settings to be sure they are correct as this is for previous qualcomm LTE devices.

ddscentral commented 5 years ago

@Trinity93 Default composition is listed as 1. I can only see one USB composition listed in modem's USB descriptor. Trying to change modem's USB composition usually results in modem simply disconnecting itself from the system and locking-up. If anyone wants to look for hidden modes, I have a copy of modem's firmware image (it's based on Android NDK).

Trinity93 commented 5 years ago

@ddscentral https://osmocom.org/attachments/3287/swi_usbcomp.pl try running this script to see what comes up. it should tell you if there is any hidden ones ;)

ddscentral commented 5 years ago

@Trinity93 See output. swi_usbcomp.txt

Trinity93 commented 5 years ago

@Trinity93 See output. swi_usbcomp.txt

was that all it returned? it should have returned something that this at the 0x555b return line

QMI msg '0x555b' returned status = 1 Current USB composition: 8 USB compositions:    0 - HIP  DM    NMEA  AT    MDM1  MDM2  MDM3  MS      NOT SUPPORTED    1 - HIP  DM    NMEA  AT    MDM1  MS                  NOT SUPPORTED    2 - HIP  DM    NMEA  AT    NIC1  MS                  NOT SUPPORTED    3 - HIP  DM    NMEA  AT    MDM1  NIC1  MS            NOT SUPPORTED    4 - HIP  DM    NMEA  AT    NIC1  NIC2  NIC3  MS      NOT SUPPORTED    5 - HIP  DM    NMEA  AT    ECM1  MS                  NOT SUPPORTED    6 - DM   NMEA  AT    QMI                             SUPPORTED    7 - DM   NMEA  AT    RMNET1 RMNET2 RMNET3            NOT SUPPORTED *  8 - DM   NMEA  AT    MBIM                            SUPPORTED    9 - MBIM                                             SUPPORTED   10 - NMEA MBIM                                        NOT SUPPORTED   11 - DM   MBIM                                        NOT SUPPORTED   12 - DM   NMEA  MBIM                                  NOT SUPPORTED   13 - Config1: comp6    Config2: comp8                 NOT SUPPORTED   14 - Config1: comp6    Config2: comp9                 NOT 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                 NOT SUPPORTED   20 - Config1: comp7    Config2: comp10                NOT SUPPORTED   21 - Config1: comp7    Config2: comp11                NOT SUPPORTED   22 - Config1: comp7    Config2: comp12                NOT SUPPORTED

ddscentral commented 5 years ago

@Trinity93 I've piped the output to a text file, so yes, that was all the script returned. And usbcomp option does absolutely nothing, other than just print the same output.

Trinity93 commented 5 years ago

@ddscentral Ok hehe very interesting...

ddscentral commented 5 years ago

Judging from the script, command 0x555b should return the available USB compositions but in our case it returns nothing at all.

Trinity93 commented 5 years ago

@ddscentral i suspect microsoft is loading custom firmware which probably will require a little custom firmware of our own instead

ddscentral commented 5 years ago

You can extract the firmware from MSI driver package for the Surface Pro LTE. https://www.microsoft.com/en-us/download/details.aspx?id=56278 The firmware file looks like a standard Android update file, except for the boot.img which lacks initrd.

Trinity93 commented 5 years ago

@ddscentral whats the output of qmicli --dms-swi-get-usb-composition

ddscentral commented 5 years ago

@Trinity93 See attached file (with --verbose flag). The main response was: error: couldn't get USB composite modes: QMI protocol error (57): 'Wms.InvalidMessageId'

qmicli_verbose.txt

ddscentral commented 5 years ago

Also, modem is really slow to respond to QMI commands. I needed a few tries to get the attached output.

ajbruscino commented 5 years ago

@zommarin ever figure it out? Feel like I'm in the same boat

zommarin commented 5 years ago

@ajbruscino No luck so far, but I have not been trying the latest tips in this thread.

ddscentral commented 5 years ago

@ajbruscino The modem is working fine after setting the buffer sizes in rc.local. In Ubuntu, the modem should be recognized by the DE as "Mobile Broadband". You may need to install the mbimcli and mbim-network tools first. For DEs lacking modem support, you can always use "mbim-network" tool from terminal. Follow the tutorial here if you need help: https://techship.com/faq/how-to-set-up-a-simple-data-connection-over-the-mbim-interface-using-libmbim-and-driver-cdc-mbim-in-linux/ mbim-set-ip script can be found here: https://github.com/elementzonline/GSMModem/tree/master/SIM7600/mbim-set-ip

Mirsonov commented 5 years ago

@ajbruscino The modem is working fine after setting the buffer sizes in rc.local. In Ubuntu, the modem should be recognized by the DE as "Mobile Broadband". You may need to install the mbimcli and mbim-network tools first. For DEs lacking modem support, you can always use "mbim-network" tool from terminal. Follow the tutorial here if you need help: https://techship.com/faq/how-to-set-up-a-simple-data-connection-over-the-mbim-interface-using-libmbim-and-driver-cdc-mbim-in-linux/ mbim-set-ip script can be found here: https://github.com/elementzonline/GSMModem/tree/master/SIM7600/mbim-set-ip

Hey everyone. I am a noob so my questions may sound a bit damy but still here they are:

  1. Should I install any firmware for this modem? If "Yes" - where to get this firmware and how (where) to install it?
  2. Should I install any driver for this modem? If "Yes" - where to get this driver and how (where) to install it?
  3. Do I need to have libmbim if I use ModemManager? If "Yes": 3.1 Are libmbim and libmbim-glib-dev the same or different things? 3.2. Are mbim and mbim-network the same or different things?
  4. If answer on question #2 is "No" - why in ModemManager I can't see any device?
  5. I copied rc.local file provided by ddscentral to /etc with only one change - my modem is wwp0s20f0u3, so what exactly did I wrong?
Mirsonov commented 5 years ago

$ sudo lsusb -t

/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M | Port 3: Dev 2, If 0, Class=Communications, Driver=cdc_mbim, 5000M |__ Port 3: Dev 2, If 1, Class=CDC Data, Driver=cdc_mbim, 5000M | Port 3: Dev 2, If 2, Class=Vendor Specific Class, Driver=, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M | Port 5: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M | Port 5: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M | Port 7: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M | Port 7: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M | Port 7: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M | Port 7: Dev 3, If 3, Class=Human Interface Device, Driver=usbhid, 12M

$ mbimcli --version

mbimcli 1.14.0 Copyright (2013-2014) Aleksander Morgado License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl-2.0.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

$ ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: wwp0s20f0u3: <BROADCAST,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether c6:4f:9d:f1:15:ea brd ff:ff:ff:ff:ff:ff 3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether d8:c4:97:ee:7e:fd brd ff:ff:ff:ff:ff:ff inet 192.168.33.10/24 brd 192.168.33.255 scope global dynamic wlp1s0 valid_lft 380sec preferred_lft 380sec inet6 fe80::a15a:d94f:d8a5:7a84/64 scope link tentative dadfailed valid_lft forever preferred_lft forever inet6 fe80::8a1c:1df9:5594:43f1/64 scope link tentative dadfailed valid_lft forever preferred_lft forever inet6 fe80::191b:a299:7d0b:e04b/64 scope link tentative dadfailed valid_lft forever preferred_lft forever

ddscentral commented 5 years ago

@Mirsonov You don't need any firmware or driver (modem uses cdc_ncm and cdc_mbim, both of which you already have on your system). You do need libmbim and ModemManager installed for NetworkManager to see your modem.

Mirsonov commented 5 years ago

ddscentral, thanks for the answer. I downloaded latest libmbim-1.20.0, extracted it, and ran 3 commands: ./configure make sudo make install

Looks like libmbim-1.20.0 was installed. But Modem Manager still does not see any device.

What I did wrong again? How to see if libmbim-1.20.0 was installed correctly - is there any command to type so it can show the status of libmbim-1.20.0 installation?

Mirsonov commented 5 years ago

Maybe I installed wrong Modem Manager? Is this the one I need: https://linuxonly.ru/?

ddscentral commented 5 years ago

@Mirsonov What's your distro ? You should normally install packages from your distribution's repository, unless you have a good reason to build from source (eg. repository version is outdated).

Mirsonov commented 5 years ago

Debian Stretch. How can I see if libmbim installed correctly? I installed modem-manager-gui from repository not from this web-site. But in "About" of this Modem Manager there is a link to this we-site, so I was wondering if this exact Modem Manager I need.

So, right now I have installed:

  1. libmbim-1.20.0;
  2. modem-manager-gui;
  3. mbimcli 1.14.0.

But Modem Manager does not see any device - what is wrong?

Trinity93 commented 5 years ago

make sure you have the right lines in /etc/rc.local and that it is running on boot. in ubuntu you might have to start a service to get the script to run

nightsparc commented 5 years ago

Hi,

great work, thx so far! Thanks to you, I got the 4G-Modem on my SP 2017 LTE finally up and running @ddscentral - or at least, Ubuntu recognizes it finally as a mbim/cdc device and start initializing it. However, neither the ModemManger (CLI and GUI tools, tried both), nor the MBIM tools are able to successfully connect itself to my provider.

System: Ubuntu 18.04, tried both the current 5.3.10-surface and the 4.19.83-surface-lts kernels from https://github.com/qzed/linux-surface

Provider: Telekom Germany APN settings:

    APN: internet.telekom
    APN auth protocol: PAP
    APN user: t-mobile
    APN password: tm
    mbim-proxy: yes

which should be correct according to the Telekom Support. I also tried several other combinations which could be found on the web...still, nothing seems to be working. And the APN internet.telekom seems to be correct, as the same SIM card is working with a Huawei E3372 LTE/4G dongle.

Using ModemManager it simple states "Connection failed". Not really helpful ;) Using the MBIM tools, following the link @ddscentral provided above, I got the following output:

sudo mbim-network /dev/cdc-wdm1 start
Loading profile at /etc/mbim-network.conf...
    APN: internet.telekom
    APN auth protocol: PAP
    APN user: t-mobile
    APN password: tm
    mbim-proxy: yes
Loading previous state from /tmp/mbim-network-state-cdc-wdm1...
    Previous Transaction ID: 10
error: no actions specified
Clearing state at /tmp/mbim-network-state-cdc-wdm1...
Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm1 --query-subscriber-ready-status --no-close --device-open-proxy'...
[/dev/cdc-wdm1] Subscriber ready status retrieved: Ready state: 'initialized' Subscriber ID: '901370010669147' SIM ICCID: '8988247000106691471' Ready info: 'none' Telephone numbers: (0) 'unknown' [/dev/cdc-wdm1] Session not closed: TRID: '4'
Saving state at /tmp/mbim-network-state-cdc-wdm1... (TRID: 4)
Querying registration state 'mbimcli -d /dev/cdc-wdm1 --query-registration-state --no-open=4 --no-close --device-open-proxy'...
[/dev/cdc-wdm1] Registration status: Network error: 'unknown' Register state: 'roaming' Register mode: 'automatic' Available data classes: 'umts, hsdpa, hsupa' Current cellular class: 'gsm' Provider ID: '26201' Provider name: 'Cellular Data' Roaming text: 'unknown' Registration flags: 'packet-service-automatic-attach' [/dev/cdc-wdm1] Session not closed: TRID: '6'
Saving state at /tmp/mbim-network-state-cdc-wdm1... (TRID: 6)
Attaching to packet service with 'mbimcli -d /dev/cdc-wdm1 --attach-packet-service --no-open=6 --no-close --device-open-proxy'...
Saving state at /tmp/mbim-network-state-cdc-wdm1... (TRID: 8)
Starting network with 'mbimcli -d /dev/cdc-wdm1 --connect=apn='internet.telekom',auth='PAP',username='t-mobile',password='tm' --no-open=8 --no-close --device-open-proxy'...
error: operation failed: Failure
Network start failed
[/dev/cdc-wdm1] Session not closed: TRID: '10'
Saving state at /tmp/mbim-network-state-cdc-wdm1... (TRID: 10)

...which, unfortunately, isn't really helpful, too.

Any help or idea would be great :D Thanks in advance!

nightsparc commented 4 years ago

Hi!

A follow up to my last post, just in case someone is running into the same problems:

It seems to be necessary to boot into Windows at least for one time and ensure that the correct SIM is selected. It seems, that the eSIM and the physical SIM are getting mixed up sometimes, thus prohibiting the ModemManager (or mbim directly) to configuring, if no eSIM is loaded.

After ensuring Windows had selected the physical SIM as default, the SIM device instantly became available in Linux (I'm currently writing from Ubuntu 18.04 connected via 4G on the Surface), if it was initialized with the fix from @ddscentral

Thanks again!

nightsparc commented 4 years ago

@ddscentral Ah, were you finally successful in getting the GPS up and running on the Surface 5 LTE? I have the same issues as you described above.

Only strange thing: During my configuration tries to get the 4G working, I managed it somehow to retrieve a valid NMEA string...unfortunately, I hadn't write down every step I did...

@Trinity93 Any idea or further debugging hints...? I got exactly the same outputs from the swi_usbcomp script and qmicli as the ones from @ddscentral

katsuya-horiuchi commented 4 years ago

I recently acquired Surface Go with LTE and installed your kernel @jakeday.

Most things worked as expected, except for LTE, under Ubuntu 18.04 LTS. I changed rc.local as @ddscentral did above, but the modem doesn't get even recognized.

Observations so far:

Any clue as to how we can get LTE working? Will be happy to run some commands on the machine if necessary.

ddscentral commented 4 years ago

MBIM modems are best used with mbim-network tool. NetworkManager works with them too with the right plugins installed. Not sure about suspend, but I never had modem disappear completely.

Trinity93 commented 4 years ago

I have sorta given up on getting the gps to work for now. Till we can get the chipset out of the special microsoft supported mode its in, i don't see how this will be possible to fix.