Communication with devices
VSM can communicate with Vehicle over different communication channels Currently supported channels are below:
Serial port configuration
VSM which communicates with vehicles via serial ports should define at least one serial port, otherwise, VSM will not try to connect to the vehicles. Port name and baud rate should be both defined.
Port name.
Required
• Name: connection.serial.[index].name = [regular expression]
• Description: Ports that should be used to connect to the vehicles by the given VSM. Port names are defined by a [regular expression] which can be used to define just a single port or create a port filtering regular expression. Expression is case insensitive on Windows. [index] is an arbitrary port indexing name.
• Example:
connection.serial.1.name = /dev/ttyUSB[0-9]+|com[0-9]+
• Example:
connection.serial.2.name = com42
Port baud rate.
Required
• Name: connection.serial.[index].baud.[baud index] = [baud]
• Description: Baud rate for port opening. [baud index] is an optional arbitrary name used when it is necessary to open the same serial port using multiple baud rates. [index] is an arbitrary port indexing name.
• Example:
connection.serial.1.baud.1 = 9600
• Example:
connection.serial.1.baud.2 = 57600
• Example:
connection.serial.2.baud = 38400
Excluded port name.
Optional
• Name: connection.serial.exclude.[exclude index] = [regular expression]
• Description: Ports that should not be used for vehicle access by this VSM. Port names are defined by a [regular expression] which can be used to define just a single port or create a port filtering regular expression. The filter is case-insensitive on Windows. [exclude index] is an arbitrary indexing name used when more than one exclude name is defined.
• Example:
connection.serial.exclude.1 = /dev/ttyS.∗
• Example:
connection.serial.exclude = com1
Serial port arbiter.
Optional
• Name: connection.serial.use_arbiter = [yes|no]
• Description: Enable (yes) or disable (no) serial port access arbitration between VSMs running on the same machine. It is recommended to have it enabled to avoid situations when multiple VSMs try to open the same port simultaneously.
• Default: yes
• Example:
connection.serial.use_arbiter = no
Outgoing TCP connection configuration
VSM can be configured to connect to the vehicle via TCP. VSM will try to establish a connection to the specified address:port.
Used to connect to vehicle simulator or when the vehicle is equipped with a WiFi adapter.
Remote TCP port.
Required
• Name: connection.tcp_out.[index].port = [port number]
• Description: Remote port to connect to.
• Example:
connection.tcp_out.1.port = 5762
IP-address for outgoing TCP connection.
Required
• Name: connection.tcp_out.[index].address = [IP-address]
• Description: IP-address of the vehicle to connect to.
• Example:
connection.tcp_out.1.address = 10.0.0.111
Incoming TCP connection configuration
VSM can be configured to listen for incoming TCP connections from the vehicle. Multiple vehicles are supported on the same port.
Used to connect to a vehicle equipped with a WiFi adapter.
Local listening TCP port.
Required
• Name: connection.tcp_in.[index].local_port = [port number]
• Description: Remote port to connect to.
• Example:
connection.tcp_in.1.local_port = 5762
Local IP address.
Optional
• Name: connection.tcp_in.[index].local_address = [IP-address]
• Description: Local IP address to bind to.
• Default: 0.0.0.0 (all interfaces)
• Example:
connection.tcp_in.1.local_address = 127.0.0.1
Outgoing UDP connection configuration
VSM can be configured to connect to the vehicle via UDP. VSM will try to establish a UDP connection to the specified address:port.
Remote IP address for UDP.
Required
• Name: connection.udp_out.[index].address = [IP-address]
• Description: Remote IP-address to send outgoing UDP packets to.
• Example:
connection.udp_out.1.address = 192.168.1.1
Remote UDP port.
Required
• Name: connection.udp_out.[index].port = [port number]
• Description: Remote UDP port to send outgoing packets to.
• Example: connection.udp_out.1.port = 14551
connection.udp_out.1.port = 14551
Local IP-address for UDP.
Optional
• Name: connection.udp_out.[index].local_address = [IP-address]
• Description: Local IP address to bind to.
• Default: 0.0.0.0 (bind to all interfaces)
• Example:
connection.udp_out.1.local_address = 0.0.0.0
Local UDP port.
Optional
• Name: connection.udp_out.[index].local_port = [port number]
• Description: Local UDP port to listen for incoming packets on.
• Default: 0 (bind to random port)
• Example:
connection.udp_out.1.local_port = 14550
Incoming UDP connection configuration
VSM can be configured to listen for UDP connections from the vehicle. The vehicle must be actively sending heartbeat/telemetry on a specified UDP port before it can be detected by VSM. VSM will automatically detect multiple vehicles on the same port. This is very useful for "drone swarm" setups as there is no need to specify a connector for each vehicle and no need to know the IP address of each vehicle in advance.
Local UDP port.
Required
• Name: connection.udp_in.[index].local_port = [port number]
• Description: Local UDP port to listen for incoming packets on.
• Example:
connection.udp_in.1.local_port = 14550
Local IP-address for UDP.
Optional
• Name: connection.udp_in.[index].local_address = [IP-address]
• Description: Local ip address to bind to.
• Default: 0.0.0.0 (bind to all interfaces)
• Example: connection.udp_in.1.local_address = 0.0.0.0
connection.udp_in.1.local_address = 0.0.0.0
Incoming UDP connection configuration (any peer)
This connection type is similar to "udp_in" with the exception that all incoming traffic will be received as one stream. It is used for special-purpose connections and cannot be used to connect vehicles.
Local UDP port.
Required
• Name: connection.udp_any.[index].local_port = [port number]
• Description: Local UDP port to listen for incoming packets on.
• Example:
connection.udp_any.1.local_port = 14550
Local IP-address for UDP.
Optional
• Name: connection.udp_any.[index].local_address = [IP-address]
• Description: Local ip address to bind to.
• Default: 0.0.0.0 (bind to all interfaces)
• Example: connection.udp_any.1.local_address = 0.0.0.0
connection.udp_any.1.local_address = 0.0.0.0
Named pipes
VSM is able to communicate with vehicles over the named pipe. The pipe must already exist.
• Name: connection.pipe.[index].port = pipe_name
• Description: Pipe name
• Example:
connection.pipe.1.name = \\pipe\my_named_pipe
Proxy configuration
VSM is able to communicate with vehicles via proxy service which redirects dataflow received from vehicles through TCP connection to VSM and vice versa using a specific protocol. In other words, the proxy service appears as a router between vehicles and VSM. At the moment there is one implementation of proxy in UgCS called XBee Connector, which retranslates data from the ZigBee network to the respective VSM.
IP-address for proxy.
Required
• Name: connection.proxy.[index].address = [IP-address]
• Description: IP-address to connect proxy to. Specify local or remote addresses.
• Example:
connection.proxy.1.address = 127.0.0.1
TCP port for proxy.
Required
• Name: connection.proxy.[index].port = [port number]
• Description: TCP port to be connected with proxy through. Should be the same as in the configuration on the proxy side.
• Example:
connection.proxy.1.port = 5566
Updated almost 2 years ago