On Tue, Oct 6, 2020 at 1:29 AM Daniel Wagner <wagi@monom.org> wrote:
On Mon, Oct 05, 2020 at 08:57:47AM -0500, KeithG wrote:
> As for the eth0 up and down, it looks like it is being controlled by
> connman. At least journalctl thinks so:
>
> Oct 05 08:18:53 rune64 connmand[4313]: eth0 {update} flags 36866 <DOWN>
> Oct 05 08:18:53 rune64 connmand[4313]: eth0 {newlink} index 3 address
> B8:27:EB:07:99:85 mtu 1500
> Oct 05 08:18:53 rune64 connmand[4313]: eth0 {newlink} index 3 operstate 2
> <DOWN>
> Oct 05 08:18:53 rune64 connmand[4313]: eth0 {update} flags 36867 <UP>
> Oct 05 08:18:53 rune64 connmand[4313]: eth0 {newlink} index 3 address
> B8:27:EB:07:99:85 mtu 1500
> Oct 05 08:18:53 rune64 connmand[4313]: eth0 {newlink} index 3 operstate 2
> <DOWN>
> Oct 05 08:34:20 rune64 connmand[4313]: eth0 {update} flags 36866 <DOWN>
> Oct 05 08:34:20 rune64 connmand[4313]: eth0 {newlink} index 3 address
> B8:27:EB:07:99:85 mtu 1500
> Oct 05 08:34:20 rune64 connmand[4313]: eth0 {newlink} index 3 operstate 2
> <DOWN>
> Oct 05 08:34:20 rune64 connmand[4313]: eth0 {update} flags 36867 <UP>
> Oct 05 08:34:20 rune64 connmand[4313]: eth0 {newlink} index 3 address
> B8:27:EB:07:99:85 mtu 1500
> Oct 05 08:34:20 rune64 connmand[4313]: eth0 {newlink} index 3 operstate 2
> <DOWN>
>
> Spams the log with this.

No, this doesn't mean it's controlled by ConnMan. ConnMan just logs the
state of the interfaces. If there are no other log entries when running
with 'connmand -n -d src/service.c' saying let's connnect/disconnect,
then it's something else enabling/disabling the interface.
Daniel,

I think I found what is spamming the log. It isn't connman, but a script we are running to check the interfaces. I have disabled that and will watch it some more.

As I see it, there are still 3 strange things going on:
1) the latest git will not grab an ipv4 address. I will revert that commit and try this again. Probably have time later this week.

2) the IPv6 online check still always fails (though it has a valid ipv4 and ipv6 address) I can connect to ipv6 addresses via ping/curl/wget and I can connect to it via ssh with its ipv6 address. I currently disable the online check and the link shows as AR and not AO.

Oct 05 18:41:10 rune64 connmand[185]: Failed to find URL:http://ipv6.connman.net/online/status.html

Oct 06 06:32:46 rune64 connmand[43232]: src/service.c:__connman_service_online_check_failed() service 0x55902cbb10 type IPv6 interval 6
Oct 06 06:32:46 rune64 connmand[43232]: src/service.c:connman_service_ref_debug() 0x55902cbb10 ref 4 by src/service.c:6205:__connman_service_online_check_failed()
Oct 06 06:33:23 rune64 connmand[43232]: src/service.c:connman_service_unref_debug() 0x55902cbb10 ref 3 by src/service.c:6160:redo_wispr()
Oct 06 06:33:23 rune64 connmand[43232]: src/service.c:redo_wispr() Retrying IPv6 WISPr for 0x55902cbb10 spg3
Oct 06 06:35:32 rune64 connmand[43232]: src/service.c:__connman_service_online_check_failed() service 0x55902cbb10 type IPv6 interval 7
Oct 06 06:35:32 rune64 connmand[43232]: src/service.c:connman_service_ref_debug() 0x55902cbb10 ref 4 by src/service.c:6205:__connman_service_online_check_failed()
Oct 06 06:36:22 rune64 connmand[43232]: src/service.c:connman_service_unref_debug() 0x55902cbb10 ref 3 by src/service.c:6160:redo_wispr()
Oct 06 06:36:22 rune64 connmand[43232]: src/service.c:redo_wispr() Retrying IPv6 WISPr for 0x55902cbb10 spg3
Oct 06 06:38:32 rune64 connmand[43232]: src/service.c:__connman_service_online_check_failed() service 0x55902cbb10 type IPv6 interval 8
Oct 06 06:38:32 rune64 connmand[43232]: src/service.c:connman_service_ref_debug() 0x55902cbb10 ref 4 by src/service.c:6205:__connman_service_online_check_failed()
Oct 06 06:39:37 rune64 connmand[43232]: src/service.c:connman_service_unref_debug() 0x55902cbb10 ref 3 by src/service.c:6160:redo_wispr()
Oct 06 06:39:37 rune64 connmand[43232]: src/service.c:redo_wispr() Retrying IPv6 WISPr for 0x55902cbb10 spg3

3) (most confounding) I am using a setting for wpa_supplicant which seems to work to get iwd to reconnect when the router goes down then back up. This setting is supposed to only work with wpa_supplicant. I am leery of calling this 'fixed' on my end as it is not supposed to work.

On this, I wonder if it would reconnect if connman actually forced the iwd config setting to AutoConnect=true. Currently when connman is controlling iwd, the iwd config looks like this:

[Security]
PreSharedKey=xxxxxx
Passphrase=password

[Settings]
AutoConnect=false

I cannot edit the AutoConnect to be 'true' because connman is controlling it and resets it every time I try to edit it. But, without the BacgroundScan setting in main.conf, iwd never gets a trigger to scan after it has lost the connection and, therefore will never reconnect when the SSID reappears. When I use systemd-networkd and iwd, I can edit this iwd setting to true and it always reconnects. wpa_supplicant is not installed. 

Keith