On Thu, Sep 24, 2020 at 7:56 AM KeithG <ys3al35l@gmail.com> wrote:
Daniel,

I pulled the latest connman and was able to run monitor-connman. The attached log is what I got when I:
1) stopped connman
2) started connman
3) turned off the radio
4) waited until my phone and other devices were online with that SSID
5) typed 'connmanctl scan wifi' got no return
6) typed ctrl c
7) typed 'connmanctl services'

I noted that after I initiated the scan even though connman reported nothing, it had already begun the connection and connected. We have noticed that if we type 'iwctl station wlan0 scan' or, apparently 'connmanctl scan wifi' that it will initiate and complete a scan. I wonder if the fact that connman 1.38 never returns with a scan complete message is a hint? The monitor-connman.txt is what showed in the terminal when I ran the script. The monitor-connman-journal.txt is what appeared in the journal for u- connman. At the same time the journalctl -iwd shows this:

Sep 24 07:29:14 keith-dell iwd[405]: Received Deauthentication event, reason: 3, from_ap: false
Sep 24 07:39:08 keith-dell iwd[405]: Received Deauthentication event, reason: 3, from_ap: true
Sep 24 07:39:08 keith-dell iwd[405]: Connected BSS not in scan results
Sep 24 07:39:08 keith-dell iwd[405]: authentication timed out

Is there some sort of timing problem?

Keith

On Wed, Sep 23, 2020 at 2:18 AM Daniel Wagner <wagi@monom.org> wrote:
On Tue, Sep 22, 2020 at 08:59:57AM -0500, KeithG wrote:
> I cannot find the monitor-iwd script.

This script is part of the iwd sources.

> I found the monitor-connman script,
> but when I try to run the monitor-connman script, I get a gobject error:
>
> $ ./monitor-connman
> Traceback (most recent call last):
>   File "./monitor-connman", line 3, in <module>
>     import gobject
> ModuleNotFoundError: No module named 'gobject'

The Python support for GLib gobject was always a bit troublesome and it
seems it aged really badly.

> This is even though I believe that python-gobject is installed and I can
> run the hello.py script on this page:
> https://pygobject.readthedocs.io/en/latest/getting_started.html
> python 3.8.5 and
> $ pacman -Q | grep gobject
> gobject-introspection 1.66.0-1
> gobject-introspection-runtime 1.66.0-1
> pygobject-devel 3.36.1-1
> python-gobject 3.36.1-1

I have the same problem with Python 3 on my distro. It still works with
Python 2. The test script need to use the dynamic version of the GLib
binding. See the other patch.

> I am now running on a pretty common dell laptop with an intel wifi card and
> get the same behavior. iwd 1.9 connman 1.38. I connected via connman then
> powered down the radio on the router then back on then had to reconnect by
> typing in teh password.  The journal of this event is attached.
>
> I did notice that in order to reconnect on this laptop (Arch Linux x86_64)
> that I had to type in the password again though I was just connected before
> I turned off the SSID. The journal running /usr/bin/connmand -n -d
> plugins/iwd.c:src/service.c though this event is attached.

I'll try to reproduce it later.

Thanks,
Daniel

I see this with all my Arch Linux installs. I made a basic install on an RPi with nothing but the base system and connman and iwd and a few other programs. When I use connman to manage the wifi interface and run ./monitor-iwd, nothing ever displays even when the wifi goes down. I'd show the tect capture, but it is blank. When I run systemd-networks/dhcpcd with iwd, and have the network go down, I get a lot of messages and it reconnects when the radio comes back online:
# ./monitor-iwd
{Station} [/net/connman/iwd/0/3] State = disconnected
{Network} [/net/connman/iwd/0/3/73706733_psk] Connected = False
{Station} [/net/connman/iwd/0/3] Scanning = True
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/52756e65417564696f4150_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/4154546a435336706932_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/4e4554474541525f455854_open]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/456476656e7475726573_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/4e4554474541523938_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/73706733_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/4d65617374657761_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/456476656e747572657333_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/73706732_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/415454785a4951347761_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/486f757365537461726b3031_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/456c4a656665_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/426964656e486172726973_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/4d4f544f524f4c412d4645304431_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/415454654865544b4932_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/4e4554474541523633_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/48414e4e41_psk]
{Station} [/net/connman/iwd/0/3] Scanning = False
{Station} [/net/connman/iwd/0/3] Scanning = True
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/52756e65417564696f4150_psk]
      Name = RuneAudioAP
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/48414e4e41_psk]
      Name = HANNA
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/456c4a656665_psk]
      Name = ElJefe
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/486f757365537461726b3031_psk]
      Name = HouseStark01
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/4e4554474541523633_psk]
      Name = NETGEAR63
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/456476656e7475726573_psk]
      Name = Edventures
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/4e4554474541523938_psk]
      Name = NETGEAR98
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/415454654865544b4932_psk]
      Name = ATTeHeTKI2
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/4974204275726e73205768656e204950_psk]
      Name = It Burns When IP
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/48414e4e4135_psk]
      Name = HANNA5
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/456476656e747572657333_psk]
      Name = Edventures3
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Station} [/net/connman/iwd/0/3] Scanning = False
{Station} [/net/connman/iwd/0/3] Scanning = True
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/426964656e486172726973_psk]
      Name = BidenHarris
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Station} [/net/connman/iwd/0/3] Scanning = False
{Station} [/net/connman/iwd/0/3] Scanning = True
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/415454785a4951347761_psk]
      Name = ATTxZIQ4wa
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/4d4f544f524f4c412d4645304431_psk]
      Name = MOTOROLA-FE0D1
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/4e4554474541525f455854_open]
      Name = NETGEAR_EXT
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = open
{Station} [/net/connman/iwd/0/3] Scanning = False
{Station} [/net/connman/iwd/0/3] Scanning = True
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/4e4554474541525f455854_open]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/4d4f544f524f4c412d4645304431_psk]
{Removed net.connman.iwd.Network} [/net/connman/iwd/0/3/48414e4e4135_psk]
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/73706733_psk]
      Name = spg3
      Connected = True
      Device = /net/connman/iwd/0/3
      Type = psk
      KnownNetwork = /net/connman/iwd/73706733_psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/73706732_psk]
      Name = spg2
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Added net.connman.iwd.Network} [/net/connman/iwd/0/3/4e4554474541523336_psk]
      Name = NETGEAR36
      Connected = False
      Device = /net/connman/iwd/0/3
      Type = psk
{Station} [/net/connman/iwd/0/3] Scanning = False
{Station} [/net/connman/iwd/0/3] State = connecting
{Station} [/net/connman/iwd/0/3] ConnectedNetwork = /net/connman/iwd/0/3/73706733_psk
{Network} [/net/connman/iwd/0/3/73706733_psk] Connected = True
{Station} [/net/connman/iwd/0/3] State = connected
{KnownNetwork} [/net/connman/iwd/73706733_psk] LastConnectedTime = 2020-09-28T01:10:45Z

The attached journal shows this for downing the radio when connman was controlling the network. It ignores it. My guess is there is some strange setting in Arch Linux which stops this from working when connman is managing things. What more can I do to help? I see this same behavior on my arm devices (RPis) and x86_64 full desktop installs.

Keith