From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: Telit HE910 : how to get the network interface name
Date: Tue, 21 May 2013 08:17:13 -0500 [thread overview]
Message-ID: <519B73D9.7000605@gmail.com> (raw)
In-Reply-To: <CAMtf1D-1Hf+zm_tG6JnRsreNFVH6qhwXbUPR0nOVq3iq-e0EaA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1677 bytes --]
Hi Etienne,
On 05/21/2013 05:05 AM, Etienne Mabille wrote:
> Hi everyone,
>
> I am using ofono and the Telit HE910, configured and running fine.
> I am now working on a program thats monitors the connection and
> initiates the reconnection when it is lost.
>
> This program uses the network interface name : usually ppp0.
> I am looking for a clean way of getting this name for the telit, and not
> just hard-code it in case this name changes.
>
The interface name is given by oFono when the context is activated. See
the 'Interface' entry in the 'Settings' dictionary of the
ConnectionContext interface (doc/connman-api.txt)
If the context is deactivated / lost, then the interface is either
destroyed or ifdown-ed by oFono.
> I see that in several modems (hs0 and samsung at least), this is done in
> the setup_* function in udevng.c
> For these modems, the NetworkInterface field is retrieved from the device.
> However, in the telit documentation, it specifies that out of the seven
> devices created for the modem (/dev/ttyACM0-6)
> only 2 can be used : the data port for ppp connections and the generic
> port for AT commands.
>
> Is there another way of retrieving this information ?
>
> I saw that it appears in gatchat/ppp_net.c: in the function ppp_net_new
> where it submits the name "ppp%d".
> My understanding is that the kernel (or pppd) fills out the number with
> the first one available.
> But this is general code in which we don't have access to the modem
> anyway...
>
Those are implementation details and are subject to change.
> Thanks for your help
> Best regards.
>
> Etienne
Regards,
-Denis
prev parent reply other threads:[~2013-05-21 13:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 10:05 Telit HE910 : how to get the network interface name Etienne Mabille
2013-05-21 13:17 ` Denis Kenzior [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=519B73D9.7000605@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.