Comm ports

Nodes: nav sim com ifc | Module: ports.vcp | Parameters: ports

This feature provides physical serial ports mapping to Virtual Comm Ports (VCP). All VCP ports are accessible by other modules and addressed by id number.

Usage examples

  • Protocols module can use VCP to communicate to the physical device;
  • WASM script can use VCP to receive and transmit data;
  • VCP port can be forwarded to GCS to provide transparent serial connection with some payload physical serial port;
  • VCP port can be used to provide C2/telemetry communication with the GCS via user specific serial modem/datalink;
  • RS485 driver can be used to provide SBUS signal for servos, generated by protocol;

Configuration parameters

  • ports

    The VCP module defines various serial ports configurations in this group.

    • mode Interface mode option [off,NODE,LAN,NMT,BUS,TELEMETRY]
      • off: the PHY is powered off;
      • Addressable VCP modes. In the following modes the port will act as normal VCP data port, addressable via id:
        • NODE: VCP port received data is not broadcasted to other nodes in network, although it is available to all node resources;
        • LAN: VCP port received data is broadcasted to other nodes in network and is available to all nodes and their modules;
      • Network interface modes. The special port modes can be used to configure the PHY as standard APX bus network interface. Any received data packet is decoded by the node and forwarded to other nodes by hub module:
        • NMT: forward and decode NMT packets of the network, i.e. acts exactly like CAN bus interface, but filters everything except NMT packets;
        • BUS: network gate interface, forwards everything from the network;
        • TELEMETRY: C2/telemetry serial link, i.e. transmits telemetry data only;
    • name Description string

      Used as user comment only.

    • id Port id byte

      When the port is configured as VCP, this parameter holds its address.

    • baud Serial baud rate dword
    • parity Parity bit option [off,odd,even]
    • bits Stop bits option [1,2]
    • line Serial line mode option [RXTX,RX,TX]
    • codec Vcp packet codec option [off,COBS]

      COBS can be used to wrap packets and protect data integrity, i.e. all received or transmitted data will be decoded/encoded with the codec. See the source code for implementation details.