Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How-to: Vanilla Linux Kernel 6.2 #211

Open
Mixaill opened this issue Sep 25, 2023 · 5 comments
Open

How-to: Vanilla Linux Kernel 6.2 #211

Mixaill opened this issue Sep 25, 2023 · 5 comments

Comments

@Mixaill
Copy link
Contributor

Mixaill commented Sep 25, 2023

  1. Check that you have Linux 6.2 or greater
  2. use Add support for vanilla Linux kernel 6.2 #210 or change the XMM RPC path to the /dev/wwan0xmmrpc0 inside the rpc/rpc.py
  3. rename xmm7360.ini.sample to xmm7360.ini and change the APN name
  4. execute sudo scripts/lte.sh up
  5. it works!

Tested on Linux 6.5.4 + OpenSuse Tumbleweed

@pswiatki
Copy link

pswiatki commented Nov 9, 2023

Everything nicely connected (with iosm driver and Michaił's patch on open_xdatachannel.py), but this is the end of ./lte up:

name:HotSpot IC uuid:b318a583-3337-4987-9dee-2202e051df07 type:802-11-wireless
name:lo uuid:75734424-8b13-4775-a325-9958ccc90d26 type:loopback
setup 4e34f700-f82e-490a-97fb-9670d84d2e66
setup connection
Traceback (most recent call last):
  File "/home/pswiatki/devel/HW/LTE_modem_m.2/xmm7360-pci/scripts/../rpc/open_xdatachannel.py", line 240, in <module>
    manager.ActivateConnection(connection_path, devpath, "/")
                                                ^^^^^^^
NameError: name 'devpath' is not defined

What is wrong here?

@pswiatki
Copy link

pswiatki commented Nov 9, 2023

Oh, by the way: it seems systemd-homed service shall be started prior to attempting lte up or otherwise no DNS info gets stored in /etc/resolv.conf.
Is this true, or have I something configured badly on my system?

@pswiatki
Copy link

pswiatki commented Nov 9, 2023

Traceback (most recent call last):
File "/home/pswiatki/devel/HW/LTE_modem_m.2/xmm7360-pci/scripts/../rpc/open_xdatachannel.py", line 240, in
manager.ActivateConnection(connection_path, devpath, "/")
^^^^^^^
NameError: name 'devpath' is not defined


What is wrong here?

Hmmm.... when looking at this code:

for d in devices:
    dev_proxy = system_bus.get_object("org.freedesktop.NetworkManager", d)
    prop_iface = dbus.Interface(dev_proxy, "org.freedesktop.DBus.Properties")
    props = prop_iface.GetAll("org.freedesktop.NetworkManager.Device")
    if props["Interface"] == "wwan0":
        devpath = d
        print("found Interface: %s" % props["Interface"])
        print("Managed: %s" % props["Managed"])
        if props["Managed"] == 0:
            print("activate")
            prop_iface.Set("org.freedesktop.NetworkManager.Device",
                           "Managed", dbus.Boolean(1))

I realized it may be failing because NetworkManager somehow doesn't know about the newly brought up wwan0. Can this be? If this is true (i.e. NM doesn't know about wwan0), devpath will never be set and the script will conclude ungracefully.

@pswiatki
Copy link

pswiatki commented Nov 9, 2023

Another obseravtion: it is probably iosm that doesn't like hibernation, though:

Nov 09 16:49:49 sdr-aptv sudo[18382]: pswiatki : TTY=pts/1 ; PWD=/home/pswiatki/devel/HW/LTE_modem_m.2/xmm7360-pci/scripts ; USER=root ; COMMAND=./lte.sh up
Nov 09 16:49:49 sdr-aptv sudo[18382]: pam_unix(sudo:session): session opened for user root(uid=0) by pswiatki(uid=1000)
Nov 09 16:49:49 sdr-aptv kernel: iosm 0000:73:00.0: PORT open refused, phase A-CD_READY
Nov 09 16:49:50 sdr-aptv kernel: iosm 0000:73:00.0: msg timeout
Nov 09 16:49:50 sdr-aptv kernel: iosm 0000:73:00.0: msg timeout
Nov 09 16:49:51 sdr-aptv sudo[18382]: pam_unix(sudo:session): session closed for user root
Nov 09 16:49:51 sdr-aptv kernel: iosm 0000:73:00.0: ch[0] timeout
Nov 09 16:49:51 sdr-aptv kernel: iosm 0000:73:00.0: if_id 0: OPEN_SESSION send failed
Nov 09 16:49:51 sdr-aptv kernel: iosm 0000:73:00.0: cannot connect wwan0 & id 0 to the IPC mem layer

So, not possible to bring the wwan0 interface back up after coming back from hibernation.

@adi1
Copy link

adi1 commented Dec 21, 2023

I realized it may be failing because NetworkManager somehow doesn't know about the newly brought up wwan0. Can this be? If this is true (i.e. NM doesn't know about wwan0), devpath will never be set and the script will conclude ungracefully.

Were you able to get anywhere with this? Everything works for me except for the NetworkManager integration. I've also tried the ModemManager 1.20.4 included with my Debian 12.4 system, but it can't connect, although it does show the modem and the provider. I've also tried the forked version mentioned above, but that gives the same result.

So right now, I can run lte up, ignore the devpath error, have no connection information in NetworkManager, run lte down when I'm done with the internet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants