wifi-connect icon indicating copy to clipboard operation
wifi-connect copied to clipboard

Use access point with captive portal and wifi connection simultaneously

Open DarianAnjuhal opened this issue 5 years ago • 2 comments

Hi,

we wanna change network settings between LAN, WIFI and LTE. Thats why it would be awesp,e if the access point with the captive portal is always open even if the wifi connection is on.

If its possible we can figure out if this wifi-connect is the correct way for us or we should build our own approach.

Thanks in advance and have a nice day Darian

DarianAnjuhal avatar Jun 23 '20 15:06 DarianAnjuhal

My understanding is that the device hardware chips (or at least most of the ones I am familiar with) only support 1 simultaneous connection at a time which would prevent this from working. Wi-Fi and LAN at the same time should work already, but two wi-fi connections would be problematic. If you can find anything on that contrary that shows a device Wi-Fi chip that can support 2, would be great if you could share it and then perhaps this could be investigated further.

maggie44 avatar Jun 28 '21 00:06 maggie44

The connection has to be on the same channel. Wifi chip shows the following on Rpi4

root@raspberrypi:/home/pi# iw list | grep -A4 "valid interface combinations:"
	valid interface combinations:
		 * #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
		   total <= 3, #channels <= 2
		 * #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
		   total <= 4, #channels <= 1

On bullet 2 managed and AP works on the same channel.

In my opinion, the only possible solution if we want to use the embedded wifi chip is to set the same channel as the wifi router you want to connect to. For instance, if your wifi router works on channel 1, hostapd will have to be configured on channel 1 before starting it up.

I'm looking at the same feature than you but I did not check the code to see if it is doable

Few links :

  • https://github.com/txn2/txwifi
  • https://raspberrypi.stackexchange.com/questions/89803/access-point-as-wifi-router-repeater-optional-with-bridge/89804?newreg=e46b9f0f237d4913b4b807b2369df10c

fheslouin avatar Sep 07 '21 07:09 fheslouin