• Page:
  • 1

TOPIC: connman questions

connman questions 1 year 4 weeks ago #1

  • rickx
  • rickx's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Thank you received: 1
  • Karma: 0
Hi,
I'm trying to set up a revo 3700 and an xtreamer ultra 2 using a wpa2-enterprise (peap-mschapv2) network in a school.
There's no way to do that using the settings addon. I may have found a way, by changing the network init script, but before going that way I wanted to do at least some testing.
So, the question(s):
How does connman work in openelec? And how does wpa_supplicant work? Are they customized or is it possible e.g. to start wpa_supplicant with custom parameters and a custom conf script?

What I found out until now:
- connman seems to call the init script each time it's called. I'd like to e.g. change the profile file and restart networking (that would be ubuntu...) but that did not work.
- connman adds wifi profiles to the default.profile: how and when I don't know. I suppose that's at every start. But what are those profiles there for?? Shouldn't it put there just the ones a user configures? Moreover, it puts a second entry for a profile I set up manually which surely does not help.

- I see no helping infos in logs. Just the "...not ready" thing which says nothing.
- There's no wpa_supplicant.conf in /etc. Is it possible to create one and use that?
- Is it possible to just do without connman? (it's not even clear if it supports peap with mschapv2 and there's nearly no documentation at all)

Ok. Sorry, I had all this to spit out...
I hope to get some help!
The administrator has disabled public write access.

Re: connman questions 1 year 4 weeks ago #2

  • chewitt
  • chewitt's Avatar
  • OFFLINE
  • Moderator
  • Posts: 2705
  • Thank you received: 418
  • Karma: 130
The OE settings addon stores basic network info (technology, interface, SSID, password, IP details) in an XML file which is read at startup by the networking init script. The script builds default.profile and this is used as the active 'profile' in connman-speak by connman when it's started. If the wireless NIC is active but not the default interface (in OE settings) default.profile will also record details of WLANs it can see. It's possible to edit the content while connman is running but each time connman goes to read the file it'll overwrite whatever you put in it. To change what ends up in default.profile you'll need to hack the init scripts that build it at startup, which is easiest done by building your own OpenELEC images. Once you've got a working build it's fairly simple to clear only the built package that contains the init scripts so that any change you made are picked up on the next build. If the system is only (re)building one small package each time the build only takes a couple of minutes.

I've no idea what support for WPA Enterprise is like but documentation for connman is in the sources. Make sure you grab v0.77 as this is what we're currently using. Be aware that connman did a major API rewrite in 0.78/79 and the latest build is 0.80. Sometime after OpenELEC 2.0 ships the devs need to re-implement connman to account for the changes so that we catch-up on their releases. This probably means the init scripts will change and require some rework to any hacking you do.

Adding Enterprise WPA support isn't high on the agenda for the project as our primary target audience is consumer users. It can probably be hacked to work and if it's really simple we might consider adding it as a capability to the main builds, but it's not guaranteed. If this were me (with a busy day-job) I'd start thinking about a long Ethernet cable or a cheap wireless bridge device as being significantly easier and more future-proof to live with. Just my $0.02.

If you go ahead, post Q's here. There are not too many people who understand how connman works (and I'm not really one of them) but we'll advise where we can if you ask the right questions!
The administrator has disabled public write access.

Re: connman questions 1 year 4 weeks ago #3

  • rickx
  • rickx's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Thank you received: 1
  • Karma: 0
Thanks for the answer! That was fast.
It's more or less like I thought...I know the init script. What made me wonder was that calling connmand -n (was it n??) returned an output from the init script...sounds like a hardcoded join there...

And you're right, it's probably much easier to use ethernet or a simple wpa2 network, but then...where would be the fun of hacking?
I'll go ahead. The changed init script is 90% done.
So if you give me two little tips, I'll see what happens, and report back.
1) Is it ok to put a sort of backdoor in the init script, linking to a file on /storage? (I know it's not from a security pov, but will it be mounted by the time the script is executed?)

2) How does the connman debugging parameter work?

Thanks again!
rickx
The administrator has disabled public write access.

Re: connman questions 1 year 4 weeks ago #4

  • chewitt
  • chewitt's Avatar
  • OFFLINE
  • Moderator
  • Posts: 2705
  • Thank you received: 418
  • Karma: 130
if you look in /var/log/messages you'll see exactly when drives become available and when connman is started by the init script. /storage should be available by that point so you should be safe with linking out to something more easily edited. If you start connman in debug mode it dumps the inner workings of connman to standard out. It's quite verbose and generates a huge amount of human-readable (if not always understandable) data.
The administrator has disabled public write access.
  • Page:
  • 1

Our Sponsors & Partners

arctic_logo