Re: Getting MC7455 static-ip to work

2018-03-06 Thread Aleksander Morgado
>>> > > Was the wwan0 interface down while you executed simple-connect?
>>> >
>>> > wwan0 being up is the most likely cause.  But seeing the debug logs
>>> > to
>>> > confirm this would be good.
>>> >
>>> > I started thinking about solving this in the driver, but ended up
>>> > falling back to the original decision: The interface must be
>>> > down.  This
>>> > is the way it is.  You should respond to any error when attempting
>>> > to
>>> > write to the sysfs file.
>>>
>>> Should we bring the interface down ourselves in MM when trying to
>>> write to the sysfs file?
>>
>> Yeah, set_expected_data_format() should check if the interface is up
>> and then take it down, set the data format, and bring it back up.
>>
>> This would kill a data connection if somebody ran "qmicli --set-
>> expected-data-format=xxx" while the connection was active, but then
>> they shouldn't do that...
>
> Exactly.  There is no way you can make the device work both before and
> after a data format change, so maintaining a connection while switching
> format makes no sense.
>

Ok. This should go to libqmi directly I would say, to the
set_expected_data_format() implementation.

-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Getting MC7455 static-ip to work

2018-03-05 Thread Bjørn Mork
Dan Williams  writes:
> On Mon, 2018-03-05 at 17:56 +0100, Aleksander Morgado wrote:
>> > > 
>> > > Was the wwan0 interface down while you executed simple-connect?
>> > 
>> > wwan0 being up is the most likely cause.  But seeing the debug logs
>> > to
>> > confirm this would be good.
>> > 
>> > I started thinking about solving this in the driver, but ended up
>> > falling back to the original decision: The interface must be
>> > down.  This
>> > is the way it is.  You should respond to any error when attempting
>> > to
>> > write to the sysfs file.
>> 
>> Should we bring the interface down ourselves in MM when trying to
>> write to the sysfs file?
>
> Yeah, set_expected_data_format() should check if the interface is up
> and then take it down, set the data format, and bring it back up.
>
> This would kill a data connection if somebody ran "qmicli --set-
> expected-data-format=xxx" while the connection was active, but then
> they shouldn't do that...

Exactly.  There is no way you can make the device work both before and
after a data format change, so maintaining a connection while switching
format makes no sense.


Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Getting MC7455 static-ip to work

2018-03-05 Thread Dan Williams
On Mon, 2018-03-05 at 17:56 +0100, Aleksander Morgado wrote:
> > > 
> > > Was the wwan0 interface down while you executed simple-connect?
> > 
> > wwan0 being up is the most likely cause.  But seeing the debug logs
> > to
> > confirm this would be good.
> > 
> > I started thinking about solving this in the driver, but ended up
> > falling back to the original decision: The interface must be
> > down.  This
> > is the way it is.  You should respond to any error when attempting
> > to
> > write to the sysfs file.
> 
> Should we bring the interface down ourselves in MM when trying to
> write to the sysfs file?

Yeah, set_expected_data_format() should check if the interface is up
and then take it down, set the data format, and bring it back up.

This would kill a data connection if somebody ran "qmicli --set-
expected-data-format=xxx" while the connection was active, but then
they shouldn't do that...

Dan
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Getting MC7455 static-ip to work

2018-03-05 Thread Aleksander Morgado
>>
>> Was the wwan0 interface down while you executed simple-connect?
>
> wwan0 being up is the most likely cause.  But seeing the debug logs to
> confirm this would be good.
>
> I started thinking about solving this in the driver, but ended up
> falling back to the original decision: The interface must be down.  This
> is the way it is.  You should respond to any error when attempting to
> write to the sysfs file.

Should we bring the interface down ourselves in MM when trying to
write to the sysfs file?

-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Getting MC7455 static-ip to work

2018-03-05 Thread Bjørn Mork
Aleksander Morgado  writes:
> On Mon, Mar 5, 2018 at 2:55 AM, Steven P  wrote:
>> $ pacman -Qi libqmi libmbim linux modemmanager | grep -B 1 Version
>> Name: libqmi
>> Version : 1.20.0-1
>> --
>> Name: libmbim
>> Version : 1.16.0-1
>> --
>> Name: linux
>> Version : 4.15.6-1
>> --
>> Name: modemmanager
>> Version : 1.8rc1+6+g0f377f94-1
>>
>
> Oh, well, yes, that is like the latest of the latest :)
>
>> I did see an occasional error in dmesg about that interface that happened 
>> when I executed simple-connect - however during one of my tests I made sure 
>> that wwan0 was brought down when I made the connection and the error didn't 
>> occur. If this sounds related, let me know and I'll see if I can reproduce 
>> it (not at my laptop atm, just happened to have the above info in my notes)
>>
>
> Any chance you can get us some ModemManager debug logs while
> reproducing the issue? See:
> https://www.freedesktop.org/wiki/Software/ModemManager/Debugging/
>
> Really would like to see why it couldn't switch the wwan to raw-ip in
> the kernel.
>
> Was the wwan0 interface down while you executed simple-connect?

wwan0 being up is the most likely cause.  But seeing the debug logs to
confirm this would be good.

I started thinking about solving this in the driver, but ended up
falling back to the original decision: The interface must be down.  This
is the way it is.  You should respond to any error when attempting to
write to the sysfs file.



Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Getting MC7455 static-ip to work

2018-03-05 Thread Aleksander Morgado
Hey,

On Mon, Mar 5, 2018 at 2:55 AM, Steven P  wrote:
> $ pacman -Qi libqmi libmbim linux modemmanager | grep -B 1 Version
> Name: libqmi
> Version : 1.20.0-1
> --
> Name: libmbim
> Version : 1.16.0-1
> --
> Name: linux
> Version : 4.15.6-1
> --
> Name: modemmanager
> Version : 1.8rc1+6+g0f377f94-1
>

Oh, well, yes, that is like the latest of the latest :)

> I did see an occasional error in dmesg about that interface that happened 
> when I executed simple-connect - however during one of my tests I made sure 
> that wwan0 was brought down when I made the connection and the error didn't 
> occur. If this sounds related, let me know and I'll see if I can reproduce it 
> (not at my laptop atm, just happened to have the above info in my notes)
>

Any chance you can get us some ModemManager debug logs while
reproducing the issue? See:
https://www.freedesktop.org/wiki/Software/ModemManager/Debugging/

Really would like to see why it couldn't switch the wwan to raw-ip in
the kernel.

Was the wwan0 interface down while you executed simple-connect?

-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Getting MC7455 static-ip to work

2018-03-04 Thread Steven P
Also note that I was not using networkmanager, just modemmanager and 
configuring the interface ip and gateway manually.

> On Mar 4, 2018, at 04:50, Aleksander Morgado  wrote:
> 
> Hey!
> 
>> Managed to figure it out - things only work if the interface is in raw_ip 
>> mode:
>> 
>> sudo sh -c 'echo Y > /sys/class/net/wwan0/qmi/raw_ip'
>> 
>> Would appreciate if there's a way to get ModemManager to set this
>> automatically, and I'm sort of curious about the mode that the
>> interface is in if it isn't raw_ip mode.
>> 
>> Barring that, hopefully others don't have to make the same mistake. :)
>> 
> 
> That should have been automatic. If the module is found to use raw-ip
> by default (as in the MC7455, which is the only mode supported), then
> ModemManager will request the kernel to switch the interface into
> raw-ip mode (qmi_device_set_expected_data_format(raw-ip)).
> 
> Which version of MM/libqmi are you using?
> 
> -- 
> Aleksander
> https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Getting MC7455 static-ip to work

2018-03-04 Thread Steven P
$ pacman -Qi libqmi libmbim linux modemmanager | grep -B 1 Version
Name: libqmi
Version : 1.20.0-1
--
Name: libmbim
Version : 1.16.0-1
--
Name: linux
Version : 4.15.6-1
--
Name: modemmanager
Version : 1.8rc1+6+g0f377f94-1

I did see an occasional error in dmesg about that interface that happened when 
I executed simple-connect - however during one of my tests I made sure that 
wwan0 was brought down when I made the connection and the error didn't occur. 
If this sounds related, let me know and I'll see if I can reproduce it (not at 
my laptop atm, just happened to have the above info in my notes)

> On Mar 4, 2018, at 04:50, Aleksander Morgado  wrote:
> 
> Hey!
> 
>> Managed to figure it out - things only work if the interface is in raw_ip 
>> mode:
>> 
>> sudo sh -c 'echo Y > /sys/class/net/wwan0/qmi/raw_ip'
>> 
>> Would appreciate if there's a way to get ModemManager to set this
>> automatically, and I'm sort of curious about the mode that the
>> interface is in if it isn't raw_ip mode.
>> 
>> Barring that, hopefully others don't have to make the same mistake. :)
>> 
> 
> That should have been automatic. If the module is found to use raw-ip
> by default (as in the MC7455, which is the only mode supported), then
> ModemManager will request the kernel to switch the interface into
> raw-ip mode (qmi_device_set_expected_data_format(raw-ip)).
> 
> Which version of MM/libqmi are you using?
> 
> -- 
> Aleksander
> https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Getting MC7455 static-ip to work

2018-03-04 Thread Aleksander Morgado
Hey!

> Managed to figure it out - things only work if the interface is in raw_ip 
> mode:
>
> sudo sh -c 'echo Y > /sys/class/net/wwan0/qmi/raw_ip'
>
> Would appreciate if there's a way to get ModemManager to set this
> automatically, and I'm sort of curious about the mode that the
> interface is in if it isn't raw_ip mode.
>
> Barring that, hopefully others don't have to make the same mistake. :)
>

That should have been automatic. If the module is found to use raw-ip
by default (as in the MC7455, which is the only mode supported), then
ModemManager will request the kernel to switch the interface into
raw-ip mode (qmi_device_set_expected_data_format(raw-ip)).

Which version of MM/libqmi are you using?

-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Getting MC7455 static-ip to work

2018-03-03 Thread Steven P
Managed to figure it out - things only work if the interface is in raw_ip mode:

sudo sh -c 'echo Y > /sys/class/net/wwan0/qmi/raw_ip'

Would appreciate if there's a way to get ModemManager to set this
automatically, and I'm sort of curious about the mode that the
interface is in if it isn't raw_ip mode.

Barring that, hopefully others don't have to make the same mistake. :)

- Steven

On Sat, Mar 3, 2018 at 4:41 PM, Steven P  wrote:
> Hi,
>
> Working with another MC7455. When I use simple-connect with ip-type
> ipv4v6, I get the following output.
>
> Mar 03 16:26:51 excalibur ModemManager[497]:   Simple connect started...
> Mar 03 16:26:51 excalibur ModemManager[497]:   Simple connect
> state (4/8): Wait to get fully enabled
> Mar 03 16:26:51 excalibur ModemManager[497]:   Simple connect
> state (5/8): Register
> Mar 03 16:26:51 excalibur ModemManager[497]:   Simple connect
> state (6/8): Bearer
> Mar 03 16:26:51 excalibur ModemManager[497]:   Simple connect
> state (7/8): Connect
> Mar 03 16:26:51 excalibur ModemManager[497]:   Modem
> /org/freedesktop/ModemManager1/Modem/5: state changed (registered ->
> connecting)
> Mar 03 16:26:51 excalibur ModemManager[497]:   QMI IPv4 Settings:
> Mar 03 16:26:51 excalibur ModemManager[497]:   Address:
> 100.127.167.238/30
> Mar 03 16:26:51 excalibur ModemManager[497]:   Gateway:
> 100.127.167.237
> Mar 03 16:26:51 excalibur ModemManager[497]:   DNS #1: 
> 198.224.173.135
> Mar 03 16:26:51 excalibur ModemManager[497]:   DNS #2: 
> 198.224.174.135
> Mar 03 16:26:51 excalibur ModemManager[497]:  MTU: 1428
> Mar 03 16:26:52 excalibur ModemManager[497]:   QMI IPv6 Settings:
> Mar 03 16:26:52 excalibur ModemManager[497]:   Address:
> 2600:1010:b01f:c448:4832:fd1a:be3a:981b/64
> Mar 03 16:26:52 excalibur ModemManager[497]:   Gateway:
> 2600:1010:b01f:c448:f565:a7c9:17d:1b1/64
> Mar 03 16:26:52 excalibur ModemManager[497]:   DNS #1:
> 2001:4888:68:ff00:608:d::
> Mar 03 16:26:52 excalibur ModemManager[497]:   DNS #2:
> 2001:4888:61:ff00:604:d::
> Mar 03 16:26:52 excalibur ModemManager[497]:  MTU: 1428
> Mar 03 16:26:52 excalibur ModemManager[497]:   Modem
> /org/freedesktop/ModemManager1/Modem/5: state changed (connecting ->
> connected)
> Mar 03 16:26:52 excalibur ModemManager[497]:   Simple connect
> state (8/8): All done
>
> I then try to configure the bearer interface's ip address:
> sudo ip addr add 100.127.167.238/30 dev wwan0
>
> Sometimes I've tried messing with the subnet mask:
> sudo ip addr add 100.127.167.238/24 dev wwan0
>
> If I try pinging 8.8.8.8, it appears as if I never get a response
> back. The gateway does not respond either. Setting it up the gateway
> as a default gateway does not help either.
>
> I'm deeply suspicious that there is a misconfiguration on my side:
> sudo ping -I wwan0 google.com
> connect: Network is unreachable
>
> Any advice or tips to troubleshoot? Thanks.
> --
> - Steven



-- 
- Steven
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel