10 Modem control using KISS protocol extension
sh123 edytuje tę stronę 2023-11-17 14:29:37 +02:00

alt text alt text

When cfg.EnableKissExtensions/CFG_KISS_EXTENSIONS configuration parameter is set to true modem will be able to handle

  • SetHardware KISS command 6 for setting modem parameters, note, that it is not compatible with classical KISS format
  • will send event about signal level with KISS command 7
  • reboot when command 8 is received

All commands are operating on KISS port 0.

This way client application (such as Codec2 Walkie-Talkie) can display signal levels and change modem parameters dynamically.

Payloads for commands are sent and expected as big endian and defined as:

  // KISS SetHardware 6
  struct SetHardware {
    uint32_t freqRx;
    uint32_t freqTx;
    uint8_t modType;   // 0 - LoRa, 1 - FSK
    int16_t pwr;
    uint32_t bw;
    uint16_t sf;
    uint16_t cr;
    uint16_t sync;
    uint8_t crc;
    uint32_t fskBitRate;
    uint32_t fskFreqDev;
    uint32_t fskRxBw;
  } __attribute__((packed));
  
  // KISS command 7
  struct SignalReport {
    int16_t rssi;
    int16_t snr;  // snr * 100
  } __attribute__((packed));

  // KISS command 8
  struct Reboot {
  } __attribute__((packed));

  // KISS command 9
  struct Telemetry {
    int16_t batteryVoltage;  // voltage * 100
  } __attribute__((packed));