From: KeithG <ys3al35l@gmail.com>
To: Daniel Wagner <wagi@monom.org>
Cc: connman@lists.linux.dev
Subject: Re: [PATCH] iwd: Add support to Scan in AP mode
Date: Mon, 22 May 2023 09:23:47 -0500 [thread overview]
Message-ID: <CAG17S_MkyEqj497spiejQBUMdPiOkCr3ao9tjwaJZnUs_4rHpA@mail.gmail.com> (raw)
In-Reply-To: <CAG17S_OFx6vU9ubpyDO06N49jBMQVqb20L+tzx0gNs7eWaLv2g@mail.gmail.com>
> > On Tue, Feb 14, 2023 at 12:55:37PM -0600, KeithG wrote:
> > > ~# iwctl device list
> > > > Devices
> > > > --------------------------------------------------------------------------------
> > > > Name Address Powered Adapter Mode
> > > > --------------------------------------------------------------------------------
> > > > wlan0 b8:27:eb:a4:6e:0f on phy0 ap
> > > >
> > > > ~# iwctl ap wlan0 scan
> > > > ~# iwctl ap wlan0 get-networks
> > > > Networks
> > > > --------------------------------------------------------------------------------
> > > > Property Value
> > > > --------------------------------------------------------------------------------
> > > > Name spg4
> > > > SignalStrength -4400
> > > > Type psk
> > > >
> > > > Name ATTcVY9ZWa
> > > > SignalStrength -5100
> > > > Type psk
> > > >
> > > > Name ATT3zFM5gH
> > > > SignalStrength -5900
> > > > Type psk
> > > >
> > > > Name 2WIRE811
> > > > SignalStrength -6900
> > > > Type psk
> > > >
> > > > Name ATTU8Z3d7i
> > > > SignalStrength -8400
> > > > Type psk
> > > >
> > > > So I am in AP mode and I am connected via WiFi to it.
> > > >
> > > > In connman, though, I do not get any wifi SSIDS:
> > > >
> > > > ~# connmanctl services
> > > > *AO Wired ethernet_b827ebf13b5a_cable
> > > > ~# connmanctl enable wifi
> > > > wifi is already enabled
> > > > ~# connmanctl scan wifi
> > > > Error /net/connman/technology/wifi: Did not receive a reply. Possible
> > > > causes include: the remote application did not send a reply, the
> > > > message bus security policy blocked the reply, the reply timeout
> > > > expired, or the network connection was broken.
> >
> > This means the connmanctl tool didnt' receive any response. Do you have the logs
> > from the iwd plugins by any chance (connmand -d plugins/iwd.c).
> >
> > > > Is this how it might work? This is how we do it when we use hostapd to
> > > > connect instead of iwd.
> >
> > It looks like the plugin is still using the wrong API and either iwd doesn't
> > respond or the iwd plugin doesn't handle the error case correctly.
> >
> > > Is this still something that could be done? I can build and test any
> > > patches pretty quickly (except for next week).
> >
> > I am not that fast sorry :)
> >
> Daniel,
>
> I am finally back at this again. I appreciate your help with this.
> I have applied your patch to connman and am running iwd 2.4. I enabled
> the logging of the iwd plugin:
> connmand -n -d plugins/iwd.c
> I get the same response as before. I am connected to the Pi with iwd
> in AP mode (only, no ethernet)\
>
> # connmanctl scan wifi
> Error /net/connman/technology/wifi: Did not receive a reply. Possible
> causes include: the remote application did not send a reply, the
> message bus security policy blocked the reply, the reply timeout
> expired, or the network connection was broken.
>
> when I submit this command, it takes a long time to return and nothing
> extra appears in the log. Is connman sending a command like 'iwctl
> station scan' as opposed to 'iwctl ap scan' and 'iwctl ap
> get-networks'?
>
> It is happily connected and iwd can scan for networks while it is
> connected in AP mode.
>
> # iwctl ap wlan0 scan
> # iwctl ap wlan0 get-networks
> Networks
> --------------------------------------------------------------------------------
> Property Value
> --------------------------------------------------------------------------------
> Name spg4
> SignalStrength -3000
> Type psk
> ...
>
> the log in the journal is this:
> May 11 13:16:40 runeaudio connmand[362]: wlan0 {update} flags 4098 <DOWN>
> May 11 13:16:40 runeaudio connmand[362]: wlan0 {newlink} index 3
> address B8:27:EB:52:CC:D0 mtu 1500
> May 11 13:16:40 runeaudio connmand[362]: wlan0 {newlink} index 3
> operstate 2 <DOWN>
> May 11 13:16:40 runeaudio connmand[362]:
> plugins/iwd.c:object_removed() net.connman.iwd.Station
> /net/connman/iwd/0/3
> May 11 13:16:40 runeaudio connmand[362]:
> plugins/iwd.c:object_removed() net.connman.iwd.SimpleConfiguration
> /net/connman/iwd/0/3
> May 11 13:16:40 runeaudio connmand[362]:
> plugins/iwd.c:object_removed() net.connman.iwd.DeviceProvisioning
> /net/connman/iwd/0/3
> May 11 13:16:40 runeaudio connmand[362]:
> plugins/iwd.c:device_property_change() /net/connman/iwd/0/3 powered 0
> May 11 13:16:40 runeaudio connmand[362]: wlan0 {update} flags 4099 <UP>
> May 11 13:16:40 runeaudio connmand[362]: wlan0 {newlink} index 3
> address B8:27:EB:52:CC:D0 mtu 1500
> May 11 13:16:40 runeaudio connmand[362]: wlan0 {newlink} index 3
> operstate 2 <DOWN>
> May 11 13:16:40 runeaudio connmand[362]: plugins/iwd.c:object_added()
> net.connman.iwd.AccessPoint /net/connman/iwd/0/3
> May 11 13:16:41 runeaudio connmand[362]: plugins/iwd.c:create_ap() started 0
> May 11 13:16:41 runeaudio connmand[362]:
> plugins/iwd.c:device_property_change() /net/connman/iwd/0/3 powered 1
> May 11 13:16:41 runeaudio connmand[362]:
> plugins/iwd.c:device_property_change() /net/connman/iwd/0/3 mode ap
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {add} address
> 192.168.5.1/24 label wlan0 family 2
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {add} route 192.168.5.0
> gw 0.0.0.0 scope 253 <LINK>
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {update} flags 69635
> <UP,LOWER_UP>
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {newlink} index 3
> address B8:27:EB:52:CC:D0 mtu 1500
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {newlink} index 3
> operstate 5 <DORMANT>
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {add} route fe80:: gw
> :: scope 0 <UNIVERSE>
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {RX} 0 packets 0 bytes
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {TX} 1 packets 42 bytes
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {update} flags 69699
> <UP,RUNNING,LOWER_UP>
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {newlink} index 3
> address B8:27:EB:52:CC:D0 mtu 1500
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {newlink} index 3
> operstate 6 <UP>
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {RX} 0 packets 0 bytes
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {TX} 1 packets 42 bytes
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {newlink} index 3
> address B8:27:EB:52:CC:D0 mtu 1500
> May 11 13:16:41 runeaudio connmand[362]: wlan0 {newlink} index 3
> operstate 6 <UP>
> May 11 13:16:41 runeaudio connmand[362]: plugins/iwd.c:object_added()
> net.connman.iwd.AccessPointDiagnostic /net/connman/iwd/0/3
> May 11 13:16:41 runeaudio connmand[362]:
> plugins/iwd.c:ap_property_change() /net/connman/iwd/0/3 started 1
> May 11 13:18:28 runeaudio connmand[362]: wlan0 {RX} 124 packets 12220 bytes
> May 11 13:18:28 runeaudio connmand[362]: wlan0 {TX} 93 packets 15083 bytes
> May 11 13:18:28 runeaudio connmand[362]: wlan0 {newlink} index 3
> address B8:27:EB:52:CC:D0 mtu 1500
> May 11 13:18:28 runeaudio connmand[362]: wlan0 {newlink} index 3
> operstate 6 <UP>
I neglected to say which version of connman I am using. I am running
connman 1.41
with the patch earlier in this thread applied.
Keith
prev parent reply other threads:[~2023-05-22 14:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 8:16 [PATCH] iwd: Add support to Scan in AP mode Daniel Wagner
2023-01-16 23:00 ` KeithG
2023-02-14 18:55 ` KeithG
2023-02-27 7:43 ` Daniel Wagner
2023-05-12 0:35 ` KeithG
2023-05-22 14:23 ` KeithG [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAG17S_MkyEqj497spiejQBUMdPiOkCr3ao9tjwaJZnUs_4rHpA@mail.gmail.com \
--to=ys3al35l@gmail.com \
--cc=connman@lists.linux.dev \
--cc=wagi@monom.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).