~anteater/mms-stack-bugs#45: 
NetworkManager will not bring up an ofono connection, bad GSM profile

When switching from MM to ofono, I am no longer able to activate a data connection through NM.

I have deleted the uuid & device-id properties in /etc/NetworkManager/system-connections/T-Mobile LTE.nmconnection, as past experience has shown that to work for making portable wifi connection profiles.

NetworkManager[261]: <info>  [1601840771.5592] audit: op="connection-activate" uuid="dabc7606-f4fd-4dcd-b607-98dcfd8e7807" name="T-Mobile LTE" pid=611 uid=1000 result="fail" reason="Connection 'T-Mobile LTE' is not available on device quectelqmi_0 because profile is not compatible with device (modem is incompatible with connection: device has differing device-id than GSM profile)
Status
REPORTED
Submitter
~fuzzy7k
Assigned to
No-one
Submitted
2 years ago
Updated
2 years ago
Labels
integration user support

~anteater 2 years ago*

I don't have any familiarity with NetworkManager's ofono support, and it's possible this would be better asked at an upstream bug tracker. I'm more familiar with using ofonoctl, a script that interacts with ofonod via DBus and can set up data connections using the Linux ip command. In general, the only steps necessary to set up networking with ofono are: poweron the modem, online the modem, and configure the appropriate Linux network interface based on settings determined by ofono--these are what ofonoctl does.

Presumably, NetworkManager's ofono support does something similar. For the particular error message you're seeing, it seems that NetworkManager uses the modem's short name (quectelqmi_0 in this case), and expects this to match the name given in the NM GSM profile. What I don't know is where the GSM profile is defined or what it's likely to look like for you.

Hopefully this helps.

~fuzzy7k 2 years ago

I was able to move this further along. The "GSM profile" is simply the .nmconnection and the device-id is I believe some type of hash that NM creates. Now that I think about it, I'm not sure why I was getting that error after deleting the device-id property. I may have forgotten some detail.

However, after resolving that I was getting

Error: Connection activation failed: Connection 'ofono' is not available on device quectelqmi_0 because profile is not compatible with device (modem is incompatible with connection: the connection ID has no context)

which comes from src/devices/wwan/nm-modem-ofono.c

It turns out that the ofono plugin is very specific about the connection id. I am guessing this is by ofono design because connman uses a similar syntax for managing ofono connections and looking at the connman connection was key to setting a connection id that NM will accept.

$ enable-modem
$ online-modem
$ connmanctl
connmanctl> services

Which spits out a carrier ID and something that looks like cellular_#imsi#_context1

Using that,

$ nmcli c connection-id edit
nmcli>set connection.id cellular/#imsi#/context1

/'s are important

Now, it tries to connect, but stalls out on:

NetworkManager[260]: <info>  [1601915316.9656] device (quectelqmi_0): Activation: starting connection 'cellular/310260098374532/context1' (144b21c9-17f2-3776-9b2d-a463cdab88db)
NetworkManager[260]: <info>  [1601915316.9662] audit: op="connection-activate" uuid="144b21c9-17f2-3776-9b2d-a463cdab88db" name="cellular/310260098374532/context1" pid=745 uid=1000 result="success"
NetworkManager[260]: <info>  [1601915316.9671] device (quectelqmi_0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
NetworkManager[260]: <info>  [1601915316.9708] manager: NetworkManager state is now CONNECTING
NetworkManager[260]: <info>  [1601915316.9724] modem-ofono[quectelqmi_0]: activating context /quectelqmi_0/context1
Register here or Log in to comment, or comment via email.