Need help making a wireless router and/or wireless server on Pi 4 (no internet)

November 22, 2023, 01:40

jeremymuller

I am trying to accomplish two things separately to try them out and see which seems to perform the best. Currently I am working on a project where my computer runs a Nodejs server and connects to tablets via web sockets. This works fine when I'm on my home network of course. What I'd like to do is first: Make a wireless router with the Raspberry Pi 4 with no need for internet. I want to run the nodejs server on my computer, wirelessly connected to the Pi and all the tablets connected to the Pi. Second: I'd like to eventually run the nodejs server directly on the Raspberry Pi and connect to the tablets wirelessly. So basically turning the Pi into a wireless router and server (with no internet). I search for these things and what I find often refers to connecting to the internet with wifi or overwhelming results. So if anyone could just point me in the right direction I would much appreciate it!

miabl0

there is a gui option to do this, if you are comfortable with that: https://www.tomshardware.com/how-to/raspberry-pi-access-point from there, you'd do routing to your pc. Just plug your pi into your lan network, set ipv4 forwarding to on (in /etc/sysctl.conf uncomment the net.ipv4.ip_forward=1) and it SHOULD rout you automatically, via the default gateway of your lan, to whatever ip you specify. This uses the Pi's antenna, if you want more range you may wanna think about adding a different antenna via usb, or even using a real apn. At that point you could do something more like this though: https://www.youtube.com/watch?v=_pBf2hGqXL8 or this: https://youtu.be/jlHWnKVpygw?si=SLVh-C3M2cABkU2S

miabl0

you COULD also just buy a cheapo used router and put it in bridge mode, restricting traffic to ONLY your pc

miabl0

or adding a network card to your pc, where you cut out the other router entirely, just connecting it to your pc and adding a network that way.

jeremymuller

Do any of these options include a way to make the Pi the nodejs server as well?