Sunday, June 14, 2026

Tweak your Home Router for Performance Gain and Efficiency

Configuration settings that are often overlooked when setting up a home router

Performance Tweaks on your Home Router

Most modern routers support dual band, one on the 2.4 GHz band and one on the 5 GHz band

Dual Band Router

2.4 GHz band is the long range band and 5 GHz band is short range band. If your router is in the living room and you go out in to your balcony, the signal strength of 2.4 GHz band is higher compared to 5 GHz band. The higher the signal strength the better the communication with the router

Here are a few settings worth tweaking to improve the performance, efficiency, safety of your router and connected devices

Smart Connect or Band Steering

Quality of Service (QoS)

Wi-Fi Protected Setup (WPS)

Bands, Channels and Channel Width

Smart Connect or Band Steering

If your router is a dual band router, it operates on two bands simultaneously and each band has its own Wi-Fi name/SSID. You will be able to connect to any band by selecting that specific SSID. You might be have something like this

BandWi-Fi name

2.4 GHzTP-Link_Home_2.4G

5 GHzTP-Link_Home_5G

Smart Connect

Some devices like old televisions, desktop computers, some single board computers etc can communicate only on the 2.4 GHz band. They will not be able to see the 5 GHz band

Modern devices like laptops, smart phones, smart televisions etc can communicate on both the bands. Once you connect any of the these devices to a particular band, they stick with that band and usually don't switch to the other band until you manually perform the switch. Some devices switch automatically when they detect a very low signal strength on the band they are connected to

When you enable smart connect on your router, it shows only one SSID for both the bands, and the devices in your home just see one name instead of two and they connect to this name. If you are browsing on your mobile phone in your living room, your mobile phone will be communicating on 5 GHz band and if you move in to your balcony, it would communicate on 2.4 GHz band. You don't have to do anything manually, this switch between bands happens seamlessly in the background and you would not visually know which band your device is communicating on as there is only one SSID for both the bands

The advantage of this is that you don't have to do anything as everything is seamless but it has one drawback. Some devices when they switch to long range 2.4 GHz band they don't switch back to 5 GHz band even when you are closer to the router. So, your device is stuck with the 2.4 GHz band which has a very narrow bandwidth and your internet feels too slow. Ofcourse your phone will switch back to 5 GHz band when you turn off the Wi-Fi on the phone and turn it on again

You may keep smart connect on or off based on your experience

Quality of Service (QoS)

QoS is a feature on your router that prioritizes network traffic for devices or applications with higher priority

Priority can be device based (Laptop, Mobile Phone, TV etc) or application based (Voice calls, streaming apps, gaming applications etc)

QoS Settings

Low end routers might support only device based settings and some high end routers might support both application and device based priority

When you are on a video conference with your colleagues and at the same time your kids are watching a movie on Netflix and if you had not defined QoS, your router would treat both the traffic equally and you might experience intermittent disturbance in your video call

If you define priority for voice calls over streaming apps like Netflix, your router would prioritize voice calls over streaming. Similarly, if you are not able to narrow down to an application and instead prefer to prioritize a device like your home server or your work laptop, the router would prioritize traffic for that device and all the applications running on it

In certain situations it is advantageous and sometimes it becomes an overkill

Enabling or disabling QoS entirely depends on your preference and necessity

Wi-Fi Protected Setup (WPS)

Enabling this setting on your router allows devices to connect to your router with out typing the Wi-Fi password. It compromises the safety of your router

This is useful for devices that don't have a screen like smarthome cameras, wireless printers, Wi-Fi range extenders etc

If you want to connect a device, you press the WPS button on the device and then you press the WPS button on your router. The router will pair with the device by transmitting the password securely to the device

If this setting is enabled, anyone can connect to your router based on the setup method selected

WPS Settings

If you selected push button method and if someone can get closer to the router and can press the WPS button when you are not noticing, they will be able to connect a device to your router with out entering password

If you selected pin number method and if someone gets hold of the pin or cracks it (it is an 8 digit numeric code and it is possible to crack the pin by using bruteforce tools), they will be able to connect a device to your router with out entering password

It is recommended you turn off this feature on your router for safety

Bands, Channels and Channel Width

Let us assume 2.4 GHz band as a very long but narrow pipe and 5 GHz band as a short but very wide pipe

By theory we know a wider pipe can carry large amount of fluid and a narrow pipe can carry small amount of fluid at any given time

We can also assume 2.4 GHz band as a narrow road with fewer lanes and 5 GHz band as a wider road with many lanes

Imagine lanes as channels and channel width as width of the lane

A narrow road has narrow lanes and a wider road has wider lanes

Narrow road is prone to traffic jam where as a wider road is not

Bands and Channels

2.4 GHz band travels longer distance by penetrating walls, that is how you get a decent signal eventhough your router is in the living room and you are connected to the router from the balcony which is two to three rooms away from your living room

Long distance travel by penetrating through walls is good until it becomes not so good, because 2.4 GHz band is used by many devices

2.4 GHz band is used by wireless devices like the wireless keyboard, bluetooth headphones, cordless phones, RC toys, smart switches, microwave etc

Apart from the above devices, add your neighbor's (living above, below or adjacent to you) router and other devices operating on 2.4 GHz band

In summary the narrower road is unfortunately used by many people located in the same neighborhood

In technical terms it is called interference and it is of two types

Co-Channel interference

Adjacent-Channel interference

Co-Channel interference happens when you and your neighbor are on the same channel

There are 11 channels in 2.4 GHz band. In some regions there are 14 channels. If you and your neighbor are on channel 6 and it is currently being used by your neighbor, your router has to wait until the channel becomes clear. This wait time is usually negligible but it becomes compounded when it happens too frequently

If we go back to our road analogy, imagine you and your neighbor have to move the car out of the garage but both of your garage roads are connected to a common lane. When both of you decide to move the car out of the garage at almost the same time, one of you has to wait depending on who has moved their vehicle first

Out of the 11 channels only 1, 6 and 11 are non-overlapping channels. All other channels are overlapping

Overlapping channels lead to Adjacent-Channel interference also known as signal bleeding

Channel Interference

Let us say you and your neighbor are on channels 2 and 3, technically you should be able to communicate simultaneously because they are different channels, but as 2 and 3 are overlapping channels, simultaneous communication will result in constant retransmission

Let us go back our road analogy again, now your garages are using roads that don't lead to a common lane, but instead to two adjacent lanes. As they are adjacent lanes you and your neighbor should be able to get your cars out on to the main road simultaeously with out having to wait. But as the lanes are adjacent and slightly overlapping, your car and your neighbor's car can't be on exact same location at the same time, if this happens your cars would scratch each other

As we are looking at one car at a time it still looks possible in both the cases (Co-Channel and Adjacent-Channel), but our routers, laptops, mobile phones and other devices send several packets at any given time, so the channels are always busy

5 GHz band has 25 non-overlapping channels and each channel is 20 MHz wide

Leave the channel selection as auto and the router would determine the right channel at the right time depending on which channel is clear at that specific time

Manual Channel Selection

You can set a specific channel if you know which channel is least used/crowded

Channel Selection

To understand which channel is crowded

Execute the below command if you are running Unix


nmcli -f BSSID,SSID,SIGNAL,BARS,CHAN device wifi list

nmcli -f BSSID,SSID,SIGNAL,BARS,CHAN device wifi list | awk 'NR==1 {print $0, "DBM"} NR>1 {p=$3; dbm=(p/2)-100; print $0, dbm " dBm"}' | column -t

Execute the below script in Power Shell if you are running Windows


netsh wlan show networks mode=bssid | ForEach-Object {
    if ($_ -match 'SSID\s+\d+\s*:\s*(.*)') { $ssid = $Matches[1].Trim() }
    if ($_ -match 'BSSID\s+\d+\s*:\s*(.*)') { $bssid = $Matches[1].Trim() }
    if ($_ -match 'Signal\s*:\s*(\d+)%')   { $signalPct = [int]$Matches[1] }
    if ($_ -match 'Channel\s*:\s*(.*)') { 
        $channel = $Matches[1].Trim()
        
        # Calculate dBm using the formula: (Signal / 2) - 100
        $dbm = ($signalPct / 2) - 100
        
        [PSCustomObject]@{
            WiFi_Name  = if ($ssid) { $ssid } else { "[Hidden Network]" }
            Channel    = $channel
            Signal     = "$signalPct%"
            Signal_dBm = "$dbm dBm"
        }
        $bssid = $signalPct = $channel = $null
    }
} | Format-Table -AutoSize; Read-Host "Press Enter to exit"

Note: If Windows blocks it due to an "Execution Policy" error, run Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass, then run your script again

If we observe the output from the above scripts, we will be able to understand which channel is used the most. The channel that appears more number of times is the channel that is used most in the neighborhood. But that doesn't alone mean we should avoid that channel. Along with that we should also look for Signal value in dBm

Wi-Fi Scan Unix

Wi-Fi Scan Windows

For us to decide which channel to avoid, we should understand how the router determines which channel is clear

Router performs a routine called Clear Channel Assesment before it decides to use a particular channel

It is a two step process

  1. Signal Detect (SD)
  2. Energy Detect (ED)

Threshold level for SD is -82 dBm. Any signal weaker (e.g., -90 dBm) than the SD threshold, the router considers that channel as clear. If it is stronger (-75 dBm) than the SD threshold, it marks that channel as busy and waits for transmission

Energy Detect step is to determine if it is a non-Wi-Fi energy source (microwave, bluetooth etc). The threshold for ED is -62 dBm. Any signal stronger (e.g., -50 dBm) than the ED threshold, the router considers that channel as busy

Now that we have uderstood how the router performs channel selection, we can easily decide which channel to avoid. The channel that repeats the most and has signal strength that equals or exceeds the SD threshold

Channel Width

On both the bands we can adjust the channel width

On the 2.4 GHz band, channel width can be set to 20 MHz or 40 MHz

On the 5 GHz band, channel width can be set to 20 MHz or 40 MHz or 80 MHz or even 160 MHz

Channel Width Selection

As the width of the overall road is constant, increasing the width of the lanes will result in overlapping lanes

On a 5 GHz band if we set the channel width to 40 MHz, the router will combine 2 adjacent channels each resulting in 12 unique channels instead of 25

Increasing the channel width will increase the speed but it is prone to interference because of channel overlap

For 2.4 GHz band set channel width selection to auto or set it to 20 MHz. For 5 GHz band set it to auto

Beacon Frames

Naturally, you might have a question now, how does my phone or laptop know which channel and channel width the router is going to use for communication when channel and channel width selection is set to auto

Routers use something called a beacon frame. Routers broadcast beacon frames 10 times every second to tell their identity

A part of this beacon frame also includes the channel and channel bandwidth

Happy Routing

Thursday, January 22, 2026

Raspberry Pi Introduction and Setup

How to setup Raspberry Pi

Introduction to Raspberry Pi and Setup

Raspberry Pi is a Single Board Computer. It provides desktop experience in a very small form factor. Pi Zero is 65mm x 30mm. Single board computers are making computing affordable for all walks of life

Raspberry Pi Zero 2 W H

Pi Zero 2 W H shown above costs about 20$, if you add a monitor that costs about another 30$ along with a mouse and keyboard you will have a computing device for about 70$

It is not powerful as the regular desktop computers but it is a good starting point for beginners especially for school and college going kids to learn and understand how computers and electronics work. Pi Zero 2 W has the below processor, memory and wireless specifications

Processor: Quad-core 64-bit Arm Cortex-A53 @ 1GHz

Memory: 512MB LPDDR2 SDRAM

Wireless: 2.4GHz 802.11b/g/n Wi-Fi, Bluetooth 4.2, Bluetooth Low Energy (BLE)

We will discuss about setting up Raspberry Pi Zero 2 W H

What do we need for this setup?

All that is needed for Raspberry Pi Setup
  1. Raspberry Pi Zero 2 W H (H indicates pre-soldered GPIO header)
  2. Raspberry Pi Pi3/Pi3B+ Micro USB 12.75W Power Supply
  3. Raspberry Pi Zero protective case
  4. SanDisk Ultra A1 Class 10 32GB Memory Card
  5. Micro SD Card Reader
  6. USB Hub
  7. Micro USB OTG to USB 2.0 Adapter
  8. HDMI Cable
  9. HDMI Female to Mini HDMI Male Adapter

Setting Up The Pi

The first step in setting up the Pi is to install the Operating System

This guide on the official site has detailed instructions on how to install the OS

Guide to installing OS on your Raspberry Pi

When you reach this step, to keep things simple, select Password Authentication

Authentication Step

After you select Password Authentication, skip all other steps for now and proceed to below step

Set the Imager options

Once you complete all the steps, you will reach the final step

Click on Finish and we are done with OS installation for the Raspberry Pi

OS Installation Complete

The OS is now installed on the Micro SD Card

We now have to start the Pi and do some customizations

Understanding Raspberry Pi Zero Pheripherals

Raspberry Pi Zero Pheripherals

On the extreme left is the Micro-SD Slot. We have to insert the SD Card with the OS installed

Insert the Card in to the slot with the labels on the card facing toward you and gently push it in

On the extreme right is the Camera Connector Slot also called the Camera Serial Interface. This is where we connect the camera module

Micro-USB Power port is for the power supply to the Pi

Micro-USB Data port is to connect a Mouse/Keyboard/any other USB device to the Pi

Mini-HDMI port is to connect the Pi to a display device like the TV or Monitor with HDMI port

GPIO (General Purpose IO) Header is to connect Input and Output devices/components to the Pi. There are 40 pins on the Pi Zero and all higher versions. In Pi Zero 2 W H, the headers are soldered and the devices/components can be connected to the pins with the help of jumper cables

Boot The Pi and Get Started

Mount the Pi in Protective Case

I have selected Waveshare protective case for enclosing the Pi. This case is convenient as all ports and connectors are accessible through openings in the case. If you intend to install the Pi outdoors where it is exposed to dust and moisture, it is important to enclose the Pi in a protective case

Mount the Pi in the case and close it. Now it is the time to power up the Pi. Connect the power supply to the Pi and it boots up. Pi Zero 2W needs 5V DC and 2A to run. If you connected any peripheral devices, it would need a maximum of 2.5A. You don't have to use the Pi3/Pi3B+ Micro USB 12.75W Power Supply, instead you can use any power supply that provides 5V and 2.5A. Even your mobile phone charger is sufficient to meet the power requirements of Pi Zero 2W

Next to the Micro-USB Power port is a small led that lights up and blinks continuously as the Pi boots

If it stops blinking and stays solid with a green light, it indicates the Pi has booted successfully

Connecting to the Pi Desktop

The Pi has booted and is now running. Usually Rasbperry Pi conects to the Wi-Fi we configured during the OS installation step. But when I booted, the Pi Zero did not connect to the Wi-Fi

If it connects to the Wi-Fi and we could grab the IP address of the Pi, we can SSH in to the Pi to access and configure it further

If it does not connect to the Wi-Fi, we have to connect the Pi to a TV or Monitor with a HDMI port. Use the HDMI Female to Mini HDMI Male Adapter. Connect your Pi to a TV or Monitor with a standard HDMI cable. Once connected, login to the Pi with the username and password configured during the OS installation step. Once logged in we should be able to see the desktop

Use this step if the Raspberry Pi HDMI doesn't show any signal when connected to a monitor/display device

  1. Plug the microSD card back into your laptop and locate the cmdline.txt file in the root directory
  2. Open cmdline.txt using a plain text editor
  3. Remember the strict rule: The text must stay on exactly one continuous line. Do not press Enter or make new lines
  4. Scroll all the way to the end of the line, hit the Spacebar once, and add this exact command to force standard 1080p video output at 60Hz

video=HDMI-A-1:1920x1080M@60D

Pi Desktop

Use the Micro USB OTG to USB 2.0 Adapter to connect to a Key Board and Mouse. To simultaneously connect the Mouse and the Key Board, you should connect the OTG adapter to a USB hub with multiple USB ports

Click on Wi-Fi configuration on the top right corner of your desktop. Configure and connect to your home Wi-Fi. If you plan to mount the Pi far away from your router, connecting to the 2.5 GHz channel would help. It is a long range channel compared to 5 GHz channel and it minimizes interference from walls and other obstacles between the Wi-Fi router and the Pi

Refer to this article for information on how to optimize your router for better performance and efficiency

Make note of the IP address assigned to the Pi. Mostly this remains constant even if you reboot and reconnect to the Wi-Fi. If you have administrative access to your home Wi-Fi router, configure a static IP for your Pi

Using this IP address, we can connect to the Pi from another computer in our home Wi-Fi network by SSH or RDP

We also have Bluetooth on Pi Zero. Bluetooth devices can be connected to the Pi

Customising the Pi

Previously, we accessed the Pi by connecting it to TV or Monitor. If you do not have a Laptop or Desktop, this is is the only way to connect to the Pi. If you have another computer, you can access the Pi by connecting it by Remote Desktop (RDP) or SSH (Secure Shell). RDP gives you access to Pi's Desktop, where as SSH gives you access to the command terminal on the Pi. In SSH mode you will be able to interact with the Pi only by executing commands on the command line interface. In RDP you can interact with the Pi through the desktop Graphical User Interface (GUI)

When we installed the OS, we configured a user to login to the Pi

SSH in to your Pi from another computer (Desktop or Laptop connected to your home Wi-Fi) for the next steps or continue to access Pi on your TV or Monitor. To SSH, use the user you configured when installing the OS. I am assuming admin is the user you created and your Pi IP Address to be 192.160.1.10

Execute ssh admin@192.160.1.10 on the command terminal on your Desktop or Laptop. On successful login, you will be presented the command terminal (shell) for your Pi. You can execute all the commands to interact with your Pi from this shell

We shall create a new user piuser. Execute the below commands in the command terminal on your Pi


sudo adduser piuser
sudo usermod -aG video piuser
sudo usermod -aG render piuser
sudo usermod -aG audio piuser
sudo usermod -aG sudo piuser

The user piuser has now been added to the groups video, audio, render and sudo

We have to enable RDP. Execute the below commands in the command terminal on your Pi


sudo apt update
sudo apt install xrdp
sudo raspi-config

Raspi Config

Navigate to Advanced Options and press Enter

Select A7 Wayland and press Enter

Select W1 X11 and press Enter

Select Finish and Reboot the system for the changes to take effect

With this we are done setting up the Pi

Let us hope and wish, single board computers like the Raspberry Pi remain affordable