SDR Panadpter, logger, and skimmer

With a TenTec Eagle transceiver, Managed by N4PY software.

n4py-diagram

http://www.n4py.com/

N4PY acts as router, distributing CAT commands to other applications.

The applications are connected using virtual serial port bridge pairs. For each of the applications, N4PY emulates a K3 transceiver on one side of the bridge.

  • Panadapter: NAP3
  • Logger: N1MM
  • CW Skimmer

The CW keyer is a K1EL Winkeyer USB controlled solely by the N1MM logger.

The routing of IQ signals from LP-PAN2 SDR is done through a MOTU 828 mk3 interface, simply to be able to split the signal so that both NAP3 and CW Skimmer can use it.

CW Skimmer gets the IQ signal directly from the MOTU. NAP3 doesn’t not recognize multiple ports on soundcards. So one end of the split from the MOTU is sent through another audio interface (Focusrite 2I2). NAP3 uses the 2I2 as an input device.

LP-PAN frequency adjustments

Notes on configuration for correct zero-beating.

When setting the Eagle BW or PBT, the IF will shift in frequency, so the numbers below assume a centered PBT and a BW of 700.

The sidetone pitch is 523 Hz.

Settings may also depend on which roofing filters are installed in the Eagle.

NAP3 settings

Set the global offset to -8200. Leave everything else at 0.

CW Skimmer settings
  • CW pitch: 523
  • Audio IF: -7520
  • Sample rate: 96 kHz
  • Hardware: SoftRock-IF

This post is about ham radio.

SQLite database for remote radio in Max

under construction…

Max/MSP features a full implementation of SQLite using the js (javascript) object. Here we describe a database to track radio frequencies. Frequencies are stored by time, type, and mode. The frequencies can be retrieved in various ways, like with a scanner radio.

Tables can be created and maintained outside of Max using the command line (sqlite3) or database apps like SQLiteStudio.

Max patches:

(not yet available on github:

  • freqdb4.maxpat (database UI)
  • swBase3.js (SQLite code)
  • lp_radio2.maxpate (Launchpad)

DB structure:

The database is called newtestDB1

tables:

You can see the table schema in the screenshots. The tables were created using command line sqlite3 and SQLiteStudio.

freq table:

One record for each stored frequency. This table retains its state from each previous use, but new records can be added using the Max patch, or the Launchpad.

Screen Shot 2016-04-05 at 11.00.31 PM

xtime: Timestamp in UTC.

frequency: Hz.
mode:

  • usb: 0
  • lsb 1
  • cw 2
  • am 3
  • fm 4

filter: bandpass filter setting in Hz. (default is 6000)

typecodes:

0 : unknown
1 : AM/SW broadcast
2 : clock
3 : digital mode
4 : local broadcast
5 : mostly noise

zone: cq zone number

rating: 0-5 (0 = unrated)

confidence: 0-5 (0 = unknown)

tags: (general text notes)

preset table:

The preset table contains one record for each 8×8 launchpad button, for each of 3 screens.

  • screen 0: fixed presets (red) (static and persistent)
  • screen 1: time presets (green) (rebuilt with each time query)
  • screen 2: user presets (yellow) (persistent but can be modified using the Launchpad)

Data from each of theses screens is also displayed in jit.cellblock objects in the Max patch. All of the fields correspond to the fields in the freq table – except for screen, row, and col which are locators for the launchpad.

Screen Shot 2016-04-05 at 11.11.08 PM

Using the database

Launchpad presets

There are three screens of presets color coded using the Launchpad mixer button (upper right). Press it to cycle through the 3 screens.

0 fixed presets (red)

The fixed presets are static. But can be changed using SQLiteStudio. They contain commonly used radio frequencies, like the SW, Ham, and CB bands. And clock stations.

To select a preset, press its button on the Launchpad.

Currently assigned presets:

Screen Shot 2016-04-05 at 11.39.12 PM

1 Time Presets (green)

Time presets are frequencies with Timestamps that match a selected range. For example, every frequency within one hour of the current time. These can be selected with a query in the Max patch, or using default values from the Launchpad. The query will randomly match up to 64 records. If the query returns less than 64 records, you will get all matching records, but in random order.

From the Max patch:

Match hours plus/minus current time (0-12).

Type the number of hours in the number box and press the button under the delay object. This reloads the presets.

Screen Shot 2016-04-05 at 11.36.35 PM

You can view the results in the jit.cellblock:

Screen Shot 2016-04-05 at 11.39.07 PM

 

Match a specific time range:

Enter the start/end times and press the button.

Screen Shot 2016-04-05 at 11.40.51 PM

 

Selecting from launchpad

trk button: re-runs query using last set number of hours plus/minus current time. Default is one.

solo button: select one random preset using current hour range, and play it?

 

User Presets (yellow)

The user presets work like the pushbuttons on a car radio. Press to select. Hold to save the currently tuned radio frequency.

The learn button (upper left) gives feedback. If you press a pad for which no frequency has been assigned, the learn button will flash red. When you save a new preset, the learn button flashes green to indicated that the saving is done. If you press a pad for a preset that has already been saved, there will be no flash, but the radio frequency will change.

Adding new frequency records

You can add records using the Max patch or the Launchpad, or from SQLiteStudio.

Adding records from Max:

Tunning the radio fills in all of the fields except for typecode. Tune the radio. Then press one of the typecode buttons. Then press the big green button. You have added a new record.

Screen Shot 2016-04-05 at 11.55.57 PM

 

Adding records with Launchpad:

Press the Arm button (lower right) to add a record for the currently tuned frequency, using an ‘unknown typecode’

Adding records from SQLiteStudio

Just do it.

Remote radio – client

How to set up the client side of the remote radio system.

(under construction) patches have not been uploaded to github

This client works with the sever described in the previous post. We are running a MacBook Pro OSx 10.11.4. with the following:

  • logmein hamachi VPN
  • Soundjack VOIP
  • Max/MSP
  • Novation launchpad
  • DJ-Tech CDJ-101 controller

VPN

Install and set up LogMein Hamachi. It is free, for a limited number of computers.  Set up a Hamachi server on both the server and client. It should look something like this:

 

VOIP

We are using Soundjack VOIP. It is also free. Use the following parameters on the client side.

  • mic: soundflower 2ch (or something that is not currently producing input!)
  • headphone: default output (or whatever you want to listen on)

Screen Shot 2016-04-05 at 12.23.54 AM

You can ignore the rest of the settings, since we are not sending audio. Most of the configuration is done on the server side.

Max

We are using several patches, depending on which hardware controllers you are using. Make sure that the hardware controllers are connected before opening Max.

patches:
  • eagle-ui5.maxpat – User interface and main entry point for client communication and CDJ-101 abstrations

Screen Shot 2016-04-05 at 12.28.56 AM

  • freqdb4.maxpat – database handler

Screen Shot 2016-04-05 at 12.29.17 AM

  • lp_radio2.maxpat – launchpad driver

Screen Shot 2016-04-05 at 12.28.41 AM

After the max patches are loaded, you should be able to control the radio using the UI and the CDJ-101 controller. The red Mixer button in the upper right corner of the Launchpad should be lit.

Instructions:

to be continued…

Remote radio – server

How to run the server side (base station) of the remote shortwave radio system.

(Under construction) The patches have not been uploaded to github yet.

Assuming that the radio and antenna system are operating. We are using an internet connected MacBook Pro running OSx 10.9.5, with a MOTU 828 MK3 audio interface.

VPN

Install and set up LogMein Hamachi. It is free, for a limited number of computers.  Set up a Hamachi server on both the server and client. It should look something like this:

 

VOIP

We are using Soundjack VOIP. It is also free. Use the following parameters on the server side.

Local Settings:
  • mic: audio interface channel that is connected to radio audio output
  • headphone: doesn’t matter
  • volume: 0
  • audio block samples: 512
  • channels: 2
  • network packet samples 512
  • quality: high
  • userlist: manual

Screen Shot 2016-04-05 at 12.38.03 AM

User list:

UDP/IP: enter hamachi IP of client.

When Soundjack is set up on the client. Press the green start button on the right side of the user list window on the server.

If all goes well, you should hear the radio on the client. Note: The input meter under local settings should be registering audio from your radio. If not, there is a problem with the audio interface.

Max Server

The Max/MSP server exchanges CAT commands via the server serial port to the radio. The command data is exchanged with a Max patch on the client using OSC (over UDP).

Screen Shot 2016-04-05 at 12.46.02 AM

patch:

eagle-cat8.maxpat

instructions:
  • select the radio serial port from the menu (for example: usbmodem 14531)
  • initialize port settings
  • set toggle to poll the serial port

At this point you should be able to try the example commands, for instance to get the version or set frequency. If the commands are not working, it indicates a problem with the serial connection to the radio.

Next, check the IP address of the udpsend object. It should be the hamachi IP of the client.