Practical Wireless

Data Modes

Mike Richards G4WNC describes how to investigat­e your home network before turning to matters Pi.

- Mike Richards G4WNC practicalw­ireless@warnersgro­up.co.uk

Mike Richards G4WNC describes how to investigat­e your home network before turning to matters Pi.

Something a bit different for this month. Amateur radio is increasing­ly making use of the internet and your home network, so I thought it might be helpful to introduce you to some of the tools and techniques you can use to check the state of your network and improve the performanc­e of troublesom­e areas.

FING

One of the most useful apps to have on your phone is FING. This is available for iOS and Android and the free version provides an excellent quick check of your network by scanning for all connected devices. This is a great way to check just who or what is connecting your network. Fing is also useful for finding the IP address of any device on the local network, Fig. 1. I often use it to identify Raspberry Pi IP addresses, but it will show you everything that’s connected. If you want to dig a bit deeper, you can click on a specific device and scroll down to the ‘Manage this device’ section, where you’ll find the Ping icon. Activating this will ping the IP address with a few packets and give you a graph showing the response time. This is a useful guide to the quality of the link to that device because long ping times indicate a struggling connection. In addition to the graph, Fing provides a tabular output showing the average ping time and the min/max and packet loss. Also, in the ‘Manage this device’ section is an icon you can use to see the open ports on the selected device.

Nmap

While there is a desktop version of Fing, you will need to purchase a licence to access most useful features. However, desktop users would be better off going for the open-source Nmap software, an extremely comprehens­ive network mapping tool used by many system administra­tors. Although initially a command-line only tool, it now has an excellent and easy-to-use Graphic User Interface (GUI) with the bundled Zenmap. The complete package is a free download (URL below) and is available for Windows, Linux and macOS. Installati­on is straightfo­rward; follow the defaults. Once installati­on is complete, start Nmap – Zenmap and you will be presented with a screen similar to that shown in Fig. 2. This may seem a bit intimidati­ng at first, but I’ll guide you through it.

http://nmap.org

The first text entry box at the top left of Zenmap is labelled Target: This is where you enter the IP address range you want to examine. In most cases, you’ll want to start with your entire local network. For this, enter your local network IP address range, which will be something like 192.168.1.0, though the 1 may be a 0 or something else in your configurat­ion. The number of addresses in the range will be 256, counting from 0 – 255. Therefore, our entry in the Target box becomes 192.168.1.0-255 and covers all the potential IP addresses on that network. The next step is to decide what type of scan we want to use. That’s done by setting the profile, which is the top right-hand text entry box. For the initial test, I suggest you select Quick scan. While making these settings, you may have noticed that the text in the Command box also changes. This is the command-line instructio­n to nmap that’s assembled automatica­lly as you enter your requiremen­ts in the top two boxes. When you’ve configured the scan, click the Scan button in the topright and Nmap will spring into action. You should get the results back in under a minute. As shown in Fig. 3, you should see a list of all the detected hosts in the left-hand panel and details of the Nmap output in the righthand panel. The first task is to identify all the connected devices and make sure they should be connected to your network. Many of the detected devices should have their device names added as part of the scan result to be easy to identify.

To help visualise your network, Nmap can produce a map of your network connection­s. To see this, select the topology tab in the right-hand panel after you’ve completed a scan. This will produce a network map as shown in Fig. 4. Here the size and colour of each circle indicates the number of ports open on that device. To get a comprehens­ive view of your network, I suggest you run an intense scan. I also suggest that you should regularly use Fing or Nmap to check for unwanted connection­s to your network.

Improving Wi-Fi Devices

I often use Raspberry Pi devices on my Wi-Fi network for all manner of applicatio­ns that range from running an APRS iGATE node to security and hedgehog monitoring cameras!

While the Wi-Fi connection­s indoors are usually reliable, once I start using devices outside, the link quality tends to drop rapidly. It’s often difficult to properly understand if it’s the transmit or receive direction that’s causing the problem. One very useful software tool for the Pi (and Linux in general) is wavemon. This is available from the Pi repository using the following commands:

Open a terminal session Ctl-Alt-T

Enter: sudo apt install -y wavemon

That’s it! To run the program, type wavemon from the command line. The best way to use this tool is with the device in-situ, so you will need to arrange what’s known as headless access. This is where you remote connect to the Pi over the network. To enable this on your Pi, start with a keyboard/ mouse and display connected. Go to the Pi menu and select Preference­s – Raspberry Pi Configurat­ion. Click on the Interfaces tab and make sure SSH is enabled. Click OK to complete. While connected, make a note of the Pi IP address, as you’ll need that to remote connect. You can now power-down the Pi and move it to its outside location. You will need a terminal utility to access the Pi from your main PC or a laptop. One of the most popular is PuTTY, Fig. 5. This is a very capable, open-source, program available from the PuTTY site (below). With PuTTY installed, you can access the Pi as follows:

Open PuTTY

In the main panel set the connection type to SSH and enter 22 in the port field

Enter your Pi IP address in the Host Name (or IP address) box

Click Open to connect

If all goes to plan, you should see a login prompt where you can enter the Pi username and password. Once you’re logged in, enter wavemon to start the program and get a live view of the link quality. The wavemon interface is packed with live informatio­n and shows you the overall link quality and signal strength in the upper section. The central Statistics section shows the amount of data sent plus the number of failed frames. Below that in the Info section are details of the Transmit and Receive rates along with the transmit power, Fig. 6.

https://putty.org

Pi-Zero Antenna Mod

The Pi-Zero-W is an amazingly useful device that I’ve used in many projects. However, there are times when the tiny PCB slot antenna is not good enough and the Wi-Fi connection struggles. A typical instance is when using the Pi-Zero-W as part of an APRS iGATE receive node. In this case, I mount the Pi in an IP66 rated electrical box on the antenna mast but need a decent link back to the home Wi-Fi.

The solution is to use an external WiFi antenna, but you may be thinking that’s not possible because the Pi has a builtin antenna. However, the Pi team had the foresight to include PCB traces for fitting an external antenna socket. I’ve shown a closeup view in Fig. 7. This shows the three

pads for mounting a standard U.FL surfacemou­nt socket. I’ve also indicated the zeroohm resistor that’s used as a link to move the Wi-Fi antenna feed from the internal slot antenna to the external socket.

The close-up looks simple enough, but that zero-ohm resistor is about the same size as fairy dust! My smallest soldering iron tip is at least twice the size of the link, so it was a bit of a challenge. Here’s a run through the technique I used. I began by cleaning the PCB with a cleaning solution to remove debris and any residual flux. The next step was to clean the U.FL socket pads with cotton buds and alcohol. I also cleaned the U.FL socket at the same time. Next, I used a syringe to put a tiny amount of solder flux on each pad. This has a dual role of helping hold the U.FL socket in position during soldering. I started soldering with my finest tip but I soon found it impossible to use that tip for the two ground lugs because the PCB ground plane was sucking the heat from the tip too quickly. With a larger tip, the two ground lugs were successful­ly soldered. I then switched back to the fine tip to deal with the centre pin. Before tackling the zero-ohm resistor, I cleaned the PCB again to remove the surplus flux from fitting the U.FL socket. Trying to reuse the zero-ohm resistor proved too tricky, so I removed it and made a small wire bridge to link the U.FL socket to the Wi-Fi feed.

To extend the Wi-Fi antenna to the outside of the case, I used a ready-made U.FL to RPSMA pigtail lead from CPC/Farnell. When buying these leads, you need to make sure you get the correct SMA socket. Introduced in the early days of Wi-Fi, the Reverse Polarity SMA connector was designed to stop consumers from altering their Wi-Fi antenna. These connectors are identical to the standard SMA series except for the centrepin connection, where the male and female parts are reversed. So the panel socket has a male pin instead of the usual female socket of a standard SMA. There are, of course, adapters available, if necessary, to swap between SMA and RP-SMA. When buying an alternativ­e Wi-Fi antenna you will find that most will use an RP-SMA connector. You will also soon notice that there are plenty of wild claims for the performanc­e of simple Wi-Fi antennas. The best solution is to use a directiona­l antenna, and the two main types are the Yagi or the patch array. Of these two, the choice depends on the location. If you’re mounting the antenna on a mast, as in the iGATE example, a Yagi would probably be more tolerant to high winds than a flat panel.

 ??  ??
 ??  ??
 ??  ??
 ??  ?? Fig. 1: Fing running on Android.
Fig. 2: Nmap main screen. Fig. 3: Nmap hosts list. Fig. 4: Nmap, network map. Fig. 5: PuTTY SSH tool for PCs. Fig. 6: Wavemon showing Wi-Fi link quality. Fig. 7: Raspberry Pi-Zero-W external antenna mod.
Fig. 1: Fing running on Android. Fig. 2: Nmap main screen. Fig. 3: Nmap hosts list. Fig. 4: Nmap, network map. Fig. 5: PuTTY SSH tool for PCs. Fig. 6: Wavemon showing Wi-Fi link quality. Fig. 7: Raspberry Pi-Zero-W external antenna mod.
 ??  ??
 ??  ??
 ??  ??

Newspapers in English

Newspapers from United Kingdom