4

I want my Raspberry Pi 4B to create a wireless network that connects to my router, without using any external devices to assist the pi (ie. a secondary router or an antennae that would connect to the pi).

The 4B would connect to a wifi network wirelessly, then I would connect the Pi network. Most tutorials are about the 3 and do not work when I try them. Note that I am a pi beginner, and this is my first project.

  • 1
    You seem to be unclear whether you want an Access Point (WHY?) or connect to a router or what you expect to do with the resultant. See How to set up networking/WiFi to setup networking - there are dozens of Access Point tutorials, so it seems futile to point to one which you claim doesn't work. – Milliways Jan 6 at 4:31
  • 1
    "I do not want to use a secondary router; just using the wireless capabilities of the 4B." By this section, you mean that you don't have any wireless devices and you want to create an AP for your wireless clients. || Although by this part, "The 4B would connect to a wifi network wirelessly, then I would connect the Pi network.", I realized that you want to make Raspberry Pi as a wireless bridge device. || Please make it clear. – M. Rostami Jan 6 at 12:41
  • 1
    As already stated, the question is unclear. Title suggests that you want the RPi to provide a Wireless Access Point. Question says that you want the RPi to connect to a Wifi Access point. Please clarify. – Charemer Jan 6 at 15:13
  • 1
    Edit: I clarified the question – Big Bird Jan 6 at 16:05
  • 1
    I think you search for SoftAp mode. You have two interfaces on wlan0, one in managed (client) type managed and one in master (AP) type __ap. Connect your managed interface to your router. Use master interface for hostpad and your own Wi-Fi Access Point. (Not tested on RPi4) – Ephemeral Jan 6 at 16:12
2

OpenWrt is the best choice for you. It makes Raspberry Pi to a wireless router device and you don't need to run a lot of commands. Easy to use with an interactive web user interface named LuCi like picture below:

enter image description here

I believe it going to help you better than in other ways.
The thing you should concern is that you should don't attend this page. As this page, OpenWrt is not on the supported list, however, you can install the bcm2709 by this link - Index of (root) / snapshots / targets / brcm2708 / bcm2709. Download rpi-2-ext4-factory.img.gz and write the image on a larger 256MB SD-Card.

The default IP is 192.168.1.1 and the DHCP server is disabled therefore add and static IP address to the host you want to configure RPi (such as 192.168.1.100), the default user is root and leave the password section blank.
Go to Network/Wireless then turn radio0 or WLAN on.

As I mentioned, it's easy to configure OpenWrt and you can configure it any way you want.


UPDATE:
Raspberry Pi 4 sources provided by the Raspberry Pi Foundation are Linux >= 4.19. OpenWrt 18.06 is based on Linux 4.9 and OpenWrt 19.07 is based on Linux 4.14, so you need to use the snapshots builds, which are based on Linux 4.19:
https://downloads.openwrt.org/snapshots/targets/brcm2708/bcm2711/

Download rpi-4-ext4-factory.img.gz and write the image to the SD-Card.


UPDATE 02:
Snapshot builds do not include the web interface, the LuCi package. Therefore, follow the procedure:

1. Connect to the Raspberry Pi's terminal via SSH.
2. Update package list of OpenWrt:

opkg update  

3. Install LuCi package which is the web interface configuration mode:

opkg install luci  
| improve this answer | |
  • Just making sure im doing this right. 1. installing only rpi-2-ext4-factory.img.gz on my computer. 2. putting it on my pi sd card? 3. add my static ip to OpenWrt. 4. Turn radio0 or WLAN on. 3. I want to start it on startup, so i would use autostart to configure it to start automatically. How do i know if i want to turn on radi0 or WLAN? And do you mean the router ip of the pi is 192.168.1.1? – Big Bird Jan 7 at 14:48
  • 1-2. Yes, Write rpi-2-ext4-factory.img.gz on an SD-Card and put it to your Raspberry Pi 4. || 3. No, change your computer IP address to something like 192.168.1.x. (the x can be a number between 2 to 254 like `192.168.1.25). || 4. Yes. || "I want to start it on startup, so I would use autostart to configure it to start automatically." You don't need to change any configuration. It has configured itself. – M. Rostami Jan 7 at 15:20
  • || "How do i know if i want to turn on radi0 or WLAN?" I don't get what you mean. || "do you mean the router ip of the pi is 192.168.1.1?", No, After you put the SD-Card to the Raspberry Pi and turn it on, the Raspberry Pi would be up with 192.168.1.1 IP address, therefore, after you change the computer IP address, you can put 192.168.1.1 on the computer's web browser to open LuCi web interface which is the Raspberry Pi (OpenWrt) configuration environment. – M. Rostami Jan 7 at 15:20
  • "Go to Network/Wireless then turn radio0 or WLAN on." I wanted to know how i would know which one to turn on. So, Technically i could not use a vpn on my computer because it would change the IP adress (I know how to change my IP adress but I just wanted to confirm i could not use my vpn while connected to my pi.) – Big Bird Jan 7 at 15:30
  • Oh and which folder to i put rpi-2-ext4-factory.img.gz in? – Big Bird Jan 7 at 15:37
1

As far as I understand you want to have an access point that is connected with a WiFi client connection as uplink to your internet. All tutorials and automated scripts I know that work with the RasPi are made to use a wired uplink to the internet router router but not a wireless one. This is because it isn't an easy task to have a wireless access point and a wireless client uplink with only the on-board WiFi device. But it is possible if you respect a strict order by managing the network interfaces. How to do it you can look at Access point as WiFi router/repeater, optional with bridge. You only need to install hostapd as helper. All other things are built-in and you only have to configure it.

| improve this answer | |

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.