Re: [MM 07] Huawei plugin: "Failed to find primary port"



>> > bjorn@nemi:/usr/local/src/git/linux$ mmcli -b 0
>> > Bearer '/org/freedesktop/ModemManager1/Bearer/0'
>> >   -------------------------
>> >   Status             |   connected: 'yes'
>> >                      |   suspended: 'no'
>> >                      |   interface: 'wwan0'
>> >                      |  IP timeout: '20'
>> >   -------------------------
>> >   Properties         |         apn: 'telenor'
>> >                      |     roaming: 'allowed'
>> >                      |     IP type: 'ipv4'
>> >                      |        user: 'none'
>> >                      |    password: 'none'
>> >                      |      number: 'none'
>> >                      | Rm protocol: 'unknown'
>> >   -------------------------
>> >   IPv4 configuration |   method: 'dhcp'
>> >   -------------------------
>> >   IPv6 configuration |   method: 'unknown'
>> > 
>> > 
>> > 
>> > Attemting to create another bearer fails as expected:
>> > 
>> > bjorn@nemi:/usr/local/src/git/linux$ mmcli -m 0 --simple-connect="apn=mms"
>> > error: couldn't connect the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.NotFound: No valid data port found to launch connection'
>> > 
>> > But this is unexpected:
>> > 
>> > bjorn@nemi:/usr/local/src/git/linux$ mmcli -b 0
>> > error: couldn't find bearer at '/org/freedesktop/ModemManager1/Bearer/0': 'not found in any modem'
>> > bjorn@nemi:/usr/local/src/git/linux$ mmcli -m 0 --list-bearers
>> > 
>> > Found 1 bearers:
>> > 
>> >         /org/freedesktop/ModemManager1/Bearer/1
>> > bjorn@nemi:/usr/local/src/git/linux$ mmcli -b 1
>> > Bearer '/org/freedesktop/ModemManager1/Bearer/1'
>> >   -------------------------
>> >   Status             |   connected: 'no'
>> >                      |   suspended: 'no'
>> >                      |   interface: 'unknown'
>> >                      |  IP timeout: '20'
>> >   -------------------------
>> >   Properties         |         apn: 'mms'
>> >                      |     roaming: 'allowed'
>> >                      |     IP type: 'ipv4'
>> >                      |        user: 'none'
>> >                      |    password: 'none'
>> >                      |      number: 'none'
>> >                      | Rm protocol: 'unknown'
>> >   -------------------------
>> >   IPv4 configuration |   method: 'unknown'
>> >   -------------------------
>> >   IPv6 configuration |   method: 'unknown'
>> > 
>> > 
>> > 
>> > So MM created the bearer and replaced the already connected one with the
>> > new and unconnected bearer.  That does not seem right?
>> > 
> No, it doesn't seem right. --simple-connect should try to do as much as
> possible to get you connected with the properties you passed. The
> problem here is that the modem allows only one bearer to be connected as
> there is only one QMI port; in this case we remove the previously
> existing bearers in order to allocate space for the new one; but we
> don't make sure the previous bearer gets disconnected, which is an error.
> 
> Another approach would be to avoid deleting the previous bearer *if* it
> is connected. If it wasn't connected, we can always just remove it,
> create a new one, and connect the new one.
> 
> Probably both approaches are valid use cases, but looking at it maybe
> the second one makes more sense as default for a simple method like
> this. The second approach will issue an error and the user can then
> disconnect the bearers before retrying the connect. Will prepare a patch
> for this.

Pushed a fix to handle this case now, which seems a good compromise for
the Simple.Connect() logic.

Cheers!

-- 
Aleksander


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]