[PATCH] mbimcli: report IP configuration on connect
Joe
joe.on.list at gmail.com
Thu May 7 02:32:41 PDT 2015
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..
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?
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!
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?
More information about the libmbim-devel
mailing list