Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: Nameservers and FallbackNameservers (Daniel Wagner)
2. Re: Is there anyway to get SIM ID? (Tarmo Kuuse)
3. Re: Is there anyway to get SIM ID? (JH)
4. Re: Is there anyway to get SIM ID? (Tarmo Kuuse)
5. Re: Is there anyway to get SIM ID? (JH)
----------------------------------------------------------------------
Date: Thu, 31 Oct 2019 08:42:28 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: Nameservers and FallbackNameservers
To: [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Tormen,
On 22.10.19 22:21, [email protected] wrote:
> Hi Daniel,
>
> two things:
>
> 1) A question about how FallbackNameservers are used
> 2) A question / potential feature request
>
>
> // 1) A question about how FallbackNameservers are used:
> as I just mentioned: I would love to help improving the documentation
> for now bit by bit as I am concerned.
>
> As an example I just stumbled about:
>
> * FallbackNameservers in the connman.conf (5) man page
>
> What I miss: You don't explain when this is actually used... I have a
> theory, but it would be nice to explicitely state that for the user
> IMHO.
>
> As I read in man comman:
>
> Depending on how ConnMan is compiled, it will by default direct all DNS
> traffic to itself by setting nameserver to 127.0.0.1 in
> resolv.conf(5) file or leave DNS management to an external entity, such
> as systemd-resolved.
>
> So I suspect about FallbackNameservers:
>
> ======================================================
> FallbackNameservers are used in case ConnMan
> internally handles DNS management (see --nodnsproxy and man connman how
> to change this default behaviour). This variable allows to specify a
> comma separated list of nameservers that will be questioned once the
> DNS server(s) received via DHCP were consulted first.
> ======================================================
>
> Is this correct?
Yes, but it should also mention two other things:
- ConnMan supports also external DNS resolver such as systemd-resolved.
The Service API contains the Nameservers property which will also be
populated with the DNS servers (including the FallbackNameservers)
- Additional DNS server can be configured (Service API) which will be
inserted (if available == reachable) before the the fallbacks.
> // 2) A question / potential feature request
>
> I would /love/ to be able to use my OWN dns server and only as a
> Fallback use the DNS servers provided by the DHCP response that connman
> handles.
>
> But why do I want that???
>
> I am privacy aware and don't like to
> give metainformation like all of my DNS requests to some company /
> provider...
>
> Hence I run dnsmasq using a local powerDNS recursor service as upstream
> nameserver.
> But also more and more people I know setup the DNS to be 1.1.1.1 (to
> not use google's 2.2.2.2, 4.4.4.4, 8.8.8.8 servers ;)).
>
> The problem: Some wifi-hotspots have their own custom DNS entries to
> e.g. resolve the login URL! (e.g. often in hotels or with the public
> transportation wifi hotspot)
> So in this case and just for resolving this 1 or 2 URLs I need the DNS
> server provided by DHCP.
>
> I can think of 3 implementations but I have the feeling there should be
> a more elegant solution, which I was not able to think of yet ;)
>
> a) Provide a way to define default setting for new wifi connections.
> And by default I can set the nameserver for this connection to
> 127.0.0.1 (pointing to my local dnsmasq). And then for connections
> where this does not work, I could then leave the nameserver setting
> blank / remove that setting so that it uses the connman default
> nameserver settings (e.g. the nameserver received via DHCP)
>
> b)
> So I could imagine connman setting up 127.0.0.1:53 and then providing a
> possibility to set the Nameservers to use to my ip(s)
> and then provide the possibility to set the FallbackNameserves to
> "DHCP". Meaning it would put whatever DNS servers connman received over
> DHCP there.
>
> c)
> connman would the nameservers that connman received via DHCP (e.g. in a
> /var/lib/connmand/dhcp-resolv.conf or something like that ;))
> So that then I can try to figure out a way to point my DNS service
> (dnsmasq) to them as fallback...
The FallbackNameservers is though as the last resort. If everything else
fails try those. I'd like to keep this way. If you don't want to add
well known (not trustworthy) servers, this is fine, just leave it blank.
Not sure if I understood you correctly. It's all about priority. You
want something like:
- Configured
- DHCP
- Fallback
?
Currently we do
if (configured)
use configured DNS servers
else
DCHP
fallback
Not sure how you can implement this without changing the existing behavior.
Thanks,
Daniel
------------------------------
Date: Thu, 31 Oct 2019 09:56:30 +0200
From: Tarmo Kuuse <[email protected]>
Subject: Re: Is there anyway to get SIM ID?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
On 31.10.19 06:31, JH wrote:
> I am running connman in a 4G LTE device in Linux system, are there
> anyway to get SIM ID? and the Operator and LTE signalling strength?
> Unfoutuantly, I don't have connmanctl due to the limitation of the
> space to install Python.
Hi jh,
Assuming you're using ofono to provide your 4G LTE connectivity, it
provides a dbus interface where it exposes a lot of detail about GSM
status (including SIM serial, IMSI, current network, signal strength etc).
All you need is a dbus client. There's one in Debian package "dbus"
called dbus-send. Some sample commands I use with ofono v 1.21:
# Get list of modems
$ sudo dbus-send --system --print-reply --dest=org.ofono /
org.ofono.Manager.GetModems
# Get general configuration of modem "/quectel_0"; enable roaming
$ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
org.ofono.ConnectionManager.GetProperties
$ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
org.ofono.ConnectionManager.SetProperty string:"RoamingAllowed"
variant:boolean:true
# Get status of network registration on modem "/quectel_0"
$ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
org.ofono.NetworkRegistration.GetProperties
# List all GPRS contexts
$ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
org.ofono.ConnectionManager.GetContexts
# Get status of GPRS context number 1
$ sudo dbus-send --system --print-reply --dest=org.ofono
/quectel_0/context1 org.ofono.ConnectionContext.GetProperties
I've also used Python to build my own simple dbus client for GSM
monitoring purposes. I used the 'pydbus' library provided by Debian
package "python3-pydbus". You can look for other alternatives if you're
low on disk space, e.g. going with dbus-send or implementing your custom
dbus client in C/C++.
--
Kind regards,
Tarmo
------------------------------
Date: Thu, 31 Oct 2019 22:05:00 +1100
From: JH <[email protected]>
Subject: Re: Is there anyway to get SIM ID?
To: Tarmo Kuuse <[email protected]>
Cc: [email protected]
Message-ID:
<CAA=hcWTJNJQWW1Ew9xe0V7oXXN2C6262dKfNHQL=db+rozl...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Hi Tarmo,
On 10/31/19, Tarmo Kuuse <[email protected]> wrote:
> Assuming you're using ofono to provide your 4G LTE connectivity, it
> provides a dbus interface where it exposes a lot of detail about GSM
> status (including SIM serial, IMSI, current network, signal strength etc).
Yes, I am using ofono.
> All you need is a dbus client. There's one in Debian package "dbus"
> called dbus-send. Some sample commands I use with ofono v 1.21:
>
> # Get list of modems
> $ sudo dbus-send --system --print-reply --dest=org.ofono /
> org.ofono.Manager.GetModems
>
> # Get general configuration of modem "/quectel_0"; enable roaming
> $ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
> org.ofono.ConnectionManager.GetProperties
> $ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
> org.ofono.ConnectionManager.SetProperty string:"RoamingAllowed"
> variant:boolean:true
>
> # Get status of network registration on modem "/quectel_0"
> $ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
> org.ofono.NetworkRegistration.GetProperties
>
> # List all GPRS contexts
> $ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
> org.ofono.ConnectionManager.GetContexts
> # Get status of GPRS context number 1
> $ sudo dbus-send --system --print-reply --dest=org.ofono
> /quectel_0/context1 org.ofono.ConnectionContext.GetProperties
That is great, I do have dbus-send in the device, but I know little
about it, I tried to play it, but could not get into array and dict
entry, sorry for asking a dbus-send syntax question, how could you run
dbus-send to display the array and dict entry for string
"CardIdentifier" variant value?
# dbus-send --system --print-reply --dest=org.ofono /ubloxqmi_0
org.ofono.SimManager.GetProperties
method return time=1572518707.814990 sender=:1.4 -> destination=:1.9 serial=85 2
array [
dict entry(
string "Present"
variant boolean true
)
dict entry(
string "CardIdentifier"
variant string "xxxxxxxxxxxxx"
)
............
I tried following command, apparently it is wrong, could you please
show me a correct command syntax?
# dbus-send --system --print-reply --dest=org.ofono /ubloxqmi_0
org.ofono.SimManager.array.dict:string:CardIdentifier
....incorrect Aborted
> I've also used Python to build my own simple dbus client for GSM
> monitoring purposes. I used the 'pydbus' library provided by Debian
> package "python3-pydbus". You can look for other alternatives if you're
> low on disk space, e.g. going with dbus-send or implementing your custom
> dbus client in C/C++.
Yeah, long way to go :-), first have to lean the dbus-send command
line, my application is using C++, so I will use the C++.
Thank you so much Tarmo
Kind regards,
- jh
------------------------------
Date: Thu, 31 Oct 2019 13:21:40 +0200
From: Tarmo Kuuse <[email protected]>
Subject: Re: Is there anyway to get SIM ID?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
On 31.10.19 13:05, JH wrote:
> On 10/31/19, Tarmo Kuuse <[email protected]> wrote:
>> Assuming you're using ofono to provide your 4G LTE connectivity, it
>> provides a dbus interface where it exposes a lot of detail about GSM
>> status (including SIM serial, IMSI, current network, signal strength etc).
>
> Yes, I am using ofono.
>
>> All you need is a dbus client. There's one in Debian package "dbus"
>> called dbus-send. Some sample commands I use with ofono v 1.21:
>>
>> # Get list of modems
>> $ sudo dbus-send --system --print-reply --dest=org.ofono /
>> org.ofono.Manager.GetModems
>>
>> # Get general configuration of modem "/quectel_0"; enable roaming
>> $ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
>> org.ofono.ConnectionManager.GetProperties
>> $ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
>> org.ofono.ConnectionManager.SetProperty string:"RoamingAllowed"
>> variant:boolean:true
>>
>> # Get status of network registration on modem "/quectel_0"
>> $ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
>> org.ofono.NetworkRegistration.GetProperties
>>
>> # List all GPRS contexts
>> $ sudo dbus-send --system --print-reply --dest=org.ofono /quectel_0
>> org.ofono.ConnectionManager.GetContexts
>> # Get status of GPRS context number 1
>> $ sudo dbus-send --system --print-reply --dest=org.ofono
>> /quectel_0/context1 org.ofono.ConnectionContext.GetProperties
>
> That is great, I do have dbus-send in the device, but I know little
> about it, I tried to play it, but could not get into array and dict
> entry, sorry for asking a dbus-send syntax question, how could you run
> dbus-send to display the array and dict entry for string
> "CardIdentifier" variant value?
>
> # dbus-send --system --print-reply --dest=org.ofono /ubloxqmi_0
> org.ofono.SimManager.GetProperties
> method return time=1572518707.814990 sender=:1.4 -> destination=:1.9
> serial=85 2
> array [
> dict entry(
> string "Present"
> variant boolean true
> )
> dict entry(
> string "CardIdentifier"
> variant string "xxxxxxxxxxxxx"
> )
> ............
>
> I tried following command, apparently it is wrong, could you please
> show me a correct command syntax?
>
> # dbus-send --system --print-reply --dest=org.ofono /ubloxqmi_0
> org.ofono.SimManager.array.dict:string:CardIdentifier
>
> ....incorrect Aborted
I understand exactly :) I'm not an expert, but it seems like all the
dbus query interfaces defined by ofono
(org.ofono.<component>.GetProperties) return a big composite response
with all data items. When you want to get an individual data item out of
it, you need to parse it yourself.
So you can't query for a single item and dbus-send doesn't seem to
support extracting a single item out of the composite response.
Hence the custom Python query client I wrote (which has maybe 100 lines,
most of it command line options processing). You can probably get away
with processing dbus-send's almost-machine-readable text output with awk
or whatever text tools you have available.
>> I've also used Python to build my own simple dbus client for GSM
>> monitoring purposes. I used the 'pydbus' library provided by Debian
>> package "python3-pydbus". You can look for other alternatives if you're
>> low on disk space, e.g. going with dbus-send or implementing your custom
>> dbus client in C/C++.
>
> Yeah, long way to go :-), first have to lean the dbus-send command
> line, my application is using C++, so I will use the C++.
Have fun!
--
Kind regards,
Tarmo Kuuse
------------------------------
Date: Fri, 1 Nov 2019 09:03:29 +1100
From: JH <[email protected]>
Subject: Re: Is there anyway to get SIM ID?
To: Tarmo Kuuse <[email protected]>
Cc: [email protected]
Message-ID:
<CAA=hcWQnKTGbSC3K_txNedL6BdaCCqqGccWoA_=GoHsjq=w...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
On 10/31/19, Tarmo Kuuse <[email protected]> wrote:
> I understand exactly :) I'm not an expert, but it seems like all the
> dbus query interfaces defined by ofono
> (org.ofono.<component>.GetProperties) return a big composite response
> with all data items. When you want to get an individual data item out of
> it, you need to parse it yourself.
>
> So you can't query for a single item and dbus-send doesn't seem to
> support extracting a single item out of the composite response.
That should be fine, just wandering if it is my ignorance about the
dbus-send :-). I can use bash command awk etc to parse it.
> Hence the custom Python query client I wrote (which has maybe 100 lines,
> most of it command line options processing). You can probably get away
> with processing dbus-send's almost-machine-readable text output with awk
> or whatever text tools you have available.
Exactly, that works fine. Will go C++ parsing.
Thank you very Tarmo, it is great kind help, really appreciate it.
Kind regards,
- jh
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]
------------------------------
End of connman Digest, Vol 48, Issue 35
***************************************