Stephen Smith's Blog

Musings on Machine Learning…

Archive for the ‘Amateur Radio’ Category

Playing with Software Defined Radio

with 3 comments

Introduction

Most Ham Radios these days, receive signals through an antenna, convert the signal to digital, process the signal with a built-in computer, and then output the result converting back to analog for the speaker. This trend to doing all the radio signal processing in software instead of using electronic components is called Software Defined Radio (SDR). The ICOM 7300 is built around SDR as are all the expensive Flex Radios.

Inexpensive SDR

Some clever hackers figured out that an inexpensive chip used in boards to receive TV into a computer, could actually tune to any frequency. From this discovery, many inexpensive USB dongles have been produced that utilize this “TV Tuner” chip, but to tune radio instead of TV. This is possible because all this chip does is receive a signal from an antenna and then convert it to digital for the computer to process. I purchased the RTL-SDR dongle for around $30 which included a small VHF/UHF antenna.

I run Linux, both on my laptop and on a Raspberry Pi. I looked around for software to use with this device and found several candidates. I chose CubicSDR because it easily installed from the Ubuntu App store on both my laptop and on my Raspberry Pi.

I tried it first on the Pi, but it just didn’t work well. It would keep hanging and the sound was never good. I then tried it on my laptop and it worked great. This led me to believe that the Raspberry Pi just doesn’t have the horsepower to run this sort of system. Either due to lack of memory (only having 1Gig) or that the ARM processor isn’t quite powerful enough. Doing some reading online, the consensus seemed to be that you couldn’t run both the radio software and a GUI on the same Pi. You needed to either have two Pi’s or use a command line version of the software. I was disappointed the Pi wasn’t up to the challenge, but got along just fine using my laptop.

Enter the NVidia Jetson Nano

I recently acquired an NVidia Jetson Nano Developers Kit. This is similar to a Raspberry Pi, but with a more powerful quad-core ARM processor, 4Gig or RAM and 120 Tegra NVidia GPU processors (it also costs $99 rather than $35).

I installed CubicSDR on this, and it worked right away like a charm. I was impressed, getting software for the Nano can sometime be difficult since it runs true 64-Bit Ubuntu Linux on ARM, so you need to have that built. But CubicSDR was in the App Store and installed with no problem. I fired it up and it recognized the RTL-SDR and it recognized the NVidia Tegra GPUs. It took over 10 of them for doing its signal processing and worked really well.

Below is a screenshot of CubicSDR playing an FM radio station.

CubicSDR

CubicSDR is open source and free, it uses GNURadio under the covers (low level open source radio processing). CubicSDR has quite an impressive display. Like fancy high end radios you can see what is happening on the frequencies around where you are tuned in. The interface can be a bit cryptic and you need to refer to the documentation to do some things. For instance the volume, doesn’t honor the system setting and you have to use the green slider in the upper right. Knowing what the various sliders do is quite helpful. Tuning frequencies is a bit tricky at first, but once you check the manual and play with it, it becomes easy. Using CubicSDR really is like using a high end radio, just for a fraction of the cost.

It is certainly helpful to know ham terminology and to know what radio protocol is used where. For instance most VHF communications use narrow band FM. Most longer wavelength ham communications are either upper or lower sideband. Aeronautical uses AM. Commercial FM stations use wide band FM.

Antennas

Although the RTL-SDR supports pretty much any frequency, you need the correct antenna for what you are doing. The ham bands that bounce off the stratosphere to allow you to talk to people halfway around the world use quite long wavelengths. The longer the wavelength, the larger the antenna you need to receive them. Don’t expect to receive anything from the 20 meter band without a good sized antenna. That doesn’t mean it has to be expensive, you can get good results using a dipole or end-fed antenna, both of these are just made out of wires, but you do have to string them high up and facing the right direction.

What About Transmitting?

This RTL-SDR only receives signals. If you want to transmit as well, then you need a more expensive model. These sort of SDR transmitters are very low power, so if you want to be heard, you will need a good linear amplifier, rated for the frequencies you want to use. You will also need a better antenna.

If you transmit you also require a ham radio license and call sign. You are responsible for not causing interference and that you signal doesn’t bleed through to adjacent channels. Since you are assembling this all yourself, an advanced license is required.

Summary

SDR is great fun to play with and there are lots of great projects you can create with this and an inexpensive single board computer. It’s too bad the Raspberry Pi isn’t quite up to the task. However, more powerful Pi competitors like the Jetson Nano run SDR just fine.

Advertisements

Written by smist08

April 16, 2019 at 2:08 am

The Technology of “Influence” – Part 5 VHF Radio Modems

leave a comment »

Introduction

In my novel “Influence”, the lead character J@ck Tr@de performs various hacking tasks. In the book he spends a lot of time securing his connections, hiding his identity and hiding his location. In this series of blog posts, I’m going to talk about the various technologies mentioned in the book like VPN, the Onion Browser, Kali Linux and using VHF radios. I’ve talked about HTTPS,  VPNs, the Onion Browser and Kali Linux so far, now we’re going to discuss VHF Radio Modems.

Very High Frequency (VHF) is a radio band used by both commercial and amateur radio operators (on different frequencies). Often if you see people using small handheld radios then chances are they are using VHF. This frequency band works line of sight and doesn’t require a very large antenna to work quite well. Like any radio frequency you can transmit and receive digital data over the air, just like a cell phone does. You can buy fairly inexpensive VHF radio modems which can be used to connect a computer to the Internet via a VHF radio.

In this article we’ll look at these in a bit more detail and discuss why J@ck finds these useful.

For anyone interested, my book is available either as a paperback or as a Kindle download on Amazon.com:

Paperback – https://www.amazon.com/dp/1730927661
Kindle – https://www.amazon.com/dp/B07L477CF6

Why Does J@ck Use These?

In the previous articles we have J@ck accessing the Internet from a coffee shop Wifi using HTTPS, a VPN and the Onion Browser. With all this security, why doesn’t J@ck feel secure? As we mentioned before you want to consider security as an Onion where the more layers you have protecting you, the more secure you can feel. However the good hackers always feel paranoid and worry about being traced. In this case J@ck is worried, what if the NSA, FBI or some other agency can track his Internet usage back to the coffee shop’s wifi?

J@ck doesn’t know if anyone can do this or if anyone is actually looking for him. By having a homeless person plant a Raspberry Pi with a VHF radio outside the coffee shop and then J@ck accesses that via a VHF radio modem attached to his laptop, J@ck can be upto 2 km away from the coffee shop, as long as he has line of sight.

This way if the people in the black SUVs show up, J@ck can see them, be warned and escape. Most importantly then he will know someone is looking for him.

The downside for J@ck is that each layer of the security onion adds overhead and latency that slows down his Internet access. With all this security in place J@ck can only access the Internet very slowly.

Strictly speaking to use these frequencies you should have either a Ham or Commercial Radio license. But then if you follow the license rules, you need to identify yourself every 30 minutes, and J@ck is certainly not going to do that. In the scheme of things, J@ck considers the penalties for illegally operating a radio, the least of his problems. There are radio modems for UHF and 900 MHz as well, J@ck could use these as well. As long as the radio is cheap enough to be disposable.

Can the NSA Catch J@ck?

If the NSA can trace J@ck’s Internet traffic back to the coffee shop. Perhaps via a compromised Tor exit node and a compromised VPN, then what can they do?

If the NSA suspect J@ck is using a VHF modem, then rather than sending the SWAT team into the coffee shop, they could have three vehicles with radio direction finding equipment move into the area quietly and then they could triangulate J@ck’s true location from the emissions from the VHF radio attached to his laptop.

J@ck’s hope is that they wouldn’t do this the first time, so if the G-men do show up at the coffee shop then he would assume they would either find his Raspberry Pi/Radio Modem or guess that he was doing this and then use the radio vans the second time.

J@ck also limits his time at each coffee shop, so that the Feds have less time to set this all up and trap him.

Summary

Catching hackers is a game of cat and mouse. Since J@ck is the mouse he wants to be as elusive as possible. VHF modems are just another tool to make it harder to trace back to J@ck’s location and catch him.

Written by smist08

January 24, 2019 at 9:12 pm

Getting My Amateur Radio License

leave a comment »

Introduction

I recently passed the exam to get my amateur (ham) radio license. This article is a bit on my experience with taking the course and writing the exam, as well some thoughts on ham radio. People spend a lot of money on cell phones, but most of what they do is done routinely for free by dedicated radio hobbyists. After all a cell phone is just a radio running on frequencies bought up by the cell phone providers.

Why?

There is a perception that amateur radio is an old obsolete dying hobby. That is consists of people using old tube radios trying talk to people far away with lots of interference and poor sound quality.

Why would anyone use ham radio when you can talk to anyone reliably on Skype or FaceTime? Didn’t ham radio only make sense back in the days when long distance calls were prohibitively expensive? Now even most phone plans are quite inexpensive and use the Internet to communicate. So why are the number of amateur radio licenses growing year over year? In the US the number of licenses issued each year is growing at a rate of about 1%, not Internet growth, but pretty steady for something that requires preparing for and writing a written exam.

Here are some of the main reasons for the continuing interest in amateur radio:

  • Disaster preparedness. Most amateur radios can operate off batteries and don’t require cell phone towers, Internet connections or even A/C power.
  • Better radios. There are a proliferation of new radios on the market, at much lower price points (under $100)  and a great many features including computer connectivity, digital channels and more efficient power.
  • Volunteer infrastructure. To use your cell phone you typically pay $75/month to someone for your ability to use their cell phone towers and such. In the amateur radio world many clubs operate repeaters (think amateur cell phone towers) and Internet connections allowing long distance communications with voice or even e-mail from low powered portable radios.
  • Cell phone coverage often isn’t as good as advertised. I do a lot of hiking and mountain biking. Most of the places I go, there is no cell phone coverage. However here on the Sunshine Coast if I get line of sight to the ocean I can probably hit one of the Nanaimo repeaters and communicate. The only other alternative is satellite phones and these make cell phones seem inexpensive.
  • Ability to build your own equipment and experiment. The world of cellphones is very locked down and DIY is not allowed at all. In the world of amateur radio if you have the correct license, you can build your own radio, you can heavily customize your equipment, you can build your own antennas and generally do a lot of experimentation and customization. If you have an interest in understanding how things work and playing with electronics, then this is a great playground.

Licensing

To get my license I took a course offered by VECTOR in Vancouver to prepare and write the basic amateur radio exam. This was a great success and I greatly enjoyed it. VECTOR is an emergency radio non-profit society for the city of Vancouver. The course was taught by a number of VECTOR members usually someone different for each section. This gave a good mix of perspective and provided a good variety over the five morning sessions. The details of this process are a bit different by country so the details here apply specifically to Canada. The basic exam is 100 multiple choice questions, you can take practice exams here. The course covers the main areas of the exam which are: Rules and Policies, Basic Electronics, Antenna Systems, Radio Wave Propagation, Interference and Suppression, Operating Procedures and Station Assembly Practices and Safety. The whole course and exam are theoretical and don’t involve touching a radio whatsoever.

I did pass the exam. If you get 70% then you get access to all frequencies above 30MHz and if you get 80% then you don’t have any frequency limitations. I got over 80% so I can use any amateur frequency band. My call sign is VA6SMI. I have to use this to identify myself in any communications.

To actually build your own radio you need the advanced certification which I might try to get next year. The other qualification you can get is Morse Code. Up till ten years ago this was part of getting a basic license but isn’t required anymore.

Future

I think a lot of the current popularity of ham radio is driven by a wish to be independent of cell phone providers and a wish for much more DIY in our communications. As recent fires, hurricanes and earthquakes have demonstrated the cell phone infrastructure is rather fragile and can take quite some time to get up and running again. During all these emergencies, ham radio was the main form of communications. With global warming, fires and hurricanes will become more common and a need for emergency communications becomes more and more important.

Separately amateurs are adding more and more functionality into ham communications with better digital protocols and speed. They are adding better volunteer infrastructure to support longer distance communications and Internet connectivity. The radio hardware market has gotten much more competitive recently with the addition of several Chinese manufacturers that have driven down prices and driven new innovation.

Will we reach a point where we have “smart” ham radios like we have “smart” phones? Will we be able to run apps like Facebook on our ham radio? Will be be able to use them as ubiquitously as we use our phones? Will we one day be able to break the hold of the cell phone providers and eliminate all those expensive subscription plans? It might take some time but we are slowly moving in that direction. Certainly the ham radio frequencies can’t handle that volume of traffic, but perhaps for those willing to pass the basic radio exam we will start to get some freedom from the current cell phone hegemony.

Summary

I enjoyed the process of getting my ham radio license. I’ve ordered a radio and look forward to getting on the air when it arrives. It was fun reviewing basic electronics and learning more about antennas and radio wave propagation. The rules and regulations part wasn’t bad, once you get the hang of what they are looking for, the questions are quite easy.

Now I’ll see if I’m better connected once I’m out in the woods. Plus I’ll be able to communicate during power outages (we had one today that also took out local cell phone coverage).

 

Written by smist08

October 21, 2017 at 12:47 am