1

So far found ways to set up a VNC server with the local network. However, I'm looking for a way to create a hotspot that bridges a wifi connection on the pi and host a VNC server (such as RealVNC) or some sort of screen sharing application over the hotspot.

Then, I could have virtually any mobile device or pc connect to the hotspot and view the contents of the screen through the localhost in a browser (while all other traffic would be passed through connected wifi).

In essence, my goal is to share the contents of the pi 4 screen over a direct connection with a client device. Would this be possible?
And if so, would I need some sort of wifi adapter/dongle to bridge wifi to a wifi connection, along with additional programs to handle internet traffic?

1

In essence, my goal is to share the contents of the pi 4 screen over a direct connection with a client device. Would this be possible?

Yes. You should make the wlan0 act as a wifi hotspot simple by this link:
Setting up a Raspberry Pi as a Wireless Access Point

Then, install your favorite VNC server on the raspberry pi. Take note that VNC Server is included with Raspbian but you have to enable it by raspi-conf or you can install other packages.

For RealVNC that you mentioned, follow procedure below:

Install indeed package by:

sudo apt-get update
sudo apt-get install realvnc-vnc-server

After all of this, add wlan0's IP address to your VNC client/viewer to connect to the by form your phone, etc.


And if so, would I need some sort of wifi adapter/dongle to bridge wifi to a wifi connection, along with additional programs to handle internet traffic?

If you want to connect to your router by this structure:

"Smartphones"_Wifi ––> <–– "wlan0_"RPi"_eth0" ––> <–– Ethernet_"Router"_Ethernet ––> <–– Internet

You don't need any more wifi adapter/dongle. But, if you mean this structure:

"Smartphones"_Wifi ––> <–– "wlan0_"RPi"_wlan1" ––> <–– Wifi_"Router"_Ethernet ––> <–– Internet  

As you see, you need another wireless adaptor (wlan1) to connect to the wireless interface of the router.

| improve this answer | |
  • Yeah I am going to need an adapter as I'll primarily be connecting this to a public network and not my home one, hence the need for the connection bridge. Once I do set up a wlan0 and wlan1 though, will the pi do the rest for me, in terms of differentiating between internet and localhost traffic? – Jacob Christianson Feb 22 at 22:35
  • I'm not sure what exactly you mean but you can configure it as a bridge. Look at the second example of this answer, the wlan1 would be your WAN port which is in DHCP mode and wlan0 is the Local port that you need to enable hotspot on it and set a static IP address then configure dnsmasq to act as a DHCP server for the clients that are going to be connected. – M. Rostami Feb 23 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.