Network connection between computers via Wi-Fi: 5 proven methods

Establishing a direct Wi-Fi connection between computers is a challenge faced by both system administrators and regular users. Do you urgently need to transfer a large file without a flash drive? Or collaborate on a project within the same room? Perhaps you want to play a network game on two PCs without internet access? A local Wi-Fi network can help in any of these situations.

Unlike a wired connection (Ethernet), a wireless connection does not require cables, but it has its own nuances. Data transfer speeds will be lower (up to 200-300 Mbps in real-world conditions versus Gigabit Ethernet), and stability depends on interference and distance. But you get mobility and the ability to quickly deploy a network even in the field. In this article, we'll look at all the current methods—from creating ad-hoc network in Windows before setting up a bridge through macOS And Linux, and we will also look at typical mistakes and their solutions.

1. Methods for connecting computers via Wi-Fi: which one to choose?

The method you choose depends on your operating system, the number of devices, and your connection goals. Here are the main options:

  • 🔹 Ad-hoc network Peer-to-peer (P2P) is the simplest method for Windows. One computer acts as the "host," and the others connect to it as if it were a router. It's suitable for 2-3 devices, but has speed and security limitations (no WPA3).
  • 🌉 Wi-Fi Direct — a modern standard for direct connections (similar to Bluetooth, but faster). Works on Windows 10/11, macOS, and Linux, but requires support from adapters. Ideal for transferring files between laptops.
  • 🖥️ Access Point Mode — One PC distributes Wi-Fi, and the others connect to it. Requires Windows 10+ or ​​macOS, but allows you to connect up to 8 devices simultaneously.
  • 🔌 Bridge through the router If you already have a Wi-Fi network, you can set up file and printer sharing through it. This method is the most stable, but it depends on your router settings.
  • 🐧 Linux-specific solutions - For example, hostapd to create a software access point or nmcli for managing connections. Requires knowledge of the terminal.

For most Windows users, the best option would be ad-hoc network or access point modeTo the owners MacBook easier to use Wi-Fi Direct or shared access via AirDropIf you need a network for multiple devices with internet access, you can't do without a router.

📊 Why do you need to connect computers via Wi-Fi?
File transfer
Online games
Printer/scanner sharing
Software development/testing
Other

2. Setting up an ad-hoc network in Windows 10/11 (without a router)

This method works on all versions of Windows starting from Windows 7, but in the "ten" and "eleven" the interface became more convenient. Ad-hoc network (from the Latin "for this") creates a temporary connection between devices without a central hub. Speed ​​is limited by the standard. 802.11n (to 150 Mbps in practice), and protection is only WPA2-PSK (no support WPA3).

To create such a network:

  1. Open Control Panel → Network and Sharing Center.
  2. Select Setting up a new connection or network → Setting up a wireless ad hoc network (In Windows 11 the path may be different - use the search for the word "ad-hoc").
  3. Set the network name (SSID), security type (WPA2-Personal) and password (minimum 8 characters).
  4. Activate the option Save settings for this network.

On the second computer, connect to the created network as you would to a regular Wi-Fi network. If the connection fails:

  • 🔧 Check if it's enabled Wi-Fi adapter on both PCs (sometimes it turns off in Device Manager).
  • 🔄 Restart the service Autoconfig (WLAN) through services.msc.
  • 🛡️ Make sure that firewall does not block the connection (temporary shutdown for testing).

Wi-Fi is enabled on both PCs|

Same Wi-Fi standard (802.11n/ac)|

VPN and proxy are disabled|

Administrator rights to create a network-->

⚠️ Attention: In Windows 11, the option to create an ad-hoc network may be hidden. If it's not in the menu, use command line (section 4) or enable support via gpedit.msc (only in Pro versions).

3. Sharing files and folders after connection

Creating a network is only half the battle. For computers to exchange data, you need to set it up public accessIn Windows, this is done through the folder properties:

  1. Right-click on the folder → Properties → Access.
  2. Select Share and specify the user Everyone with rights Reading and writing.
  3. Go to the tab Security and add the same group with full rights.

To access a shared folder from another PC:

  1. Open Conductor and enter in the address bar \\[IP address of the first PC] (For example, \\192.168.137.1).
  2. Or use the computer name: \\[PC-NAME] (you can watch it in System properties).

If the folder does not open:

  • 🔐 Check that it is enabled on both PCs Network discovery (Settings → Network & Internet → Sharing options).
  • 📡 Make sure the computers are on the same working group (by default WORKGROUP in Windows).
  • 🔧 Turn it off antivirus (For example, Kaspersky or Avast often block network access).
Problem Cause Solution
Computers are not visible on the network The protocol is disabled SMB1 (unsafe) Turn on SMB 2/3 through Control Panel → Programs → Turn on Windows features
Requests login/password There is no account with such rights. Create identical local users on both PCs
Slow file transfer Interference at 2.4 GHz Switch to 5GHz channel (if supported)
The connection is broken Wi-Fi adapter power saving Disable the option in Device Manager → Adapter Properties → Power Management

4. Alternative Method: Command Line for Ad-Hoc

If the GUI doesn't work (or you prefer the console), you can create an ad-hoc network via CMDThis method is universal for all versions of Windows and allows you to flexibly customize the settings.

Open the command prompt as administrator and run:

netsh wlan set hostednetwork mode=allow ssid=MyAdHoc key=12345678 keyUsage=persistent

netsh wlan start hostednetwork

Where:

  • ssid=MyAdHoc — the name of your network (you can replace it with anything).
  • key=12345678 — password (minimum 8 characters).

To stop the network, use:

netsh wlan stop hostednetwork

If the command returns an error Failed to start hosted network:

  • 🔧 Check if yours supports Wi-Fi adapter mode hostednetwork (list of compatible chips: Atheros, Broadcom, Intel, Realtek RTL8188/8192).
  • 🔄 Update your adapter driver via device Manager or the manufacturer's website.
  • 🛠️ Start the service Autoconfig (WLAN) manually: net start WlanSvc.
How to check hostednetwork support?

Enter the command in CMD netsh wlan show drivers and find the line Hosted network support. If there Yes — your adapter is compatible.

⚠️ Attention: After rebooting the PC, the hosted network is disabled. To start it automatically, create a task in Task Scheduler with the team netsh wlan start hostednetwork at system startup.

5. Connect via Wi-Fi Direct (Windows/macOS/Linux)

Wi-Fi Direct — is a standard for direct connection of devices without intermediaries (like Bluetooth, but with Wi-Fi speed). It is supported by most modern laptops and smartphones. Advantages:

  • 🚀 Speed ​​up to 250 Mbps (at a frequency of 5 GHz).
  • 🔒 Support WPA3 (in new devices).
  • 📱 Compatibility with smartphones (you can transfer files from Android/iPhone on PC).

To connect via Wi-Fi Direct in Windows 10/11:

  1. Open Settings → Devices → Bluetooth & other devices.
  2. Click Add a device → Wireless display or dock.
  3. Select the second computer from the list (it should be in connection standby mode).

On macOS:

  1. Open Finder → Go → AirDrop.
  2. Make sure Wi-Fi and Bluetooth are turned on on both Macs.
  3. Drag the files to the target computer icon.

For Linux (for example Ubuntu):

sudo nmcli dev wifi connect "DIRECT-xx:xx:xx:xx:xx:xx" password "12345678"

Where DIRECT-xx:... — the name of the Wi-Fi Direct network (can be seen in nmtui or iw dev).

6. Setting up a bridge through a router (for Internet access)

If you already have a Wi-Fi router, you can set it up Internet access sharing and files through it. This is the most reliable method because:

  • 🌐 All devices have access to the Internet.
  • 🔗 You can connect more than 10 devices (ad-hoc limit is 8 clients).
  • 🛡️ High security (WPA3, guest networks, MAC filtering).

Instructions for Windows:

  1. Connect both computers to the same Wi-Fi network of the router.
  2. On the main PC, open Control Panel → Network and Sharing Center → Change adapter settings.
  3. Right-click on the current connection → Properties → Access.
  4. Check the box Allow other network users to share your Internet connection.
  5. Select from the drop-down list Local Area Connection* X (where X is the virtual adapter number).

On the router (for example TP-Link/ASUS):

  1. Go to the web interface (192.168.0.1 or 192.168.1.1).
  2. Activate DHCP server (so that devices automatically receive IP).
  3. In the section Local Area Network (LAN) turn on IGMP Proxy for multicast traffic (needed for online games).
⚠️ Attention: If after setting up the bridge the Internet works, but some websites (for example, banks) do not open, disable IPv6 in the connection properties. Some providers block traffic when double NAT is enabled.

7. Diagnosing problems and speeding up connections

If your connection is unstable or slow, follow these steps:

  • 📡 Check your signal level: In Windows, open netsh wlan show interfaces and look at the parameter SignalIf it's below 60%, move the devices closer or change the channel in the router.
  • 🔄 Change frequency: Channels 1, 6, and 11 on 2.4 GHz are less susceptible to interference. On 5 GHz, choose a channel with minimal congestion (check through Wi-Fi Analyzer on a smartphone).
  • 🖥️ Update your drivers: Download the latest versions from the adapter manufacturer's website (not through Windows Update!). For Intel use Driver & Support Assistant, For Realtek — utility from the official website.
  • 🔧 Disable power saving: IN Device Manager → Wi-Fi Adapter Properties → Power Management uncheck the box Allow the computer to turn off this device to save power.

To test the speed between computers, use the utility iPerf3:

iperf3 -s # on the first PC (server)

iperf3 -c [IP address of the first PC] -P 5 # on the second PC (client)

Normal values ​​for Wi-Fi:

  • 2.4 GHz: 50-100 Mbps.
  • 5 GHz: 200-400 Mbps (in close proximity).

FAQ: Frequently asked questions about connecting a PC via Wi-Fi

Is it possible to connect a computer to a MacBook via Wi-Fi?

Yes, the easiest way is to use Wi-Fi Direct (through AirDrop) or create ad-hoc network on Windows and connect to it from macOS. On Mac, open System Preferences → Network → Wi-Fi and select the created network. When transferring files, you may need to enable Guest access V Public access.

Why is file transfer speed low (1-2 MB/s)?

Reasons:

  1. The adapter operates in the mode 802.11g (max 54 Mbps). Switch to 802.11n/ac in the router settings.
  2. Interference from other networks. Use the 5 GHz channel or change the channel to 2.4 GHz (1, 6, or 11).
  3. Reduce packet fragmentation MTU up to 1400 (as described above).
  4. Hard disk drive (HDD) is bad. Connect an SSD or use RAM disk for the test.
How do I connect a printer via Wi-Fi to both computers?

Methods:

  • 🖨️ Via router: Connect the printer to the router's USB port (if supported) and share it in the web interface.
  • 📡 Wi-Fi Direct: Modern printers (eg HP OfficeJet or Canon PIXMA) support direct connection. Activate Wi-Fi Direct mode on the printer and connect to it as an access point.
  • 🖥️ General access: Connect the printer to one PC, then open access: Control Panel → Devices and Printers → Printer Properties → Access.

On the second computer, add the printer via \\[IP address of the first PC].

Is it possible to play over a local network via Wi-Fi?

Yes, but with some reservations:

  • 🎮 For CS:GO, Minecraft or GTA V delays (ping) will be higher than via cable (usually 10-30 ms versus 1-5 ms).
  • 🔌 Use frequency 5 GHz and a channel with minimal interference.
  • 🛡️ In the game settings, specify local IP second PC (for example, 192.168.137.2 for ad-hoc).

For competitive games (eg. Valorant or Fortnite) it is better to use a wired connection.

How can I make the network be created automatically when I start my PC?

For ad-hoc networks in Windows:

  1. Create a file start_hostednetwork.bat with the line:
    netsh wlan start hostednetwork
  2. Put it in startup: shell:startup.
  3. IN Task Scheduler create a task to execute this file when you log in (with administrator rights).

For Wi-Fi Direct There is no automatic connection - you need to initialize the connection manually at each startup.