Active Topics

 


Reply
Thread Tools
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#1
On Sailfish there is this connman, so for me I heard it the first time. However it seems this is not the only place where connman is used.

Here is some info:
https://01.org/connman
https://wiki.archlinux.org/index.php/ConnMan
http://www.embedded-computing.com/iot/the-connman

Source code:
https://git.merproject.org/mer-core/connman
https://git.merproject.org/mer-core/libconnman-qt
https://github.com/sailfishos/sailfi...lugin-iptables

Example Internet connection through USB:
https://together.jolla.com/question/...n-through-usb/

Looking through our forum I found these bt on and off dbus commands.

https://talk.maemo.org/showpost.php?...33&postcount=4

And you can use the same for wifi and gps too. Just replace the stars with wifi, gps or bluetooth.
on
Code:
dbus-send --system --print-reply --dest=net.connman /net/connman/technology/*** net.connman.Technology.SetProperty string:"Powered" variant:boolean:true
off
Code:
dbus-send --system --print-reply --dest=net.connman /net/connman/technology/*** net.connman.Technology.SetProperty string:"Powered" variant:boolean:false
Ok so far nothing new. What I really would like to know is the control of dhcp and iptables. If somebody know something it would be wounderful.

I looked in the cmst gui for connman and gave it a try. So it is a standard qt widget application so there is not so much to expect only problems and ugly look. But after a little tweeking it is working. I think partially so far I didn't test everything. So I removed the systray and replaced one combobox with listwidget.
So it is worth to look into the source code from cmst if you are interested in connman. Will add my not fully tested experimental binary. Be aware that this app runs as root!!!!

Maybe more to come in the future.
Attached Images
  
Attached Files
File Type: rpm cmst-1.1.19-1.armv7hl.rpm (332.6 KB, 74 views)

Last edited by Halftux; 2019-03-11 at 20:53. Reason: added more links
 

The Following 6 Users Say Thank You to Halftux For This Useful Post:
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#2
Oh btw there is a mistake in one of the pictures
A small bug in the software. I used the January 2019 release.
Who find it first can name it. Hint: for germans it is easier.
 

The Following 2 Users Say Thank You to Halftux For This Useful Post:
Posts: 56 | Thanked: 146 times | Joined on Sep 2013 @ Norway
#3
Beenden -> Exit
 

The Following 2 Users Say Thank You to PamNor For This Useful Post:
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#4
Originally Posted by PamNor View Post
Beenden -> Exit
Oh yes, I did not see there is one more on second picture.
 

The Following User Says Thank You to Halftux For This Useful Post:
Posts: 1,293 | Thanked: 4,319 times | Joined on Oct 2014
#5
Originally Posted by Halftux View Post
Oh yes, I did not see there is one more on second picture.
Aus=off
Sicherheit = Security
 

The Following 2 Users Say Thank You to nieldk For This Useful Post:
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#6
Originally Posted by nieldk View Post
Aus=off
Sicherheit = Security
Well done maybe for germans it is not easier because these are all known words.
I have seen only "Sicherheit" in the beginning.
 

The Following User Says Thank You to Halftux For This Useful Post:
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#7
Ok here I found the iptables part:

https://github.com/sailfishos/sailfish-connman-plugin-iptables


Still some info about dhcp is missing. The only thing what I could find is some qvariant map with networks settings including dhcp and dns. Maybe thats all I need, will see.

void UtService::initTestCase()
{
QVERIFY(waitForService("net.connman", "/", "net.connman.Manager"));
m_service = new NetworkService("/service0", QVariantMap(), this);
m_otherService = new NetworkService("/service0", QVariantMap(), this);
}

void UtService::testWriteProperties_data()
{
QTest::addColumn<QVariant>("newValue");

QTest::newRow("autoConnect") << QVariant(true);
QVariantMap ipv4Config;
ipv4Config["Method"] = "dhcp";
ipv4Config["Address"] = "10.0.24.24";
ipv4Config["Netmask"] = "255.255.224.0";
ipv4Config["Gateway"] = "10.0.24.1";
QTest::newRow("ipv4Config") << QVariant(ipv4Config);
QVariantMap ipv6Config;
ipv6Config["Method"] = "dhcp";
ipv6Config["Address"] = "fd30:84f5:4397:1676:d:e:a:d";
ipv6Config["PrefixLength"] = "65";
ipv6Config["Gateway"] = "fd30:84f5:4397:1676:d:e:a:1";
ipv6Config["Privacy"] = "disabled";
QTest::newRow("ipv6Config") << QVariant(ipv6Config);
QTest::newRow("nameserversConfig") << QVariant(QStringList() << "127.0.1.1" << "127.0.1.2");
QTest::newRow("domainsConfig") << QVariant(QStringList() << "foo.org" << "foo.com");
QVariantMap proxyConfig;
proxyConfig["Method"] = "auto";
proxyConfig["URL"] = "http://proxy.foo.org";
proxyConfig["Sercers"] = QStringList() << "proxy24.foo.org";
proxyConfig["Excludes"] = QStringList() << "drct1.com" << "drct2.com";
QTest::newRow("proxyConfig") << QVariant(proxyConfig);
}

void UtService::testWriteProperties()
{
QFETCH(QVariant, newValue);

testWriteProperty(m_service, m_otherService, QTest::currentDataTag(), newValue);
}

[1] https://git.merproject.org/mer-core/...ut_service.cpp
 

The Following 2 Users Say Thank You to Halftux For This Useful Post:
nthn's Avatar
Posts: 764 | Thanked: 2,888 times | Joined on Jun 2014
#8
Originally Posted by Halftux View Post
Well done maybe for germans it is not easier because these are all known words.
I have seen only "Sicherheit" in the beginning.
I don't get it, what was the bug?
 

The Following User Says Thank You to nthn For This Useful Post:
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#9
Originally Posted by nthn View Post
I don't get it, what was the bug?
There is no bug only the translation is not finished.
 

The Following 2 Users Say Thank You to Halftux For This Useful Post:
Posts: 56 | Thanked: 146 times | Joined on Sep 2013 @ Norway
#10
deactiviert -> deactivated
 

The Following 2 Users Say Thank You to PamNor For This Useful Post:
Reply

Tags
connection, connman, power, switch


 
Forum Jump


All times are GMT. The time now is 08:51.