[PATCH] mbimcli: report IP configuration on connect

Aleksander Morgado aleksander at aleksander.es
Thu May 7 03:28:22 PDT 2015


Hey,

On Thu, May 7, 2015 at 11:32 AM, Joe <joe.on.list at gmail.com> wrote:
> On Monday 04 May 2015 20:31:28 Dan Williams wrote:
>> On Tue, 2015-05-05 at 00:50 +0200, Joe wrote:
>> >
>> > Ehm... I'm totally newbie to git and patching...
>> > Pardon my ingnorance, but...  How can I apply this patch
>> > to test if it works for my dongle too?
>>
>> If you've got git installed, you can save the email as a text file (or
>> grab it from
>> http://people.redhat.com/dcbw/0001-mbimcli-report-IP-configuration-on-
> connect.patch )
>> and then 'cd' into the top level of the libmbim source tree.
>> Then, you run 'git am /path/to/0001-mbimcli-report-IP-configuration-on-
> connect.patch'
>> and it should apply with no problems.  Then you can 'make' to build with the
> changes,
>> 'make install' to install them, and you're all set with the new code.
>
> Ok, I've done... after created my local libmbim dir:
>
> git clone git://anongit.freedesktop.org/libmbim/libmbim
>
>
> Just a note, before 'make' seems 'autogen.sh' script have to be launched. It
> should generate all needed Makefiles, configure etc..
>

Yes. When building from git you need to run ./autogen.sh first.

> However I was'nt able to obtain a tarball like those in stable repo...
> http://www.freedesktop.org/software/libmbim/
>
> How have you create them starting from git branch?  Could you let me know?
>

I usually do this:

$ .NOCONFIGURE=1 /autogen.sh
$ ./configure
$ make
$ make distcheck

The distcheck phase will run tests and if all goes well, create a tarball.

>
> Anyway I was able to produce a tarball containing sources and to pass it to a
> slackbuild and install, installation is not perfect but It's enought for
> testing
> purpouse.
>
> Finally I launched mbimcli connection... and it report also my IP GW DNS MTU
> etc...  So It works!
>

Good!

> Ok, but now we have to manually configure wwan inferface. I could make a
> script
> to parse mbimcli output and get IP adress and Gateway address, it's not so
> hard... But why not to add two otpions more to mbimcli, something like:
>
> --configure-net-interface
>
> --use-peer-dns (if one want to overwrite his resolv.conf...)
>
> And automagically obtain our interface up and configured with our IP and our
> routing table properly setted to use our new wwan.
>
> Now I've used these commands (iproute2):
> -----------------------
> ip a a $IP dev $DEV b +
> ip l s $DEV up
> ip r a default via $GW dev $DEV
> -------------------------------
>
> IP is my assigned IP/network
> GE is my assigned gateway
> DEV is my wwan interface wwan0, or wwan1...
>
> I think it is a good chioce to let the user pass those options instead of
> introduce this feature by default, because one is free to use DHCP if
> prefers and if is his dongle supports it.
>
> What do you think about?
>

That is a good thing, yes. I've been meaning to do this already in
e.g. mbim-network, but doing it via mbimcli for the static IP config
would also be a good thing I guess.

-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list