Friday, August 21, 2020

Remote WSPR and FT-8 with a Raspberry Pi behind a DSL Modem/Router (NVG510) with Google WiFi

This is my third blog post on running WSPR (and FT-8) remotely using a Raspberry Pi connected to a Transceiver.

The first blog post (here) describes a basic setup in which the Raspberry Pi and the device controlling it (e.g. a laptop, a tablet, or a smart-phone) are all on the same network.  For example, the Raspberry Pi and Transceiver could be in one room of a house and WSPR operation could be controlled and monitored using a tablet from another room.

The second blog post (here) expands upon this concept, but rather than controlling and monitoring from a device on the same network as the Raspberry Pi, the Raspberry Pi and Transceiver are controlled via the internet from a location not associated with the local-area-network to which the Raspberry Pi is connected.  In other words, it could be controlled from across town, or across the state, or from a different country.

In the second post the Raspberry Pi (and transceiver) were attached to a local-area-network behind a 5031NV DSL Modem Router.  In this third blog post, I'll discuss a similar setup, but with the Raspberry Pi (and transceiver) behind an NVG510 DSL Modem/Router using Google Wifi in lieu of the Modem/Router's built in WiFi function.

This is the setup:

The network whose setup for remote control I will be discussing is the "Far End" network.  It is controlled from the "Near End" using (in the example shown) a laptop running VNC Viewer. which allows the user at the Near End to interact with the Raspberry Pi's desktop at the Far End.

(Note:  the IP addresses shown in RED are not the real IP addresses.  I've assigned these numbers for purposes of illustration).


Why does the Far End use Google WiFi?

The NVG510 Modem/Router provides internet to our property in Nevada City, California.  There are several structures on this property which require access to this internet, and the NVG510's integrated WiFi does not supply adequate coverage to all of the wireless devices needing it.

On the other hand, the Google WiFi mesh network provides us the coverage we need.

The Google WiFi was purchased several years ago and it consists of three puck-like devices.

One of these pucks connects via an Ethernet cable to one of the Ethernet ports on the back of the NVG510 Modem/Router.

The other two pucks can be located anywhere within range of the first puck -- they do not need to be connected to the NVG510.

The three pucks, operating together, form the WiFi mesh-network.


1.  Setting up the NVG510:

To use VNC Viewer to remotely control and monitor the Raspberry Pi, the VNC application on the Raspberry Pi must have two-way communication through the NVG510's firewall.  To allow this access, I set up the NVG510 using the following steps:

First, it is necessary to log into the NVG510 locally via its control IP address.  Its IP address follows the "For Advanced Device Configuration go to:" line on a sticker on the side of the unit.

At the window which appears, go to the "Firewall" tab and click on the "NAT/Gaming" tab on the line under it:

Clicking on the "NAT/Gaming" tab should bring up a login screen requiring a "Device Access Code".  This code is also found on the side of the NVG510:

Entering the "Device Access Code" will bring up the NAT/Gaming window:

Note that the blue bar under "Hosted Applications" states, "No Application Hosting entries have been defined."

Scroll down the "Service" pull-down menu until you find the entry for "VNC, Virtual Network Computing" and select it.

Then go to the "Needed by Device" pull-down menu and select the Google Wifi device.  In my case, this was the only device on the list.  Note that it can be identified as a Google device by the first three pairs of digits in its MAC address (this MAC address is shown scrunched together at the end of the entry, above).  (If you have these three pairs of digits, you can google which company they are assigned to.  In my case d8:6c:63 is assigned to Google.)

Then click on the "Add" button.  The window should be updated to show the following.  

Note that VNC is now listed as a hosted application.


Next, go to the "IP Passthrough" tab under the "Firewall" tab.

At the "Allocation Mode" pulldown menu, select "Passthrough".

At the "Passthrough Mode" pulldown menu, select "DHCPS-fixed".

And at the "Passthrough fixed MAC Address" select the Google Wifi device (which, in my case, is the only device on the list).

Then click "Save".  

The screen should update to show that the changes have been saved and that you should restart the Modem/Router.

But don't click on "restart" yet.

Before clicking on Restart, let's first go back to the NAT/Gaming tab (still under the Firewall tab) and take a look at how it has changed:

Now click on "Restart".

(By the way -- be sure to do the Passthrough assignment step after the VNC application selection step.  That is, follow the steps in the order I've shown them, above.  If you reverse the order of these two steps you might not be able to assign the VNC application to a device, even if that device is "passthrough".)


Step 2, Setting Up Google WiFi:

Using the Google WiFi app (which is on my tablet and my smart-phone), I did the following:

1.  Go to Settings > Network and General > Advanced networking > Port management.

2.  Click on the "+" (to add).

3.  Find the Raspberry Pi on the list, select it (so that a check-mark appears), then tap "Next".

4.  Select "TCP & UDP" under "External Ports"

5.  Then touch "Internal Ports" and at the text-prompt type "5900" (which is the port number for VNC).

6.  Then tap "Done".

This new "port management rule" should now be saved on the Google Wifi.


Step 3:  Verify that Port 5900 can be seen from the Outside World:

Go to the website "canyouseeme.org" and enter in the Modem/Router's public IP address and "5900" as the port to check.  Then click on "Check Port".

(Note that if you have forgotten the public address to use, you can first look it up on the Modem's control panel, as shown below.)


If everything has been configured correctly, you should see a green "Success" appear on the screen, as shown, below:


Step 4:  Access the Raspberry Pi using the VNC Viewer App:

On your controlling device, open the VNC Viewer app and enter in the Modem/Router's public IP address and "5900", separated with a colon (:) and hit <ENTER>

Continue through the "warning" screen that might appear.  The Raspberry Pi's desktop should then appear in a window on your remote device (laptop, tablet, etc).

That's it!

Done!


A Note on Security:

Important:  allowing VNC Viewer to access the Raspberry Pi from the world outside your router presents a security risk.  The Raspberry Pi's Port 5900 (its VNC port) could now be accessed and your Raspberry Pi, via VNC Viewer, controlled by someone else.  For example, an unknown third party could possibly load software onto your Raspberry Pi that might monitor your network's internal WiFi traffic.

At a minimum, change the Raspberry Pi's password from the default "raspberry".  Or go into the VNC settings and change VNC's password there (under Options>Security -- note that if you select "VNC password" in lieu of "UNIX password", there will be no Username field at the login)
.

Standard Caveat:

I might have made a mistake in my designs, equations, schematics, models, etc. If anything looks confusing or wrong to you, please feel free to comment below or send me an email.

Also, I will note:

This design and any associated information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



Monday, August 17, 2020

Remote WSPR with a Raspberry Pi behind a DSL Modem/Router (5031NV)

 

This blog post continues my setup of a remote WSPR station using a Raspberry Pi and my FT-1000D transceiver.

The first blog post describes remote operation when operating within a local area network, for example, when the transceiver and Raspberry Pi are in one room of a house and you are controlling them from another room via a wireless router.

Here is an example of that basic setup:

In this blog post control of the Raspberry Pi will not be done locally, but over the internet from a second network (or using a cellphone), as shown, below:

The Raspberry Pi and Transceiver are at the "far end" of the internet link, on a local-area-network that is behind, in my case, a DSL Modem/Router (Pace Model 5031NV).

My laptop (or tablet device, etc.) is on a separate local-area-network (the "near end" network of the internet link).  With it I monitor and control the far end WSPR operation using "VNC Viewer", as described in my first blog post.

At the near-end, "VNC Viewer" on my laptop must have a two-way communication's link with the Raspberry Pi at the far-end.  To do this, I need to set up my 5031NV DSL Modem/Router to allow the VNC application two-way communications through the 5031NV.

This blog post describes the set up of my 5031NV Modem/Router to provide the two-way VNC link through it.


Step 1:  Access the 5031NV's Configuration Controls:

To set up my DSL Modem/Router, I first need to access its configuration "panel".  To do this, I enter into my laptop's browser the "For Advanced Configuration" IP address printed on the label attached to the modem/router's side cover.

If I've correctly entered the modem's IP address into my browser, I should see the following "home" screen:

(The text in red represents information that I've changed for privacy purposes.  For example, my network's name really isn't "JCA1234".)

Note that  "raspberrypi" is one of the devices listed in the "Home Network Device Lists" at the bottom of the screen.


Step 2:  Allowing access to the VNC Application on the Raspberry Pi:

Next, I want to enable two-way communication through the Modem/Router for the VNC app on my Raspberry Pi.  (This app was automatically installed on my Raspberry Pi by the Pi's NOOBS software).

To do this, I first go to the "Settings" tab and then select the "Firewall" tab.

Under the "Firewall" tab I select "Applications, Pinholes and DMZ", as shown below:

Selecting "Applications, Pinholes and DMZ" will bring up the next window.  Under the "1) Select a computer" heading, choose "raspberrypi". 

Continuing down the screen, do the following:

Under the "2) Edit firewall settings for this computer" select the "Allow individual application(s)" radio-button.

Then, scroll through the Application List until you see the entry for "VNC".  Select it and click the "Add" button.  VNC should then appear as a "Hosted Application".

Next, click on "Status" under the "Firewall" tab.  You should now see:

This screen tells you that you can remotely access VNC on the Raspberry Pi via port 5500, 5800, or 5900 at http://1111.11.11.11 (this latter IP address is a fake one, for privacy purposes).

If you'd like, you can do a quick check by returning to the "Home" screen and clicking on the "Details" button for "raspberrypi".

You should be taken to the "LAN" tab under the "Settings" tab and see something that looks like this:

(Again, information in RED is not my actual network's information.  I've changed it for privacy).


That's all there is to this Modem/Router's setup!  My 5031NV Modem/Router will now allow remote access to my Raspberry Pi's VNC app.

The next step is to try it out...


3.  Logging in to VNC on the Remote Raspberry Pi:

To login to the remotely-located Raspberry Pi, open the VNC Viewer app on your "near-end" control device (e.g. laptop, tablet, smart-phone, etc.) and enter in the "Public IP", then a ':' (colon), and a VNC "Port Number".

In my case, the Public IP address is 1111.11.11.11, and I've chosen Port 5900 (see info on the previous image), so I would enter "1111.11.11.11:5900", as shown, below:

After hitting <ENTER> (and possibly getting a warning screen, which I just ignore), I then see my Raspberry Pi's desktop on my remote device!


That's it!  Done!


A Note on Security:

Important:  allowing VNC Viewer to access the Raspberry Pi from the world outside your router presents a security risk.  The Raspberry Pi's Port 5900 (its VNC port) could now be accessed and your Raspberry Pi, via VNC Viewer, controlled by someone else.  For example, an unknown third party could possibly load software onto your Raspberry Pi that might monitor your network's internal WiFi traffic.

At a minimum, change the Raspberry Pi's password from the default "raspberry".  Or go into the VNC settings and change VNC's password there (under Options>Security -- note that if you select "VNC password" in lieu of "UNIX password", there will be no Username field at the login)
.

Standard Caveat:

I might have made a mistake in my designs, equations, schematics, models, etc. If anything looks confusing or wrong to you, please feel free to comment below or send me an email.

Also, I will note:

This design and any associated information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Tuesday, August 4, 2020

Remote WSPR with a Raspberry Pi

Monitoring my WSPR station on an iPad

This blogpost describes my WSPR setup using a wireless Raspberry Pi that allows me to monitor and control my FT-1000D transceiver's WSPR operation via my laptop, iPhone, or iPad, from anywhere within my Local Area Network's WiFi range.

By "Local Area Network", I mean my home network, as shown, below:


(I can also monitor and control WSPR on my home network from a remote network, via the Internet.  This is the topic of the next blog post, (click here).)


WSPR (Weak Signal Propagation Reporter) is a good way check the performance of antennas, and it is always very cool to see how far I can transmit with low power.  

For example, the map below shows where my 5 watt WSPR signal was received over a 24 hour period on 20 meters (using my 80-meter full-wave loop in Nevada City, CA, grid CM99mg):


But WSPR requires a computer, and because my radio room is not close to my "home office" where I normally use my laptop, if I want to use WSPR I have to first eject my laptop from its docking station in the office, carry it to the radio room, and connect it to my WSPR interface.

All very inconvenient.

A friend, Dick Benson (W1QG), mentioned that he was making a WSPR computer using a Raspberry Pi.  The Raspberry Pi would be stand-alone -- it would not need to be directly connected to his home computer.  

Instead, the Raspberry Pi would be a dedicated "remote" computer (without display, keyboard, or mouse) and he would communicate with it (and control it) via the internet (WIFI), using a "remote desktop" application on his PC, operating under Windows.

This remote connection would be over his "local" area network.  That is, access to the WSPR computer would depend upon his network's WiFi coverage.

Well, this idea sounded like just what I needed in my ham shack.  I could keep my laptop in my home office and have a small, dedicated processor out in the radio shack handling WSPR communications.

But I am a newbie to the Raspberry Pi and to Linux, so I approached the project with some trepidation.  Overall, though, I found the process more straightforward than I had anticipated (Google searches were very helpful whenever I ran into a stumbling block).  This blog post documents the steps I took to create my own "remote" Raspberry Pi WSPR computer.   


The Raspberry Pi board is shown above (along with a USB Audio Interface).  

And below is a screen-shot of my laptop's "remote desktop" view of the Raspberry Pi running WSJT-X:


I'll start by describing the hardware I'm using, including an audio-derived VOX PTT interface to control PTT for my radios that do not have CAT control interfaces.  

I will also describe using the Raspberry Pi to control the FT-1000D's PTT via a CAT-interface PTT, in lieu of the audio-derived VOX PTT. 


Hardware, Overall:

The image, below, shows the different bits and pieces that comprise my remote WSPR station.  Note that I am using a Yaesu FT-1000D as my WSPR transceiver.  Note that, although the FT-1000D does have CAT control, I'm going to start by describing a system that controls the transceiver's PTT using audio-derived VOX PTT.


And here's a block diagram:



HW, XCVR Audio I/F

My "Transceiver Audio Interface" is one that I originally built to connect my FT-1000D Rx and Tx audio to my Lenovo P50 laptop.  I use this same interface module, without modification, to connect the transceiver to the Raspberry Pi. 

Because my Lenovo laptop uses a single 3.5mm Tip/Ring/Ring/Shield (TRRS) jack for both audio input and audio output (i.e. it is the headset jack), my Transceiver Audio Interface has a corresponding 3.5mm TRRS plug to connect it to the Lenovo's TRRS headset jack.  

This same TRRS plug will connect to the Raspberry Pi (via adapters, to be described below).

The Transceiver Audio Interface is shown, below.  You can see cable terminated with the TRRS plug coming from the left-hand side of the box. 


At the right side of the box (next to the two red-knobbed potentiometer volume controls) are two 3.5mm stereo (TRS) jacks.  These two jacks connect to the transceiver's audio input and output (via appropriate patch cords)

The top 3.5mm jack brings in Receiver Audio from the FT-1000D's "AF Out" 3.5mm TRS jack on the transceiver's back panel.  This connection is made with a stereo 3.5mm male-male patch cable (TIP is the sub-receiver audio out, and RING is the main-receiver audio out.  My Transceiver Audio Interface uses the RING (main receiver) audio, not the sub-receiver audio).

The bottom 3.5mm jack in the image, above, sends audio from the Raspberry Pi to the FT-1000D's Mic input.  This 3.5mm jack is wired with TIP as PTT and RING as Mic Audio.

A 3.5mm stereo male-male patch cable connects this jack to a jack on a homebrew adapter that then connects to the FT-1000D's 8-pin Mic DIN connector.  (Adapter wiring described later in this post).

XCVR Audio I/F Schematic:

Here is the Audio Interface schematic.

Schematic Notes:
  • PTT is audio derived (VOX), and requires 5 to 12VDC to power the VOX circuitry
  • The PTT output is open-collector, and is low-true when active (pull-up required at xcvr).
  • Overall circuit based upon a design by Dick Benson, W1QG

HW, 3.5mm to FT-1000D Mic Adapter:

I made the following adapter to connect a 3.5mm TRS patch cable to the FT-1000D's mic input:


The illustration, below, shows how I wire the signals between these two connectors:
 


HW, Raspberry Pi and USB Audio Interface:

The photo, below, shows the Raspberry Pi and USB Audio Adapter I'm using:


The Raspberry Pi is a "Raspberry Pi 3 Model B+".  To simplify the purchasing process, I decided to purchase a Starter Kit from Amazon that includes:
  • Raspberry Pi 3 Model B+
  • 32GB micro SD card, pre-programmed with NOOBS 
  • DC Power Adapter, 5V/3A
  • Case
  • HDMI cable
  • And other bits and pieces (e.g. heatsinks, quickstart guide).  
Below is the Amazon link to this Raspberry Pi 3 B+ Starter Kit:


Note, although the Raspberry Pi has an Audio/Video (A/V) interface connector on its board, this interface only provides Audio Out.  There is no Audio Input on the Raspberry Pi 3 B+ board.

I need both Audio In and Audio Out for WSPR.  A simple way to provide both functions is with a USB Audio Adapter.  The USB Audio Adapter provides for the Raspberry Pi an analog Mic Input (mono) and a stereo analog Headphone Output.

Below is the Amazon Link to the USB Audio Adapter I am using:



Y-Splitter Cable:

I needed some way to connect the USB Audio Adapter's two 3.5mm TRS audio jacks to my Transceiver Audio Interface's 3.5mm TRRS plug (the plug that would normally be inserted into my laptop's headset jack).  The Y-Splitter cable, shown below, provides this function. 


Here's the link for the cable I purchased:


By the way...I can eliminate the Y-Splitter cable if I change my USB Audio Adapter to one that accepts a 3.5mm TRRS Headset plug, such as this one:


Version 2 Block Diagram if using this Adapter:

And a photo, too:



Setting up the Raspberry Pi and the Windows Remote Viewer:

1.  Raspberry Pi, Out of Box:

The Raspberry Pi 3 Model B+ starter kit contained a 32 GB micro SD card that already had the NOOBS package (New Out Of Box Software) installed on it.  (If you need to load NOOBS onto a virgin SD card, go to the website in the previous link).

To get started with the Raspberry Pi I needed a display (with HDMI interface), a USB keyboard, and a USB mouse in addition to the shipped pre-programmed 32 GB micro-SD card and the 5VDC power adapter.

I connected together the above items in the following order:
  1. Insert programmed 32 GB micro-SD card into the micro SD card holder on the bottom of the Raspberry Pi board.
  2. Attach a USB Keyboard and a USB Mouse to two of the Pi's USB ports
  3. Attach the HDMI cable to the Pi's HDMI port.  The other end of the cable attaches to an HDMI port on a monitor.
  4. And attach the 5VDC Power Adapter's plug into the Pi's "PWR IN" connector (J1).
Then, power up the Raspberry Pi.  If it successfully boots, you should be taken through a few setup prompts which should be self-explanatory (be wary, though of removing the "black space" around the screen.  If your choice is incorrect, this can be a bit of a headache to fix).

Being a complete "newbie" to Raspberry Pi's, I found the following video helpful:


Note that the presenter discusses a number of topics that might not be needed, but I found his procedure for enabling/disabling the "back space" around the image very helpful, after I discovered, during the Pi's setup procedure, that the black space I saw around the image should not be removed.  After I accidentally "removed" the non-existent black space, the image was too large for the display and I had to edit the config file (a process described in the video) to bring its margins back into the displayed area.


2.  Obtaining the Pi's IP Address:

To operate WSPR remotely using the Raspberry Pi, we need to communicate with it over the internet, and thus we need to know the Raspberry Pi's IP address.

To obtain the Raspberry Pi's IP address, click on the LXTerminal icon on the menu bar at the top of the screen and then type "hostname -I" at the prompt in the LXTerminal's window:


Then press "Enter" on the keyboard.  LXTerminal should return a sequence of numbers representing the IP address, e.g:  123.456.78.90.  Write this number down -- you will use it later.


3.  Update and Upgrade the Raspberry Pi's software:

A website I'd found recommended that after successfully booting up the Raspberry Pi for the first time, its software should be updated and upgraded.

To update the software, use LXTerminal and type: "sudo apt-get update" <ENTER> at the prompt.

Next, to upgrade the software, use LXTerminal and type: "sudo apt full-upgrade" <ENTER> (the upgrade will probably take some time).

Note:  You could also upgrade using a "sudo apt-get upgrade" command.  But I found the "sudo apt full-upgrade" to be preferable to "sudo apt-get upgrade".  I had first tried this latter command and, although it seemed to work OK, I discovered when I tried using the Raspberry Pi's File Manager that the File Manager was screwed up (the file tree would appear and then immediately disappear).

Googling, I found a website recommending using "sudo apt full-upgrade" in lieu of  "sudo apt-get upgrade" to fix this problem.  I tried the 'full-upgrade' command, and it worked.


4.  Setting up a Remote Viewer on the Windows Desktop:

Next, I installed a remote viewer on my laptop, operating under Windows 7.

There are a couple of choices for remote viewers that I am aware of.  One choice is Windows "Remote Device Connection" that comes pre-packaged with Windows. (Note that this viewer requires the installation of XRDP on the Raspberry Pi.  If you would like to install this package, type "sudo apt-get install xrdp" in the LXTerminal).

However, I do not recommend this viewer, simply because I am unable to use the Raspberry Pi's "Shutdown" button (under "Logout" in its menu) to remotely shut-down the Raspberry Pi.  Instead, I can only remotely shutdown the Raspberry Pi by typing "sudo shutdown -h now" into LXTerminal.  Very inconvenient!

The second viewer (and my preferred choice) is better behaved with respect to Shutdown.  This viewer is "VNC Viewer".  The Raspberry Pi should already have VNC Viewer's associated "VNC Server" loaded on it (if you are using the NOOBS software package).  You can identify if the VNC Server is present on your Raspberry Pi by the presence of its icon on the Raspberry Pi's menu bar, as shown, below:


If the icon is there, you should be good to go.  Download the Windows "VNC Viewer" via the link, below:


With "VNC Viewer" now installed on my laptop and operating under Windows, I did all further Raspberry Pi setup operations remotely, via my laptop, with the Raspberry Pi operating "headless" (that is, without display or keyboard attached to the Raspberry Pi).  

To operate "headless", do the following:
  1. Shutdown the Raspberry Pi (use the Shutdown button under the Raspberry Pi menu's "Logout" icon).
  2. Turn off power to the Raspberry Pi.
  3. Disconnect the USB Keyboard.
  4. Disconnect the USB Mouse.
  5. Disconnect the HDMI cable.
  6. Connect the USB Audio Adapter to a USB port.
  7. Power-up the Raspberry Pi.
The Raspberry Pi should now be powered up, but of course, with no display attached, you cannot see its desktop.

Now, launch "VNC Viewer" on your PC.  If the Raspberry Pi has finished booting, a prompt should appear asking for the IP address to which VNC Viewer should connect.  You will need to type into this prompt the Raspberry Pi's IP address that you (hopefully) wrote down earlier.

VNC Viewer will then attempt to connect to the Raspberry Pi.  If it is successful, you should next see an "Authentication" window asking for your User Name on the Raspberry Pi (if you haven't changed it in the Raspberry Pi setup, its default is "pi") and a Password (its default is "raspberry").  


Type in the appropriate User Name and Password, then click "OK".

You should then see your Raspberry Pi's desktop appear in a new window on your Windows desktop!

If the Raspberry Pi is running "headless", the VNC Viewer's window of the Raspberry Pi desktop will probably be set to the Raspberry Pi's default resolution of 768 by 480 pixels.  If this is the case, your Windows desktop might look like this (note that my Windows desktop, which you can see below, has an overall resolution of 1920 x 1080 pixels).


I have found that the default resolution of 768 x 480 is not adequate for viewing WSJT-X, as you can see in the following screen-capture of the VNC Viewer window:


Increasing the Raspberry Pi's resolution to 1280 x 720 greatly improved viewing WSTJ-X (procedure for doing this described next).


Much better!

Note:  The "VNC Viewer" App also exists for other devices.  For example, I downloaded VNC Viewer from the Apple app store (it was free) and installed it on my iPad:



5.  Changing the Raspberry Pi's Display Resolution:

You can change the Raspberry Pi's screen resolution several ways.  I'll describe two methods that use the Raspberry Pi's menu structure and a third method that is initialized with a command typed into LXTerminal.

Plus, I'll show what I had to do when none of the above methods worked.

Let's look at the two methods that utilize the Pi's menus...

5.1.  Changing Display Resolution via Raspberry Pi's menus, "Display Tab" Method:

This method describes my procedure when the Raspberry Pi's "Raspberry Pi Configuration" menu has a "Display" tab.

First, go to the "Preferences" under the Raspberry icon and select "Raspberry Pi Configuration".


When the "Raspberry Pi Configuration" window appears, go  to the "Display" tab.  Then click on "Set Resolution" and select the desired resolution from the pull-down menu.


Click "OK".  Then click "OK" again to exit the "Raspberry Pi Configuration" window.  You will then be prompted to reboot the Raspberry Pi (after which your display will be at the new resolution).


5.2.  Changing Display Resolution via Raspberry Pi's menus when there is no, "Display Tab":

I recently downloaded the RSS software package for RigPi and loaded it onto my Raspberry Pi.  In a sense, because I already have a Raspberry Pi, I'm trying to make it into a "RigPi" clone..

But for some reason, despite doing "updates" and "upgrades" via LXTerminal commands, the "Raspberry Pi Configuration" window for this version of software does not have a "Display" tab.
  
So here's how I changed its display resolution.

First, pull up the "Raspberry Pi Configuration" window under "Preferences" and click on the "Set Resolution" button on the "System" tab:


You should now see a new, smaller, window with a pull-down menu of resolutions.  Pull down that menu and select the resolution you want:


Then click on OK (and then OK again to close the "Raspberry Pi Configuration" window), and then reboot the Raspberry Pi.

Following the reboot, your Raspberry Pi window should be at the new resolution.


5.3  Changing Display Resolution via LXTerminal:

First, launch LXTerminal and at the prompt type "sudo raspi-config".


Press the keyboard's ENTER key to perform the command.  You should then see the "Raspberry Pi Software Configuration Tool" (pictured below).  Use the arrow keys to scroll down to "Advanced Options" and press the keyboard's ENTER key.


Now you should see the "Advanced Settings" menu.  Use the arrow keys to scroll down to "Resolution" and press the keyboard's ENTER key.


The "Resolution" menu should now appear.  Scroll down to the desired resolution (I use 1280x720):


Then press the ENTER button.  Finish up by using the arrow keys to select <OK>, <FINISH>, and finally <YES> at the reboot prompt.

After rebooting (which will cause VNC Viewer to temporarily lose its connection with the Raspberry Pi), you should see on your Windows desktop a larger window for VNC Viewer:




5.4  What to Try if None of the Above Methods Work?

Suppose you try all of the above methods and, despite selecting a new resolution and saving it, your resolution returns to the original, lower resolution, following reboot?

This happened to me when I was trying to adjust the resolution for my "RigPi clone" machine using the RSS software package I had purchased from MFJ.

Fortunately, I still had my original "NOOBS" system on the original micro SD card that I had been using prior to the RSS download (which was onto a new micro SD card).  So I compared its "config.txt" file to the "config.txt" file on the RSS micro SD card.

And I found the problem.  There was a line that was commented-out on my NOOBS card that was not commented out on the RSS card.

Specifically, the line that should have been commented out is: "hdmi_safe=1".  This line should be "#hdmi_safe=1".  Adding the "#" at the start of the line comments-out the command and fixed my problem:

Here's the Viewer using the lower resolution, and I've pointed out the line that needs to be commented out:


The image below shows the same line, but now commented-out, and you can see that the Viewer's resolution is much better:


To make this change in the config.txt file, type the command "sudo nano /boot/config.txt" <ENTER> into the LXTerminal window.

Use the arrow keys to scroll down to the "hdmi_safe=1" line and add "#" in front of it.

Then Control-X (Exit), "Y" to "Save Modified Buffer?", and <ENTER> at the file-name prompt (which should show "config.txt").

This should return you to the LXTerminal and its prompt.  Close down the terminal and reboot the Raspberry Pi.  Following reboot you should see the selected resolution.
.

Next, let's setup the USB Audio Adapter to be the Raspberry Pi's default Audio device.


6.  Select the USB Audio Adapter to be the Raspberry Pi's default Audio device, and setting its Output Volume:

(In these menus I've changed the Raspberry Pi's "Appearance Settings" defaults to be for "Medium Screens" (via Preferences>Appearance Settings>Default Tab).  This enlarges the icons for improved viewing.)

First, right-click on the speaker icon at far right on the top menu bar .  You should then see two selections, "Audio Outputs", and "Audio Inputs".


Select Audio Outputs.  Then select USB Audio Device


Repeat for Audio Inputs:


That's it!

(Note, for reference, you can also set the USB Audio Interface to be the default audio device by using commands typed into the LXTerminal.  For more information on this procedure, see THIS WEBSITE.)

Finally, here's how to set the Audio Output volume (I use this to set the Raspberry Pi's Output Audio level so that it is high enough to trigger my Transceiver Audio Interface's VOX PTT circuit):



Next, load WSJT-X onto the Raspberry Pi...


7.  Loading WSJT-X onto the Raspberry Pi:

Loading WSJT-X is straightforward if you don't mind not having the latest version of WSJT-X.

First, one must get the WSJT-X packages that are compatible with Raspberry Pi Linux.  To do this, go to "Preferences" and select "Add/Remove Software":


(Note that I've changed my wallpaper from the default "Temples" image to one of my own photos.)

Next, type "WSJTX" <ENTER> into the text line.  The search result will be displayed in the large pane to the right, as shown, below (which shows that 3 packages for WSJTX version 2.0.0 were found).  

Make sure all three boxes are checked, then click OK in the lower right-hand corner:


WSJT-X (version 2.0.0) will now be installed.

Following the installation I do a reboot.  When the VNC Viewer screen reappears, I can launch WSJT-X by clicking on the "WSJTX" icon under "Sound & Video":


You should see something like this:


To configure WSJT-X, click on "File" and select "Settings...":


The "Settings" window should appear.  Under its "General" tab I've filled in my call and grid location:


Next, I need to select the Audio "Soundcard" device that WSJT-X will use on the Raspberry Pi.  This is set under the "Audio" tab.  The "Soundcard" devices are initially set to Default, and they need to be changed to the USB Audio Adapter.

To find the list of devices, click on the "arrows" (shown below) for both Input and Output:


From the list, I selected the "plughw" device. (From the listed names, this selection certainly was not clear to me, so I went with the one that had "plug" in its description, and fortunately it turned out to be the USB Adapter).


Below are my final Audio settings:


After everything is setup properly, WSJT-X should start decoding the WSPR signals being received (make sure input audio levels are set properly, per WSJT-X recommendations).

To transmit I need to ensure that the output audio level is high enough to trigger my VOX PTT circuitry in my Audio Interface module.  To do this, I adjust the Volume control, as shown, below:


That's pretty much it!  The WSPR station should now be operating.


Raspberry Pi with CAT Control and the FT-1000D:

I had been using an analog-derived VOX PTT signal to key my FT-1000D (VOX PTT because I use my Transceiver Audio Interface module to operate WSPR with other transceivers whose only method of transmission-control is via the PTT on a mic connector).  

But the FT-1000D has CAT control, so why not try using it in lieu of audio-derived VOX PTT?  I would no longer need an analog VOX PTT circuit and could thus disconnect the +12VDC supply from my Transceiver Audio Interface module.

I purchased this CAT Interface cable for the FT-1000D:


The following Block Diagram shows its connection to the Raspberry Pi and the FT-1000D:


(Note that there is no longer a +12VDC supply connected to the Transceiver Audio Interface.

And here's a photo of the same setup:


Setting up WSJT-X on the Raspberry Pi to use CAT contro is "fairly" straightforward.  After inserting the CAT Interface cable into the Raspberry Pi's USB port, discover its name by typing "ls -l /dev/serial/by-id" <ENTER> into the LXTerminal window, as shown, below:


I only have one serial device attached to the Raspberry Pi, and, as shown in the image above, its name ends with "/ttyUSB0".  This is the device I will select in the WSJT-X Settings menu (under the "Radio" tab) for the CAT Control "Serial Port", as shown, below:


In addition to the "Serial Port" that I've selected, as shown above, I'll also make the following menu selections for FT-1000D CAT Control:
  • Baud Rate: 4800
  • Data Bits: 8
  • Stop Bits: 2
  • Handshake: Default
  • PTT Method: CAT
These changes are shown in the screen-shot, below:


After the menu selections have been made, test the CAT interface by clicking on the "Test CAT" button in this same WSJT-X window.  But note, the button might not change color (green indicates that the CAT test was successful, red indicates failure).

The image below shows how the button should look if the CAT test is successful.  Note that it becomes green:


In fact, after I had clicked the "Test CAT" button, it turned neither green (pass) nor red (fail) -- it simply remained its default color and there was no other indication on the WSJT-X window that the CAT interface was working, or not.  

After playing around with the options settings, I did notice that some settings would invoke a "CAT failure" window (which did not appear with the settings I show selected, above).  

Finally, I noticed a "CAT System" annunciator blinking on the FT-1000D's front panel:


This blinking "CAT System" indicator was the only indication that the Raspberry Pi was successfully communicating with the FT-1000D.

The Raspberry Pi was communicating with the FT-1000D.  And WSJT-X could now initiate transmissions via CAT Control.

The CAT Interface was now successfully integrated with the Raspberry Pi.


Weird Things about CAT Operation with WSJT-X on the Raspberry Pi:

There are a couple of weird things I noticed when using WSJT-X and CAT PTT operation with the Raspberry Pi, compared to my previous PTT operation with audio-derived VOX PTT.  These things are:

1.  As mentioned above, the "CAT Test" button does not change color to indicate the result of the CAT test (neither green for pass, nor red for fail, yet the test, in my case, seemed to have passed).  At the moment, I do not know the cause.

2.  There seems to be a significant delay (on the order of seconds) in the actual engagement of the FT-1000D's PTT when controlled via CAT and the Raspberry Pi from "VNC Viewer" on my laptop.  I especially notice this delay if I toggle the "Tune" button on the WSJT-X control panel.  It seems like the actual toggling of the PTT state at the transceiver is delayed by 2 to 4 seconds from the moment I click on the "Tune" button, which I find quite noticable.  

I will note, though, that this delay does not seem to affect transmission or reception of WSPR signals.


Other Hints and Kinks:

1.  Changing the Raspberry Pi's Wallpaper Image.

You can select from a number of pre-supplied images using "Appearance Settings" under the Raspberry Pi's "Preferences" icon.

If you'd like to use your own image (as I did), you can do the following.  This might not be the most effective way (after all, VNC Server does let you transfer files), but it works:
  • Transfer your JPG image onto a USB memory stick.
  • Insert the USB memory stick into one of the Raspberry Pi USB ports.
  • In the Raspberry Pi's LXTerminal, type "sudo pcmanfm" <ENTER>.
You should now see a new window with file folders.  Locate the memory stick, open it, grab your image, and move it to the folder usr/share/rpd-wallpaper.

Eject your USB memory stick and close down this file-folders window.  If you then return to "Appearance Settings", you should now see your image as one of the images you can use for wallpaper.


2.  To display Raspberry Pi processor temperature:

To display the temperature of the Raspberry Pi core, open the LXTerminal and type into it:

"vcgencmd measure_temp" <ENTER>

You will then see the temperature returned in degrees Celsius.


3.  Capturing screenshots of VNC Viewer:

If you try to get a screenshot of VNC Viewer on Windows the normal way (using, for example, the Alt-PrintScreen keys), you will be unable to capture an image.  This is because the "special keys" that Windows normally uses are, by default, passed to the VNC Server rather than used by Windows.

To allow Windows to screen-grab the VNC Viewer window we need to disable the passing of the "special keys" to the VNC Server:

First, move the mouse pointer into the small white area at the top of the VNC Viewer window:


You should see a small menu appear.  Click on the "Gear" (i.e. Properties) icon:


In the "Properties" window that appears, go to the "Options" tab and uncheck the box for "Pass special keys directly to VNC Server".


You should now be able to use Alt-PrintScreen to grab screen captures of VNC Viewer.


Next Blog Posts...



Standard Caveat:

I might have made a mistake in my designs, equations, schematics, models, etc. If anything looks confusing or wrong to you, please feel free to comment below or send me an email.

Also, I will note:

This design and any associated information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.