Access Point and Internet Access simultaneously #12903
Replies: 2 comments 6 replies
-
In AP_IP you are on 192.168.4.1 so 192.168.4.x and no route Normally in STA_IF you've got a route in your lan interface gateway declaration |
Beta Was this translation helpful? Give feedback.
-
on on a pico w, if wifi provisioning is being attempted, what is the proper way to disable the AP before enabling the STA client mode? I've been trying different types of "cleanup" code, like Is there an example of properly shutting down/removing/cleaning up the AP mode before continuing in STA/client mode on a Pico W? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
So I want my raspberry pi pico to act as both an access point and connect to another wifi network (and through that the internet) at the same time.
I can get two network interfaces if I use both network.WLAN(network.AP_IF) and network.WLAN(network.STA_IF), I can access the pico on the AP_IF interface and the pico can access addresses on the network.WLAN(network.STA_IF) network (via a socket), which is great.
However, when I try to access anything on the internet this completely fails. I think it's because the network code doesn't know how to route packets if there are multiple interfaces which is understandable because how would it know which interface to use?
My question is, is there a way to set default routing so that it'll route via the STA_IF network (if the address is not matched by the AP_IF network netmask)?
I found this in the code so I guess it's not supported?
Beta Was this translation helpful? Give feedback.
All reactions