Hi,
On 12/02/2016 10:21 AM, Priyaranjan Singh wrote:
We have got Telephony device connected to usb0 interface with my
Linux embedded system. This Telephony device doesn't have DHCP Server.
Using connman API, we are setting static route and nameserver information.
I assume you are talking about the D-Bus APIs.
With the logs we can very well verify that connman accepted this new
values but reverting this value soon.
So you set the value and soon after that it is reverted again?
Note: Telephony device has been given highest priority in the
connman service order list. Also using log I cannot see service order changing
is happening.
How do you set the highest priority? Via MoveBefore? If so, MoveBefore
and MoveAfter is not really useful because it is not something ConnMan
remembers. It is just the ordering for the moment you influence.
Everyone agrees, that is not how it should be.
Basic steps: My application is setting below properties. Listening
for the change from connman. In case connman is reverting this
change, application is setting back to static values.
For "nameserver" we are setting " Nameservers.Configuration"
property
For "route" we are setting " IPv4.Configuration" property (Method,
Address, Netmask, Gateway)
Result:
1) When application is setting "nameserver", for entire lifecycle
connman is clearing the value and My application is setting it back.
This is going in loop.
Hard to tell. Could you send logs for this?
- If application is writing static nameserver to
"resolv.conf" file directly. We are not observing any issues.
- What will be side effect in case application is directly writing to resolv.conf
You are bypassing the dnsproxy inside ConnMan. If you don't want ConnMan
to handle the DNS queries you can disable it via -r command line option.
2) When application is reading " IPv4" property, if
"method" is not
"manual" then setting " IPv4.Configuration". Application is
checking
this on SERVICESCHANGED and PROPERTYCHANGED signal from connman
Not sure if I understand this correctly. Could you write this as small
Python demonstrator, something like in connman/tests/set-ipv4-method?
- usb0 interface is getting added and removed by connman continuously
==> connman Log " usb0 {add} route" & " usb0 {del} route" is
continuously coming
- This is causing state change to "configuration" ->
"idle" -> "ready"
Do you know reason for this issue? Are we consuming connman APIs in wrong way?
As I said, it is hard to tell from you description. Log files and a
small Python prototype would really help.
Thanks,
Daniel