Showing posts with label rpi. Show all posts
Showing posts with label rpi. Show all posts

Sunday, October 10, 2021

Chasing the Dragon - Building a Signals Intelligence (SIGINT) platform with SDR

Introduction

It has been ten years since software defined radio (SDR) has reached the average tech enthusiast through hacking a USB DVB-T TV Tuner. This helped accelerate existing SDR projects such as GNU Radio for signal processing and low cost transceiver platforms such as the HackRF and LimeSDR.

The more complex the signal the more demanding it is in system performance to process, decode, and sometimes decrypt. Many interesting signals transmit at very low power levels requiring you to be in close proximity to them. This makes building a highly portable dedicated SDR system the most desirable path.

Building a SDR system to participate in Wireless or RF Capture the Flag contests (WCTF and RFCTF respectively) is a use case that has the broadest spectrum requirements from a few MHz to a few GHz. Many of these events are hosted at fixed locations with the more complex modulation schemas transmitted there. Any portable requirements are for well known signals.

Because this use case requires the greatest breadth and depth of signal identification you see people use workstation-grade laptops. But people do not want to be using their best laptop as their SDR station especially if it is their "daily driver" for work/personal. Thus begins the journey for a more cost effective solution for a system dedicated to SDR. Thus began my quest such a system.

Ideation

Starting with contests as my use case, I started investigation what is the most versatile signal intelligence (SIGINT) platform I can build using readily available components at a moderate cost. This is what I came up with:

  • RX coverage from 100 KHz to 6 GHz
  • TX coverage on frequencies within the RX coverage where legally and/or licensed to operate. ISM, GMRS (US), FRS (US), and Amateur Radio bands.
  • Should be able to carry every thing in nothing larger than a carry-on luggage sized case and quickly deploy the station in under 10 minutes.
  • All resources are focused on signals intelligence first. Any other intended usage of the compute platform is secondary.

Architecture

I came up with the architecture and components diagrammed below. While SDR performance s well documented using a Raspberry Pi 3 Model B+, performance is centered around simple analog and digital modulation modes like OOK, ASK, FSK, PSK, and MFSK. Since I expect to be working with more complex digital modulation voice modes such as DMR, C4FM, P25, and M17 I opted to build on a Raspberry Pi 4 with 4GB RAM (RPi4) instead.

SIGbox Architecture

Since the build needs to be portable, I decided to have power sourced from 12VDC which could be delivered by a switching power supply or power supply or battery such as a 12V@20A LiFePO4.

Since the RPi4 demands 5.1V a dedicated buck converter is installed between the RPi4 and power sourc. When RPi4 are under heavy load a "Low Voltage" message will be displayed in any X-Windows session. 

USB devices are equally demanding for power so a USB 3.0 powered hub is installed. 36 watts is distributed across seven ports.

I suspect each port is limited to 2.5A but I do not expect all connected USB devices to be under load at all times - three at best. But it does beg the question whether USB power hubs vary when it comes to whether they make the entire current capacity avialble to a port. Further testing require on this.

The RTL-SDR Blog V3 R820T2 RTL2832U and HackRF SDR devicesare a good combo to satisfy broad spectrum and TX/RX requirements. The RTL-SDR performs well for HF/VHF/UHF receive, The HackRF makes a good secondary receiver for VHF/UHF for signals that require two receivers and primary up reciever for signals up to 6GHz. The HackRF also provides all our transmit requirements. 

For signal specific requirments, Ubertooth is added for Bluetooth, a GPS to keep time and location, and an Alfa AC1200 for WiFi. A FM VHF/UHF analog/digital transceiver is optional for VHF/UHF APRS and DMR. This transceiver could be something simple like a Baofeng DM-1801.

Prototype

Given the RPi4 for compute, Raspberry Pi OS Full (32-bit) is the chosen operating system given its maturity and maximum ARM hardware compatibility. While Ubuntu 20.04 was an option, sticking with "tried and true" reduces debugging points in the prototype.

SDRangel and SDR++  are SDR applications reflecting a new generation of tools that provide frameworks for plug-in development. This is necessary given the growing complexity of digital modulation modes optimized for superior noise immunity without sacrificing throughput to deliver use cases such as passive radar. SDR applications need to scale in functionality that allows peeling back the layers which can also include decryption.

SDR application frameworks are a great evolution enabling those who may not be able to cope with working at a lower level with GNU radio and GRC companion to stand on the shoulders of others through developing plug-ins. To encourage plug-in develeopment and experimentation to further the SDR "arts" I decided to focus only on SDRangel and SDR++ and include libraries, command line decoders, and other relevant tools focused on signal intelligence (SIGINT.)

To promote further development in SDR and signals intelligence you have to create an education path free of distractions best through some gamified journey. While one can create labs for simple digital modulation modes like OOK, ASK, and FSK, the established modulation modes in Amateur Radio provide a more interactive introductory education. I have done this with a workshop I presented at HOPE XII and have since archived on Github.

Development

When people try to build their own RF related platform or distro, they tend to dump every RF related package a repo has on the topic and top it off with the latest trendy app as long as it is available as a package and does not require compiling. Without ready avilable and relevant help and education, this hurts more than helps someone getting into SIGINT. 

The best approach is establish common ground starting with the end-user already knowing how to install and configure Raspberry Pi OS Full (32-bit) and familiarity in its use as an end user. From there easy to follow instructions that to stand-u pan automated script to install the required software to build a working SDR station. Any choices the end user needs to make during installation needs to be very explicit in what they are deciding.

The end user should not be overwhelmed with first experience after the install. Any desktop changes should be incremental and not transformational. Something as simple as an updated background tells them "they have arrived", a new menu with all the applications that were part of the install, and one or two desktop links that help educate end-users in their SIGINT journey.

Gievn the above, I produced a (Bash) installer script that is run after a fresh install of Raspberry Pi Full OS and configuration (raspi-config) has occured. The end-user gets the script through cloning a Github repo which includes componetns the installation script is dependent on.

Testing

What I love about virtual machines and containers is I can quickly iterate tests and fixes build/destroying/building again images. For the RPi it means having a bunch of formatted SDcards on hand with fresh Raspberry Pi OS installs already upgraded on hand. This tends to slow down the testing iteration.

Testing has shown that RPi4 performance may not be enough when investigating signals for special uses cases that require multiple SDR devices. In those scenarios it may be better to run SDR headless servers on RPi3 B or better platforms each with their own SDR device. The SDR GUI client on a laptop or its own platform.

This laid the groundwork in porting everything into Ubuntu 20.04 for use on more potent hardware since it is available for Raspberry Pi as well. Porting to Ubuntu 20.04 also meant I could iterate through testing faster by building/destroying virtual machines instead.

Early Releases

The discussion and work to date have culminated into the following projects.

  • SIGpi. SIGINT platform for RPi4
  • SIGdeb. SIGINT platform for Ubuntu 20.04 and Debian based systems

With the exception of the workshop materials, the other two repos are early days still implementing and testing lessons learned with the SIGdeb repo as of this writing the furthest along.

Summary

If your a beginner in SIGINT and your use case is education, experimentation with well known signals, and new to contests, then adding a bunch fo RF packages from your favorite distro should suffice. But as your experience grows and you develop an affinity to certain types of signals you will find that you need to be selective in the tools you choose and your system optimized for their performance. You will also gain an appreciation for building/using the proper antennas for various signals and perhaps once you've mastered a tool like SDRangel or SDR++ get into better understanding GNU Radio.

What about Windows? There are a range of low cost PC sticks comparable to RPi4 in "price-for-performance/features." Referencing the architecture, I plan to do some testing with a Windows PC stick running Windows 10 on an Intel Atom x5-Z8350 with 4GB RAM, HDMI, Bluetooth, dual-band Wi-Fi, and USB 3.0. Subject for a future article.

73,

- Joe, NE2Z





Saturday, March 14, 2020

HASviolet: Pi Power Considerations

COVID-19 ham radio

To help celebrate International Pi Day,  the HVDN team would like to share a tiny preview related to our HASviolet project we were expecting to release at the WOPR Summit later this month.

Unfortunately, the blasted COVID-19 virus forced the event to be rescheduled for September 18th to 20th, but we are keeping our project goals on track for release since we have even bigger plans for HASviolet for the rest of the year!

What is HASviolet?

Our project goal was to create an educational platform involving (H)ardware selection, (A)ntenna theory and (S)oftware involving LoRa communications as well as other FSK, GFSK, MSK, GMSK and OOK modulation method applications in the future.

The letters in the word "HAS" may make more sense now, but the color "violet" needs a little more explanation.

We want to promote the use of  900 MHz and above spectrum for both amateur radio and "IoT" hobbyist use so we chose the frequency of 911.250 MHz as our initial project center frequency and namesake.

The HEX value of 911250 is a nice shade of purple and hence, how we came up with the second word in our project name - violet!

Our hopes are that this frequency can become the epicenter for amateur radio experimentation involving LoRa in the United States.

Hardware needs power! 

Releasing this article "just after"  March 14th (AKA "Pi Day") should make our readers guess that our HASviolet project involves the popular Raspberry Pi embedded computer and indeed it does!

You need to have reliable and stable power  for all Raspberry Pi projects and that is what this article will talk about, but just in the context of the Raspberry Pi Zero Wireless device since that is what we are using as part of  the HASviolet project.


Plug in the wall options

The "current" requirements for a Raspberry Pi tend to be at least 2 amps of power and it is advised to use a mains power supply rated at least for 2.5 amps.

Reliable sellers such as Adafruit, SparkFun, MicroCenter, Fry's and even Best Buy or Barnes & Noble in the United States have already ensured what they sell will provide the best user experience.





However, it is a good idea to be cautious when making a purchase online via websites like Amazon or E-Bay since sometimes it is harder to know what you are buying from online sellers.  The best price does not always guarantee the best product!

Here is a list of HVDN approved AC mains 2.5+ amp power supplies from select sellers who sell both online as well as through traditional stores you can visit:


USB power bank options

A USB power bank is probably one of the best options to power your Raspberry Pi project since you can charge them for portable use by using your plug in the wall adapter or even charge them from any USB port such as one found on any computer.

  • You do need to be sure that your power bank is capable of outputting over 2.0 amps of current on at least one of the USB output ports.
  • Some USB power banks will indicate this clearly, so be careful about what you purchase.
  • A minimum 10,000 mAh capacity power bank is recommended, but 20,000mAh is better.

Higher battery capacity means longer run times. If you plan to travel by air, there is a limit on how large of a power bank you can take with you. Please check airline or local government regulations for details.

In the United States, the FAA sets the appropriate restrictions which the TSA is responsible for enforcing.

In order to match your Raspberry Pi, you will also want one with the USB micro connector rather then the newer USB-C connector so you can use your existing wall mains supply to run your Raspberry Pi directly or to charge your power bank.

Here are three common options to consider purchasing:


HVDN Recommended Option 1: INIU 20000 mAh with  3.0 A output plus USB micro and USB-C input via Amazon.com


ham radio amateur radio HASviolet


HVDN Recommended Option 2: USB Battery Pack for Raspberry Pi - 10000 mAh plus dual high current USB

ham radio amateur radio HASviolet




















HVDN Recommended Option 3: Baseus PPDMNA USD PowerBank - After extensive research by one member of the HVDN team, this power bank has proven a good value for the money and comes in different colors. This power bank is also very thin. It can also be shipped from different countries for no extra cost.

This power bank offers true USB-C standard for both charging or output.  A micro USB connector for charging is included alongside the standard USB connector to power external devices.


HVDN USB Power Bank Recommendation

There are far too many power bank options available today and we are only sharing three options.

Our recommendation is option 3 based on price and feature set plus you can even get it in pink or blue aside from the usual black or white colors.

Option 1 is great if you need higher capacity and fancy display plus two USB outputs.

Option 2 is is worthwhile if you are looking to add items to your Adafruit shopping cart, who is one of the main suppliers of components found in the HASviolet project you will be able to learn about later this month (Spoiler: Saturday March 28th at 9:11 AM)

pHat Power Options

Modular boards that have the same foot print and 40 pin connector that matches the Raspberry Pi are often referred to as a hat or pHat. A pHat can go under or on top of a Raspberry Pi when using the correct 40 pin connector.

Example of a pHat by pimoroni.com and sold by Adafruit.com.
The EnviroPhat is a collection of sensors with more detail found here

There are many pHat's available for different tasks, but only a few made that can provide a reliable portable power supply.

Here are some options with commentary on ones designed to work with a Raspberry Pi Zero.

pHat Power Option 1:  PiZ-UpTime 2.0 - Not to be confused with the original PiZ-UpTime which only ran on a single 14500 LiPo battery.

The new 2.0 version offers no such restriction and also adds better external on/off control, power in and power out connections along with a fuel gauge to safely power down your RPi when the battery reaches a low amount.

Further details here. The second picture is the first generation PiZ-UpTime for comparison and is not recommended.


Genuine PiZ-UpTime 2.0 
Here is the original PiZ-UpTime for comparison and to show the genuine product compared to imitation copies mentioned later in this article.



pHat Power Option 2:  PiSugar Portable Power Platform - Some members of the HVDN HASviolet team like this product because it is open source as evidence by its Git Hub project page and its overall set of features.

There are two different side batteries available that are the same size of the board and RPi Zero.  A nice feature is a built in visual battery capacity meter via 4 blue LED and the use of the power pads on the bottom of the Raspberry Pi Zero. The PiSugar can also function as a UPS.

3-D printer files are even available to help create different cases easily or to modify for your own use.

Both the 900 mAh and 1200 mAh versions can be purchased via Amazon.com.  The only only drawback of the PiSugar is the small size of its battery which will limit run time compared to a larger power bank.

One member of the HASviolet team has used the 1200 mAh version of this product and easily got 5 hours of continuous run time while running the "beacon" mode of our project with a transmit interval of once every 5 seconds.



pHat Power Option 3:  Generic UPS Power HAT  - There are many generic UPS power hats available for the Raspberry Pi Zero and we have only tested two.

The first one was a generic version of the PiZ-UpTime original product and was a waste of money.

A few years ago, a counterfeit version caused a fault with a Raspberry Pi Zero and was unable to be used for anything else ever again, including the RPi Zero! Please avoid purchasing this product!


The second generic UPS pHat worked much better but only lasted about an hour which was strange considering the PiSugar worked for much longer with a not much larger battery. This one also uses pins from the underside to power your Raspberry Pi.

ham radio amateur radio HASviolet

















What to expect from HASviolet?

We hope this brief article on power sources for the Raspberry Pi Zero has you curious on what are we building for the HASviolet project.

Our team thinks that people will want to use the HASviolet project both at home and while traveling, hence us starting to make sure power solutions are something you are already thinking about.

Between now and Saturday March 28th, we will release some additional articles focused on the antenna part of the project along with details relating to Git Hub and other basic necessities so that you can start putting aside some hard earned money to buy the needed hardware for HASviolet!

Be safe in the meantime if you are under self-quarantine or in areas overly affected by COVID-19.

Thanks!

HVDN HASviolet Team

(Joe Apuzzo N1JTA,  Steve Bossert K2GOG & Joe Cupano NE2Z)



Sunday, June 3, 2018

MMDVM JumboSPOT board: Mods you may need



This is the JumboSPOT board that was/is sold on ebay and other online places. This board along with a Rasberry Pi Zero and a SD card loaded with PiStar makes up a Digital Radio Hotspot.

Depending on when you purchased your board and for what price, you may need certain modifications. The following mods have ONLY be tested / verified on the above board. As with anything in life, you take on the risk and responsibilities of preforming these mods. If you don't know what you are doing, STOP and don't do it!

Antenna mod

If you installed the SMA connector at P3 and plan to use the included SMA external Antenna you need to remove the cap ( see A in above picture ). This removes the connection to the internal ceramic Antenna ( not shown about ) at AE1. Bottom line is that you should not run two Antenna's so removing C28 makes sure that only Antenna is P3.

Flash FW mod

Most early boards shipped with only the 10 pin connector soldered as in the above picture. This meant that you were unable to flash updates to the STM32A103 microcontroller chip. Thus the two pins in the above picture ( marked B and in the red rectangle ) need to be connected to the Rasberry Pi's GPIO pins 20 and 21 which will be right below them.
It is a direct pass through, NOT a jumper as most people assume. So you just need to add a female header to your JumboSPOT board and a male header to the Raspberry Pi. Current boards place a 10 pin female header on both sides of the JumboSpot, which will work, but only thoes two pins are needed. Once the pins are connected you will be able to use the PiStar Firmware update script to update your JumboSpot to the latest version of HS_HAT which is displayed on the PiStar admin page.

OLED display mod

If you just purchased the JumboSPOT board it most likely did not come with an OLED display. You can add one later on if you like. Just look for " 0.96" I2C IIC SPI Serial 128X64 White OLED LCD LED Display Module for ArduinoG9K " or similar. The display gets connect to the top row in the above picture ( refrence "C" ) and not the bottom row that is marked. The main issue is that the pins must match the board pins which are listed above. From left to right they are [3.3v] [GND] [SCL] [SDA] So since you solder the display so that it's facing out the screen you purchase should match that config like so:
 I was able to find this module for 450% less then the ones listed as compatible to the JumbSPOT so don't get fooled by the seller, you can use compatible modules as long as it has the correct pins and supports "I2C IIC SPI Serial". Also note that the display will NOT turn on unless you have it configured and PiStar attaches to a server on the Internet ( as in Brandmister etc ). In PiStar http://pi-star.local/admin/configure.php make sure you have it configured as in:




Adding Ethernet to your Pi Zero mod

This one requires no-soldering! Just chose the correct part from eBay or your favorite Chinese vendor. The PiStar distribution will support an Ethernet adapter out of the box. It's even smart enough to use Ethernet over WiFi and fall back to WiFi if Ethernet fails. But which one to get. If you search for "MMDVM Hotspot Ethernet Adapter" you will be paying the most you can pay. If you look for "Micro USB 2.0 to Ethernet 10/100 RJ45 Network LAN Adapter" you will find ones EIGHT TIMES less! Make sure that it supports Linux and you will be safe. Also I suggest getting one more then you need. When I ordered three, only two worked. Since I only needed two it was worth buying extra ( these parts are really REALLY cheap and cheaply made ).

What do you think?

Please leave constructive comments. If you have mods of your own please share. Like most of you out there I was attracted to this hobby because I could MOD things, make them better! So pitch in and share your knowledge!

Saturday, March 17, 2018

Preliminary Review: Raspberry Pi 3 Model B

The Hudson Valley Digital Network aims to provide early reviews of various devices that may be of interest to amateur radio and electronic enthusiasts in and around the Hudson Valley of New York

The somewhat ubiquitous Raspberry Pi single board computer has a new model available called the Raspberry Pi 3 Model B.

The major differences between the regular Pi 3 and the new Pi 3 Model B include:


  • Added 5.8 GHz Wi-Fi in addition to the 2.4 GHz as found in its predecessor
  • Processor upgraded to the Quad Core 1.2GHz Broadcom BCM2837 64bit CPU
  • Broadcom BCM43438 WLAN includes Bluetooth Low Energy (BLE) on board
  • Wired Ethernet increases it true life throughput to 300 Mbps
  • Addition of a header to support power over Ethernet add on boards/hats

Exciting applications for ham radio

Excitement #1:  The addition of faster Ethernet and how it is implemented on the raspberry pi 3 model B may create all sorts of remote radio head applications such as a variety of software defined radio (SDR) use cases that have been constrained in the past due to the 10/100 Mbps speed limitations in prior Raspberry Pi versions. Actual throughput on the model B may reach up to 300 Mbps instead of the average 30-60 Mbps on prior models.   What is interesting is that the model B is not touting actual gigabit ethernet, but this still means the Ethernet upgrade is a good step forward and still keeping the cost down to $35 at launch time in late Q1 2018.

Excitement #2: Adding in a header for power over Ethernet support is interesting and is likely just tapping out pins 4, 5, 7 and 8 on the Ethernet port. This may frustrate some people, but it should allow for more flexibility.  In comparison, the GL iNet AR-150 has supported add on power over Ethernet which lets the user decide how they want to power the device remotely. For the Raspberry Pi 3 Model B, the user may explore powering the pi from as low as 5 volts and most likely, 12, 24 or 48 volts. 

The only problem potential is that the positioning of the header pins may get in the way of certain add on boards, but it looks easy to design into many projects and should be a non issue.  Power over ethernet will also allow more remote radio head applications when using higher frequency applications involving software defined radios.  Being able to eliminate antenna feed line loss where possible is always a good thing and the PoE edition was a smart one to make without greatly increasing costs. 

Excitement #3:  Increased wireless connectivity through the addition of 5.8 GHz and bluetooth low energy (BLE) will expand the usefulness for many applications, possibly including mesh applications. 


Processor Upgrades

With faster processor power comes increased power consumption which may limit the model B for full time powered operation compared to remote battery operation.  The increased processor speed and quad core architecture will enable more intensive  loads such as higher bandwidth SDR and various digital voice applications related to DMR, NXDN and P25. 

Discuss your next Pi project?

Have a look at the HVDN Activity calendar for related moderated discussions around computing and embedded computing to find out where others may be talking about the Raspberry Pi 3 Model B in the coming weeks. 


If you know of additional discussions taking place not already listed on the calendar, please make a suggestion to have something added.