andrew-bibb / cmst

QT GUI for Connman
174 stars 37 forks source link

oFono support #150

Closed klausenbusk closed 8 years ago

klausenbusk commented 8 years ago

Hello

It seems like oFono is needed for 3g/4g modems. As I understand it, oFono manage APN settings and connecting to the network and connman mange ip/routes.

I haven't looked very much into oFono yet, but https://lists.ofono.org/pipermail/ofono/2011-June/010670.html seems to document the steps needed to bring up a modem, using a bunch of the test script located here.

It seems like we just need to call the right dbus interfaces..

Ideally as I start I think it should just allow setting pincode and APN, at a later point it could use mobile-broadband-provider-info.

What do you think Andrew? :)

Regards Kristian

progandy commented 8 years ago

Isn't there already an ofono plugin for connman? This should translate the settings so that you should be able to use the entry mask for wifi networks for this I think. You'll have to compile connman with that plugin, though. https://github.com/aldebaran/connman/blob/master/plugins/ofono.c There is also a modified plugin for jolla that may work better? https://git.merproject.org/mer-core/connman/blob/master/connman/plugins/jolla-ofono.c

klausenbusk commented 8 years ago

@progandy As I understand it you still need to configure APN and so with oFono, Connman can't do that.. https://lists.ofono.org/pipermail/ofono/2012-November/013821.html or maybe I'm wrong?

andrew-bibb commented 8 years ago

There is no separate Connman API for oFono. I have not looked at it at all, but I'm guessing it is very similar to Bluetooth which also has no separate API. I'm a bit more familiar with the Bluetooth as I spent some time this spring working with that. My guess would be that once oFono makes a connection that Connman can then manage the connection using the service API (I think that is what you are getting at in the post above). That is the way it works with Bluetooth.

I'll do a bit of further research on this just to be sure.

klausenbusk commented 8 years ago

I'll do a bit of further research on this just to be sure.

https://lists.ofono.org/pipermail/ofono/2012-November/013821.html (and rest of the thread) is worth reading, if you haven't already. It explain a bit on how it works and so..

andrew-bibb commented 8 years ago

Kristian,

I've read through the links and I think I understand where you are trying to get to.

Up to this point I've been trying very hard to limit CMST to interfacing with ConnMan only. I have pushed that a bit with both the provisioning and vpn-provisioning editors which write to /var/lib/connman and /var/lib/comman-vpn using separate root helper programs and bypassing ConnMan, so I'm not completely adverse to doing this.

Doing the DBus connections with QT will not be difficult at all. I think if I do this I'd like to do it as a stand alone program called by CMST if needed or wanted. I had a few people wanting me to at least disable the VPN stuff after I added it, and I could see the same happening here. Maybe something like the root helpers for the provisioning editors - they are started only when needed. Still thinking, if you have any other ideas let me know.

A-

klausenbusk commented 8 years ago

Doing the DBus connections with QT will not be difficult at all. I think if I do this I'd like to do it as a stand alone program called by CMST if needed or wanted. I had a few people wanting me to at least disable the VPN stuff after I added it, and I could see the same happening here. Maybe something like the root helpers for the provisioning editors - they are started only when needed. Still thinking, if you have any other ideas let me know.

I'm not sure what the benefits is by writing it as a standalone program? At the end it is often the package maintainer which decide what to ship. A compiler flag to disable VPN stuff and this, should be enough I think.

We have ordered a Huawei E3372, so I will test oFono and Connman with that either tomorrow or next week and see how well it works. It don't make sense for you to start working on this, if I can't get it to work from command line.

Regards Kristian

andrew-bibb commented 8 years ago

A compiler flag would do that same thing to keep it separate.

Good on the testing at your end. I can do the code part, but I've no way of testing anything cell phone related. I'm still in the reading the Ofono API document stage, and there are an awful lot of them, so it will take me a bit to wade through. My guess is I'll only need one, maybe two, but I've got to find which ones.

klausenbusk commented 8 years ago

We have ordered a Huawei E3372,

I just researched a bit on Huawei E3372 and Linux support, and some sites state it have a mode called HiLink mode, where it act as a kind of "router"/usb Ethernet.. So if that is true, then oFono support isn't needed, so for now it isn't worth researching too much :)

andrew-bibb commented 8 years ago

I'm going to close this one out as it has been quiet for some time. If we need it back please do not hesitate to reopen.

klausenbusk commented 8 years ago

I'm going to close this one out as it has been quiet for some time. If we need it back please do not hesitate to reopen.

Totally okay, we ended up using a Huawei 4G modem in HiLink mode, which works like a ethernet adapter somehow.

But anyways, thanks for your time :)