All of lore.kernel.org
 help / color / mirror / Atom feed
* Telit HE910 : how to get the network interface name
@ 2013-05-21 10:05 Etienne Mabille
  2013-05-21 13:17 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Etienne Mabille @ 2013-05-21 10:05 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

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.

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...

Thanks for your help
Best regards.

Etienne

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 1405 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Telit HE910 : how to get the network interface name
  2013-05-21 10:05 Telit HE910 : how to get the network interface name Etienne Mabille
@ 2013-05-21 13:17 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2013-05-21 13:17 UTC (permalink / raw)
  To: ofono

[-- 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-21 13:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-21 10:05 Telit HE910 : how to get the network interface name Etienne Mabille
2013-05-21 13:17 ` Denis Kenzior

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.