I've got an Arduino Nano 33 IoT. I've run through a few of the WiFiNINA examples: set up an access point, set up a client, connected to a website, pinged a server, and served a sample page to a client that put in a request at the nano's IP address. All good to go.
I'm curious if there is a way to see (print to Serial monitor?) all network traffic coming from devices connected to my access point network? Like if my phone is connected to the AP, and tries to connect to google, is there a way to see the GET request heading towards google's IP address?
Would this involve changing the DNS or Gateway settings to somehow route all traffic back to the device perhaps with
I am thinking about a captive portal-- a webpage that pops up when a device connects to a new network. As I understand it, when my phone connects, it puts out an http request to a known location to determine if the internet is connected. If it gets a 302 redirect, it will instead pop up that as a captive portal. I am wondering how to send an http 302 back to the device without knowing its IP address or port.
Is there is a way to tell the IP address of a device connecting to the nano's AP? Is this even possible without delving into UDP? The UDP examples are pretty opaque to me at the moment.
Pretty new at this networking stuff, looking for some insight and direction from more familiar users.