Loading...
 

3.5 External UDP Broadcasts

External UDP broadcasts pass information from N1MM Logger+ about the contest in progress to various third-party software programs. UDP broadcasts stay in the same network (same subnet) and cannot be broadcast directly over the Internet.

There are additional UDP broadcasts built into N1MM Logger+, which are sent by default, but (except as noted) they are not very useful for general users. One example is the real-time score reporting application.

 A note to software developers

Vasily K3IT has found that if both SO_BROADCAST and SO_REUSEADDR options are used when a UDP port is opened, it is opened in a 'non-exclusive' mode. This allows multiple applications to share the same port, as long as they all follow this method. Using these flags helps avoid port conflict issues.

File not found.

To enable external UDP broadcasts select >Config >Config Ports... >Broadcast Data.

1. Selecting which UDP Broadcasts to Send

Checkboxes Explanation
Application Info Broadcasts information about the station and the current contest (station name, contest database, contest name...) when the program launches, when a new contest is opened, or when a different contest is selected in the Contest Dialog window. See full field list below
Radio Broadcast radio information (mode, frequency, antenna, operator...) at least every 10 seconds or when radio frequency or mode change. See full field list below
Contact Broadcasts contact information (time, callsign, mode, frequency, exchange...) when a new contact (QSO) is added to the log, when an existing contact is edited in the log, or when an existing contact is deleted from the log. See full field list below
All QSOs Broadcast all contact info from all stations on a network from this station. This command is useful only in Networked Computer mode. When enabled (together with Contact) at any station, that station will rebroadcast every contact that it receives to the UDP port specified. The XML format is the same as for Contact except that IsOriginal will be set false. CAUTION: Multiple, misconfigured stations with All QSOs enabled could result in a circular network storm of contact packets.
Spots Broadcast info about spots as they are processed (added or deleted). Spots may originate from telnet (including RBN), from logging QSOs, or from local spots stored in the Bandmap.

2. Setting the Destination IP Addresses

The Application, Radio, and Contact packets will be addressed to destinations indicated in this dialog window. To send them to a program running on this PC, use the address 127.0.0.1. To send them to another PC on this subnet, enter its IP on the corresponding line. To send them to all PCs on this subnet, enter 255 as the last number (octet) of this subnet's address. For example: if PCs on this subnet have the address 192.168.1.n, use 192.168.1.255 to send the packets to all of the PCs on this network. Separate multiple destination IP address from each other with a space. Do not specify 255 in the higher order octets, or you will risk broadcasting to the internet. While eventually the packets will be discarded by internet routers, it will not endear you to your ISP.

3. Setting the Destination IP Port Numbers

The recommended default port number for N1MM Logger applications is 12060. Destination port numbers are defined by adding a colon ":" to the IP address, followed by the port number. For example, to send packets at port 12060 to this PC and to all other PCs on this subnet: 127.0.0.1:12060 192.168.1.255:12060

4. Other UDP Broadcast Settings

Optional External Broadcast statements allow different external broadcast types to be sent to different IP addresses, multiple IP addresses, and multiple port numbers. Refer to the instructions for those applications for confuguration details about adding their packet addressing information to the N1MM Logger.INI file.

5. XML Schema and Broadcast Field Lists

5.1. Application Info

<?xml version="1 .0" encoding="utf-8"?>
      <AppInfo>
            <dbname>SampleLog.s3db</dbname>
            <contestnr>71</contestnr>
            <contestname>CQWWSSB</contestname>
            <StationName>Phone-15M</StationName>
      </AppInfo>

NOTE: contestnr is a unique number assigned to this contest in this database. Do not expect the same contestnr to be assigned to another computer running the same contest name.

5.2. Contact

5.2.1. Contact Info UDP packet

<?xml version="1.0" encoding="utf-8"?>
<contactinfo>
	<contestname>DXPEDITION</contestname>
	<contestnr>10</contestnr>
	<timestamp>2016-04-10 16:17:41</timestamp>
	<mycall>K8UT</mycall>
	<band>21</band>
	<rxfreq>2125500</rxfreq>
	<txfreq>2125500</txfreq>
	<operator>K8UT</operator>
	<mode>USB</mode>
	<call>W2BBB</call>
	<countryprefix>K</countryprefix>
	<wpxprefix>W2</wpxprefix>
	<stationprefix>K8UT</stationprefix>
	<continent>NA</continent>
	<snt>59</snt>
	<sntnr>2</sntnr>
	<rcv>59</rcv>
	<rcvnr>0</rcvnr>
	<gridsquare></gridsquare>
	<exchange1></exchange1>
	<section></section>
	<comment></comment>
	<qth></qth>
	<name></name>
	<power></power>
	<misctext></misctext>
	<zone>5</zone>
	<prec></prec>
	<ck>0</ck>
	<ismultiplier1>0</ismultiplier1>
	<ismultiplier2>0</ismultiplier2>
	<ismultiplier3>0</ismultiplier3>
	<points>1</points>
	<radionr>1</radionr>
	<RoverLocation></RoverLocation>
	<RadioInterfaced>0</RadioInterfaced>
	<NetworkedCompNr>0</NetworkedCompNr>
	<IsOriginal>True</IsOriginal>
	<NetBiosName>DEV-PC</NetBiosName>
	<IsRunQSO>0</IsRunQSO>
	<Run1Run2></Run1Run2>
	<ContactType></ContactType>
	<StationName>PHONE-15M</StationName>
</contactinfo>

NOTE: IsOriginal indicates that this is the station on which this contact was initially logged - to differentiate from another station that may be forwarding the contact record. StationName is the netbios name of the station that sent this packet, not necessarily the name of the station that logged this contact.

NOTE: ''power", "name" and "qth" refer to information about the station being worked in this contact. In a contest where transmit power is part of the exchange, "power" will contain the received power exchange from the other station.

NOTE: It may be tempting to assume that there is a one-to-one correspondence between fields in the contactinfo broadcasts and similar fields in the ADIF specification, but this is not always the case. The best example is the Section field in the contactinfo broadcast; this means whatever the rules for the particular contest define it to mean. In a few contests, the Section field is the same as the ADIF ARRL_SECT; in many more contests and for most geographical locations, it may be the same as STATE in ADIF. However, in some contests for some geographical locations (e.g. Alaska, Hawaii, the District of Columbia, the Canadian Atlantic provinces, Canadian northern territories) the section identifier specified in the contest rules might not match either ADIF field. Another example is the Zone field, which often means the same as CQZ in ADIF, but in some contests it means the same as ITUZ.

5.2.2. Contact Replace

The Contact Replace packet contains the same fields as Contact Info above, but with <contactreplace> XML tags.
IMPORTANT NOTE TO DEVELOPERS: When a user edits an existing contact record, the program will send a pair of UDP packets: A <contactdelete> packet, followed by a <contactreplace> packet. The <contactdelete> packet will contain the existing record's callsign and timestamp, in the event that the <contactreplace> packet includes a new timestamp or callsign for this record.

UDP packet:  <?xml version="1.0" encoding="utf-8"?>
<contactreplace>
	<contestname>DXPEDITION</contestname>
	<contestnr>10</contestnr>
	<timestamp>2016-04-10 16:17:41</timestamp>
	...
	<StationName>PHONE-15M</StationName>
</contactreplace>

5.2.3. Contact Delete

UDP packet:  <?xml version="1.0" encoding="utf-8"?>
<contactdelete>
	<timestamp>4/10/2016 4:17:41 PM</timestamp>
	<call>W2BBB</call>
	<contestnr>10</contestnr>
	<StationName>RUN-PC</StationName>
</contactdelete>

5.3. Radio Info

UDP packet:  <?xml version="1.0" encoding="utf-8"?>
   <RadioInfo>
      <StationName>CW-STATION</StationName>
      <RadioNr>2</RadioNr>
      <Freq>2120000</Freq>
      <TXFreq>2120000</TXFreq>
      <Mode>CW</Mode>
      <OpCall>PA1M</OpCall>
      <IsRunning>False</IsRunning>
      <FocusEntry>12170</FocusEntry>
      <Antenna>2</Antenna>
      <Rotors>tribander</Rotors>
      <FocusRadioNr>2</FocusRadioNr>
      <IsStereo>False</IsStereo>
      <ActiveRadioNr>2</ActiveRadioNr>
   </RadioInfo>


Radio Info Notes:

  • StationName is the NetBios name of the computer that is sending these messages. It is the name used in Mulit-Computer networking. Windows limits it to 15 characters. If the computer name is greater than 15 characters long, the first 15 characters will be used.
  • RadioNr is the radio number associated with a specific XML packet - in other words, the source of the information in that packet. When in SO2V or SO2R mode, N1MM+ sends two packets every ten seconds - one packet each from RadioNr1 and RadioNr2
  • Freq is the receive frequency represented as values to the tens digit with no delimiter. For example: 160 meters: 181234; 40 meters: 712345; 10 meters: 2812345; 6 meters: 5012345
  • TXFreq is the transmit frequency represented as values to the tens digit with no delimiter. For example: 160 meters: 181234; 40 meters: 712345; 10 meters: 2812345; 6 meters: 5012345
  • Mode could be any one of the following: CW, USB, LSB, RTTY, PSK31, PSK63, PSK125, PSK250, QPSK31, QPSK63, QPSK125, QPSK250, FSK, GMSK, DOMINO, HELL, FMHELL, HELL80, MT63, THOR, THRB, THRBX, OLIVIA, MFSK8, MFSK16
  • OpCall is the callsign entered by the operator after OPON (or Ctl-O). Defaults to the station call
  • IsRunning represents the value of the RUN <> S&P radio buttons in the Entry Window. If you are on your CQ frequency, IsRunning will be True
  • FocusEntry is the Windows assigned handle of the Entry Window with program focus
  • Antenna is the currently selected antenna for this radio (0-15), from the Antenna tab in the Configurer
  • Rotors is the name of the currently selected rotor from the Antenna table in the Configurer
  • FocusRadioNr Receive Radio Focus - the Green Dot in the Entry Window. Enables signal switching for SO2R operation - facilitating the routing of Microphone, Audio, PTT, CW signals to/from the selected radio. FocusRadioNr toggles between 1 and 2 when the program, a mouse click, or the \ key selects the opposite Entry Window
  • IsStereo enables audio switching for SO2R operation.The ` key (backquote) toggles its value between True and False
  • ActiveRadioNr Transmit Radio Focus - the Red Dot in the Entry Window. Enables signal switching for SO2R operation - facilitating the routing of Microphone, Audio, PTT, CW signals to/from the selected radio. ActiveRadioNr toggles between 1 and 2 when the program or pressing the <pause> key selects the opposite Entry Window


The program sends Radio Info packets at 10 second intervals, or immediately after an event where any of the information in one of these fields changes (for example: user changes bands, spins the VFO dial, switches from Run to S&P, or selects VFOb).

6. Rotator Control

Broadcasts to operate the separate Rotator Control program are sent automatically when the user selects >Tools >Turn Rotor (alt+J), and do not require configuration settings or modifications to the N1MM Logger.ini file. The broadcasts are always sent on port 12040. See the Digging Deeper chapter for more information in section 2.5.4 Rotator Control.

7. Spot Data

The Spot Data packet contains all spots processed by the program whether from Telnet (including RBN), Logging QSOs, or local spotting.
The values for action are:

  • add
  • delete


The values for status are:

  • busy - marked by N1MM user as a frequency to note
  • bust - a busted call (when CT1BOH tags are present)
  • cq - the cq frequency on this band (last place F1 was pressed)
  • dupe - duplicate contact
  • qtc - a WAE qtc
  • single mult - this spot is a single multiplier in this contest
  • double mult - this spot is a double (or more) mult in this contest
  • new qso - a logged qso (this is now a dupe by definition)

Spot UDP Packet:

"<?xml version="1.0" encoding="utf-8"?>  
<spot>
    <StationName>N1MM</StationName>
    <dxcall>UN7NFD</dxcall>  
    <frequency>14017.4</frequency>
    <spottercall>R0BB-#</spottercall>
    <comment>CW 4 DB 19 WPM CQ </comment> 
    <action>add</action>
    <status>new qso</status>  
    <timestamp>2016-07-21 14:20:46</timestamp>  
</spot>"

  • StationName - the callsign shown in the station dialog
  • dxcall - the station that is spotted
  • spottercall - the station that spotted the call (StationName for stations worked, or spotted locally)
  • comment - the comment from the spot
  • action - whether this spot was added or deleted (spots are deleted when they move within a band)
  • status - dupe, mult etc. See above for values
  • timestamp - the time of the spot

8. Sending Spectrum Data to N1MM+

N1MM+ receives spectrum data from SDR receivers on port 13064. Follow this XML layout:

<?xml version="1.0" encoding="utf-8"?>
<Spectrum>
     <Name>N1MM SDR1</Name>
     <LowScopeFrequency>14000</LowScopeFrequency>
     <HighScopeFrequency>14055</HighScopeFrequency>
     <ScalingFactor>0.3125</ScalingFactor>
     <DataCount>475</DataCount>
     <SpectrumData>0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0, 
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0, 
     0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,19,25,0,0,0,0,0,0,0,4,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0, 
     1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0, 
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,38,50,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0, 
     0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0
     </SpectrumData>
</Spectrum>

Notes:

  • <Name> is the name of your source. It will be shown in the N1MMPlus UI
  • <LowScopeFrequency> is lowest frequency represented by the signal levels in <SpectrumData>
  • <HighScopeFrequency> is highest frequency represented by the signal levels in <SpectrumData>
  • <ScalingFactor> is a number that converts your 0-N data in <SpectrumData> to dB for display in the UI
  • <DataCount> is the number of signal levels sent in <SpectrumData>
  • <SpectrumData> is comma separated signal level values. Icom uses a range from 0-160. We can accept integer values from 0-65535.
  • Spectrum Window help can be found at: Spectrum Window Help


To show this data in N1MM+:

  • Open a Spectrum Display window (Windows/Spectrum Display).
  • Right-click and change Spectrum Source to "Source Name".
  • Set the source name to the <Name> you are sending in the message above.


We’ve tried to minimize the development effort from your side by only requiring six pieces of meta data and your level information in the same fashion that you display level data on your UI. Icom provides this data about 3x per second and that seems adequate. We wouldn't want more than 5x to 10x per second to avoid overloading the users machines, since so many users have older processors.
In addition to the xml data, you would need to allow your users to specify an IP address to send the data to. You will probably want to allow your users to name the source, in the event there is more than one spectrum display on their networks.

If you would like to see what the spectrum UI looks like, I have prepared a 4 minute video at: Spectrum Video

9. Sending Log Data to N1MM+

N1MM+ can receive log data from other logging programs (such as JTDX and JTAlert) via connections on the IP address and port specified at the bottom under the Broadcast Data tab in the Configurer (the default for JTDX TCP packets is 127.0.0.1:52001, for JTAlert UDP packets is 127.0.0.1:2333). There is an Enable check box that must be checked before the program will accept data on either port; you may need to shut down and restart N1MM+ after checking the Enable check box.

Configurer BroadcastDataTabwithTCPUDP

The data sent from the other program must be in the following format:

<command:3>Log <parameters:nnnn>ADIF QSO data record (where "nnnn" = length of ADIF character string)


For example,

<command:3>Log <parameters:146><Band:3>20M <Call:5>M4HXM <Freq:6>14.076 <Mode:4>JT65 <QSO_DATE:8>20110419

<TIME_ON:6>184000 <RST_Rcvd:3>-03 <RST_Sent:3>-07 <TX_PWR:4>20.0 <EOR>

The QSO data will be inserted into the currently defined N1MM+ contest log.

The following ADIF field tags are supported:
"CALL", "QSO_DATE", "TIME_ON", "CONTEST_ID", "MODE", "FREQ", "FREQ_RX", "BAND", "COMMENT", "CQZ", "ITUZ", "GRIDSQUARE", "NAME", "RST_RCVD", "RST_SENT", "TX_PWR", "RX_PWR", "SRX", "STX", "QTH", "OPERATOR", "RADIO_NR", "POINTS", "ARI_PROV", "ARRL_SECT", "DIG", "DISTRIKT", "DOK", "IOTA", "KDA", "OBLAST", "PFX", "RDA", "SAC", "SECT", "STATE", "IARU_ZONE", "SECTION", "NAQSO_SECT", "VE_PROV", "UKEI", "WWPMC", "PRECEDENCE", "CHECK" and "EOR".

 Using Two Rig Control Programs Simultaneously

You will encounter port errors when two programs - like N1MM+ and WSJT-x - try to access the same com ports in Windows. The solution requires some form of shared serial port. You have many choices: vSPE, com0com, LP-Bridge, Win4K3... We do not plan to be prescriptive - use whichever one you can get to work or is included with your general logging program.
OR
If you are going to be running a dedicated JT65 / FT8 operation with WSJT-x and just using N1MM as a back-end contest database, you can create a custom INI file that launches N1MM+ without enabling its CAT interface. This prevents any of the serial port complications. See the documentation about using a custom INI file and launching N1MM+ with custom INI settings enabled.


Last Modification: 29 August 2017 16:21:48 EDT by K8UT.