All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Request for feature - Scan while AP
@ 2022-02-08 22:46 James Prestwood
  0 siblings, 0 replies; 4+ messages in thread
From: James Prestwood @ 2022-02-08 22:46 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 4192 bytes --]

Hi Keith,

On Tue, 2022-02-08 at 16:01 -0600, KeithG wrote:
> James,
> 
> As far as I am concerned, yes, I think the same station scan command
> would be compatible with what we have. As it is now we keep iwd up and
> launch hostapd. iwctl complains when we do this but we still get a
> list of available stations with current strength info that we can
> provision and connect to. This is the error we get when we have both
> hostapd and connman/iwd running and scanning.

Oh wow, this is at least good testing for IWD :) 

> ```
> Feb 08 15:45:42 alarm iwd[244]: WARNING:
> src/station.c:station_autoconnect_start() condition
> station->autoconnect_list failed
> Feb 08 15:45:42 alarm iwd[244]: Received error during
> CMD_TRIGGER_SCAN: Operation not supported (95)
> ```
> I have cobbled together a config for our project that starts iwd in ap
> mode (instead of launching hostapd) if there is not an IP address that
> it connects to at boot. Since it initially starts in station mode and
> we save the local SSIDs at boot, we can select and connect, but
> current strength of that list of SSIDs is not available and if a new
> SSID shows up, we will not catch that whereas with the current setup
> of hostapd/iwd, we do. I do not know if it is reasonable or not but if
> iwd is in ap mode and connman asks for a list of SSIDs and iwd just
> provides them it would probably be easiest for us, but we could adapt
> to another means of getting the SSIDs if it this is not an
> acceptable/reasonable means of getting this info. I am not certain how
> connman would deal with this.

Yeah this would certainly be easier than what you're doing now, in
addition to dropping the dependency on hostapd.


So in general scanning in AP mode is going to be horrible for any
performance perspective since the device is not even accepting frames
from stations. But I do see your use case, basically a new (likely
headless) device is turned on and needs to be provisioned. With the
current state of things I'm guessing AP mode is really you're only
option, and I know this is actually quite common based on devices I
personally have set up.

I won't commit to a timeframe or anything but I will start poking
around at this in the background.

> As for DPP, I am unfamiliar with it. Is there an example of it we
> could crib? If it is incompatible with apple, though, maybe not too
> useful for us as we expect all devices can connect and provision. I
> have been able to provision them with my phone or laptop.

We have a short wiki page on DPP:

https://iwd.wiki.kernel.org/device_provisioning

Thanks,
James

> 
> Keith
> 
> On Tue, Feb 8, 2022 at 3:13 PM James Prestwood <prestwoj(a)gmail.com>
> wrote:
> > 
> > Hi Keith,
> > 
> > On Fri, 2022-02-04 at 17:10 -0600, KeithG wrote:
> > > I mentioned this a while ago and am wondering if this is on the
> > > list
> > > of features to add. Currently, we start as connman/iwd, but if we
> > > do
> > > not get an IP address, we stop iwd then start hostapd and advertise
> > > as
> > > an AP for initial setup. When a user connects, he/she can scan for
> > > availabel SSIDS and set then up.
> > > I know iwd can run in AP mode, but it cannot scan while in AP mode.
> > > As
> > > it is, hostapd does this for us, so we have a work around. I was
> > > wondering if this functionality is in the works.
> > 
> > What exactly do you need/want for the API? Same thing as
> > net.connman.iwd.Station.Scan() where you issue Scan() then
> > GetOrderedNetworks() for the results?
> > 
> > Also one thing that may interest you is DPP. This is significantly
> > less
> > overhead/hassle than having the device change to AP mode, scan,
> > return
> > results, go back to station, then connect. You would need some way of
> > bootstrapping, and compatibility may be an issue e.g. Apple devices,
> > just a thought.
> > 
> > Thanks,
> > James
> > 
> > > 
> > > Regards,
> > > 
> > > Keith
> > > _______________________________________________
> > > iwd mailing list -- iwd(a)lists.01.org
> > > To unsubscribe send an email to iwd-leave(a)lists.01.org
> > 
> > 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Request for feature - Scan while AP
@ 2022-02-08 22:01 KeithG
  0 siblings, 0 replies; 4+ messages in thread
From: KeithG @ 2022-02-08 22:01 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 3117 bytes --]

James,

As far as I am concerned, yes, I think the same station scan command
would be compatible with what we have. As it is now we keep iwd up and
launch hostapd. iwctl complains when we do this but we still get a
list of available stations with current strength info that we can
provision and connect to. This is the error we get when we have both
hostapd and connman/iwd running and scanning.
```
Feb 08 15:45:42 alarm iwd[244]: WARNING:
src/station.c:station_autoconnect_start() condition
station->autoconnect_list failed
Feb 08 15:45:42 alarm iwd[244]: Received error during
CMD_TRIGGER_SCAN: Operation not supported (95)
```
I have cobbled together a config for our project that starts iwd in ap
mode (instead of launching hostapd) if there is not an IP address that
it connects to at boot. Since it initially starts in station mode and
we save the local SSIDs at boot, we can select and connect, but
current strength of that list of SSIDs is not available and if a new
SSID shows up, we will not catch that whereas with the current setup
of hostapd/iwd, we do. I do not know if it is reasonable or not but if
iwd is in ap mode and connman asks for a list of SSIDs and iwd just
provides them it would probably be easiest for us, but we could adapt
to another means of getting the SSIDs if it this is not an
acceptable/reasonable means of getting this info. I am not certain how
connman would deal with this.

As for DPP, I am unfamiliar with it. Is there an example of it we
could crib? If it is incompatible with apple, though, maybe not too
useful for us as we expect all devices can connect and provision. I
have been able to provision them with my phone or laptop.

Keith

On Tue, Feb 8, 2022 at 3:13 PM James Prestwood <prestwoj(a)gmail.com> wrote:
>
> Hi Keith,
>
> On Fri, 2022-02-04 at 17:10 -0600, KeithG wrote:
> > I mentioned this a while ago and am wondering if this is on the list
> > of features to add. Currently, we start as connman/iwd, but if we do
> > not get an IP address, we stop iwd then start hostapd and advertise
> > as
> > an AP for initial setup. When a user connects, he/she can scan for
> > availabel SSIDS and set then up.
> > I know iwd can run in AP mode, but it cannot scan while in AP mode.
> > As
> > it is, hostapd does this for us, so we have a work around. I was
> > wondering if this functionality is in the works.
>
> What exactly do you need/want for the API? Same thing as
> net.connman.iwd.Station.Scan() where you issue Scan() then
> GetOrderedNetworks() for the results?
>
> Also one thing that may interest you is DPP. This is significantly less
> overhead/hassle than having the device change to AP mode, scan, return
> results, go back to station, then connect. You would need some way of
> bootstrapping, and compatibility may be an issue e.g. Apple devices,
> just a thought.
>
> Thanks,
> James
>
> >
> > Regards,
> >
> > Keith
> > _______________________________________________
> > iwd mailing list -- iwd(a)lists.01.org
> > To unsubscribe send an email to iwd-leave(a)lists.01.org
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Request for feature - Scan while AP
@ 2022-02-08 21:13 James Prestwood
  0 siblings, 0 replies; 4+ messages in thread
From: James Prestwood @ 2022-02-08 21:13 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]

Hi Keith,

On Fri, 2022-02-04 at 17:10 -0600, KeithG wrote:
> I mentioned this a while ago and am wondering if this is on the list
> of features to add. Currently, we start as connman/iwd, but if we do
> not get an IP address, we stop iwd then start hostapd and advertise
> as
> an AP for initial setup. When a user connects, he/she can scan for
> availabel SSIDS and set then up.
> I know iwd can run in AP mode, but it cannot scan while in AP mode.
> As
> it is, hostapd does this for us, so we have a work around. I was
> wondering if this functionality is in the works.

What exactly do you need/want for the API? Same thing as
net.connman.iwd.Station.Scan() where you issue Scan() then
GetOrderedNetworks() for the results?

Also one thing that may interest you is DPP. This is significantly less
overhead/hassle than having the device change to AP mode, scan, return
results, go back to station, then connect. You would need some way of
bootstrapping, and compatibility may be an issue e.g. Apple devices,
just a thought.

Thanks,
James

> 
> Regards,
> 
> Keith
> _______________________________________________
> iwd mailing list -- iwd(a)lists.01.org
> To unsubscribe send an email to iwd-leave(a)lists.01.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Request for feature - Scan while AP
@ 2022-02-04 23:10 KeithG
  0 siblings, 0 replies; 4+ messages in thread
From: KeithG @ 2022-02-04 23:10 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 521 bytes --]

I mentioned this a while ago and am wondering if this is on the list
of features to add. Currently, we start as connman/iwd, but if we do
not get an IP address, we stop iwd then start hostapd and advertise as
an AP for initial setup. When a user connects, he/she can scan for
availabel SSIDS and set then up.
I know iwd can run in AP mode, but it cannot scan while in AP mode. As
it is, hostapd does this for us, so we have a work around. I was
wondering if this functionality is in the works.

Regards,

Keith

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-08 22:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 22:46 Request for feature - Scan while AP James Prestwood
  -- strict thread matches above, loose matches on Subject: below --
2022-02-08 22:01 KeithG
2022-02-08 21:13 James Prestwood
2022-02-04 23:10 KeithG

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.