All of lore.kernel.org
 help / color / mirror / Atom feed
* Particular APN and Ofono+Connman+BBB+Buildroot
@ 2014-03-27 19:09 =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes
  2014-03-27 19:48 ` Denis Kenzior
  0 siblings, 1 reply; 6+ messages in thread
From: =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes @ 2014-03-27 19:09 UTC (permalink / raw)
  To: ofono

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

Hi,

First of all, I just subscribe to the mailing list, and I'll warn that I'll
probably be asking some silly or nonsense questions.

I'm trying to build a embedded Linux system for the Beaglebone Black (BBB)
board, using Buildroot. That system must be able to connect to the internet
through a 3g modem. Also must have the possibility of use 2 or more modems
(each one with a different operator) and the ethernet port to get online,
and manage witch is the preferred interface. The system must start
everything needed and connect automatically with no user interface.

After some research, I'm trying to use Connman+Ofono to achieve that. I'm
using the latest version of Buildroot (2014.02), witch supports Connman
1.19 and Ofono 1.13.

Ok, I build the system. Buildroot creates a script to auto start connmand
but not for ofonod (I don't knows if there is any reason for that). I
manually start ofonod and then connmand, and I've sucessfully make one 3g
modem connected, with connmancli.

As fair as I understand, ofono gets the correct APN settings using
Gnome Service Provider Database.

My questions are:
 - How can I 'tell' ofono to use a specific APN settings?
 - It seams that ofono only works if is started after usb-modeswitch
detects the modem and create /dev/ttyUSBx devices. Is there anything to do
to configure that to work properly?

Thanks in advance for any tip.

Best regards,

Jerônimo Lopes

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

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

* Re: Particular APN and Ofono+Connman+BBB+Buildroot
  2014-03-27 19:09 Particular APN and Ofono+Connman+BBB+Buildroot =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes
@ 2014-03-27 19:48 ` Denis Kenzior
  2014-03-28 14:05   ` =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes
  0 siblings, 1 reply; 6+ messages in thread
From: Denis Kenzior @ 2014-03-27 19:48 UTC (permalink / raw)
  To: ofono

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

Hi Jerônimo,

> As fair as I understand, ofono gets the correct APN settings using
> Gnome Service Provider Database.

Not necessarily.  Mobile Broadband Provider Info can be used, but the
provisioning system is plugin based.  You can write your own if you
wish.  See examples/provision.c in oFono git.

> 
> My questions are:
>  - How can I 'tell' ofono to use a specific APN settings?

One can edit context settings via the D-Bus interface, if that is what
you mean.  See test/create-internet-context for an example.

>  - It seams that ofono only works if is started after usb-modeswitch
> detects the modem and create /dev/ttyUSBx devices. Is there anything to
> do to configure that to work properly? 
> 

As long as the modem is configured by usb-modeswitch properly and
detected by udev, the order of events doesn't matter.  oFono will detect
"hot-plugged" devices.

Regards,
-Denis


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

* Re: Particular APN and Ofono+Connman+BBB+Buildroot
  2014-03-27 19:48 ` Denis Kenzior
@ 2014-03-28 14:05   ` =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes
  2014-03-28 14:43     ` Denis Kenzior
  0 siblings, 1 reply; 6+ messages in thread
From: =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes @ 2014-03-28 14:05 UTC (permalink / raw)
  To: ofono

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

Hi Denis,

I've checked those code files, it seams that both do exactly what I need.

Just a few more questions...


2014-03-27 16:48 GMT-03:00 Denis Kenzior <denkenz@gmail.com>:

> Hi Jerônimo,
>
> > As fair as I understand, ofono gets the correct APN settings using
> > Gnome Service Provider Database.
>
> Not necessarily.
> 
> Mobile Broadband Provider Info can be used, but the
> provisioning system is plugin based.  You can write your own if you
> wish.  See examples/provision.c in oFono git.
>
>
Ok, if I write my own how can I include it to my application? Do I need to
include this source file in ofono compilation or is there another way?

Another question, make both work at the same time? I mean, make ofono look
first at 'my own provider', if doesn't have a specific APN, look at
the Mobile Broadband Provider.

>
> > My questions are:
> >  - How can I 'tell' ofono to use a specific APN settings?
>
> One can edit context settings via the D-Bus interface, if that is what
> you mean.  See test/create-internet-context for an example.
>

That's nice, but I need Python to achieve that. I would like to keep the
system (an embedded one) as simple as possible, and for now I don't have
Python, I don't think it's a good idea to include it just for that.

Can I do that with C?

If so, what is the difference between first method and this one?


> >  - It seams that ofono only works if is started after usb-modeswitch
> > detects the modem and create /dev/ttyUSBx devices. Is there anything to
> > do to configure that to work properly?
> >
>
> As long as the modem is configured by usb-modeswitch properly and
> detected by udev, the order of events doesn't matter.  oFono will detect
> "hot-plugged" devices.
>

Ok, I'll recheck that.



>
> Regards,
> -Denis
>
> _______________________________________________
> ofono mailing list
> ofono(a)ofono.org
> https://lists.ofono.org/mailman/listinfo/ofono
>

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

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

* Re: Particular APN and Ofono+Connman+BBB+Buildroot
  2014-03-28 14:05   ` =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes
@ 2014-03-28 14:43     ` Denis Kenzior
  2014-03-28 17:20       ` =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes
  0 siblings, 1 reply; 6+ messages in thread
From: Denis Kenzior @ 2014-03-28 14:43 UTC (permalink / raw)
  To: ofono

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

Hi Jerônimo,

> Ok, if I write my own how can I include it to my application? Do I need
> to include this source file in ofono compilation or is there another way?
>

The easiest is to include it into oFono source.  We do support external
plugins but I can't point you to an example off the top of my head.
There were a couple of external plugins in the past.  See src/plugin.c
and Makefile* to see how to do this.

> Another question, make both work at the same time? I mean, make ofono
> look first at 'my own provider', if doesn't have a specific APN, look at
> the Mobile Broadband Provider.

This can be done by setting the plugin priority appropriately. Plugins
with higher priorities are queried first.

> That's nice, but I need Python to achieve that. I would like to keep the
> system (an embedded one) as simple as possible, and for now I don't have
> Python, I don't think it's a good idea to include it just for that.
> 
> Can I do that with C? 

Sure.  Python just gives you an example of what D-Bus properties to set.

> 
> If so, what is the difference between first method and this one?

No difference in the end.  For an embedded system which has no user
input, the provisioning approach will likely be easier.

Regards,
-Denis

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

* Re: Particular APN and Ofono+Connman+BBB+Buildroot
  2014-03-28 14:43     ` Denis Kenzior
@ 2014-03-28 17:20       ` =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes
  2014-03-28 20:51         ` Denis Kenzior
  0 siblings, 1 reply; 6+ messages in thread
From: =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes @ 2014-03-28 17:20 UTC (permalink / raw)
  To: ofono

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

Hi again Denis


2014-03-28 11:43 GMT-03:00 Denis Kenzior <denkenz@gmail.com>:

> Hi Jerônimo,
>
> > Ok, if I write my own how can I include it to my application? Do I need
> > to include this source file in ofono compilation or is there another way?
> >
>
> The easiest is to include it into oFono source.  We do support external
> plugins but I can't point you to an example off the top of my head.
> There were a couple of external plugins in the past.  See src/plugin.c
> and Makefile* to see how to do this.
>

Ok, I'll try the easiest first. But even to do that I'm a little lost, can
I just add the "foo.c" file at "plugins" folder and compile? Do I need to
add it to the "Makefile.am"?

Is there a easy way to test it with Eclipse? By test, I mean configure
Eclipse to cross-compile it, launch and debug at the target, this case the
Beaglebone Black board.


> > Another question, make both work at the same time? I mean, make ofono
> > look first at 'my own provider', if doesn't have a specific APN, look at
> > the Mobile Broadband Provider.
>
> This can be done by setting the plugin priority appropriately. Plugins
> with higher priorities are queried first.
>
> > That's nice, but I need Python to achieve that. I would like to keep the
> > system (an embedded one) as simple as possible, and for now I don't have
> > Python, I don't think it's a good idea to include it just for that.
> >
> > Can I do that with C?
>
> Sure.  Python just gives you an example of what D-Bus properties to set.
>
> >
> > If so, what is the difference between first method and this one?
>
> No difference in the end.  For an embedded system which has no user
> input, the provisioning approach will likely be easier.
>
> Regards,
> -Denis
> _______________________________________________
> ofono mailing list
> ofono(a)ofono.org
> https://lists.ofono.org/mailman/listinfo/ofono
>

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

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

* Re: Particular APN and Ofono+Connman+BBB+Buildroot
  2014-03-28 17:20       ` =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes
@ 2014-03-28 20:51         ` Denis Kenzior
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2014-03-28 20:51 UTC (permalink / raw)
  To: ofono

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

Hi Jerônimo,

> Ok, I'll try the easiest first. But even to do that I'm a little lost,
> can I just add the "foo.c" file at "plugins" folder and compile? Do I
> need to add it to the "Makefile.am"?
> 

Yes, you need to add it to Makefile.am at least.

> Is there a easy way to test it with Eclipse? By test, I mean configure
> Eclipse to cross-compile it, launch and debug at the target, this case
> the Beaglebone Black board.
> 

Can't help you there, don't use IDEs.

Regards,
-Denis


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

end of thread, other threads:[~2014-03-28 20:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 19:09 Particular APN and Ofono+Connman+BBB+Buildroot =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes
2014-03-27 19:48 ` Denis Kenzior
2014-03-28 14:05   ` =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes
2014-03-28 14:43     ` Denis Kenzior
2014-03-28 17:20       ` =?unknown-8bit?q?Jer=C3=B4nimo?= Lopes
2014-03-28 20:51         ` 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.