Index: mainwindow.cpp
===================================================================
--- mainwindow.cpp	(revision 5053)
+++ mainwindow.cpp	(working copy)
@@ -451,11 +451,57 @@
   m_config.transceiver_online (true);
   on_monitorButton_clicked (!m_config.monitor_off_at_startup ());
 
+  udpServer(); // start our UDP server
+
 #if !WSJT_ENABLE_EXPERIMENTAL_FEATURES
   ui->actionJT9W_1->setEnabled (false);
 #endif
 }
 
+void MainWindow::doCall(DecodedText decodedtext)
+{
+      auto my_base_call = baseCall (m_config.my_callsign ());
+      ui->decodedTextBrowser2->displayDecodedText(decodedtext
+                                                  , my_base_call
+                                                  , false
+                                                  , m_logBook
+                                                  , m_config.color_CQ()
+                                                  , m_config.color_MyCall()
+                                                  , m_config.color_DXCC()
+                                                  , m_config.color_NewCall());
+      m_QSOText=decodedtext;
+      ui->decodedTextBrowser2->textCursor().movePosition(QTextCursor::End,QTextCursor::MoveAnchor);
+      // move cursor to a char or two before the end-of-line -- this doesn't seem to work
+      ui->decodedTextBrowser2->textCursor().movePosition(QTextCursor::PreviousCharacter,QTextCursor::KeepAnchor,10);
+      doubleClickOnCall(false,false);
+      
+}
+
+void MainWindow::readPendingDatagrams()
+{
+  while (udpSocket->hasPendingDatagrams()) {
+      QByteArray datagram;
+      datagram.resize(udpSocket->pendingDatagramSize());
+      QHostAddress sender;
+      quint16 senderPort;
+      udpSocket->readDatagram(datagram.data(),datagram.size(),&sender,&senderPort);
+      // Our first example -- take in a decoded CQ message and post it to RX window
+msgBox("datagram: "+QString::number(datagram.size()));
+      QString calltext(datagram);
+      DecodedText decodedtext;
+      decodedtext = calltext.replace("\n","");
+msgBox("strlen: "+QString::number(calltext.length())+","+QString::number(calltext.replace("\n","").length()));
+      doCall(decodedtext);
+  }
+}
+
+void MainWindow::udpServer() 
+{
+  udpSocket = new QUdpSocket(this);
+  udpSocket->bind(QHostAddress::Any,5001);
+  connect(udpSocket, SIGNAL(readyRead()), this, SLOT(readPendingDatagrams()));
+}
+
 //--------------------------------------------------- MainWindow destructor
 MainWindow::~MainWindow()
 {
Index: mainwindow.h
===================================================================
--- mainwindow.h	(revision 5053)
+++ mainwindow.h	(working copy)
@@ -80,6 +80,7 @@
   void jt9_error(QProcess::ProcessError);
   void setXIT(int n);
   void setFreq4(int rxFreq, int txFreq);
+  void doCall(DecodedText decodedtext);
 
 protected:
   virtual void keyPressEvent( QKeyEvent *e );
@@ -178,6 +179,7 @@
   void monitor (bool);
   void stop_tuning ();
   void auto_tx_mode (bool);
+  void readPendingDatagrams();
 
 private:
   void enable_DXCC_entity (bool on);
@@ -369,6 +371,7 @@
   double m_toneSpacing;
   int m_firstDecode;
   QProgressDialog m_optimizingProgress;
+  QUdpSocket *udpSocket;
 
   //---------------------------------------------------- private functions
   void readSettings();
@@ -392,6 +395,7 @@
   void pskSetLocal ();
   void displayDialFrequency ();
   void transmitDisplay (bool);
+  void udpServer();
 };
 
 extern void getfile(QString fname, int ntrperiod);
