From Stu2
Jump to navigation Jump to search

I'm working on a couple of projects to make the SDR more productive for the VHF contests.

N1MM Network Protocol

I used wireshark to sniff the N1MM network protocols. N1MM uses UDP. So it's possible to emulate a N1MM station and exchange 'instant messages'. For example, it's possible to parse APRS data and send messages to the operators via N1MM.

TALK%[STA2] Passing WA0DYJ on 432000.0%~

STA1 (			STA2 (
ECHOREQ%2008-07-22%19:43:11%~   ECHO%2008-07-22%19:43:11%~
STATUS%0%43200000%0%W4IY%0%0%%~ ECHOREQ%2008-07-22%16:43:10%~
ECHO%2008-07-22%16:43:10%~      STATUS%1420000%1420000%-1%W7IY%0%0%SB%~

Start up sequence
STA1 (			STA2 (
ECHOREQ%2008-07-22%19:46:42%~	ECHOREQ%2008-07-22%16:46:41%~
ECHO%2008-07-22%16:46:41%~	ECHO%2008-07-22%19:46:42%~
LASTQAT%2008-07-19 23:46:42%~	FREQ%1420000%~
				LASTQAT%2008-07-22 23:45:59%~
CHECKSUM%2008-06-29 18:00:22%2008-07-22 23:46:42%1273027086%FD%~
				TALK%[STA2] My contest: DX, yours: FD%~

Exchange ECHOREQ/ECHO with each station in the group.

Send UDP packet to port 12056

Enter az in entry window, press Alt-J

N1MM and the Flex 5000A or Flex 1500

Using N1MM and PowerSDR for CW and SSB contesting. You need the following:

  • PowerSDR (Flex 5000A or 1500)
  • N1MM
  • Virtual Audio Cable (VAC version 4.09, not 4.10)
  • N8VB Virtual COM port software (or com0com or VSP Manager - VSP Manager for Windows 7)
  • Windows XP (updated for Windows7)

Using a Single COM Port

The following article shows you how to use a single COM port to take care of both the CAT and keying controls. Note, I had to restart N1MM after I made the configurations as per the article. However - if you get stuck and need to separate out the control signals, the method described in this wiki may be helpful. The audio configurations in these pages are still valid.

Getting Ready

VAC provides virtual cabling between the Flex 5000A and Windows. Use the control panel in VAC to set up two cables. They are generic, use the default. When you're done, you'll have two virtual audio cables that we will use like this:

Windows -> Cable 1 -> Flex    TX audio to the Flex
Windows <- Cable 2 <- Flex    RX audio from the Flex

Install N8VB virtual COM driver, enable the virtual connections like this:

COM6 -> COM16   -   use for CAT control
COM7 -> COM17   -   use for CW
COM8 -> COM18   -   use for PTT (Not sure about this)

I was NOT able to use the same port for the CW and CAT. For the VHF contests, I used COM1 with the Flex 1500 (not 5000A) to key an external sequencer. The sequencer handles keying for the preamp, transverter (Elecraft) and Flex 1500. A footswitch and COM1 are inputs to the sequencer. The COM ports are only representative. You need three pairs, one pair for CAT control, CW and PTT. N1MM only allows COM1-COM8, so plan accordingly.

Flex 1500 Update May 2011

Flex fixed the two main bugs, which makes this work around obsolete! The delay on the PowerSDR antenna form now delays the internal Flex PTT from the PTT IN signal. It also uses the delay with the CAT PTT. This allows the sequencers to switch before the RF appears. Second, CW is fixed and works great! You can key the rig via N1MM without a winkey box.

You may want to refer to the overall system diagram. [PNG]

The only drawback is FLEX didn't give us a way to set the drop delay. The PTT delay is applied to the tail. Meaning, the hardware PTT won't drop until after the delay. Since I use the hardware PTT to control the sequencer, the sequencer can't start until after the delay. This adds an unnecessary delay when switching from TX to RX. On the plus side, the conifguration is fine for driving an external amp because you want to drop the RF first, then drop the AMP so you don't hot switch.

Bottom line - don't need this stuff in the next section below anymore!

--Stu2 16:57, 15 May 2011 (EDT)

Flex - Old Info Regarding Sequencer

We plan to use the Flex 1500 to feed a transverter for the upcoming ARRL September VHF contest. As of Sept 2, 2010, the Flex 1500 has a bug that doesn't allow a delay on the flexwire PTT out. Additionally, there is no way to delay the internal PowerSDR TX from the external HW or CAT PTT inputs. (Missing feature) Protecting our mast mounted preamp is my main goal and I need to switch things from two inputs. (N1MM and a footswitch.)

My solution was to modify my homebrew sequencer to accept two inputs; one from the computer's COM port RTS line and one from my footswitch. The sequencer handles the proper switch timing for the preamp, transverter and rig. The transverter switches the power amplifier. I had to choose this method because PowerSDR doesn't delay the actual internal PTT from the hardware PTT. For example, if I keyed the rig directly with footswitch, I can't delay PowerSDR TX until the external sequencer finished. Transmitting RF before the preamp switches out of RX mode would destroy the preamp.

If the delay was sufficient to allow the preamp to switch out, then I would be able to key the rig directly with the footswitch and let the rig key the sequencer. (Note the Kenwood TS-2K allows you to set this internal delay to 20ms.) This would be the simplest configuration. There may actually be enough delay due to the PowerSDR's latency, but I didn't measure it and I didn't want to depend on the preamp relay winning the race.

The rig can be keyed from N1MM via the CAT commands. In fact, it must be keyed via the CAT command to allow the DVK functions to work when I use the footswitch as an input to the sequencer. This means I need to use COM1 to key the sequencer. (I can't use the rig output, because that causes a feedback loop. Sequencer keys rig, rig keys sequencer.) Using a COM port pair from N1MM doesn't allow the audio to come from N1MM for some reason. (If you uncheck the Allow VAC to override button, then N1MM DVK works, but the footswitch ceases to function.)

If the rig is keyed directly from the footswitch (internal delay still an issue) AND the sequencer is keyed from the rig - then a COM port pair in N1MM will work fine. The CAT commands work, too. However - since this is confusing - just key the rig from N1MM using CAT commands!

Therefore, I configured N1MM to key both the CAT PTT and COM1 PTT. Since I can control the DVK/CW keyer start-up delay, I can ensure there will be enough time for the preamp to switch out.

The flex 1500 also has a known issue with CW, but an external WinKey will work fine. I set it up on COM6 (arbitrary port #). Configuring the Winkey is not so mysterious and the PTT set up as described above will work fine. Just make sure you add the start up delay to account for the sequencer timing.

As mentioned above, the ideal configuration for VHF/UHF work would use two PTT outputs, with settable delays from the input PTT (CAT or hardware) and the internal PowerSDR TX PTT, plus a settable delay between the input PTT and the output PTTs. That way, we could let the software handle the entire sequencing job. Since the 1500 only has a single output, I think we are stuck with an external sequencer for the preamp.To further simplify, we really need that settable delay between the 'master PTT' and the internal PTT.

Of course, if you are using the 1500 for HF and only need to key an amplifier, then the single PTT OUT is fine. In this case, the delay between PTT IN and PTT OUT would be handy to ensure the rig TX stops before the amp is switched out.

Setting up the Audio

In Windows:

Start, Settings, Control Panel, Sounds and Audio

Sounds Tab: Make sure sound scheme is set to none (nothing selected) otherwise, 
you'll have 'dings' mixed in with your TX audio. ;)

Audio Tab:
Sound Playback: Virtual Cable 1   (This is TX audio going to the Flex)
Sound Recording: Virtual Cable 2  (This is RX audio coming from the Flex)

Note - change the windows settings first because the settings in the audio tab of N1MM will change back to the defaults.

In the PowerSDR:

Setup -> Audio -> VAC

Under Virtual Audio Cable Setup Box
Driver: -> MME
Input: -> Virtual Cable 1
Output: -> Virtual Cable 2

Set the buffer size to 2048 and the sample rate to 44100
Check Allow PTT to override VAC for PHone

I had to set the sample rate to 44100 for another program. I don't think this is critical. VAC seems to be able to translate between sample rates, but I set them both the same.

In N1MM 11.6 (the options seem to change from version to version)

Config -> Config Ports, Telnet Address, Other -> Audio Tab

Select # 1 - One Radio, No Sound Card SO2R
Select Output Device: Line 1 (Virtual Audio Cable)
Select Port to Mute: N/A
Select Message Recording Device: Line 2 (Virtual Audio Cable)
Select Message Recording Port: Line 2
Select QSO Recording Device: Line 2 (Virtual Audio Cable)
Select QSO Recording Port: Line 2
Recording Channels: 1
Recording Bits: 24
Recording Sample Rate: 44100
Max Recording Length: 30

I was able to use the windows recorder (start/accessories/entertainment) to verify the audio was being recorded.

Update June 2011 - Flex 1500 and Windows7

Windows 7 (64-bit) is working with the Flex 1500 now. For whatever reason, the microphone is now muted during N1MM DVK playback. Setup VAC 4.09 as above, except change the sampling rate to 44100 in Flex VAC panel. In N1MM:

In Windows7, I made sure Virtual Line 1 and Virtual Line 2 were enabled in both playback and recording. For playback, Line 1 was set for default. For recording, Line 2 was set for default.

Note, it is possible to record a WAV file for the DVK. Turn on the Flex monitor button, press the PTT switch, then in N1MM press CTL-SHIFT-Fx and record. When finished, press CTL-SHIFT-Fx again.

Setting up the CAT, CW and PTT

In the PowerSDR:

Setup -> DSP -> Keyer
Under the connections box,
Primary: 5000 (uses the key jack on the back panel)
Secondary: COM17
Key Line: DTR

Setup -> CAT Control
CAT Control box
Uncheck Enable CAT - so you can make changes
Port: Port COM16
Baud: 57600
Parity: none
Data: 8
Stop: 1
Check Enable CAT

Under PTT Control:
Uncheck Enable PTT
Port: COM18  -> Note, under N1MM, I set use CAT command for
    PTT. This must be enabled for the N1MM audio to work.
check RTS
Check Enable PTT

Then, in N1MM:

Config -> Configure Ports, Telnet Addresses, Other -> Hardware Tab

For the Flex 5000A:
COM6: Kenwood   Set: 57600,N,8,1, DTR=Always Check: Radio PTT via CAT command (this keys the SDR)
COM7: Check CW/Other  Set: DTR = CW, RTS = PTT, Allow external Interrupts, WinKey = unchecked
COM8: Check CW/Other  Set: DTR Always on, RTS = PTT

For the Flex 1500:
COM1: DTR=Always, RTS=PTT - this keys the sequencer via an open collector transistor.
COM6: Kenwood   Set: 57600,N,8,1, DTR=Always Check: Radio PTT via CAT command (this keys the SDR)

Using the Configuration

You should be able to run N1MM and PowerSDR together. The frequency and mode should appear in N1MM and you should be able to change modes by entering something like "USB" in the call sign entry window. If this doesn't work, then check the CAT settings.

For CW, enter CW in the call sign window, press ENTER and the Flex will switch to CW. Press F1 and check the transmission. (Should key the rig and send the F1 message.)

For SSB, double check the messages and make sure you have the directories and files set up correctly. Use Ctrl-O to change operators. Note, this usually means there must be a directory and corresponding file to store the WAV files recorded by the operator.

Ensure the VAC button is on
Ensure the MON button is on in PowerSDR

Press the foot switch - should key the rig
Check 'GATE' and set the threshold (neat feature)
press SHIFT-CTRL-Fx to start recording
press SHIF-CTRL-Fx to stop recording
Release the foot switch

press Fx to play the message

Note, there is a delay between your voice and the monitored audio. N1MM is recording the monitored audio, not the microphone audio. Since this uses the audio card in the flex, where the mic attaches, I don't think there is a way to record the audio directly from the mic. Perhaps a more complicated set up, which uses the sound card in the computer?

VFO Knob - Software Solution

Note - I found this neat utility, which allows you to use the wheel in a mouse to send tuning commands to the Flex. While a knob still seems favorable to me, this gets the job done nicely.

Here is a link to the e-mail, with instructions:

Here is a link to the file:

Turn on the scroll lock and the num lock. The following commands will go to Flex.

- mouse wheel roll and click
- ctrl+arrow keys (up/down=tuning, left/right=sets tuning step)
- NumPad 9/3 = Band Up/Down
- NumPad 8/2 = Filter Up/Down
- NumPad 7/1 = Mode Up/Down

I'm still looking for a Griffin Knob equivalent. (I think one could build a C# program combining the HID stuff from Microsoft with the concepts from the HotWheel program. This would be more effective than building yet another hardware interface using PIC controllers. Incidentally, it seems like this could be built into the PowerSDR program. I have no idea why it isn't.)

Update: 11/08 - I used the SDR-5000A and the above program during the 2008 ARRL CW SS contest. It worked great! I searched and pounced the entire time and ended up with 441Q's and 78 Mults. The point and click feature of PowerSDR was nice and the filters were awesome. Too bad K3AN (and maybe others) beat me. Guess I need to call CQ more often and stay on the low bands longer.