Skip to content

Commit

Permalink
Sik radio update 2024-1-18 (ArduPilot#3277)
Browse files Browse the repository at this point in the history
* RFD900 tools 2.12 - Fixed tooltip text for GPI1_1R/CIN and GPI1_1R/COUT

* RFD900 tools 2.13 - Now if a parameter fails to load, that same parameter is not saved back to the modem.

* RFD900 Tools 2.14 - Resolved issue in which modem firmware could not be reprogrammed immediately after programming.

* RFD900x restrictions for firmware programming for modems locked to country now appears to work well.  However, programming RFD900+ seems to have regressed.

* Resolved issues with RFD900+ modem in which it couldn't load settings immediately after programming firmware.

* Now parses freq/band and antenna options from RFD900x

* 2.15 - Added firmware programming certified check for RFD900X/UX.  Added SBUS, freq/band and antenna parameters
 *          for RFD900x.

* 2.16 - Resolved issue in which it was looking for the country string in the wrong part of the ATI command response.

* 2.17 - Resolved issue in which pin wasn't being set to output/input when RC out / SBUS out checked / unchecked.

* RFD900 Tools 2.18 - Added text boxes to settings view for local and remote modems to display country code if locked to a country,
 *          as requested by Moreton.

* 2.19 - Fixed bug in which programming RFD900x firmware whose file size was a multiple of 128 bytes failed.

* 2.20 - Made changes so that it could update firmware and load settings from a modem with multipoint firmware.

* 2.21 - Now for modems which use the xmodem protocol for firmware updates (RFD900x and RFD900ux), it waits for
 *          and acknowledgement of the EOT packet before sending the BOOTNEW command.  This may or may not
 *          resolve the intermittent issue in which firmware update results in the modem staying in bootloader mode.
 *          Now programs version 3.01 as the reference firmware for RFD900x to check certified (instead of 3.00).

* 2.21 - Now for modems which use the xmodem protocol for firmware updates (RFD900x and RFD900ux), it waits for
 *          and acknowledgement of the EOT packet before sending the BOOTNEW command.  This may or may not
 *          resolve the intermittent issue in which firmware update results in the modem staying in bootloader mode.
 *          Now programs version 3.01 as the reference firmware for RFD900x to check certified (instead of 3.00).

* RFD900 Tools 2.22 - Changed "Set PPM Fail safe" feature so there is one button per local/remote modem.  Made it so it is enabled
 *          depending on GPO1_1R/COUT being set.

* Now has better handling of the case in which it can't put the modem into RSSI reprting mode.

* 2.24 - Improved instructions to user in message boxes.  Improved handling of cases where it was unable to communicate

* RFD900 Tools 2.25 - Now does auto disconnect/reconnect of serial port after every firmware programming regardless of success or failure.

* 2.26 - Now sets status text to "Programming Failed.  (Try Again?)" if it fails to determine which mode the modem is in when trying to program firmware.

* 2.28 - Now has a manufacturing page/tab for locking down modems to a country.

* 2.29 - Resolved bug in which the value ranges available from the remote modem weren't being parsed and used in the combo box e.g. for the min and max frequency ranges.  Also, added a work-around for an issue in the RFDSiK RFD900x 3.07 firmware in which it didn't return the complete set of parameters in response to an RTI5? command.

* 2.30 - For RFD900x multipoint firmware, now allows correct broadcast id for nodedestination parameter.

* RFD900 tools 2.32 - Supports programming of RFD900ux modems.

* 2.33 - Corrected available frequency ranges for RFD900+

* 2.34 - Now handles new settings GPO1_1SBUSIN, GPO1_1SBUSOUT, GPO1_3STATLED, and GPO1_0TXEN485

* 2.35 - Fixed bug in which re-loading settings when AES was previously enabled would cause it to disable AES.

* 2.36 - Added a retry option message window for when programming firmware fails.

* 2.37 - Resolved issue in which a MAX_WINDOW setting value which wasn't a multiple of 20 failed to be set in the settings GUI.

* 2.38 - Manufacturing tab now includes lockdown for EU and India.

* 2.39 - For checkbox settings for which the modem specifies (in the ATI5? query response) only one option, it now greys-out the checkbox. This was to cater to the X modem 3.15 firmware in which the ECC paramater can't be changed and is always false.

* 2.40 - Now for remote modems which do not specify valid settings ranges, if the remote modem has the same firmware version as the

* 2.42 - Now gets valid parameter ranges out of remote modem for newer firmware which doesn't support the RTI5? query.  Now supports the

* 2.43 - Resolved freezing-up issue which happened for older or non-SiK modem firmware which doesn't yet have ATI10/RTI10 command.  Tidied up GUI layout.

* 2.44 - Resolved mavlink setting problem.

* 2.45 - There is now a 50ms delay between '+' characters transmitted to modem when doing the +++ sequence to change mode from transparent to AT command mode,

* 2.46 - A command line switch is now available to force programming of firmware into modems regardless of type of modem.  Removed 50ms delay between '+' characters  transmitted to modem when doing the +++ sequence to change mode from transparent to AT command mode, as this is not required by any firmware.

* 2.47 - Added GPIO1_1FUNC settings for RFD900x async firmware 2.69.

* 2.48 - RSSI page now writes log to the user's documents folder, instead of the program folder, to prevent exception.

* 2.49 - Hardened up code to reduce crashes when switching between terminal, RSSI and settings pages.

* 2.50 - Added support for FSFRAMELOSS, GPI1_2AUXIN and GPO1_3AUXOUT parameters.

* RFDTools 2.51 - Fixed error message problem when used with multipoint firmware 2.90.

* RFDTools 2.52 - Now uses a more reliable means of reading country code from modems than looking at the string returned by ATI command.

* 2.53 - For multipoint firmware, made 255 available as an option for destination node ID.

* 2.54 - Changed encryption key text box max length from 32 to 64 hex numerals (for 256 bit encryption).

* 2.55 - Changed encryption key text box max length from 32 to 64 hex numerals (for 256 bit encryption).

* 2.56 - Now recognises country code 255 as not locked to country.

* RFDTools 2.57 - Now before programming firmware, checks whether modem says it is DINIO.  If it says it is DINIO, only allows DINIO firmware to be programmed into modem.

* 2.58 - Now supports RFD X rev 2.  Now checks that band is compatible with country before locking to a country.

* RFDTools 2.60 - Now supports RFD X rev 2 programming firmware when baud rate other than 57600bps is used.

* 2.61 - Now supports RFD UX rev 2.

* 2.63 - Settings GUI can now dynamically shows settings read from the modem which are unknown to this software.  Supports the RSSI_IN_DBM, AUXSER_SPEED and AIR_FRAMELEN settings.

* RFDTools 2.64 - Can now save settings to file and load settings from file.

* 2.65 - Now checks whether min freq is greater than max freq before saving settings to modem(s).  Resolved issue in which itshowed erroneous "Set command error" message when saving encryption key to modem.

* RFD Tools 2.66 - Fixed bug for multipoint firmware in which it showed an error message of 'Encryption key not valid hex number <=32[/64] hex numerals' when saving change to encryption level setting to the modem.

* Fix firmware download bug where if the firmware file were read only (or in a read only directory) trying to download it would result in an error because the file could not be opened. Resolved by making the file stream open the file in read only mode.

---------

Co-authored-by: Martin Keeling <martinlkeeling@gmail.com>
  • Loading branch information
StevenHAtRFDesign and MartinKeeling authored Feb 25, 2024
1 parent f1ec823 commit b6f7e4a
Show file tree
Hide file tree
Showing 33 changed files with 10,040 additions and 3,171 deletions.
5 changes: 5 additions & 0 deletions MissionPlanner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,11 @@
<Compile Include="SikRadio\ISikRadioForm.cs" />
<Compile Include="SikRadio\RFD900.cs" />
<Compile Include="SikRadio\RFDLib\Array.cs" />
<Compile Include="SikRadio\RFDLib\Collections.cs" />
<Compile Include="SikRadio\RFDLib\Text.cs" />
<Compile Include="SikRadio\RFDLib\GUI\Settings.cs" />
<Compile Include="SikRadio\RFDLib\IO\SerialPort\SerialPort.cs" />
<Compile Include="SikRadio\RFDLib\IO\ATCommand.cs" />
<Compile Include="Splash.Designer.cs">
<SubType>Form</SubType>
<DependentUpon>Splash.cs</DependentUpon>
Expand Down Expand Up @@ -1576,6 +1580,7 @@
<Compile Include="Plugin\PluginUI.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Radio\ComPort.cs" />
<Compile Include="Radio\IHex.cs" />
<Compile Include="Radio\Sikradio.cs">
<SubType>UserControl</SubType>
Expand Down
31 changes: 31 additions & 0 deletions Radio/ComPort.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using MissionPlanner.Comms;

namespace MissionPlanner.Radio
{
public static class ComPort
{
static ICommsSerial _Port;

public static ICommsSerial GetComPortForSiKRadio()
{
if (_Port == null)
{
MainV2.comPort.Close();
MissionPlanner.Radio.Sikradio.Connect(ref _Port);
}

return _Port;
}

public static void FinishedWithComPortForSiKRadio()
{
if (_Port != null)
{
_Port.Dispose();
_Port = null;
}
}
}

}
62 changes: 54 additions & 8 deletions Radio/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ExtraParamControlsSet
LabelComboBoxPair TXENCAP;
LabelComboBoxPair RXENCAP;
LabelComboBoxPair MAX_DATA;
LabelComboBoxPair MAX_RETRIES;
IEnumerable<Control> Others;
bool Remote;

Expand All @@ -45,19 +46,33 @@ public ExtraParamControlsSet(Label lblNodeID, ComboBox cmbNodeID,
Label lblTXENCAP, ComboBox cmbTXENCAP,
Label lblRXENCAP, ComboBox cmbRXENCAP,
Label lblMAX_DATA, ComboBox cmbMAX_DATA,
Label lblMAX_RETRIES, ComboBox cmbMAX_RETRIES,
Control[] Others, bool Remote)
{
NodeID = new LabelComboBoxPair(lblNodeID, cmbNodeID);
DestID = new LabelComboBoxPair(lblDestID, cmbDestID);
TXENCAP = new LabelComboBoxPair(lblTXENCAP, cmbTXENCAP);
RXENCAP = new LabelComboBoxPair(lblRXENCAP, cmbRXENCAP);
MAX_DATA = new LabelComboBoxPair(lblMAX_DATA, cmbMAX_DATA);
MAX_RETRIES = new LabelComboBoxPair(lblMAX_RETRIES, cmbMAX_RETRIES);
this.Others = Others;
this.Remote = Remote;
}

public void SetModel(Model M)
/// <summary>
/// Reconfigure the GUI for the given modem firmware type
/// </summary>
/// <param name="M">The modem firmware type.</param>
/// <param name="Settings">The settings retrieved from the modem. Must not be null.</param>
public void SetModel(Model M, Dictionary<string, RFD.RFD900.TBaseSetting> Settings)
{
NodeID.Reset();
DestID.Reset();
TXENCAP.Reset();
RXENCAP.Reset();
MAX_DATA.Reset();
MAX_RETRIES.Reset();

string Prefix = Remote ? "R" : "";

switch (M)
Expand All @@ -73,7 +88,7 @@ public void SetModel(Model M)
RXENCAP.ComboBox.Name = Prefix + "NODECOUNT";
RXENCAP.Label.Text = "Node Count";
NodeID.ComboBox.DataSource = Sikradio.Range(0, 1, 29);
var Temp = (List<int>)Sikradio.Range(0, 1, 29);
var Temp = new List<int>(Sikradio.Range(0, 1, 29));
Temp.Add(65535);
DestID.ComboBox.DataSource = Temp;
TXENCAP.ComboBox.DataSource = Sikradio.Range(0, 1, 1);
Expand Down Expand Up @@ -103,14 +118,27 @@ public void SetModel(Model M)
case Model.MULTIPOINT_X:
{
DestID.ComboBox.Name = Prefix + "NODEDESTINATION";
TXENCAP.ComboBox.Name = Prefix + "NODECOUNT";
TXENCAP.Label.Text = "Node Count";
if (Settings.ContainsKey("NETCOUNT"))
{
TXENCAP.ComboBox.Name = Prefix + "NETCOUNT";
TXENCAP.Label.Text = "Net Count";
}
else
{
TXENCAP.ComboBox.Name = Prefix + "NODECOUNT";
TXENCAP.Label.Text = "Node Count";
}
RXENCAP.ComboBox.Name = Prefix + "SERBREAKMS10";
RXENCAP.Label.Text = "Ser. brk. x10ms";
MAX_DATA.ComboBox.Name = "GPO1_3STATLED";
MAX_DATA.Label.Text = "GPO1_\n3STATLED";
if (Settings.ContainsKey("MASTERBACKUP"))
{
MAX_DATA.ComboBox.Name = Prefix + "MASTERBACKUP";
MAX_DATA.Label.Text = "Master Bckp";
}
MAX_RETRIES.ComboBox.Name = Prefix + "RXFRAME";
MAX_RETRIES.Label.Text = "Rx Frame";
NodeID.ComboBox.DataSource = Sikradio.Range(0, 1, 29);
var Temp = (List<int>)Sikradio.Range(0, 1, 29);
var Temp = new List<int>(Sikradio.Range(0, 1, 29));
Temp.Add(65535);
DestID.ComboBox.DataSource = Temp;
TXENCAP.ComboBox.DataSource = Sikradio.Range(0, 1, 1);
Expand All @@ -121,7 +149,14 @@ public void SetModel(Model M)
DestID.Visible = true;
TXENCAP.Visible = true;
RXENCAP.Visible = true;
MAX_DATA.Visible = true;
if (Settings.ContainsKey("MASTERBACKUP"))
{
MAX_DATA.Visible = true;
}
if (Settings.ContainsKey("RXFRAME"))
{
MAX_RETRIES.Visible = true;
}
}
break;
}
Expand All @@ -134,6 +169,7 @@ void SetAllVisible(bool V)
TXENCAP.Visible = V;
RXENCAP.Visible = V;
MAX_DATA.Visible = V;
MAX_RETRIES.Visible = V;
foreach (var x in Others)
{
x.Visible = V;
Expand All @@ -145,11 +181,15 @@ class LabelComboBoxPair
{
public readonly Label Label;
public readonly ComboBox ComboBox;
public readonly string OrigName;
public readonly string OrigLabel;

public LabelComboBoxPair(Label L, ComboBox C)
{
this.Label = L;
this.ComboBox = C;
OrigName = C.Name;
OrigLabel = L.Text;
}

public bool Visible
Expand All @@ -164,5 +204,11 @@ public bool Visible
ComboBox.Visible = value;
}
}

public void Reset()
{
Label.Text = OrigLabel;
ComboBox.Name = OrigName;
}
}
}
Loading

0 comments on commit b6f7e4a

Please sign in to comment.