<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:543912208;
        mso-list-type:hybrid;
        mso-list-template-ids:1964538790 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoPlainText">Rob - OK, I have a handle on what to do for system updating. I will take out references to doing any of this using Central Control.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Now here is an implementation question for you:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">- I'd like your recommendation on precisely how to handle the communication between the LH and the DE. The plan is to use sockets, but I need some more detail on that.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoPlainText" style="mso-list:l0 level1 lfo1">Let's say we use TCP. We need an approach that handles making connections, dealing with lost connections, ensuring communications get thru & recover from errors, thread safety, etc. I have seen packages
 such as<a href="https://zeromq.org/"> Zeromq</a> and things like it, but those would require that the DE use an exactly compatible method (implemented in FPGA, I guess) – probably not possible, maybe not even desirable. What would you recommend?<o:p></o:p></li><li class="MsoPlainText" style="mso-list:l0 level1 lfo1">Scotty has said he want to use UDP as much as possible. To me, this makes sense for sending acquired data, but for commands, I don’t know.  Would UDP work for everything?  If so, do you know of something
 we can use that is an open source package, or do we need to write everything from scratch? Don’t want to re-invent, etc.  Any thoughts?<o:p></o:p></li></ol>
<p class="MsoPlainText">-73- Bill<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-----Original Message-----<br>
From: Rob Wiesler <halcyone1024@gmail.com> On Behalf Of Rob Wiesler<br>
Sent: Monday, November 18, 2019 3:25 PM<br>
To: Engelke, Bill <bill.engelke@ua.edu><br>
Cc: TAPR TangerineSDR Modular Software Defined Radio <tangerinesdr@lists.tapr.org><br>
Subject: Re: [TangerineSDR] Updated Detailed Design Specification for PSWS Local Host (v0.1)</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">On Mon, Nov 18, 2019 at 16:38:17 +0000, Engelke, Bill wrote:<o:p></o:p></p>
<p class="MsoPlainText">> - I had been figuring we would have a distributable image with<o:p></o:p></p>
<p class="MsoPlainText">>   everything we need included in it. People could build their system<o:p></o:p></p>
<p class="MsoPlainText">>   by downloading this and putting on eMMC/SDchip, or buy a pre-made<o:p></o:p></p>
<p class="MsoPlainText">>   one from TAPR. You mentioned  that we should have a version of this<o:p></o:p></p>
<p class="MsoPlainText">>   for desktop that is exactly the same as for the Odroid; seems fine,<o:p></o:p></p>
<p class="MsoPlainText">>   but don't we have at least the difference that the Odroid is ARM and<o:p></o:p></p>
<p class="MsoPlainText">>   the desktop would be x86/x64? Is everything we need going to work<o:p></o:p></p>
<p class="MsoPlainText">>   the same on both architectures?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">It shouldn't be an issue.  In particular, if there's an issue, then there's a bug in our code.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> - On the FT8 decoder, I just picked the initial approach based on how<o:p></o:p></p>
<p class="MsoPlainText">>   it is done in the Red Pitaya (Pavel Demin's "Notebook" code).  If we<o:p></o:p></p>
<p class="MsoPlainText">>   have plenty of RAM, RAMdisk is fine. The FT8 files are about 2 MB<o:p></o:p></p>
<p class="MsoPlainText">>   each, so decoding 8 bands would take 16 MB which is not that much<o:p></o:p></p>
<p class="MsoPlainText">>   for the Odroid. BTW, I have the FT8 decoder source (mix of C and<o:p></o:p></p>
<p class="MsoPlainText">>   Fortran), and it could probably be enhanced to use pipe or socket or<o:p></o:p></p>
<p class="MsoPlainText">>   other more state-of-the-art method, but I would make that a lower<o:p></o:p></p>
<p class="MsoPlainText">>   priority for Phase 1, since we do have a working solution.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Right.  Just so long as we're not messing the the lifetime of the SD card or eMMC.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> - On Gmail, I have tried on several occasions to push outgoing mail to<o:p></o:p></p>
<p class="MsoPlainText">>   it (and to AT&T also) , trying various methods with good SMTP<o:p></o:p></p>
<p class="MsoPlainText">>   credentials, but have never been successful; always ended up using<o:p></o:p></p>
<p class="MsoPlainText">>   SMTP2GO. If you can provide detailed guidance on how to actually<o:p></o:p></p>
<p class="MsoPlainText">>   make that work, it would be great.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">In Python:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">                from smtplib import SMTP<o:p></o:p></p>
<p class="MsoPlainText">                from email.mime.text import MIMEText<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">                SMTP_USERNAME = 'example@gmail.com'<o:p></o:p></p>
<p class="MsoPlainText">                SMTP_PASSWORD = 'example password'<o:p></o:p></p>
<p class="MsoPlainText">                SMTP_SERVER   = 'smtp.gmail.com:587'<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">                def email(subject, message, to_addrs, from_addr=None):<o:p></o:p></p>
<p class="MsoPlainText">                                if not from_addr:<o:p></o:p></p>
<p class="MsoPlainText">                                                from_addr = SMTP_USERNAME<o:p></o:p></p>
<p class="MsoPlainText">                                msg = MIMEText(message)<o:p></o:p></p>
<p class="MsoPlainText">                                msg['Subject'] = subject<o:p></o:p></p>
<p class="MsoPlainText">                                msg['From']    = from_addr<o:p></o:p></p>
<p class="MsoPlainText">                                msg['To']      = ', '.join(to_addrs)<o:p></o:p></p>
<p class="MsoPlainText">                                s = SMTP(SMTP_SERVER)<o:p></o:p></p>
<p class="MsoPlainText">                                s.ehlo()<o:p></o:p></p>
<p class="MsoPlainText">                                s.starttls()<o:p></o:p></p>
<p class="MsoPlainText">                                s.login(SMTP_USERNAME, SMTP_PASSWORD)<o:p></o:p></p>
<p class="MsoPlainText">                                s.sendmail(from_addr, to_addrs, msg.as_string())<o:p></o:p></p>
<p class="MsoPlainText">                                s.quit()<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">                # Example:<o:p></o:p></p>
<p class="MsoPlainText">                #<o:p></o:p></p>
<p class="MsoPlainText">                # email( "Example of sending SMTP from Python via Gmail"<o:p></o:p></p>
<p class="MsoPlainText">                #      , "This is line 1\n"<o:p></o:p></p>
<p class="MsoPlainText">                #      + "This is line 2\n"<o:p></o:p></p>
<p class="MsoPlainText">                #      , ('recipient@example.com',)<o:p></o:p></p>
<p class="MsoPlainText">                #      )<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I cribbed this from an old debug file I wrote for my company years ago.<o:p></o:p></p>
<p class="MsoPlainText">There's absolutely nothing novel about it, so it's in the public domain.<o:p></o:p></p>
<p class="MsoPlainText">It could be made significantly more sophisticated, but I never needed to.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> - On frequency of clock updating, I based that merely on the<o:p></o:p></p>
<p class="MsoPlainText">>   guidelines for setting up a system to update clock with Dimension 4;<o:p></o:p></p>
<p class="MsoPlainText">>   updating clock every 15 or 30 minutes is quite sufficient for FT8 or<o:p></o:p></p>
<p class="MsoPlainText">>   WSPR. We can have it update as often as deemed necessary.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I suspect we might be in violent agreement, but again, modern system clocks governed by NTP only "update" the clock a maximum of once, if the clock is significantly wrong when the system boots.  That's called "stepping" the clock.  After
 that, NTP uses some external time source (a GPS with a PPS output, a terrestrial atomic clock, or a pool of Internet-connected hosts also running NTP) and a boatload of statistics to track the minute differences in frequency between the system clock and the
 external time source (which is presumed to be more authoritative).  The system clock's frequency is adjusted very slightly over time to match (and continue to match) the external time source as closely as possible, except that the frequency is increased slightly
 if the system clock is behind the true time, and decreased slightly if it is ahead.  This is called "slewing" the clock.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> - Regarding "- You mention in the "Remote System Updates" section,<o:p></o:p></p>
<p class="MsoPlainText">>   "Need to select a package for enabling this."  What do you mean by<o:p></o:p></p>
<p class="MsoPlainText">>   that?"  --- Not knowing any better I had assumed that there would be<o:p></o:p></p>
<p class="MsoPlainText">>   more than one way to distribute and apply system updates from the<o:p></o:p></p>
<p class="MsoPlainText">>   Central Control system; this just refers to deciding how to apply<o:p></o:p></p>
<p class="MsoPlainText">>   these.  I gather that you have a good handle on best practice here,<o:p></o:p></p>
<p class="MsoPlainText">>   and can recommend how to do it.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">It's basically just apt-get and friends.  The Central Control system probably won't even have anything to do.  Rather, we'll update packages in the repo, and each system will periodically check for and install updates.<o:p></o:p></p>
</div>
</body>
</html>