(1) (1.13) SiK radio advanced configuration (4)

Article directory

Preface

9 Using AT command set

10 MAVLink protocol description


Preface

This article provides advanced configuration information for SiK Telemetry Radio . It is intended for " power users " and users who want to better understand how their radio operates.


9 Using AT command set

The radio supports configuration with a variant of the Hayes " AT " modem command set.

If you use the serial console to connect the radio at the current serial baud rate, you can tell the radio to enter AT command mode by entering the sequence " +++ " . A certain guard time is required to prevent data from being viewed as a sequence of commands, so make sure nothing is entered on the serial link within 1 second before or after the sequence is entered.

After entering AT command mode, the radio will issue an " OK " prompt and stop displaying data sent by other radios.

Once in AT command mode, you can issue " AT " commands to the radio to control the local radio, or (if successfully connected) use " RT " commands to control the remote radio.

Available AT commands are:

  •  ATI - displays radio version;
  • ATI2 - Displays the board type;
  • ATI3 - displays board frequency;
  • ATI4 - Displays the board version;
  • ATI5 - Displays all user-settable EEPROM parameters;
  • ATI6 - Display TDM timing report;
  • ATI7 - Display RSSI signal report;
  • ATO - Exit AT command mode;
  • ATSn? - displays radio parameter number ' n ';
  • ATSn=X - sets radio parameter number " n " to " X ";
  • ATZ - Restart radio;
  • AT&W - Write current parameters to EEPROM ;
  • AT&F - Resets all parameters to factory default settings;
  • A T&T=RSSI - enable RSSI debug reporting;
  • AT&T=TDM - Enable TDM debug reporting;
  • AT&T - Disable debug reporting. 

By replacing " AT " with " RT ", all of these commands, except ATO , will work on the connected remote radio.

Perhaps the most useful command is " ATI5 ", which displays all user-settable EEPROM parameters. It will generate a report like this:

S0: FORMAT=22

 S1: SERIAL_SPEED=57

 S2: AIR_SPEED=64

 S3: NETID=25

 S4: TXPOWER=20

 S5: ECC=1

 S6: MAVLINK=1

 S7: OPPRESEND=1

 S8: MIN_FREQ=915000

 S9: MAX_FREQ=928000

 S10: NUM_CHANNELS=50

 S11: DUTY_CYCLE=100

 S12: LBT_RSSI=0

 S13: MANCHESTER=0

 S14: RTSCTS=0

 S15: MAX_WINDOW=131

The first column is the S register to be set when the parameters are to be changed . For example, to set the transmit power to 10dBm , use " ATS4=10 ".

Most parameters will only take effect on the next reboot. Therefore, the common practice is to set the required parameters, then use " AT&W " to write the parameters to the EEPROM , and then use " ATZ " to reboot. The exception is transmit power, which changes immediately (but will revert to the original setting on reboot unless using AT&W ).

The meaning of this parameter is as follows:

  •  FORMAT - This is the EEPROM format version. Do not change;
  • SERIAL_SPEED - This isthe serial speed " in one byte " (see below);
  • AIR_SPEED - This isthe air data transfer rate " in one byte ";
  • NETID - This is the network ID . Both radios must use the same ID ;
  • TXPOWER - Transmit power in dBm . The maximum value is 20dBm ;
  • ECC - enable/disable Golay Error Correction Code;
  • MAVLINK - Controls MAVLink framing and reporting. 0 = No MAVLink framing, 1 = MAVlink framing, 2 = Low latency MAVlink ;
  • MIN_FREQ - minimum frequency, unit kHz ;
  • MAX_FREQ - maximum frequency in kilohertz;
  • NUM_CHANNELS - Number of frequency hopping channels;
  • DUTY_CYCLE - Percentage of time allowed to emit;
  • LBT_RSSI - listen-before-speak threshold (see documentation below);
  • MAX_WINDOW - Maximum transmission window in milliseconds, default is 131 , 33 is recommendedfor low latency (but lower bandwidth). 

For two radios to communicate, the following conditions must be the same at both ends of the link:

  •  Radio firmware version;
  • the AIR_SPEED
  • the MIN_FREQ
  • the MAX_FREQ
  • the NUM_CHANNELS
  • the NETID
  • the ECC settings;
  • the LBT_RSSI setting;
  • the MAX_WINDOW setting. 

Other settings may differ on both sides of the link, but usually the settings are the same on both sides.

10 MAVLink protocol description

MAVLink is a very lightweight message transmission protocol used for communication between ground control terminals (ground stations) and drones (as well as between onboard drone components).

Mavlink follows a modern hybrid publish-subscribe and point-to-point design pattern: data streams are sent/published as  topics  , while configuration subprotocols (such as  pathpoint protocols  or  parameter protocols ) are point-to-point patterns based on retransmission mechanisms.

The message content is defined in the xml file associated with it . Each xml file corresponds to a specific MAVLink system and defines a dedicated message set for the system (also called a " language dialect "). The " common message set " used by most  ground stations and autopilots is defined in  common.xml  (most " language branches " are built based on the " common message set "  : that is, most " language branches " correspond to xml files include common.xml ) .

Note

The MAVLink library based on the C package is a header-only library that is highly optimized for the limited ram and flash memory of resource-constrained systems. This library, which has been field-proven and deployed in many products, serves as an interactive interface between components from different manufacturers.

MAVLink was first released by Lorenz Meier in early 2009 and has a considerable number of contributors so far .

Guess you like

Origin blog.csdn.net/qq_20016593/article/details/135341127